@univerjs/sheets-formula 0.1.13 → 0.1.14
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 +4 -4
- package/lib/es/index.js +958 -959
- package/lib/types/controllers/formula-editor-show.controller.d.ts +2 -2
- package/lib/types/controllers/formula-render.controller.d.ts +2 -5
- package/lib/types/controllers/prompt.controller.d.ts +2 -3
- package/lib/types/controllers/utils/utils.d.ts +6 -0
- package/lib/umd/index.js +4 -4
- package/package.json +41 -28
package/lib/es/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Disposable as ne, ObjectMatrix as j, Dimension as
|
|
1
|
+
var Ba = Object.defineProperty;
|
|
2
|
+
var Va = (a, e, t) => e in a ? Ba(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var q = (a, e, t) => (Va(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { Disposable as ne, ObjectMatrix as j, Dimension as Ln, OnLifecycle as ce, LifecycleStages as fe, IUniverInstanceService as de, CellValueType as Ue, ThemeService as an, ICommandService as ue, isFormulaString as Ee, isFormulaId as ge, Tools as te, Direction as w, CommandType as Pe, UniverInstanceType as Y, toDisposable as Q, ColorKit as Vn, Rectangle as _e, DEFAULT_EMPTY_DOCUMENT_VALUE as Ha, isRealNum as wa, getCellValueType as Ga, LocaleService as xe, FOCUSING_DOC as Xa, FOCUSING_UNIVER_EDITOR as Ya, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Wa, FOCUSING_EDITOR_INPUT_FORMULA as nt, DisposableCollection as Hn, RANGE_TYPE as Oe, AbsoluteRefType as Z, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ka, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ka, IContextService as $a, throttle as An, cellToRange as ja, RxDisposable as Qa, Plugin as za, DependentOn as Za } from "@univerjs/core";
|
|
5
5
|
import { Inject as y, Injector as Ot, createIdentifier as Mt } from "@wendellhu/redi";
|
|
6
|
-
import { SetDefinedNameMutation as
|
|
7
|
-
import { SetRangeValuesMutation as le, SetStyleCommand as on, MoveRangeMutation as
|
|
8
|
-
import { DATA_TYPE as
|
|
9
|
-
import { IRenderManagerService as
|
|
10
|
-
import { IEditorService as
|
|
11
|
-
import { useDependency as me, connectInjector as
|
|
12
|
-
import { Subject as
|
|
13
|
-
import
|
|
14
|
-
import { Popup as
|
|
15
|
-
import { ReplaceContentCommand as
|
|
16
|
-
const
|
|
17
|
-
var
|
|
18
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
6
|
+
import { SetDefinedNameMutation as Pn, RemoveDefinedNameMutation as bn, FormulaDataModel as $e, IActiveDirtyManagerService as rn, IDefinedNamesService as wn, SetArrayFormulaDataMutation as Nt, stripErrorMargin as Gn, LexerTreeBuilder as Be, ErrorType as W, SetFormulaCalculationResultMutation as Xn, sequenceNodeType as ie, serializeRange as ke, FUNCTION_NAMES_COMPATIBILITY as B, FunctionType as r, FUNCTION_NAMES_CUBE as Ne, FUNCTION_NAMES_DATABASE as ae, FUNCTION_NAMES_DATE as G, FUNCTION_NAMES_ENGINEERING as O, FUNCTION_NAMES_FINANCIAL as _, FUNCTION_NAMES_INFORMATION as $, FUNCTION_NAMES_LOGICAL as z, FUNCTION_NAMES_LOOKUP as V, FUNCTION_NAMES_MATH as N, FUNCTION_NAMES_STATISTICAL as P, FUNCTION_NAMES_TEXT as x, FUNCTION_NAMES_WEB as yt, isReferenceStrings as Ja, functionArray as ei, functionCompatibility as ti, functionCube as ni, functionDatabase as ai, functionDate as ii, functionEngineering as ri, functionFinancial as ui, functionInformation as oi, functionLogical as mi, functionLookup as ci, functionMath as fi, functionMeta as si, functionStatistical as li, functionText as di, functionUniver as pi, functionWeb as Li, IFunctionService as Yn, ERROR_TYPE_SET as Ai, matchToken as ye, matchRefDrawToken as Tn, compareToken as Ft, deserializeRangeWithSheet as De, normalizeSheetName as Pi, serializeRangeToRefString as st, generateStringWithSequence as un, getAbsoluteRefTypeWitString as bi, SetFormulaCalculationStartMutation as En, SetFormulaCalculationNotificationMutation as Ti, FormulaExecuteStageType as Ut, FormulaExecutedStateType as Fe, SetFormulaDataMutation as at, initSheetFormulaData as Sn, RegisterFunctionMutation as Ei, UnregisterFunctionMutation as Si, serializeRangeWithSpreadsheet as Ii, serializeRangeWithSheet as Ni, SetOtherFormulaMutation as Ri, RemoveOtherFormulaMutation as Ci, UniverFormulaEnginePlugin as hi } from "@univerjs/engine-formula";
|
|
7
|
+
import { SetRangeValuesMutation as le, SetStyleCommand as on, MoveRangeMutation as In, MoveRowsMutation as Nn, MoveColsMutation as Rn, RemoveRowMutation as Cn, RemoveColMutation as hn, RemoveSheetMutation as kt, InsertSheetMutation as $t, SetDefinedNameCommand as jt, INTERCEPTOR_POINT as mn, SheetInterceptorService as Dt, SetRangeValuesUndoMutationFactory as _i, SetRangeValuesCommand as Oi, SelectionManagerService as cn, getSheetCommandTarget as Mi, getCellAtRowCol as Di, SetSelectionsOperation as gi, NORMAL_SELECTION_PLUGIN_NAME as he, WorkbookEditablePermission as Wn, WorksheetEditPermission as Kn, WorksheetSetCellValuePermission as kn, RangeProtectionPermissionEditPoint as $n, convertSelectionDataToRange as Bt, getNormalSelectionStyle as xi, setEndForRange as vi, getPrimaryForRange as qi, SetBorderCommand as jn, ClearSelectionFormatCommand as Qn, INumfmtService as yi, handleMoveRange as zn, EffectRefRangId as K, runRefRangeMutations as k, handleMoveRows as Zn, handleMoveCols as Jn, handleInsertRow as ea, handleInsertCol as ta, handleIRemoveRow as na, handleIRemoveCol as aa, handleDeleteRangeMoveLeft as ia, handleDeleteRangeMoveUp as ra, handleInsertRangeMoveDown as ua, handleInsertRangeMoveRight as oa, RemoveSheetCommand as Fi, SetWorksheetNameCommand as Ui, DeleteRangeMoveLeftCommand as Bi, DeleteRangeMoveUpCommand as Vi, RemoveColCommand as Hi, RemoveRowCommand as wi, InsertRangeMoveDownCommand as Gi, InsertRangeMoveRightCommand as Xi, InsertColCommand as Yi, InsertRowCommand as Wi, MoveColsCommand as Ki, MoveRowsCommand as ki, MoveRangeCommand as $i, SetWorksheetActiveOperation as ji, InsertDefinedNameCommand as Qi, RemoveDefinedNameCommand as zi, RefRangeService as Zi, handleDefaultRangeChangeWithEffectRefCommands as Ji } from "@univerjs/sheets";
|
|
8
|
+
import { DATA_TYPE as _n, APPLY_TYPE as er, IAutoFillService as tr, SheetPasteCommand as nr, COPY_TYPE as ma, PREDEFINED_HOOK_NAME as ar, ISheetClipboardService as ir, SelectionShape as rr, IEditorBridgeService as ca, SheetSkeletonManagerService as fa, ISelectionRenderService as sa, useActiveWorkbook as ur, getCurrentRangeDisable$ as la, PASTE_SPECIAL_MENU_ID as or, whenFormulaEditorActivated as je, getEditorObject as On, MoveSelectionCommand as it, JumpOver as Mn, ExpandSelectionCommand as Dn, CellAlertType as mr, HoverManagerService as cr, CellAlertManagerService as fr } from "@univerjs/sheets-ui";
|
|
9
|
+
import { IRenderManagerService as fn, DeviceInputEventType as se, getCellInfoInMergeData as sr, ITextSelectionRenderManager as lr } from "@univerjs/engine-render";
|
|
10
|
+
import { IEditorService as Qe, ISidebarService as dr, MenuGroup as pr, MenuItemType as sn, MenuPosition as Lr, getMenuHiddenObservable as Ar, IClipboardInterfaceService as Pr, KeyCode as H, MetaKeys as Se, ComponentManager as br, BuiltInUIPart as Tr, IMenuService as Er, IShortcutService as Sr, IUIPartsService as Ir, SetEditorResizeOperation as Nr, IContextMenuService as Rr, IProgressService as Cr } from "@univerjs/ui";
|
|
11
|
+
import { useDependency as me, connectInjector as hr } from "@wendellhu/redi/react-bindings";
|
|
12
|
+
import { Subject as Me, combineLatestWith as _r, map as We, Observable as Or, merge as gn, bufferTime as Mr, filter as Dr } from "rxjs";
|
|
13
|
+
import gr, { forwardRef as ze, useRef as da, createElement as Ze, useState as X, useEffect as Rt } from "react";
|
|
14
|
+
import { Popup as pa, Select as xr, Input as vr, Button as Vt } from "@univerjs/design";
|
|
15
|
+
import { ReplaceContentCommand as qr, MoveCursorOperation as yr, TextSelectionManagerService as Fr, DocViewModelManagerService as Ur } from "@univerjs/docs";
|
|
16
|
+
const La = "formula-ui";
|
|
17
|
+
var Br = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Hr = (a, e, t, n) => {
|
|
18
|
+
for (var i = n > 1 ? void 0 : n ? Vr(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
19
19
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
20
|
-
return n && i &&
|
|
21
|
-
},
|
|
20
|
+
return n && i && Br(e, t, i), i;
|
|
21
|
+
}, rt = (a, e) => (t, n) => e(t, n, a);
|
|
22
22
|
let lt = class extends ne {
|
|
23
23
|
constructor(a, e, t, n) {
|
|
24
24
|
super(), this._activeDirtyManagerService = a, this._univerInstanceService = e, this._formulaDataModel = t, this._definedNamesService = n, this._initialize();
|
|
@@ -38,24 +38,24 @@ let lt = class extends ne {
|
|
|
38
38
|
}), this._initialMove(), this._initialRowAndColumn(), this._initialSheet(), this._initialDefinedName();
|
|
39
39
|
}
|
|
40
40
|
_initialMove() {
|
|
41
|
-
this._activeDirtyManagerService.register(
|
|
42
|
-
commandId:
|
|
41
|
+
this._activeDirtyManagerService.register(In.id, {
|
|
42
|
+
commandId: In.id,
|
|
43
43
|
getDirtyData: (a) => {
|
|
44
44
|
const e = a.params;
|
|
45
45
|
return {
|
|
46
46
|
dirtyRanges: this._getMoveRangeMutationDirtyRange(e)
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
}), this._activeDirtyManagerService.register(
|
|
50
|
-
commandId:
|
|
49
|
+
}), this._activeDirtyManagerService.register(Nn.id, {
|
|
50
|
+
commandId: Nn.id,
|
|
51
51
|
getDirtyData: (a) => {
|
|
52
52
|
const e = a.params;
|
|
53
53
|
return {
|
|
54
54
|
dirtyRanges: this._getMoveRowsMutationDirtyRange(e)
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
}), this._activeDirtyManagerService.register(
|
|
58
|
-
commandId:
|
|
57
|
+
}), this._activeDirtyManagerService.register(Rn.id, {
|
|
58
|
+
commandId: Rn.id,
|
|
59
59
|
getDirtyData: (a) => {
|
|
60
60
|
const e = a.params;
|
|
61
61
|
return {
|
|
@@ -65,16 +65,16 @@ let lt = class extends ne {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
_initialRowAndColumn() {
|
|
68
|
-
this._activeDirtyManagerService.register(
|
|
69
|
-
commandId:
|
|
68
|
+
this._activeDirtyManagerService.register(Cn.id, {
|
|
69
|
+
commandId: Cn.id,
|
|
70
70
|
getDirtyData: (a) => {
|
|
71
71
|
const e = a.params;
|
|
72
72
|
return {
|
|
73
73
|
dirtyRanges: this._getRemoveRowOrColumnMutation(e, !0)
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
}), this._activeDirtyManagerService.register(
|
|
77
|
-
commandId:
|
|
76
|
+
}), this._activeDirtyManagerService.register(hn.id, {
|
|
77
|
+
commandId: hn.id,
|
|
78
78
|
getDirtyData: (a) => {
|
|
79
79
|
const e = a.params;
|
|
80
80
|
return {
|
|
@@ -99,14 +99,14 @@ let lt = class extends ne {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
_initialDefinedName() {
|
|
102
|
-
this._activeDirtyManagerService.register(
|
|
103
|
-
commandId:
|
|
102
|
+
this._activeDirtyManagerService.register(Pn.id, {
|
|
103
|
+
commandId: Pn.id,
|
|
104
104
|
getDirtyData: (a) => {
|
|
105
105
|
const e = a.params;
|
|
106
106
|
return { dirtyDefinedNameMap: this._getDefinedNameMutation(e) };
|
|
107
107
|
}
|
|
108
|
-
}), this._activeDirtyManagerService.register(
|
|
109
|
-
commandId:
|
|
108
|
+
}), this._activeDirtyManagerService.register(bn.id, {
|
|
109
|
+
commandId: bn.id,
|
|
110
110
|
getDirtyData: (a) => {
|
|
111
111
|
const e = a.params;
|
|
112
112
|
return { dirtyDefinedNameMap: this._getDefinedNameMutation(e) };
|
|
@@ -139,12 +139,12 @@ let lt = class extends ne {
|
|
|
139
139
|
const { subUnitId: e, unitId: t, range: n, shiftDimension: i } = a, u = [], o = this._univerInstanceService.getUniverSheetInstance(t), m = o == null ? void 0 : o.getSheetBySheetId(e), c = (m == null ? void 0 : m.getLastRowWithContent()) || 0, f = (m == null ? void 0 : m.getLastColumnWithContent()) || 0, d = new j();
|
|
140
140
|
let s = null;
|
|
141
141
|
const { startRow: l, startColumn: L, endRow: b, endColumn: E } = n;
|
|
142
|
-
i ===
|
|
142
|
+
i === Ln.ROWS ? s = this._rangeToMatrix({
|
|
143
143
|
startRow: l,
|
|
144
144
|
startColumn: L,
|
|
145
145
|
endRow: c,
|
|
146
146
|
endColumn: E
|
|
147
|
-
}) : i ===
|
|
147
|
+
}) : i === Ln.COLUMNS && (s = this._rangeToMatrix({
|
|
148
148
|
startRow: l,
|
|
149
149
|
startColumn: L,
|
|
150
150
|
endRow: b,
|
|
@@ -225,18 +225,18 @@ let lt = class extends ne {
|
|
|
225
225
|
return n;
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
lt =
|
|
228
|
+
lt = Hr([
|
|
229
229
|
ce(fe.Ready, lt),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
rt(0, rn),
|
|
231
|
+
rt(1, de),
|
|
232
|
+
rt(2, y($e)),
|
|
233
|
+
rt(3, wn)
|
|
234
234
|
], lt);
|
|
235
|
-
var
|
|
236
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
235
|
+
var wr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, Xr = (a, e, t, n) => {
|
|
236
|
+
for (var i = n > 1 ? void 0 : n ? Gr(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
237
237
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
238
|
-
return n && i &&
|
|
239
|
-
},
|
|
238
|
+
return n && i && wr(e, t, i), i;
|
|
239
|
+
}, ut = (a, e) => (t, n) => e(t, n, a);
|
|
240
240
|
let dt = class extends ne {
|
|
241
241
|
constructor(a, e, t, n) {
|
|
242
242
|
super(), this._commandService = a, this._sheetInterceptorService = e, this._formulaDataModel = t, this._themeService = n, this._initialize();
|
|
@@ -247,7 +247,7 @@ let dt = class extends ne {
|
|
|
247
247
|
_commandExecutedListener() {
|
|
248
248
|
this.disposeWithMe(
|
|
249
249
|
this._commandService.onCommandExecuted((a) => {
|
|
250
|
-
if (a.id !==
|
|
250
|
+
if (a.id !== Nt.id)
|
|
251
251
|
return;
|
|
252
252
|
const e = a.params;
|
|
253
253
|
if (e == null)
|
|
@@ -269,25 +269,29 @@ let dt = class extends ne {
|
|
|
269
269
|
...c,
|
|
270
270
|
v: 0,
|
|
271
271
|
// Default value for empty cell
|
|
272
|
-
t:
|
|
272
|
+
t: Ue.NUMBER
|
|
273
|
+
}) : (a == null ? void 0 : a.t) === Ue.NUMBER && typeof (a == null ? void 0 : a.v) == "number" ? t({
|
|
274
|
+
...a,
|
|
275
|
+
...c,
|
|
276
|
+
v: Gn(a.v)
|
|
273
277
|
}) : t({ ...a, ...c });
|
|
274
278
|
}
|
|
275
279
|
})
|
|
276
280
|
);
|
|
277
281
|
}
|
|
278
282
|
};
|
|
279
|
-
dt =
|
|
283
|
+
dt = Xr([
|
|
280
284
|
ce(fe.Ready, dt),
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
+
ut(0, ue),
|
|
286
|
+
ut(1, y(Dt)),
|
|
287
|
+
ut(2, y($e)),
|
|
288
|
+
ut(3, y(an))
|
|
285
289
|
], dt);
|
|
286
|
-
var
|
|
287
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
290
|
+
var Yr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Kr = (a, e, t, n) => {
|
|
291
|
+
for (var i = n > 1 ? void 0 : n ? Wr(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
288
292
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
289
|
-
return n && i &&
|
|
290
|
-
},
|
|
293
|
+
return n && i && Yr(e, t, i), i;
|
|
294
|
+
}, xn = (a, e) => (t, n) => e(t, n, a);
|
|
291
295
|
let pt = class extends ne {
|
|
292
296
|
constructor(a, e) {
|
|
293
297
|
super(), this._autoFillService = a, this._lexerTreeBuilder = e, this._initialize();
|
|
@@ -297,12 +301,12 @@ let pt = class extends ne {
|
|
|
297
301
|
}
|
|
298
302
|
_registerAutoFill() {
|
|
299
303
|
const a = {
|
|
300
|
-
type:
|
|
304
|
+
type: _n.FORMULA,
|
|
301
305
|
priority: 1001,
|
|
302
|
-
match: (e) =>
|
|
303
|
-
isContinue: (e, t) => e.type ===
|
|
306
|
+
match: (e) => Ee(e == null ? void 0 : e.f) || ge(e == null ? void 0 : e.si),
|
|
307
|
+
isContinue: (e, t) => e.type === _n.FORMULA,
|
|
304
308
|
applyFunctions: {
|
|
305
|
-
[
|
|
309
|
+
[er.COPY]: (e, t, n, i) => {
|
|
306
310
|
const { data: u, index: o } = e;
|
|
307
311
|
return this._fillCopyFormula(u, t, n, o, i);
|
|
308
312
|
}
|
|
@@ -312,12 +316,12 @@ let pt = class extends ne {
|
|
|
312
316
|
}
|
|
313
317
|
_fillCopyFormula(a, e, t, n, i) {
|
|
314
318
|
var c, f;
|
|
315
|
-
const u =
|
|
319
|
+
const u = $r(i), o = [], m = /* @__PURE__ */ new Map();
|
|
316
320
|
for (let d = 1; d <= e; d++) {
|
|
317
321
|
const s = (d - 1) % a.length, l = te.deepClone(a[s]);
|
|
318
322
|
if (l) {
|
|
319
|
-
const L = ((c = a[s]) == null ? void 0 : c.f) || "", b = ((f = a[s]) == null ? void 0 : f.si) || "", E =
|
|
320
|
-
if (
|
|
323
|
+
const L = ((c = a[s]) == null ? void 0 : c.f) || "", b = ((f = a[s]) == null ? void 0 : f.si) || "", E = Ee(L);
|
|
324
|
+
if (ge(b))
|
|
321
325
|
l.si = b, l.f = null, l.v = null, l.p = null, t === w.DOWN || t === w.RIGHT ? o.push(l) : o.unshift(l);
|
|
322
326
|
else if (E) {
|
|
323
327
|
let R = m.get(s);
|
|
@@ -325,7 +329,7 @@ let pt = class extends ne {
|
|
|
325
329
|
l.si = R, l.f = null, l.v = null, l.p = null;
|
|
326
330
|
else {
|
|
327
331
|
R = te.generateRandomId(6), m.set(s, R);
|
|
328
|
-
const { offsetX: T, offsetY: A } =
|
|
332
|
+
const { offsetX: T, offsetY: A } = kr(u, t), h = this._lexerTreeBuilder.moveFormulaRefOffset(
|
|
329
333
|
L,
|
|
330
334
|
T,
|
|
331
335
|
A
|
|
@@ -339,12 +343,12 @@ let pt = class extends ne {
|
|
|
339
343
|
return o;
|
|
340
344
|
}
|
|
341
345
|
};
|
|
342
|
-
pt =
|
|
346
|
+
pt = Kr([
|
|
343
347
|
ce(fe.Ready, pt),
|
|
344
|
-
|
|
345
|
-
|
|
348
|
+
xn(0, tr),
|
|
349
|
+
xn(1, y(Be))
|
|
346
350
|
], pt);
|
|
347
|
-
function
|
|
351
|
+
function kr(a, e) {
|
|
348
352
|
let t = 0, n = 0;
|
|
349
353
|
switch (e) {
|
|
350
354
|
case w.UP:
|
|
@@ -362,7 +366,7 @@ function Yr(a, e) {
|
|
|
362
366
|
}
|
|
363
367
|
return { offsetX: t, offsetY: n };
|
|
364
368
|
}
|
|
365
|
-
function
|
|
369
|
+
function $r(a) {
|
|
366
370
|
let e = 0;
|
|
367
371
|
for (const t in a)
|
|
368
372
|
a[t].forEach((n) => {
|
|
@@ -370,19 +374,19 @@ function Wr(a) {
|
|
|
370
374
|
});
|
|
371
375
|
return e;
|
|
372
376
|
}
|
|
373
|
-
const
|
|
377
|
+
const Aa = "special-paste-formula", Pa = {
|
|
374
378
|
id: "sheet.command.paste-formula",
|
|
375
379
|
type: Pe.COMMAND,
|
|
376
|
-
handler: async (a) => a.get(ue).executeCommand(
|
|
377
|
-
value:
|
|
380
|
+
handler: async (a) => a.get(ue).executeCommand(nr.id, {
|
|
381
|
+
value: Aa
|
|
378
382
|
})
|
|
379
383
|
};
|
|
380
|
-
var
|
|
381
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
384
|
+
var jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, zr = (a, e, t, n) => {
|
|
385
|
+
for (var i = n > 1 ? void 0 : n ? Qr(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
382
386
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
383
|
-
return n && i &&
|
|
384
|
-
},
|
|
385
|
-
const
|
|
387
|
+
return n && i && jr(e, t, i), i;
|
|
388
|
+
}, ot = (a, e) => (t, n) => e(t, n, a);
|
|
389
|
+
const Zr = "default-paste-formula";
|
|
386
390
|
let Lt = class extends ne {
|
|
387
391
|
constructor(a, e, t, n) {
|
|
388
392
|
super(), this._currentUniverSheet = a, this._lexerTreeBuilder = e, this._sheetClipboardService = t, this._injector = n, this._initialize();
|
|
@@ -395,7 +399,7 @@ let Lt = class extends ne {
|
|
|
395
399
|
}
|
|
396
400
|
_pasteFormulaHook() {
|
|
397
401
|
return {
|
|
398
|
-
id:
|
|
402
|
+
id: Aa,
|
|
399
403
|
priority: 10,
|
|
400
404
|
specialPasteInfo: { label: "specialPaste.formula" },
|
|
401
405
|
onPasteCells: (a, e, t, n) => this._onPasteCells(a, e, t, n, !0)
|
|
@@ -403,18 +407,18 @@ let Lt = class extends ne {
|
|
|
403
407
|
}
|
|
404
408
|
_pasteWithFormulaHook() {
|
|
405
409
|
return {
|
|
406
|
-
id:
|
|
410
|
+
id: Zr,
|
|
407
411
|
priority: 10,
|
|
408
412
|
onPasteCells: (a, e, t, n) => this._onPasteCells(a, e, t, n, !1)
|
|
409
413
|
};
|
|
410
414
|
}
|
|
411
415
|
_onPasteCells(a, e, t, n, i) {
|
|
412
416
|
const u = {
|
|
413
|
-
copyType: n.copyType ||
|
|
417
|
+
copyType: n.copyType || ma.COPY,
|
|
414
418
|
copyRange: a == null ? void 0 : a.range,
|
|
415
419
|
pasteType: n.pasteType
|
|
416
420
|
}, o = e.range, m = t, c = this._currentUniverSheet.getCurrentUnitForType(Y.UNIVER_SHEET), f = c.getUnitId(), d = c.getActiveSheet().getSheetId();
|
|
417
|
-
return this._injector.invoke((s) =>
|
|
421
|
+
return this._injector.invoke((s) => Jr(
|
|
418
422
|
f,
|
|
419
423
|
d,
|
|
420
424
|
o,
|
|
@@ -426,36 +430,36 @@ let Lt = class extends ne {
|
|
|
426
430
|
));
|
|
427
431
|
}
|
|
428
432
|
};
|
|
429
|
-
Lt =
|
|
433
|
+
Lt = zr([
|
|
430
434
|
ce(fe.Ready, Lt),
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
ot(0, de),
|
|
436
|
+
ot(1, y(Be)),
|
|
437
|
+
ot(2, ir),
|
|
438
|
+
ot(3, y(Ot))
|
|
435
439
|
], Lt);
|
|
436
|
-
function
|
|
440
|
+
function Jr(a, e, t, n, i, u, o, m = !1) {
|
|
437
441
|
const c = [], f = [], d = new j(), s = /* @__PURE__ */ new Map();
|
|
438
442
|
let l = 0, L = 0;
|
|
439
443
|
if (u && u.copyRange) {
|
|
440
444
|
const { copyType: p, copyRange: R } = u;
|
|
441
|
-
p ===
|
|
445
|
+
p === ma.COPY && R && (l = R.rows.length, L = R.cols.length);
|
|
442
446
|
}
|
|
443
447
|
n.forValue((p, R, T) => {
|
|
444
|
-
var
|
|
448
|
+
var D, M;
|
|
445
449
|
const A = T.f || "", h = T.si || "";
|
|
446
450
|
let S = {};
|
|
447
451
|
if (m && (S = te.deepClone(T)), !(!l || !L)) {
|
|
448
|
-
if (
|
|
452
|
+
if (ge(h))
|
|
449
453
|
S.si = h, S.f = null, S.v = null, S.p = null;
|
|
450
|
-
else if (
|
|
451
|
-
const
|
|
454
|
+
else if (Ee(A) && u.pasteType === ar.DEFAULT_PASTE) {
|
|
455
|
+
const v = p % l, g = R % L, U = `${v}_${g}`;
|
|
452
456
|
let I = s.get(U);
|
|
453
457
|
if (I)
|
|
454
458
|
S.si = I, S.f = null, S.v = null, S.p = null;
|
|
455
459
|
else {
|
|
456
460
|
I = te.generateRandomId(6), s.set(U, I);
|
|
457
|
-
const F = u != null && u.copyRange ? (
|
|
458
|
-
S.si = I, S.f =
|
|
461
|
+
const F = u != null && u.copyRange ? (D = u == null ? void 0 : u.copyRange) == null ? void 0 : D.cols[g] : g, pe = u != null && u.copyRange ? (M = u == null ? void 0 : u.copyRange) == null ? void 0 : M.rows[v] : v, oe = t.cols[R] - F, Ie = t.rows[p] - pe, tt = o.moveFormulaRefOffset(A, oe, Ie);
|
|
462
|
+
S.si = I, S.f = tt, S.v = null, S.p = null;
|
|
459
463
|
}
|
|
460
464
|
}
|
|
461
465
|
d.setValue(t.rows[p], t.cols[R], S);
|
|
@@ -470,7 +474,7 @@ function Qr(a, e, t, n, i, u, o, m = !1) {
|
|
|
470
474
|
id: le.id,
|
|
471
475
|
params: b
|
|
472
476
|
});
|
|
473
|
-
const E =
|
|
477
|
+
const E = _i(
|
|
474
478
|
i,
|
|
475
479
|
b
|
|
476
480
|
);
|
|
@@ -482,15 +486,15 @@ function Qr(a, e, t, n, i, u, o, m = !1) {
|
|
|
482
486
|
redos: c
|
|
483
487
|
};
|
|
484
488
|
}
|
|
485
|
-
var
|
|
486
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
489
|
+
var eu = Object.defineProperty, tu = Object.getOwnPropertyDescriptor, nu = (a, e, t, n) => {
|
|
490
|
+
for (var i = n > 1 ? void 0 : n ? tu(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
487
491
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
488
|
-
return n && i &&
|
|
492
|
+
return n && i && eu(e, t, i), i;
|
|
489
493
|
}, Le = (a, e) => (t, n) => e(t, n, a);
|
|
490
|
-
let
|
|
494
|
+
let Ct = class extends ne {
|
|
491
495
|
constructor(e, t, n, i, u, o, m, c, f, d) {
|
|
492
496
|
super();
|
|
493
|
-
|
|
497
|
+
q(this, "_previousShape");
|
|
494
498
|
this._context = e, this._editorBridgeService = t, this._formulaDataModel = n, this._lexerTreeBuilder = i, this._themeService = u, this._renderManagerService = o, this._selectionRenderService = m, this._sheetSkeletonManagerService = c, this._commandService = f, this._sheetInterceptorService = d, this._initInterceptorEditorStart(), this._commandExecutedListener(), this._initInterceptorCell();
|
|
495
499
|
}
|
|
496
500
|
_initInterceptorEditorStart() {
|
|
@@ -512,12 +516,12 @@ let ht = class extends ne {
|
|
|
512
516
|
return L != null && new j(L).forValue((T, A, h) => {
|
|
513
517
|
if (h == null)
|
|
514
518
|
return !0;
|
|
515
|
-
const { startRow: S, startColumn:
|
|
519
|
+
const { startRow: S, startColumn: D, endRow: M, endColumn: v } = h;
|
|
516
520
|
if (T === i && A === u)
|
|
517
521
|
return this._createArrayFormulaRangeShape(h, o), !1;
|
|
518
|
-
if (i >= S && i <= M && u >=
|
|
519
|
-
const
|
|
520
|
-
if ((
|
|
522
|
+
if (i >= S && i <= M && u >= D && u <= v) {
|
|
523
|
+
const g = c.getCell(S, D);
|
|
524
|
+
if ((g == null ? void 0 : g.v) === W.SPILL)
|
|
521
525
|
return;
|
|
522
526
|
const U = this._formulaDataModel.getFormulaDataItem(
|
|
523
527
|
T,
|
|
@@ -544,7 +548,7 @@ let ht = class extends ne {
|
|
|
544
548
|
...e,
|
|
545
549
|
v: null,
|
|
546
550
|
// Default value for empty cell, information displayed before calculation
|
|
547
|
-
t:
|
|
551
|
+
t: Ue.NUMBER
|
|
548
552
|
}) : n(e),
|
|
549
553
|
priority: 10
|
|
550
554
|
})
|
|
@@ -552,12 +556,12 @@ let ht = class extends ne {
|
|
|
552
556
|
}
|
|
553
557
|
_commandExecutedListener() {
|
|
554
558
|
this.disposeWithMe(this._commandService.onCommandExecuted((e, t) => {
|
|
555
|
-
(e.id ===
|
|
559
|
+
(e.id === Xn.id || e.id === Nt.id && t && t.remove) && this._removeArrayFormulaRangeShape();
|
|
556
560
|
}));
|
|
557
561
|
}
|
|
558
562
|
_createArrayFormulaRangeShape(e, t) {
|
|
559
563
|
var L;
|
|
560
|
-
const n = this._themeService.getCurrentTheme(), i = new
|
|
564
|
+
const n = this._themeService.getCurrentTheme(), i = new Vn(n.colorWhite).setAlpha(0).toString(), u = {
|
|
561
565
|
strokeWidth: 1,
|
|
562
566
|
stroke: n.hyacinth700,
|
|
563
567
|
fill: i,
|
|
@@ -572,25 +576,25 @@ let ht = class extends ne {
|
|
|
572
576
|
}), f = (L = this._sheetSkeletonManagerService.getCurrent()) == null ? void 0 : L.skeleton;
|
|
573
577
|
if (!o || !f)
|
|
574
578
|
return;
|
|
575
|
-
const { rowHeaderWidth: d, columnHeaderHeight: s } = f, l = new
|
|
579
|
+
const { rowHeaderWidth: d, columnHeaderHeight: s } = f, l = new rr(o, 100, !1, this._themeService);
|
|
576
580
|
l.update(m, d, s, u, c), l.setEvent(!1), this._previousShape = l;
|
|
577
581
|
}
|
|
578
582
|
_removeArrayFormulaRangeShape() {
|
|
579
583
|
this._previousShape != null && (this._previousShape.dispose(), this._previousShape = null);
|
|
580
584
|
}
|
|
581
585
|
};
|
|
582
|
-
|
|
583
|
-
Le(1, y(
|
|
584
|
-
Le(2, y(
|
|
585
|
-
Le(3, y(
|
|
586
|
+
Ct = nu([
|
|
587
|
+
Le(1, y(ca)),
|
|
588
|
+
Le(2, y($e)),
|
|
589
|
+
Le(3, y(Be)),
|
|
586
590
|
Le(4, y(an)),
|
|
587
|
-
Le(5,
|
|
588
|
-
Le(6,
|
|
589
|
-
Le(7, y(
|
|
591
|
+
Le(5, fn),
|
|
592
|
+
Le(6, sa),
|
|
593
|
+
Le(7, y(fa)),
|
|
590
594
|
Le(8, ue),
|
|
591
595
|
Le(9, y(Dt))
|
|
592
|
-
],
|
|
593
|
-
const
|
|
596
|
+
], Ct);
|
|
597
|
+
const ba = {
|
|
594
598
|
id: "formula-ui.command.insert-function",
|
|
595
599
|
type: Pe.COMMAND,
|
|
596
600
|
handler: async (a, e) => {
|
|
@@ -611,9 +615,9 @@ const Ta = {
|
|
|
611
615
|
const u = {
|
|
612
616
|
value: i.getData()
|
|
613
617
|
};
|
|
614
|
-
return n.executeCommand(
|
|
618
|
+
return n.executeCommand(Oi.id, u);
|
|
615
619
|
}
|
|
616
|
-
},
|
|
620
|
+
}, ve = {
|
|
617
621
|
id: "formula-ui.operation.select-editor-formula",
|
|
618
622
|
type: Pe.OPERATION,
|
|
619
623
|
handler: (a, e) => (
|
|
@@ -645,26 +649,26 @@ const Ta = {
|
|
|
645
649
|
// }
|
|
646
650
|
!0
|
|
647
651
|
)
|
|
648
|
-
},
|
|
649
|
-
class
|
|
652
|
+
}, Ve = Mt("formula-ui.prompt-service");
|
|
653
|
+
class au {
|
|
650
654
|
constructor() {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
655
|
+
q(this, "_search$", new Me());
|
|
656
|
+
q(this, "_help$", new Me());
|
|
657
|
+
q(this, "_navigate$", new Me());
|
|
658
|
+
q(this, "_accept$", new Me());
|
|
659
|
+
q(this, "_acceptFormulaName$", new Me());
|
|
660
|
+
q(this, "search$", this._search$.asObservable());
|
|
661
|
+
q(this, "help$", this._help$.asObservable());
|
|
662
|
+
q(this, "navigate$", this._navigate$.asObservable());
|
|
663
|
+
q(this, "accept$", this._accept$.asObservable());
|
|
664
|
+
q(this, "acceptFormulaName$", this._acceptFormulaName$.asObservable());
|
|
665
|
+
q(this, "_searching", !1);
|
|
666
|
+
q(this, "_helping", !1);
|
|
667
|
+
q(this, "_isInsertRefString", !1);
|
|
668
|
+
q(this, "_sequenceNodes", []);
|
|
669
|
+
q(this, "_isSelectionMoving", !1);
|
|
670
|
+
q(this, "_isLockedOnSelectionChangeRefString", !1);
|
|
671
|
+
q(this, "_isLockedOnSelectionInsertRefString", !1);
|
|
668
672
|
}
|
|
669
673
|
dispose() {
|
|
670
674
|
this._search$.complete(), this._help$.complete(), this._navigate$.complete(), this._accept$.complete(), this._acceptFormulaName$.complete(), this._sequenceNodes = [];
|
|
@@ -814,44 +818,44 @@ class eu {
|
|
|
814
818
|
const Qt = {
|
|
815
819
|
id: "formula-ui.operation.help-function",
|
|
816
820
|
type: Pe.OPERATION,
|
|
817
|
-
handler: async (a, e) => (a.get(
|
|
818
|
-
},
|
|
821
|
+
handler: async (a, e) => (a.get(Ve).help(e), !0)
|
|
822
|
+
}, ln = {
|
|
819
823
|
id: "formula-ui.operation.insert-function",
|
|
820
824
|
type: Pe.OPERATION,
|
|
821
825
|
handler: async (a, e) => {
|
|
822
826
|
var R, T;
|
|
823
|
-
const t = a.get(cn), n = a.get(
|
|
827
|
+
const t = a.get(cn), n = a.get(Qe), i = t.getSelections();
|
|
824
828
|
if (!i || !i.length)
|
|
825
829
|
return !1;
|
|
826
|
-
const u =
|
|
830
|
+
const u = Mi(a.get(de));
|
|
827
831
|
if (!u)
|
|
828
832
|
return !1;
|
|
829
833
|
const { worksheet: o, unitId: m, subUnitId: c } = u, f = o.getCellMatrix(), { value: d } = e, s = a.get(ue), l = [];
|
|
830
834
|
let L = null, b = 0, E = 0, p = "";
|
|
831
|
-
if (i.length === 1 && (
|
|
832
|
-
const { range: A, primary: h } = i[0], S = (R = h == null ? void 0 : h.actualRow) != null ? R : A.startRow,
|
|
833
|
-
L = A, b = S, E =
|
|
834
|
-
const M =
|
|
835
|
-
M && (p =
|
|
835
|
+
if (i.length === 1 && (uu(i[0].range) || ou(i[0].range))) {
|
|
836
|
+
const { range: A, primary: h } = i[0], S = (R = h == null ? void 0 : h.actualRow) != null ? R : A.startRow, D = (T = h == null ? void 0 : h.actualColumn) != null ? T : A.startColumn;
|
|
837
|
+
L = A, b = S, E = D;
|
|
838
|
+
const M = vn(f, S, D);
|
|
839
|
+
M && (p = ke(M));
|
|
836
840
|
} else
|
|
837
841
|
i.some((A) => {
|
|
838
842
|
var I, F;
|
|
839
|
-
const { range: h, primary: S } = A,
|
|
840
|
-
if (!
|
|
841
|
-
return L = h, b =
|
|
842
|
-
const
|
|
843
|
+
const { range: h, primary: S } = A, D = (I = S == null ? void 0 : S.actualRow) != null ? I : h.startRow, M = (F = S == null ? void 0 : S.actualColumn) != null ? F : h.startColumn, v = vn(f, D, M);
|
|
844
|
+
if (!v)
|
|
845
|
+
return L = h, b = D, E = M, !0;
|
|
846
|
+
const g = ke(v), U = `=${d}(${g})`;
|
|
843
847
|
return l.push({
|
|
844
848
|
range: h,
|
|
845
849
|
primary: {
|
|
846
|
-
row:
|
|
850
|
+
row: D,
|
|
847
851
|
column: M
|
|
848
852
|
},
|
|
849
853
|
formula: U
|
|
850
854
|
}), !1;
|
|
851
855
|
});
|
|
852
856
|
if (L) {
|
|
853
|
-
const A =
|
|
854
|
-
range:
|
|
857
|
+
const A = Di(b, E, o), h = {
|
|
858
|
+
range: _e.clone(L),
|
|
855
859
|
primary: {
|
|
856
860
|
startRow: A.startRow,
|
|
857
861
|
startColumn: A.startColumn,
|
|
@@ -865,20 +869,20 @@ const Qt = {
|
|
|
865
869
|
}, S = {
|
|
866
870
|
unitId: m,
|
|
867
871
|
subUnitId: c,
|
|
868
|
-
pluginName:
|
|
872
|
+
pluginName: he,
|
|
869
873
|
selections: [h]
|
|
870
874
|
};
|
|
871
|
-
await s.executeCommand(
|
|
875
|
+
await s.executeCommand(gi.id, S), setTimeout(() => {
|
|
872
876
|
n.setFormula(`=${d}(${p}`);
|
|
873
877
|
}, 0);
|
|
874
878
|
}
|
|
875
|
-
return l.length === 0 ? !1 : s.executeCommand(
|
|
879
|
+
return l.length === 0 ? !1 : s.executeCommand(ba.id, {
|
|
876
880
|
list: l
|
|
877
881
|
});
|
|
878
882
|
}
|
|
879
883
|
};
|
|
880
|
-
function
|
|
881
|
-
const n =
|
|
884
|
+
function vn(a, e, t) {
|
|
885
|
+
const n = iu(a, e, t);
|
|
882
886
|
if (n !== e)
|
|
883
887
|
return {
|
|
884
888
|
startRow: n,
|
|
@@ -886,7 +890,7 @@ function qn(a, e, t) {
|
|
|
886
890
|
startColumn: t,
|
|
887
891
|
endColumn: t
|
|
888
892
|
};
|
|
889
|
-
const i =
|
|
893
|
+
const i = ru(a, e, t);
|
|
890
894
|
return i !== t ? {
|
|
891
895
|
startRow: e,
|
|
892
896
|
endRow: e,
|
|
@@ -894,18 +898,18 @@ function qn(a, e, t) {
|
|
|
894
898
|
endColumn: t - 1
|
|
895
899
|
} : null;
|
|
896
900
|
}
|
|
897
|
-
function
|
|
901
|
+
function iu(a, e, t) {
|
|
898
902
|
let n = !1;
|
|
899
903
|
if (e === 0)
|
|
900
904
|
return e;
|
|
901
905
|
for (let i = e - 1; i >= 0; i--) {
|
|
902
906
|
const u = a.getValue(i, t);
|
|
903
|
-
if (
|
|
907
|
+
if (ht(u) && !n) {
|
|
904
908
|
if (i === 0)
|
|
905
909
|
return 0;
|
|
906
910
|
n = !0;
|
|
907
911
|
} else {
|
|
908
|
-
if (n && !
|
|
912
|
+
if (n && !ht(u))
|
|
909
913
|
return i + 1;
|
|
910
914
|
if (n && i === 0)
|
|
911
915
|
return 0;
|
|
@@ -913,18 +917,18 @@ function tu(a, e, t) {
|
|
|
913
917
|
}
|
|
914
918
|
return e;
|
|
915
919
|
}
|
|
916
|
-
function
|
|
920
|
+
function ru(a, e, t) {
|
|
917
921
|
let n = !1;
|
|
918
922
|
if (t === 0)
|
|
919
923
|
return t;
|
|
920
924
|
for (let i = t - 1; i >= 0; i--) {
|
|
921
925
|
const u = a.getValue(e, i);
|
|
922
|
-
if (
|
|
926
|
+
if (ht(u) && !n) {
|
|
923
927
|
if (i === 0)
|
|
924
928
|
return 0;
|
|
925
929
|
n = !0;
|
|
926
930
|
} else {
|
|
927
|
-
if (n && !
|
|
931
|
+
if (n && !ht(u))
|
|
928
932
|
return i + 1;
|
|
929
933
|
if (n && i === 0)
|
|
930
934
|
return 0;
|
|
@@ -932,39 +936,39 @@ function nu(a, e, t) {
|
|
|
932
936
|
}
|
|
933
937
|
return t;
|
|
934
938
|
}
|
|
935
|
-
function
|
|
939
|
+
function ht(a) {
|
|
936
940
|
if (a != null && a.p) {
|
|
937
941
|
const e = a == null ? void 0 : a.p.body;
|
|
938
942
|
if (e == null)
|
|
939
943
|
return !1;
|
|
940
|
-
const t = e.dataStream, i = t.substring(t.length - 2, t.length) ===
|
|
941
|
-
return
|
|
944
|
+
const t = e.dataStream, i = t.substring(t.length - 2, t.length) === Ha ? t.substring(0, t.length - 2) : t;
|
|
945
|
+
return wa(i);
|
|
942
946
|
}
|
|
943
|
-
return a && (a.t ===
|
|
947
|
+
return a && (a.t === Ue.NUMBER || Ga(a) === Ue.NUMBER);
|
|
944
948
|
}
|
|
945
|
-
function
|
|
949
|
+
function uu(a) {
|
|
946
950
|
return a.startRow === a.endRow && a.startColumn === a.endColumn;
|
|
947
951
|
}
|
|
948
|
-
function
|
|
952
|
+
function ou(a) {
|
|
949
953
|
return a.startRow !== a.endRow && a.startColumn !== a.endColumn;
|
|
950
954
|
}
|
|
951
|
-
const
|
|
955
|
+
const Ta = `${La}_MORE_FUNCTIONS_COMPONENT`, Ea = {
|
|
952
956
|
id: "formula-ui.operation.more-functions",
|
|
953
957
|
type: Pe.OPERATION,
|
|
954
|
-
handler: async (a) => (a.get(
|
|
958
|
+
handler: async (a) => (a.get(dr).open({
|
|
955
959
|
header: { title: "formula.insert.tooltip" },
|
|
956
|
-
children: { label:
|
|
960
|
+
children: { label: Ta }
|
|
957
961
|
}), !0)
|
|
958
|
-
},
|
|
962
|
+
}, dn = {
|
|
959
963
|
id: "formula-ui.operation.change-ref-to-absolute",
|
|
960
964
|
type: Pe.OPERATION,
|
|
961
965
|
handler: async (a) => !0
|
|
962
966
|
}, zt = {
|
|
963
967
|
id: "formula-ui.operation.search-function",
|
|
964
968
|
type: Pe.OPERATION,
|
|
965
|
-
handler: async (a, e) => (a.get(
|
|
969
|
+
handler: async (a, e) => (a.get(Ve).search(e), !0)
|
|
966
970
|
};
|
|
967
|
-
var
|
|
971
|
+
var Sa = { exports: {} }, gt = {};
|
|
968
972
|
/**
|
|
969
973
|
* @license React
|
|
970
974
|
* react-jsx-runtime.production.min.js
|
|
@@ -974,22 +978,22 @@ var Ia = { exports: {} }, gt = {};
|
|
|
974
978
|
* This source code is licensed under the MIT license found in the
|
|
975
979
|
* LICENSE file in the root directory of this source tree.
|
|
976
980
|
*/
|
|
977
|
-
var
|
|
978
|
-
function
|
|
981
|
+
var mu = gr, cu = Symbol.for("react.element"), fu = Symbol.for("react.fragment"), su = Object.prototype.hasOwnProperty, lu = mu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, du = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
982
|
+
function Ia(a, e, t) {
|
|
979
983
|
var n, i = {}, u = null, o = null;
|
|
980
984
|
t !== void 0 && (u = "" + t), e.key !== void 0 && (u = "" + e.key), e.ref !== void 0 && (o = e.ref);
|
|
981
985
|
for (n in e)
|
|
982
|
-
|
|
986
|
+
su.call(e, n) && !du.hasOwnProperty(n) && (i[n] = e[n]);
|
|
983
987
|
if (a && a.defaultProps)
|
|
984
988
|
for (n in e = a.defaultProps, e)
|
|
985
989
|
i[n] === void 0 && (i[n] = e[n]);
|
|
986
|
-
return { $$typeof:
|
|
990
|
+
return { $$typeof: cu, type: a, key: u, ref: o, props: i, _owner: lu.current };
|
|
987
991
|
}
|
|
988
|
-
gt.Fragment =
|
|
989
|
-
gt.jsx =
|
|
990
|
-
gt.jsxs =
|
|
991
|
-
|
|
992
|
-
var C =
|
|
992
|
+
gt.Fragment = fu;
|
|
993
|
+
gt.jsx = Ia;
|
|
994
|
+
gt.jsxs = Ia;
|
|
995
|
+
Sa.exports = gt;
|
|
996
|
+
var C = Sa.exports, re = function() {
|
|
993
997
|
return re = Object.assign || function(a) {
|
|
994
998
|
for (var e, t = 1, n = arguments.length; t < n; t++) {
|
|
995
999
|
e = arguments[t];
|
|
@@ -998,7 +1002,7 @@ var C = Ia.exports, re = function() {
|
|
|
998
1002
|
}
|
|
999
1003
|
return a;
|
|
1000
1004
|
}, re.apply(this, arguments);
|
|
1001
|
-
},
|
|
1005
|
+
}, pu = function(a, e) {
|
|
1002
1006
|
var t = {};
|
|
1003
1007
|
for (var n in a)
|
|
1004
1008
|
Object.prototype.hasOwnProperty.call(a, n) && e.indexOf(n) < 0 && (t[n] = a[n]);
|
|
@@ -1006,16 +1010,16 @@ var C = Ia.exports, re = function() {
|
|
|
1006
1010
|
for (var i = 0, n = Object.getOwnPropertySymbols(a); i < n.length; i++)
|
|
1007
1011
|
e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(a, n[i]) && (t[n[i]] = a[n[i]]);
|
|
1008
1012
|
return t;
|
|
1009
|
-
},
|
|
1010
|
-
var t = a.icon, n = a.id, i = a.className, u = a.extend, o =
|
|
1011
|
-
return
|
|
1013
|
+
}, Je = ze(function(a, e) {
|
|
1014
|
+
var t = a.icon, n = a.id, i = a.className, u = a.extend, o = pu(a, ["icon", "id", "className", "extend"]), m = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), c = da("_".concat(Pu()));
|
|
1015
|
+
return Na(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, re({ ref: e, className: m }, o), u);
|
|
1012
1016
|
});
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
1015
|
-
return
|
|
1017
|
+
function Na(a, e, t, n, i) {
|
|
1018
|
+
return Ze(a.tag, re(re({ key: e }, Lu(a, t, i)), n), (Au(a, t).children || []).map(function(u, o) {
|
|
1019
|
+
return Na(u, "".concat(e, "-").concat(a.tag, "-").concat(o), t, void 0, i);
|
|
1016
1020
|
}));
|
|
1017
1021
|
}
|
|
1018
|
-
function
|
|
1022
|
+
function Lu(a, e, t) {
|
|
1019
1023
|
var n = re({}, a.attrs);
|
|
1020
1024
|
t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1);
|
|
1021
1025
|
var i = e.defIds;
|
|
@@ -1024,63 +1028,63 @@ function lu(a, e, t) {
|
|
|
1024
1028
|
typeof m == "string" && (n[o] = m.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1025
1029
|
})), n;
|
|
1026
1030
|
}
|
|
1027
|
-
function
|
|
1031
|
+
function Au(a, e) {
|
|
1028
1032
|
var t, n = e.defIds;
|
|
1029
1033
|
return !n || n.length === 0 ? a : a.tag === "defs" && (!((t = a.children) === null || t === void 0) && t.length) ? re(re({}, a), { children: a.children.map(function(i) {
|
|
1030
1034
|
return typeof i.attrs.id == "string" && n && n.indexOf(i.attrs.id) > -1 ? re(re({}, i), { attrs: re(re({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
|
|
1031
1035
|
}) }) : a;
|
|
1032
1036
|
}
|
|
1033
|
-
function
|
|
1037
|
+
function Pu() {
|
|
1034
1038
|
return Math.random().toString(36).substring(2, 8);
|
|
1035
1039
|
}
|
|
1036
|
-
|
|
1037
|
-
var
|
|
1038
|
-
return
|
|
1040
|
+
Je.displayName = "UniverIcon";
|
|
1041
|
+
var bu = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ra = ze(function(a, e) {
|
|
1042
|
+
return Ze(Je, Object.assign({}, a, {
|
|
1039
1043
|
id: "check-mark-single",
|
|
1040
1044
|
ref: e,
|
|
1041
|
-
icon:
|
|
1045
|
+
icon: bu
|
|
1042
1046
|
}));
|
|
1043
1047
|
});
|
|
1044
|
-
|
|
1045
|
-
const
|
|
1046
|
-
var
|
|
1047
|
-
return
|
|
1048
|
+
Ra.displayName = "CheckMarkSingle";
|
|
1049
|
+
const Tu = Ra;
|
|
1050
|
+
var Eu = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z" } }] }, Ca = ze(function(a, e) {
|
|
1051
|
+
return Ze(Je, Object.assign({}, a, {
|
|
1048
1052
|
id: "close-single",
|
|
1049
1053
|
ref: e,
|
|
1050
|
-
icon:
|
|
1054
|
+
icon: Eu
|
|
1051
1055
|
}));
|
|
1052
1056
|
});
|
|
1053
|
-
|
|
1054
|
-
const
|
|
1055
|
-
var
|
|
1056
|
-
return
|
|
1057
|
+
Ca.displayName = "CloseSingle";
|
|
1058
|
+
const Su = Ca;
|
|
1059
|
+
var Iu = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.75 5.32495C8.75 5.73916 8.41421 6.07495 8 6.07495 7.58579 6.07495 7.25 5.73916 7.25 5.32495 7.25 4.91074 7.58579 4.57495 8 4.57495 8.41421 4.57495 8.75 4.91074 8.75 5.32495zM8.5999 7.52505C8.5999 7.19368 8.33127 6.92505 7.9999 6.92505 7.66853 6.92505 7.3999 7.19368 7.3999 7.52505V11.425C7.3999 11.7564 7.66853 12.025 7.9999 12.025 8.33127 12.025 8.5999 11.7564 8.5999 11.425V7.52505z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M0.899902 8.00002C0.899902 4.0788 4.07868 0.900024 7.9999 0.900024C11.9211 0.900024 15.0999 4.0788 15.0999 8.00002C15.0999 11.9212 11.9211 15.1 7.9999 15.1C4.07868 15.1 0.899902 11.9212 0.899902 8.00002ZM7.9999 2.10002C4.74142 2.10002 2.0999 4.74154 2.0999 8.00002C2.0999 11.2585 4.74142 13.9 7.9999 13.9C11.2584 13.9 13.8999 11.2585 13.8999 8.00002C13.8999 4.74154 11.2584 2.10002 7.9999 2.10002Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ha = ze(function(a, e) {
|
|
1060
|
+
return Ze(Je, Object.assign({}, a, {
|
|
1057
1061
|
id: "details-single",
|
|
1058
1062
|
ref: e,
|
|
1059
|
-
icon:
|
|
1063
|
+
icon: Iu
|
|
1060
1064
|
}));
|
|
1061
1065
|
});
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
var
|
|
1065
|
-
return
|
|
1066
|
+
ha.displayName = "DetailsSingle";
|
|
1067
|
+
const Nu = ha;
|
|
1068
|
+
var Ru = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.90913 3.57564C6.14345 3.34132 6.52335 3.34132 6.75766 3.57564L10.7577 7.57564C10.992 7.80995 10.992 8.18985 10.7577 8.42417L6.75766 12.4242C6.52335 12.6585 6.14345 12.6585 5.90913 12.4242C5.67482 12.1899 5.67482 11.81 5.90913 11.5756L9.48487 7.9999L5.90913 4.42417C5.67482 4.18985 5.67482 3.80995 5.90913 3.57564Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _a = ze(function(a, e) {
|
|
1069
|
+
return Ze(Je, Object.assign({}, a, {
|
|
1066
1070
|
id: "more-single",
|
|
1067
1071
|
ref: e,
|
|
1068
|
-
icon:
|
|
1072
|
+
icon: Ru
|
|
1069
1073
|
}));
|
|
1070
1074
|
});
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1073
|
-
function
|
|
1075
|
+
_a.displayName = "MoreSingle";
|
|
1076
|
+
const Cu = _a;
|
|
1077
|
+
function hu(a, e) {
|
|
1074
1078
|
return Object.keys(a).filter((t) => isNaN(Number(t))).map((t) => ({
|
|
1075
1079
|
label: e.t(`formula.functionType.${t.toLocaleLowerCase()}`),
|
|
1076
1080
|
value: `${a[t]}`
|
|
1077
1081
|
}));
|
|
1078
1082
|
}
|
|
1079
|
-
function
|
|
1083
|
+
function _u(a, e) {
|
|
1080
1084
|
let t = "";
|
|
1081
1085
|
return a.aliasFunctionName ? (t = e.t(a.aliasFunctionName), t === a.aliasFunctionName && (t = a.functionName)) : t = a.functionName, t;
|
|
1082
1086
|
}
|
|
1083
|
-
function
|
|
1087
|
+
function Oa(a) {
|
|
1084
1088
|
if (!a.require && !a.repeat)
|
|
1085
1089
|
return `[${a.name}]`;
|
|
1086
1090
|
if (a.require && !a.repeat)
|
|
@@ -1090,56 +1094,56 @@ function Ma(a) {
|
|
|
1090
1094
|
if (a.require && a.repeat)
|
|
1091
1095
|
return `${a.name},...`;
|
|
1092
1096
|
}
|
|
1093
|
-
const
|
|
1094
|
-
formulaHelpFunction:
|
|
1095
|
-
formulaHelpFunctionTitle:
|
|
1096
|
-
formulaHelpFunctionTitleIcons:
|
|
1097
|
-
formulaHelpFunctionTitleIcon:
|
|
1098
|
-
formulaHelpFunctionContent:
|
|
1099
|
-
formulaHelpFunctionContentInner:
|
|
1100
|
-
formulaHelpFunctionContentParams:
|
|
1101
|
-
formulaHelpFunctionContentParamsTitle:
|
|
1102
|
-
formulaHelpFunctionContentParamsDetail:
|
|
1103
|
-
formulaHelpFunctionActive:
|
|
1104
|
-
formulaHelpDecorator:
|
|
1105
|
-
formulaHelpParam:
|
|
1106
|
-
formulaHelpParamPrefix:
|
|
1107
|
-
formulaHelpParamItem:
|
|
1108
|
-
formulaHelpParamActive:
|
|
1097
|
+
const Ou = "univer-formula-help-function", Mu = "univer-formula-help-function-title", Du = "univer-formula-help-function-title-icons", gu = "univer-formula-help-function-title-icon", xu = "univer-formula-help-function-content", vu = "univer-formula-help-function-content-inner", qu = "univer-formula-help-function-content-params", yu = "univer-formula-help-function-content-params-title", Fu = "univer-formula-help-function-content-params-detail", Uu = "univer-formula-help-function-active", Bu = "univer-formula-help-decorator", Vu = "univer-formula-help-param", Hu = "univer-formula-help-param-prefix", wu = "univer-formula-help-param-item", Gu = "univer-formula-help-param-active", J = {
|
|
1098
|
+
formulaHelpFunction: Ou,
|
|
1099
|
+
formulaHelpFunctionTitle: Mu,
|
|
1100
|
+
formulaHelpFunctionTitleIcons: Du,
|
|
1101
|
+
formulaHelpFunctionTitleIcon: gu,
|
|
1102
|
+
formulaHelpFunctionContent: xu,
|
|
1103
|
+
formulaHelpFunctionContentInner: vu,
|
|
1104
|
+
formulaHelpFunctionContentParams: qu,
|
|
1105
|
+
formulaHelpFunctionContentParamsTitle: yu,
|
|
1106
|
+
formulaHelpFunctionContentParamsDetail: Fu,
|
|
1107
|
+
formulaHelpFunctionActive: Uu,
|
|
1108
|
+
formulaHelpDecorator: Bu,
|
|
1109
|
+
formulaHelpParam: Vu,
|
|
1110
|
+
formulaHelpParamPrefix: Hu,
|
|
1111
|
+
formulaHelpParamItem: wu,
|
|
1112
|
+
formulaHelpParamActive: Gu
|
|
1109
1113
|
};
|
|
1110
|
-
function
|
|
1111
|
-
const [a, e] = X(!1), [t, n] = X(!0), [i, u] = X(!0), [o, m] = X(0), [c, f] = X([0, 0]), [d, s] = X({ left: 0, top: 0 }), [l, L] = X(null), b = me(
|
|
1112
|
-
|
|
1113
|
-
const
|
|
1114
|
-
const { visible:
|
|
1115
|
-
if (!
|
|
1116
|
-
e(
|
|
1114
|
+
function Xu() {
|
|
1115
|
+
const [a, e] = X(!1), [t, n] = X(!0), [i, u] = X(!0), [o, m] = X(0), [c, f] = X([0, 0]), [d, s] = X({ left: 0, top: 0 }), [l, L] = X(null), b = me(Ve), E = me(xe), p = E.t("formula.prompt.required"), R = E.t("formula.prompt.optional"), T = me(de), A = me(Qe);
|
|
1116
|
+
Rt(() => {
|
|
1117
|
+
const D = b.help$.subscribe((M) => {
|
|
1118
|
+
const { visible: v, paramIndex: g, functionInfo: U } = M;
|
|
1119
|
+
if (!v) {
|
|
1120
|
+
e(v);
|
|
1117
1121
|
return;
|
|
1118
1122
|
}
|
|
1119
1123
|
const I = h();
|
|
1120
1124
|
if (I == null)
|
|
1121
1125
|
return;
|
|
1122
1126
|
const { left: F, top: pe, height: oe } = I;
|
|
1123
|
-
U.description === "" && U.functionParameter.length === 0 || (f([F, pe + oe]), m(
|
|
1127
|
+
U.description === "" && U.functionParameter.length === 0 || (f([F, pe + oe]), m(g), L(U), s({ left: F, top: pe }), e(v));
|
|
1124
1128
|
});
|
|
1125
1129
|
return () => {
|
|
1126
|
-
|
|
1130
|
+
D == null || D.unsubscribe();
|
|
1127
1131
|
};
|
|
1128
1132
|
}, []);
|
|
1129
1133
|
function h() {
|
|
1130
1134
|
const M = T.getCurrentUniverDocInstance().getUnitId();
|
|
1131
1135
|
if (!A.isEditor(M))
|
|
1132
1136
|
return;
|
|
1133
|
-
const
|
|
1134
|
-
return
|
|
1137
|
+
const v = A.getEditor(M);
|
|
1138
|
+
return v == null ? void 0 : v.getBoundingClientRect();
|
|
1135
1139
|
}
|
|
1136
|
-
function S(
|
|
1137
|
-
m(
|
|
1140
|
+
function S(D) {
|
|
1141
|
+
m(D);
|
|
1138
1142
|
}
|
|
1139
|
-
return /* @__PURE__ */ C.jsx(C.Fragment, { children: i ? /* @__PURE__ */ C.jsx(
|
|
1140
|
-
/* @__PURE__ */ C.jsxs("div", { className:
|
|
1143
|
+
return /* @__PURE__ */ C.jsx(C.Fragment, { children: i ? /* @__PURE__ */ C.jsx(pa, { visible: a, offset: c, children: l ? /* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpFunction, children: [
|
|
1144
|
+
/* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpFunctionTitle, children: [
|
|
1141
1145
|
/* @__PURE__ */ C.jsx(
|
|
1142
|
-
|
|
1146
|
+
Yu,
|
|
1143
1147
|
{
|
|
1144
1148
|
prefix: l.functionName,
|
|
1145
1149
|
value: l.functionParameter,
|
|
@@ -1147,22 +1151,22 @@ function Hu() {
|
|
|
1147
1151
|
onClick: S
|
|
1148
1152
|
}
|
|
1149
1153
|
),
|
|
1150
|
-
/* @__PURE__ */ C.jsxs("div", { className:
|
|
1154
|
+
/* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpFunctionTitleIcons, children: [
|
|
1151
1155
|
/* @__PURE__ */ C.jsx(
|
|
1152
1156
|
"div",
|
|
1153
1157
|
{
|
|
1154
|
-
className:
|
|
1158
|
+
className: J.formulaHelpFunctionTitleIcon,
|
|
1155
1159
|
style: { transform: t ? "rotateZ(-90deg)" : "rotateZ(90deg)" },
|
|
1156
1160
|
onClick: () => n(!t),
|
|
1157
|
-
children: /* @__PURE__ */ C.jsx(
|
|
1161
|
+
children: /* @__PURE__ */ C.jsx(Cu, {})
|
|
1158
1162
|
}
|
|
1159
1163
|
),
|
|
1160
1164
|
/* @__PURE__ */ C.jsx(
|
|
1161
1165
|
"div",
|
|
1162
1166
|
{
|
|
1163
|
-
className:
|
|
1167
|
+
className: J.formulaHelpFunctionTitleIcon,
|
|
1164
1168
|
onClick: () => u(!i),
|
|
1165
|
-
children: /* @__PURE__ */ C.jsx(
|
|
1169
|
+
children: /* @__PURE__ */ C.jsx(Su, {})
|
|
1166
1170
|
}
|
|
1167
1171
|
)
|
|
1168
1172
|
] })
|
|
@@ -1170,17 +1174,17 @@ function Hu() {
|
|
|
1170
1174
|
/* @__PURE__ */ C.jsx(
|
|
1171
1175
|
"div",
|
|
1172
1176
|
{
|
|
1173
|
-
className:
|
|
1177
|
+
className: J.formulaHelpFunctionContent,
|
|
1174
1178
|
style: {
|
|
1175
1179
|
height: t ? "unset" : 0,
|
|
1176
1180
|
padding: t ? "revert-layer" : 0
|
|
1177
1181
|
},
|
|
1178
|
-
children: /* @__PURE__ */ C.jsxs("div", { className:
|
|
1182
|
+
children: /* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpFunctionContentInner, children: [
|
|
1179
1183
|
/* @__PURE__ */ C.jsx(
|
|
1180
1184
|
Ht,
|
|
1181
1185
|
{
|
|
1182
1186
|
title: E.t("formula.prompt.helpExample"),
|
|
1183
|
-
value: `${l.functionName}(${l.functionParameter.map((
|
|
1187
|
+
value: `${l.functionName}(${l.functionParameter.map((D) => D.example).join(",")})`
|
|
1184
1188
|
}
|
|
1185
1189
|
),
|
|
1186
1190
|
/* @__PURE__ */ C.jsx(
|
|
@@ -1190,12 +1194,12 @@ function Hu() {
|
|
|
1190
1194
|
value: l.description
|
|
1191
1195
|
}
|
|
1192
1196
|
),
|
|
1193
|
-
l && l.functionParameter && l.functionParameter.map((
|
|
1197
|
+
l && l.functionParameter && l.functionParameter.map((D, M) => /* @__PURE__ */ C.jsx(
|
|
1194
1198
|
Ht,
|
|
1195
1199
|
{
|
|
1196
|
-
className: o === M ?
|
|
1197
|
-
title:
|
|
1198
|
-
value: `${
|
|
1200
|
+
className: o === M ? J.formulaHelpFunctionActive : "",
|
|
1201
|
+
title: D.name,
|
|
1202
|
+
value: `${D.require ? p : R} ${D.detail}`
|
|
1199
1203
|
},
|
|
1200
1204
|
M
|
|
1201
1205
|
))
|
|
@@ -1205,32 +1209,32 @@ function Hu() {
|
|
|
1205
1209
|
] }) : /* @__PURE__ */ C.jsx(C.Fragment, {}) }) : a ? /* @__PURE__ */ C.jsx(
|
|
1206
1210
|
"div",
|
|
1207
1211
|
{
|
|
1208
|
-
className:
|
|
1212
|
+
className: J.formulaHelpDecorator,
|
|
1209
1213
|
onClick: () => u(!i),
|
|
1210
1214
|
style: { left: d.left - 24, top: d.top },
|
|
1211
|
-
children: /* @__PURE__ */ C.jsx(
|
|
1215
|
+
children: /* @__PURE__ */ C.jsx(Nu, {})
|
|
1212
1216
|
}
|
|
1213
1217
|
) : /* @__PURE__ */ C.jsx(C.Fragment, {}) });
|
|
1214
1218
|
}
|
|
1215
|
-
const Ht = (a) => /* @__PURE__ */ C.jsxs("div", { className:
|
|
1216
|
-
/* @__PURE__ */ C.jsx("div", { className: `${
|
|
1217
|
-
/* @__PURE__ */ C.jsx("div", { className:
|
|
1218
|
-
] }),
|
|
1219
|
+
const Ht = (a) => /* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpFunctionContentParams, children: [
|
|
1220
|
+
/* @__PURE__ */ C.jsx("div", { className: `${J.formulaHelpFunctionContentParamsTitle} ${a.className}`, children: a.title }),
|
|
1221
|
+
/* @__PURE__ */ C.jsx("div", { className: J.formulaHelpFunctionContentParamsDetail, children: a.value })
|
|
1222
|
+
] }), Yu = (a) => {
|
|
1219
1223
|
const { prefix: e, value: t, active: n, onClick: i } = a;
|
|
1220
|
-
return /* @__PURE__ */ C.jsxs("div", { className:
|
|
1221
|
-
/* @__PURE__ */ C.jsxs("span", { className:
|
|
1224
|
+
return /* @__PURE__ */ C.jsxs("div", { className: J.formulaHelpParam, children: [
|
|
1225
|
+
/* @__PURE__ */ C.jsxs("span", { className: J.formulaHelpParamPrefix, children: [
|
|
1222
1226
|
e,
|
|
1223
1227
|
"("
|
|
1224
1228
|
] }),
|
|
1225
1229
|
t && t.map((u, o) => (
|
|
1226
1230
|
// TODO@Dushusir: more params needs to be active
|
|
1227
|
-
/* @__PURE__ */ C.jsxs("span", { className:
|
|
1231
|
+
/* @__PURE__ */ C.jsxs("span", { className: J.formulaHelpParamItem, children: [
|
|
1228
1232
|
/* @__PURE__ */ C.jsx(
|
|
1229
1233
|
"span",
|
|
1230
1234
|
{
|
|
1231
|
-
className: n === o ?
|
|
1235
|
+
className: n === o ? J.formulaHelpFunctionActive : J.formulaHelpParamActive,
|
|
1232
1236
|
onClick: () => i(o),
|
|
1233
|
-
children:
|
|
1237
|
+
children: Oa(u)
|
|
1234
1238
|
}
|
|
1235
1239
|
),
|
|
1236
1240
|
o === t.length - 1 ? "" : ","
|
|
@@ -1238,45 +1242,45 @@ const Ht = (a) => /* @__PURE__ */ C.jsxs("div", { className: ee.formulaHelpFunct
|
|
|
1238
1242
|
)),
|
|
1239
1243
|
")"
|
|
1240
1244
|
] });
|
|
1241
|
-
},
|
|
1242
|
-
formulaSearchFunction:
|
|
1243
|
-
formulaSearchFunctionItem:
|
|
1244
|
-
formulaSearchFunctionItemName:
|
|
1245
|
-
formulaSearchFunctionItemNameLight:
|
|
1246
|
-
formulaSearchFunctionItemDesc:
|
|
1247
|
-
formulaSearchFunctionItemActive:
|
|
1245
|
+
}, Wu = "univer-formula-search-function", Ku = "univer-formula-search-function-item", ku = "univer-formula-search-function-item-name", $u = "univer-formula-search-function-item-name-light", ju = "univer-formula-search-function-item-desc", Qu = "univer-formula-search-function-item-active", Te = {
|
|
1246
|
+
formulaSearchFunction: Wu,
|
|
1247
|
+
formulaSearchFunctionItem: Ku,
|
|
1248
|
+
formulaSearchFunctionItemName: ku,
|
|
1249
|
+
formulaSearchFunctionItemNameLight: $u,
|
|
1250
|
+
formulaSearchFunctionItemDesc: ju,
|
|
1251
|
+
formulaSearchFunctionItemActive: Qu
|
|
1248
1252
|
};
|
|
1249
|
-
function
|
|
1250
|
-
const [a, e] = X(!1), [t, n] = X(0), [i, u] = X([0, 0]), [o, m] = X([]), [c, f] = X(""), d =
|
|
1251
|
-
|
|
1253
|
+
function zu() {
|
|
1254
|
+
const [a, e] = X(!1), [t, n] = X(0), [i, u] = X([0, 0]), [o, m] = X([]), [c, f] = X(""), d = da(null), s = me(Ve), l = me(de), L = me(Qe);
|
|
1255
|
+
Rt(() => {
|
|
1252
1256
|
let T = [], A = 0;
|
|
1253
1257
|
const h = s.search$.subscribe((M) => {
|
|
1254
|
-
const { visible:
|
|
1255
|
-
if (!
|
|
1256
|
-
e(
|
|
1258
|
+
const { visible: v, searchText: g, searchList: U } = M;
|
|
1259
|
+
if (!v) {
|
|
1260
|
+
e(v);
|
|
1257
1261
|
return;
|
|
1258
1262
|
}
|
|
1259
1263
|
const I = b();
|
|
1260
1264
|
if (I == null)
|
|
1261
1265
|
return;
|
|
1262
1266
|
const { left: F, top: pe, height: oe } = I;
|
|
1263
|
-
f(
|
|
1267
|
+
f(g), m(U), T = U, u([F, pe + oe]), e(v), n(0), A = 0;
|
|
1264
1268
|
}), S = s.navigate$.subscribe((M) => {
|
|
1265
|
-
const { direction:
|
|
1266
|
-
if (
|
|
1267
|
-
let
|
|
1268
|
-
|
|
1269
|
-
} else if (
|
|
1270
|
-
let
|
|
1271
|
-
|
|
1269
|
+
const { direction: v } = M;
|
|
1270
|
+
if (v === w.UP) {
|
|
1271
|
+
let g = A - 1;
|
|
1272
|
+
g = g < 0 ? T.length - 1 : g, n(g), A = g;
|
|
1273
|
+
} else if (v === w.DOWN) {
|
|
1274
|
+
let g = A + 1;
|
|
1275
|
+
g = g >= T.length ? 0 : g, n(g), A = g;
|
|
1272
1276
|
}
|
|
1273
1277
|
R(A);
|
|
1274
|
-
}),
|
|
1275
|
-
const
|
|
1276
|
-
s.acceptFormulaName(
|
|
1278
|
+
}), D = s.accept$.subscribe((M) => {
|
|
1279
|
+
const v = T[A].name;
|
|
1280
|
+
s.acceptFormulaName(v);
|
|
1277
1281
|
});
|
|
1278
1282
|
return () => {
|
|
1279
|
-
h == null || h.unsubscribe(), S == null || S.unsubscribe(),
|
|
1283
|
+
h == null || h.unsubscribe(), S == null || S.unsubscribe(), D == null || D.unsubscribe();
|
|
1280
1284
|
};
|
|
1281
1285
|
}, []);
|
|
1282
1286
|
function b() {
|
|
@@ -1300,8 +1304,8 @@ function $u() {
|
|
|
1300
1304
|
const h = A.parentNode;
|
|
1301
1305
|
if (!h)
|
|
1302
1306
|
return;
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1307
|
+
const D = h.getBoundingClientRect().top, M = h.offsetHeight, v = A.getBoundingClientRect(), g = v.top, U = v.height;
|
|
1308
|
+
if (g >= 0 && g > D && g - D + U <= M)
|
|
1305
1309
|
return;
|
|
1306
1310
|
const I = A.offsetTop - (M - U) / 2;
|
|
1307
1311
|
h.scrollTo({
|
|
@@ -1309,7 +1313,7 @@ function $u() {
|
|
|
1309
1313
|
behavior: "smooth"
|
|
1310
1314
|
});
|
|
1311
1315
|
}
|
|
1312
|
-
return o.length > 0 && /* @__PURE__ */ C.jsx(
|
|
1316
|
+
return o.length > 0 && /* @__PURE__ */ C.jsx(pa, { visible: a, offset: i, children: /* @__PURE__ */ C.jsx("ul", { className: Te.formulaSearchFunction, ref: d, children: o.map((T, A) => /* @__PURE__ */ C.jsxs(
|
|
1313
1317
|
"li",
|
|
1314
1318
|
{
|
|
1315
1319
|
className: t === A ? `${Te.formulaSearchFunctionItem} ${Te.formulaSearchFunctionItemActive}` : Te.formulaSearchFunctionItem,
|
|
@@ -1327,17 +1331,17 @@ function $u() {
|
|
|
1327
1331
|
A
|
|
1328
1332
|
)) }) });
|
|
1329
1333
|
}
|
|
1330
|
-
function
|
|
1334
|
+
function Zu() {
|
|
1331
1335
|
return /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
1332
|
-
/* @__PURE__ */ C.jsx(
|
|
1333
|
-
/* @__PURE__ */ C.jsx(
|
|
1336
|
+
/* @__PURE__ */ C.jsx(zu, {}),
|
|
1337
|
+
/* @__PURE__ */ C.jsx(Xu, {})
|
|
1334
1338
|
] });
|
|
1335
1339
|
}
|
|
1336
|
-
const
|
|
1337
|
-
formulaMoreFunctions:
|
|
1338
|
-
formulaMoreFunctionsOperation:
|
|
1340
|
+
const Ju = "univer-formula-more-functions", eo = "univer-formula-more-functions-operation", qn = {
|
|
1341
|
+
formulaMoreFunctions: Ju,
|
|
1342
|
+
formulaMoreFunctionsOperation: eo
|
|
1339
1343
|
};
|
|
1340
|
-
function
|
|
1344
|
+
function Ma(a) {
|
|
1341
1345
|
const { prefix: e, value: t } = a;
|
|
1342
1346
|
return /* @__PURE__ */ C.jsxs("div", { children: [
|
|
1343
1347
|
/* @__PURE__ */ C.jsxs("span", { children: [
|
|
@@ -1345,50 +1349,50 @@ function Da(a) {
|
|
|
1345
1349
|
"("
|
|
1346
1350
|
] }),
|
|
1347
1351
|
t && t.map((n, i) => /* @__PURE__ */ C.jsxs("span", { children: [
|
|
1348
|
-
/* @__PURE__ */ C.jsx("span", { children:
|
|
1352
|
+
/* @__PURE__ */ C.jsx("span", { children: Oa(n) }),
|
|
1349
1353
|
i === t.length - 1 ? "" : ","
|
|
1350
1354
|
] }, i)),
|
|
1351
1355
|
")"
|
|
1352
1356
|
] });
|
|
1353
1357
|
}
|
|
1354
|
-
const
|
|
1355
|
-
formulaFunctionParams:
|
|
1356
|
-
formulaFunctionParamsTitle:
|
|
1357
|
-
formulaFunctionParamsDetail:
|
|
1358
|
+
const to = "univer-formula-function-params", no = "univer-formula-function-params-title", ao = "univer-formula-function-params-detail", wt = {
|
|
1359
|
+
formulaFunctionParams: to,
|
|
1360
|
+
formulaFunctionParamsTitle: no,
|
|
1361
|
+
formulaFunctionParamsDetail: ao
|
|
1358
1362
|
};
|
|
1359
|
-
function
|
|
1363
|
+
function Xe(a) {
|
|
1360
1364
|
const { className: e, value: t, title: n } = a;
|
|
1361
1365
|
return /* @__PURE__ */ C.jsxs("div", { className: wt.formulaFunctionParams, children: [
|
|
1362
1366
|
/* @__PURE__ */ C.jsx("div", { className: `${wt.formulaFunctionParamsTitle} ${e}`, children: n }),
|
|
1363
1367
|
/* @__PURE__ */ C.jsx("div", { className: wt.formulaFunctionParamsDetail, children: t })
|
|
1364
1368
|
] });
|
|
1365
1369
|
}
|
|
1366
|
-
const
|
|
1367
|
-
formulaInputParamsList:
|
|
1368
|
-
formulaInputParamsListItemName:
|
|
1369
|
-
formulaInputParamsListItemSelector:
|
|
1370
|
+
const io = "univer-formula-input-params-list", ro = "univer-formula-input-params-list-item-name", uo = "univer-formula-input-params-list-item-selector", we = {
|
|
1371
|
+
formulaInputParamsList: io,
|
|
1372
|
+
formulaInputParamsListItemName: ro,
|
|
1373
|
+
formulaInputParamsListItemSelector: uo
|
|
1370
1374
|
};
|
|
1371
|
-
function
|
|
1375
|
+
function oo(a) {
|
|
1372
1376
|
const { functionInfo: e, onChange: t } = a;
|
|
1373
1377
|
if (!e)
|
|
1374
1378
|
return null;
|
|
1375
1379
|
X([]);
|
|
1376
1380
|
const [n, i] = X(e.functionParameter), [u, o] = X(-1);
|
|
1377
|
-
return /* @__PURE__ */ C.jsxs("div", { className:
|
|
1378
|
-
/* @__PURE__ */ C.jsx("div", { className:
|
|
1379
|
-
/* @__PURE__ */ C.jsx("div", { className:
|
|
1380
|
-
/* @__PURE__ */ C.jsx("div", { className:
|
|
1381
|
+
return /* @__PURE__ */ C.jsxs("div", { className: we.formulaInputParams, children: [
|
|
1382
|
+
/* @__PURE__ */ C.jsx("div", { className: we.formulaInputParamsList, children: n.map((m, c) => /* @__PURE__ */ C.jsxs("div", { children: [
|
|
1383
|
+
/* @__PURE__ */ C.jsx("div", { className: we.formulaInputParamsListItemName, children: m.name }),
|
|
1384
|
+
/* @__PURE__ */ C.jsx("div", { className: we.formulaInputParamsListItemSelector })
|
|
1381
1385
|
] }, c)) }),
|
|
1382
|
-
/* @__PURE__ */ C.jsx("div", { className:
|
|
1383
|
-
|
|
1386
|
+
/* @__PURE__ */ C.jsx("div", { className: we.formulaInputParamsInfo, children: /* @__PURE__ */ C.jsx(
|
|
1387
|
+
Xe,
|
|
1384
1388
|
{
|
|
1385
|
-
title: u === -1 ? /* @__PURE__ */ C.jsx(
|
|
1389
|
+
title: u === -1 ? /* @__PURE__ */ C.jsx(Ma, { prefix: e.functionName, value: n }) : n[u].name,
|
|
1386
1390
|
value: u === -1 ? e.description : n[u].detail
|
|
1387
1391
|
}
|
|
1388
1392
|
) })
|
|
1389
1393
|
] });
|
|
1390
1394
|
}
|
|
1391
|
-
const
|
|
1395
|
+
const mo = [], co = [
|
|
1392
1396
|
{
|
|
1393
1397
|
functionName: B.BETADIST,
|
|
1394
1398
|
functionType: r.Compatibility,
|
|
@@ -2225,9 +2229,9 @@ const ro = [], uo = [
|
|
|
2225
2229
|
}
|
|
2226
2230
|
]
|
|
2227
2231
|
}
|
|
2228
|
-
],
|
|
2232
|
+
], fo = [
|
|
2229
2233
|
{
|
|
2230
|
-
functionName:
|
|
2234
|
+
functionName: Ne.CUBEKPIMEMBER,
|
|
2231
2235
|
functionType: r.Cube,
|
|
2232
2236
|
description: "formula.functionList.CUBEKPIMEMBER.description",
|
|
2233
2237
|
abstract: "formula.functionList.CUBEKPIMEMBER.abstract",
|
|
@@ -2249,7 +2253,7 @@ const ro = [], uo = [
|
|
|
2249
2253
|
]
|
|
2250
2254
|
},
|
|
2251
2255
|
{
|
|
2252
|
-
functionName:
|
|
2256
|
+
functionName: Ne.CUBEMEMBER,
|
|
2253
2257
|
functionType: r.Cube,
|
|
2254
2258
|
description: "formula.functionList.CUBEMEMBER.description",
|
|
2255
2259
|
abstract: "formula.functionList.CUBEMEMBER.abstract",
|
|
@@ -2271,7 +2275,7 @@ const ro = [], uo = [
|
|
|
2271
2275
|
]
|
|
2272
2276
|
},
|
|
2273
2277
|
{
|
|
2274
|
-
functionName:
|
|
2278
|
+
functionName: Ne.CUBEMEMBERPROPERTY,
|
|
2275
2279
|
functionType: r.Cube,
|
|
2276
2280
|
description: "formula.functionList.CUBEMEMBERPROPERTY.description",
|
|
2277
2281
|
abstract: "formula.functionList.CUBEMEMBERPROPERTY.abstract",
|
|
@@ -2293,7 +2297,7 @@ const ro = [], uo = [
|
|
|
2293
2297
|
]
|
|
2294
2298
|
},
|
|
2295
2299
|
{
|
|
2296
|
-
functionName:
|
|
2300
|
+
functionName: Ne.CUBERANKEDMEMBER,
|
|
2297
2301
|
functionType: r.Cube,
|
|
2298
2302
|
description: "formula.functionList.CUBERANKEDMEMBER.description",
|
|
2299
2303
|
abstract: "formula.functionList.CUBERANKEDMEMBER.abstract",
|
|
@@ -2315,7 +2319,7 @@ const ro = [], uo = [
|
|
|
2315
2319
|
]
|
|
2316
2320
|
},
|
|
2317
2321
|
{
|
|
2318
|
-
functionName:
|
|
2322
|
+
functionName: Ne.CUBESET,
|
|
2319
2323
|
functionType: r.Cube,
|
|
2320
2324
|
description: "formula.functionList.CUBESET.description",
|
|
2321
2325
|
abstract: "formula.functionList.CUBESET.abstract",
|
|
@@ -2337,7 +2341,7 @@ const ro = [], uo = [
|
|
|
2337
2341
|
]
|
|
2338
2342
|
},
|
|
2339
2343
|
{
|
|
2340
|
-
functionName:
|
|
2344
|
+
functionName: Ne.CUBESETCOUNT,
|
|
2341
2345
|
functionType: r.Cube,
|
|
2342
2346
|
description: "formula.functionList.CUBESETCOUNT.description",
|
|
2343
2347
|
abstract: "formula.functionList.CUBESETCOUNT.abstract",
|
|
@@ -2359,7 +2363,7 @@ const ro = [], uo = [
|
|
|
2359
2363
|
]
|
|
2360
2364
|
},
|
|
2361
2365
|
{
|
|
2362
|
-
functionName:
|
|
2366
|
+
functionName: Ne.CUBEVALUE,
|
|
2363
2367
|
functionType: r.Cube,
|
|
2364
2368
|
description: "formula.functionList.CUBEVALUE.description",
|
|
2365
2369
|
abstract: "formula.functionList.CUBEVALUE.abstract",
|
|
@@ -2380,7 +2384,7 @@ const ro = [], uo = [
|
|
|
2380
2384
|
}
|
|
2381
2385
|
]
|
|
2382
2386
|
}
|
|
2383
|
-
],
|
|
2387
|
+
], so = [
|
|
2384
2388
|
{
|
|
2385
2389
|
functionName: ae.DAVERAGE,
|
|
2386
2390
|
functionType: r.Database,
|
|
@@ -2645,7 +2649,7 @@ const ro = [], uo = [
|
|
|
2645
2649
|
}
|
|
2646
2650
|
]
|
|
2647
2651
|
}
|
|
2648
|
-
],
|
|
2652
|
+
], lo = [
|
|
2649
2653
|
{
|
|
2650
2654
|
functionName: G.DATE,
|
|
2651
2655
|
functionType: r.Date,
|
|
@@ -3167,7 +3171,7 @@ const ro = [], uo = [
|
|
|
3167
3171
|
}
|
|
3168
3172
|
]
|
|
3169
3173
|
}
|
|
3170
|
-
],
|
|
3174
|
+
], po = [
|
|
3171
3175
|
{
|
|
3172
3176
|
functionName: O.BESSELI,
|
|
3173
3177
|
functionType: r.Engineering,
|
|
@@ -4356,7 +4360,7 @@ const ro = [], uo = [
|
|
|
4356
4360
|
}
|
|
4357
4361
|
]
|
|
4358
4362
|
}
|
|
4359
|
-
],
|
|
4363
|
+
], Lo = [
|
|
4360
4364
|
{
|
|
4361
4365
|
functionName: _.ACCRINT,
|
|
4362
4366
|
functionType: r.Financial,
|
|
@@ -5567,7 +5571,7 @@ const ro = [], uo = [
|
|
|
5567
5571
|
}
|
|
5568
5572
|
]
|
|
5569
5573
|
}
|
|
5570
|
-
],
|
|
5574
|
+
], Ao = [
|
|
5571
5575
|
{
|
|
5572
5576
|
functionName: $.CELL,
|
|
5573
5577
|
functionType: r.Information,
|
|
@@ -5953,7 +5957,7 @@ const ro = [], uo = [
|
|
|
5953
5957
|
}
|
|
5954
5958
|
]
|
|
5955
5959
|
}
|
|
5956
|
-
],
|
|
5960
|
+
], Po = [
|
|
5957
5961
|
{
|
|
5958
5962
|
functionName: z.AND,
|
|
5959
5963
|
functionType: r.Logical,
|
|
@@ -6387,7 +6391,7 @@ const ro = [], uo = [
|
|
|
6387
6391
|
}
|
|
6388
6392
|
]
|
|
6389
6393
|
}
|
|
6390
|
-
],
|
|
6394
|
+
], bo = [
|
|
6391
6395
|
{
|
|
6392
6396
|
functionName: V.ADDRESS,
|
|
6393
6397
|
functionType: r.Lookup,
|
|
@@ -7314,7 +7318,7 @@ const ro = [], uo = [
|
|
|
7314
7318
|
}
|
|
7315
7319
|
]
|
|
7316
7320
|
}
|
|
7317
|
-
],
|
|
7321
|
+
], To = [
|
|
7318
7322
|
{
|
|
7319
7323
|
functionName: N.ABS,
|
|
7320
7324
|
functionType: r.Math,
|
|
@@ -9128,7 +9132,7 @@ const ro = [], uo = [
|
|
|
9128
9132
|
}
|
|
9129
9133
|
]
|
|
9130
9134
|
}
|
|
9131
|
-
],
|
|
9135
|
+
], Eo = [
|
|
9132
9136
|
{
|
|
9133
9137
|
functionName: P.AVEDEV,
|
|
9134
9138
|
functionType: r.Statistical,
|
|
@@ -11597,9 +11601,9 @@ const ro = [], uo = [
|
|
|
11597
11601
|
}
|
|
11598
11602
|
]
|
|
11599
11603
|
}
|
|
11600
|
-
],
|
|
11604
|
+
], So = [
|
|
11601
11605
|
{
|
|
11602
|
-
functionName:
|
|
11606
|
+
functionName: x.ASC,
|
|
11603
11607
|
functionType: r.Text,
|
|
11604
11608
|
description: "formula.functionList.ASC.description",
|
|
11605
11609
|
abstract: "formula.functionList.ASC.abstract",
|
|
@@ -11621,7 +11625,7 @@ const ro = [], uo = [
|
|
|
11621
11625
|
]
|
|
11622
11626
|
},
|
|
11623
11627
|
{
|
|
11624
|
-
functionName:
|
|
11628
|
+
functionName: x.ARRAYTOTEXT,
|
|
11625
11629
|
functionType: r.Text,
|
|
11626
11630
|
description: "formula.functionList.ARRAYTOTEXT.description",
|
|
11627
11631
|
abstract: "formula.functionList.ARRAYTOTEXT.abstract",
|
|
@@ -11643,7 +11647,7 @@ const ro = [], uo = [
|
|
|
11643
11647
|
]
|
|
11644
11648
|
},
|
|
11645
11649
|
{
|
|
11646
|
-
functionName:
|
|
11650
|
+
functionName: x.BAHTTEXT,
|
|
11647
11651
|
functionType: r.Text,
|
|
11648
11652
|
description: "formula.functionList.BAHTTEXT.description",
|
|
11649
11653
|
abstract: "formula.functionList.BAHTTEXT.abstract",
|
|
@@ -11665,7 +11669,7 @@ const ro = [], uo = [
|
|
|
11665
11669
|
]
|
|
11666
11670
|
},
|
|
11667
11671
|
{
|
|
11668
|
-
functionName:
|
|
11672
|
+
functionName: x.CHAR,
|
|
11669
11673
|
functionType: r.Text,
|
|
11670
11674
|
description: "formula.functionList.CHAR.description",
|
|
11671
11675
|
abstract: "formula.functionList.CHAR.abstract",
|
|
@@ -11687,7 +11691,7 @@ const ro = [], uo = [
|
|
|
11687
11691
|
]
|
|
11688
11692
|
},
|
|
11689
11693
|
{
|
|
11690
|
-
functionName:
|
|
11694
|
+
functionName: x.CLEAN,
|
|
11691
11695
|
functionType: r.Text,
|
|
11692
11696
|
description: "formula.functionList.CLEAN.description",
|
|
11693
11697
|
abstract: "formula.functionList.CLEAN.abstract",
|
|
@@ -11709,7 +11713,7 @@ const ro = [], uo = [
|
|
|
11709
11713
|
]
|
|
11710
11714
|
},
|
|
11711
11715
|
{
|
|
11712
|
-
functionName:
|
|
11716
|
+
functionName: x.CODE,
|
|
11713
11717
|
functionType: r.Text,
|
|
11714
11718
|
description: "formula.functionList.CODE.description",
|
|
11715
11719
|
abstract: "formula.functionList.CODE.abstract",
|
|
@@ -11731,7 +11735,7 @@ const ro = [], uo = [
|
|
|
11731
11735
|
]
|
|
11732
11736
|
},
|
|
11733
11737
|
{
|
|
11734
|
-
functionName:
|
|
11738
|
+
functionName: x.CONCAT,
|
|
11735
11739
|
functionType: r.Text,
|
|
11736
11740
|
description: "formula.functionList.CONCAT.description",
|
|
11737
11741
|
abstract: "formula.functionList.CONCAT.abstract",
|
|
@@ -11753,7 +11757,7 @@ const ro = [], uo = [
|
|
|
11753
11757
|
]
|
|
11754
11758
|
},
|
|
11755
11759
|
{
|
|
11756
|
-
functionName:
|
|
11760
|
+
functionName: x.CONCATENATE,
|
|
11757
11761
|
functionType: r.Text,
|
|
11758
11762
|
description: "formula.functionList.CONCATENATE.description",
|
|
11759
11763
|
abstract: "formula.functionList.CONCATENATE.abstract",
|
|
@@ -11775,7 +11779,7 @@ const ro = [], uo = [
|
|
|
11775
11779
|
]
|
|
11776
11780
|
},
|
|
11777
11781
|
{
|
|
11778
|
-
functionName:
|
|
11782
|
+
functionName: x.DBCS,
|
|
11779
11783
|
functionType: r.Text,
|
|
11780
11784
|
description: "formula.functionList.DBCS.description",
|
|
11781
11785
|
abstract: "formula.functionList.DBCS.abstract",
|
|
@@ -11797,7 +11801,7 @@ const ro = [], uo = [
|
|
|
11797
11801
|
]
|
|
11798
11802
|
},
|
|
11799
11803
|
{
|
|
11800
|
-
functionName:
|
|
11804
|
+
functionName: x.DOLLAR,
|
|
11801
11805
|
functionType: r.Text,
|
|
11802
11806
|
description: "formula.functionList.DOLLAR.description",
|
|
11803
11807
|
abstract: "formula.functionList.DOLLAR.abstract",
|
|
@@ -11819,7 +11823,7 @@ const ro = [], uo = [
|
|
|
11819
11823
|
]
|
|
11820
11824
|
},
|
|
11821
11825
|
{
|
|
11822
|
-
functionName:
|
|
11826
|
+
functionName: x.EXACT,
|
|
11823
11827
|
functionType: r.Text,
|
|
11824
11828
|
description: "formula.functionList.EXACT.description",
|
|
11825
11829
|
abstract: "formula.functionList.EXACT.abstract",
|
|
@@ -11841,7 +11845,7 @@ const ro = [], uo = [
|
|
|
11841
11845
|
]
|
|
11842
11846
|
},
|
|
11843
11847
|
{
|
|
11844
|
-
functionName:
|
|
11848
|
+
functionName: x.FIND,
|
|
11845
11849
|
functionType: r.Text,
|
|
11846
11850
|
description: "formula.functionList.FIND.description",
|
|
11847
11851
|
abstract: "formula.functionList.FIND.abstract",
|
|
@@ -11863,7 +11867,7 @@ const ro = [], uo = [
|
|
|
11863
11867
|
]
|
|
11864
11868
|
},
|
|
11865
11869
|
{
|
|
11866
|
-
functionName:
|
|
11870
|
+
functionName: x.FINDB,
|
|
11867
11871
|
functionType: r.Text,
|
|
11868
11872
|
description: "formula.functionList.FINDB.description",
|
|
11869
11873
|
abstract: "formula.functionList.FINDB.abstract",
|
|
@@ -11885,7 +11889,7 @@ const ro = [], uo = [
|
|
|
11885
11889
|
]
|
|
11886
11890
|
},
|
|
11887
11891
|
{
|
|
11888
|
-
functionName:
|
|
11892
|
+
functionName: x.FIXED,
|
|
11889
11893
|
functionType: r.Text,
|
|
11890
11894
|
description: "formula.functionList.FIXED.description",
|
|
11891
11895
|
abstract: "formula.functionList.FIXED.abstract",
|
|
@@ -11907,7 +11911,7 @@ const ro = [], uo = [
|
|
|
11907
11911
|
]
|
|
11908
11912
|
},
|
|
11909
11913
|
{
|
|
11910
|
-
functionName:
|
|
11914
|
+
functionName: x.LEFT,
|
|
11911
11915
|
functionType: r.Text,
|
|
11912
11916
|
description: "formula.functionList.LEFT.description",
|
|
11913
11917
|
abstract: "formula.functionList.LEFT.abstract",
|
|
@@ -11929,7 +11933,7 @@ const ro = [], uo = [
|
|
|
11929
11933
|
]
|
|
11930
11934
|
},
|
|
11931
11935
|
{
|
|
11932
|
-
functionName:
|
|
11936
|
+
functionName: x.LEFTB,
|
|
11933
11937
|
functionType: r.Text,
|
|
11934
11938
|
description: "formula.functionList.LEFTB.description",
|
|
11935
11939
|
abstract: "formula.functionList.LEFTB.abstract",
|
|
@@ -11951,7 +11955,7 @@ const ro = [], uo = [
|
|
|
11951
11955
|
]
|
|
11952
11956
|
},
|
|
11953
11957
|
{
|
|
11954
|
-
functionName:
|
|
11958
|
+
functionName: x.LEN,
|
|
11955
11959
|
functionType: r.Text,
|
|
11956
11960
|
description: "formula.functionList.LEN.description",
|
|
11957
11961
|
abstract: "formula.functionList.LEN.abstract",
|
|
@@ -11966,7 +11970,7 @@ const ro = [], uo = [
|
|
|
11966
11970
|
]
|
|
11967
11971
|
},
|
|
11968
11972
|
{
|
|
11969
|
-
functionName:
|
|
11973
|
+
functionName: x.LENB,
|
|
11970
11974
|
functionType: r.Text,
|
|
11971
11975
|
description: "formula.functionList.LENB.description",
|
|
11972
11976
|
abstract: "formula.functionList.LENB.abstract",
|
|
@@ -11981,7 +11985,7 @@ const ro = [], uo = [
|
|
|
11981
11985
|
]
|
|
11982
11986
|
},
|
|
11983
11987
|
{
|
|
11984
|
-
functionName:
|
|
11988
|
+
functionName: x.LOWER,
|
|
11985
11989
|
functionType: r.Text,
|
|
11986
11990
|
description: "formula.functionList.LOWER.description",
|
|
11987
11991
|
abstract: "formula.functionList.LOWER.abstract",
|
|
@@ -11996,7 +12000,7 @@ const ro = [], uo = [
|
|
|
11996
12000
|
]
|
|
11997
12001
|
},
|
|
11998
12002
|
{
|
|
11999
|
-
functionName:
|
|
12003
|
+
functionName: x.MID,
|
|
12000
12004
|
functionType: r.Text,
|
|
12001
12005
|
description: "formula.functionList.MID.description",
|
|
12002
12006
|
abstract: "formula.functionList.MID.abstract",
|
|
@@ -12018,7 +12022,7 @@ const ro = [], uo = [
|
|
|
12018
12022
|
]
|
|
12019
12023
|
},
|
|
12020
12024
|
{
|
|
12021
|
-
functionName:
|
|
12025
|
+
functionName: x.MIDB,
|
|
12022
12026
|
functionType: r.Text,
|
|
12023
12027
|
description: "formula.functionList.MIDB.description",
|
|
12024
12028
|
abstract: "formula.functionList.MIDB.abstract",
|
|
@@ -12040,7 +12044,7 @@ const ro = [], uo = [
|
|
|
12040
12044
|
]
|
|
12041
12045
|
},
|
|
12042
12046
|
{
|
|
12043
|
-
functionName:
|
|
12047
|
+
functionName: x.NUMBERVALUE,
|
|
12044
12048
|
functionType: r.Text,
|
|
12045
12049
|
description: "formula.functionList.NUMBERVALUE.description",
|
|
12046
12050
|
abstract: "formula.functionList.NUMBERVALUE.abstract",
|
|
@@ -12062,7 +12066,7 @@ const ro = [], uo = [
|
|
|
12062
12066
|
]
|
|
12063
12067
|
},
|
|
12064
12068
|
{
|
|
12065
|
-
functionName:
|
|
12069
|
+
functionName: x.PHONETIC,
|
|
12066
12070
|
functionType: r.Text,
|
|
12067
12071
|
description: "formula.functionList.PHONETIC.description",
|
|
12068
12072
|
abstract: "formula.functionList.PHONETIC.abstract",
|
|
@@ -12084,7 +12088,7 @@ const ro = [], uo = [
|
|
|
12084
12088
|
]
|
|
12085
12089
|
},
|
|
12086
12090
|
{
|
|
12087
|
-
functionName:
|
|
12091
|
+
functionName: x.PROPER,
|
|
12088
12092
|
functionType: r.Text,
|
|
12089
12093
|
description: "formula.functionList.PROPER.description",
|
|
12090
12094
|
abstract: "formula.functionList.PROPER.abstract",
|
|
@@ -12106,7 +12110,7 @@ const ro = [], uo = [
|
|
|
12106
12110
|
]
|
|
12107
12111
|
},
|
|
12108
12112
|
{
|
|
12109
|
-
functionName:
|
|
12113
|
+
functionName: x.REPLACE,
|
|
12110
12114
|
functionType: r.Text,
|
|
12111
12115
|
description: "formula.functionList.REPLACE.description",
|
|
12112
12116
|
abstract: "formula.functionList.REPLACE.abstract",
|
|
@@ -12128,7 +12132,7 @@ const ro = [], uo = [
|
|
|
12128
12132
|
]
|
|
12129
12133
|
},
|
|
12130
12134
|
{
|
|
12131
|
-
functionName:
|
|
12135
|
+
functionName: x.REPLACEB,
|
|
12132
12136
|
functionType: r.Text,
|
|
12133
12137
|
description: "formula.functionList.REPLACEB.description",
|
|
12134
12138
|
abstract: "formula.functionList.REPLACEB.abstract",
|
|
@@ -12150,7 +12154,7 @@ const ro = [], uo = [
|
|
|
12150
12154
|
]
|
|
12151
12155
|
},
|
|
12152
12156
|
{
|
|
12153
|
-
functionName:
|
|
12157
|
+
functionName: x.REPT,
|
|
12154
12158
|
functionType: r.Text,
|
|
12155
12159
|
description: "formula.functionList.REPT.description",
|
|
12156
12160
|
abstract: "formula.functionList.REPT.abstract",
|
|
@@ -12172,7 +12176,7 @@ const ro = [], uo = [
|
|
|
12172
12176
|
]
|
|
12173
12177
|
},
|
|
12174
12178
|
{
|
|
12175
|
-
functionName:
|
|
12179
|
+
functionName: x.RIGHT,
|
|
12176
12180
|
functionType: r.Text,
|
|
12177
12181
|
description: "formula.functionList.RIGHT.description",
|
|
12178
12182
|
abstract: "formula.functionList.RIGHT.abstract",
|
|
@@ -12194,7 +12198,7 @@ const ro = [], uo = [
|
|
|
12194
12198
|
]
|
|
12195
12199
|
},
|
|
12196
12200
|
{
|
|
12197
|
-
functionName:
|
|
12201
|
+
functionName: x.RIGHTB,
|
|
12198
12202
|
functionType: r.Text,
|
|
12199
12203
|
description: "formula.functionList.RIGHTB.description",
|
|
12200
12204
|
abstract: "formula.functionList.RIGHTB.abstract",
|
|
@@ -12216,7 +12220,7 @@ const ro = [], uo = [
|
|
|
12216
12220
|
]
|
|
12217
12221
|
},
|
|
12218
12222
|
{
|
|
12219
|
-
functionName:
|
|
12223
|
+
functionName: x.SEARCH,
|
|
12220
12224
|
functionType: r.Text,
|
|
12221
12225
|
description: "formula.functionList.SEARCH.description",
|
|
12222
12226
|
abstract: "formula.functionList.SEARCH.abstract",
|
|
@@ -12238,7 +12242,7 @@ const ro = [], uo = [
|
|
|
12238
12242
|
]
|
|
12239
12243
|
},
|
|
12240
12244
|
{
|
|
12241
|
-
functionName:
|
|
12245
|
+
functionName: x.SEARCHB,
|
|
12242
12246
|
functionType: r.Text,
|
|
12243
12247
|
description: "formula.functionList.SEARCHB.description",
|
|
12244
12248
|
abstract: "formula.functionList.SEARCHB.abstract",
|
|
@@ -12260,7 +12264,7 @@ const ro = [], uo = [
|
|
|
12260
12264
|
]
|
|
12261
12265
|
},
|
|
12262
12266
|
{
|
|
12263
|
-
functionName:
|
|
12267
|
+
functionName: x.SUBSTITUTE,
|
|
12264
12268
|
functionType: r.Text,
|
|
12265
12269
|
description: "formula.functionList.SUBSTITUTE.description",
|
|
12266
12270
|
abstract: "formula.functionList.SUBSTITUTE.abstract",
|
|
@@ -12282,7 +12286,7 @@ const ro = [], uo = [
|
|
|
12282
12286
|
]
|
|
12283
12287
|
},
|
|
12284
12288
|
{
|
|
12285
|
-
functionName:
|
|
12289
|
+
functionName: x.T,
|
|
12286
12290
|
functionType: r.Text,
|
|
12287
12291
|
description: "formula.functionList.T.description",
|
|
12288
12292
|
abstract: "formula.functionList.T.abstract",
|
|
@@ -12304,7 +12308,7 @@ const ro = [], uo = [
|
|
|
12304
12308
|
]
|
|
12305
12309
|
},
|
|
12306
12310
|
{
|
|
12307
|
-
functionName:
|
|
12311
|
+
functionName: x.TEXT,
|
|
12308
12312
|
functionType: r.Text,
|
|
12309
12313
|
description: "formula.functionList.TEXT.description",
|
|
12310
12314
|
abstract: "formula.functionList.TEXT.abstract",
|
|
@@ -12326,7 +12330,7 @@ const ro = [], uo = [
|
|
|
12326
12330
|
]
|
|
12327
12331
|
},
|
|
12328
12332
|
{
|
|
12329
|
-
functionName:
|
|
12333
|
+
functionName: x.TEXTAFTER,
|
|
12330
12334
|
functionType: r.Text,
|
|
12331
12335
|
description: "formula.functionList.TEXTAFTER.description",
|
|
12332
12336
|
abstract: "formula.functionList.TEXTAFTER.abstract",
|
|
@@ -12348,7 +12352,7 @@ const ro = [], uo = [
|
|
|
12348
12352
|
]
|
|
12349
12353
|
},
|
|
12350
12354
|
{
|
|
12351
|
-
functionName:
|
|
12355
|
+
functionName: x.TEXTBEFORE,
|
|
12352
12356
|
functionType: r.Text,
|
|
12353
12357
|
description: "formula.functionList.TEXTBEFORE.description",
|
|
12354
12358
|
abstract: "formula.functionList.TEXTBEFORE.abstract",
|
|
@@ -12370,7 +12374,7 @@ const ro = [], uo = [
|
|
|
12370
12374
|
]
|
|
12371
12375
|
},
|
|
12372
12376
|
{
|
|
12373
|
-
functionName:
|
|
12377
|
+
functionName: x.TEXTJOIN,
|
|
12374
12378
|
functionType: r.Text,
|
|
12375
12379
|
description: "formula.functionList.TEXTJOIN.description",
|
|
12376
12380
|
abstract: "formula.functionList.TEXTJOIN.abstract",
|
|
@@ -12392,7 +12396,7 @@ const ro = [], uo = [
|
|
|
12392
12396
|
]
|
|
12393
12397
|
},
|
|
12394
12398
|
{
|
|
12395
|
-
functionName:
|
|
12399
|
+
functionName: x.TEXTSPLIT,
|
|
12396
12400
|
functionType: r.Text,
|
|
12397
12401
|
description: "formula.functionList.TEXTSPLIT.description",
|
|
12398
12402
|
abstract: "formula.functionList.TEXTSPLIT.abstract",
|
|
@@ -12414,7 +12418,7 @@ const ro = [], uo = [
|
|
|
12414
12418
|
]
|
|
12415
12419
|
},
|
|
12416
12420
|
{
|
|
12417
|
-
functionName:
|
|
12421
|
+
functionName: x.TRIM,
|
|
12418
12422
|
functionType: r.Text,
|
|
12419
12423
|
description: "formula.functionList.TRIM.description",
|
|
12420
12424
|
abstract: "formula.functionList.TRIM.abstract",
|
|
@@ -12436,7 +12440,7 @@ const ro = [], uo = [
|
|
|
12436
12440
|
]
|
|
12437
12441
|
},
|
|
12438
12442
|
{
|
|
12439
|
-
functionName:
|
|
12443
|
+
functionName: x.UNICHAR,
|
|
12440
12444
|
functionType: r.Text,
|
|
12441
12445
|
description: "formula.functionList.UNICHAR.description",
|
|
12442
12446
|
abstract: "formula.functionList.UNICHAR.abstract",
|
|
@@ -12458,7 +12462,7 @@ const ro = [], uo = [
|
|
|
12458
12462
|
]
|
|
12459
12463
|
},
|
|
12460
12464
|
{
|
|
12461
|
-
functionName:
|
|
12465
|
+
functionName: x.UNICODE,
|
|
12462
12466
|
functionType: r.Text,
|
|
12463
12467
|
description: "formula.functionList.UNICODE.description",
|
|
12464
12468
|
abstract: "formula.functionList.UNICODE.abstract",
|
|
@@ -12480,7 +12484,7 @@ const ro = [], uo = [
|
|
|
12480
12484
|
]
|
|
12481
12485
|
},
|
|
12482
12486
|
{
|
|
12483
|
-
functionName:
|
|
12487
|
+
functionName: x.UPPER,
|
|
12484
12488
|
functionType: r.Text,
|
|
12485
12489
|
description: "formula.functionList.UPPER.description",
|
|
12486
12490
|
abstract: "formula.functionList.UPPER.abstract",
|
|
@@ -12502,7 +12506,7 @@ const ro = [], uo = [
|
|
|
12502
12506
|
]
|
|
12503
12507
|
},
|
|
12504
12508
|
{
|
|
12505
|
-
functionName:
|
|
12509
|
+
functionName: x.VALUE,
|
|
12506
12510
|
functionType: r.Text,
|
|
12507
12511
|
description: "formula.functionList.VALUE.description",
|
|
12508
12512
|
abstract: "formula.functionList.VALUE.abstract",
|
|
@@ -12524,7 +12528,7 @@ const ro = [], uo = [
|
|
|
12524
12528
|
]
|
|
12525
12529
|
},
|
|
12526
12530
|
{
|
|
12527
|
-
functionName:
|
|
12531
|
+
functionName: x.VALUETOTEXT,
|
|
12528
12532
|
functionType: r.Text,
|
|
12529
12533
|
description: "formula.functionList.VALUETOTEXT.description",
|
|
12530
12534
|
abstract: "formula.functionList.VALUETOTEXT.abstract",
|
|
@@ -12546,7 +12550,7 @@ const ro = [], uo = [
|
|
|
12546
12550
|
]
|
|
12547
12551
|
},
|
|
12548
12552
|
{
|
|
12549
|
-
functionName:
|
|
12553
|
+
functionName: x.CALL,
|
|
12550
12554
|
functionType: r.Text,
|
|
12551
12555
|
description: "formula.functionList.CALL.description",
|
|
12552
12556
|
abstract: "formula.functionList.CALL.abstract",
|
|
@@ -12568,7 +12572,7 @@ const ro = [], uo = [
|
|
|
12568
12572
|
]
|
|
12569
12573
|
},
|
|
12570
12574
|
{
|
|
12571
|
-
functionName:
|
|
12575
|
+
functionName: x.EUROCONVERT,
|
|
12572
12576
|
functionType: r.Text,
|
|
12573
12577
|
description: "formula.functionList.EUROCONVERT.description",
|
|
12574
12578
|
abstract: "formula.functionList.EUROCONVERT.abstract",
|
|
@@ -12590,7 +12594,7 @@ const ro = [], uo = [
|
|
|
12590
12594
|
]
|
|
12591
12595
|
},
|
|
12592
12596
|
{
|
|
12593
|
-
functionName:
|
|
12597
|
+
functionName: x.REGISTER_ID,
|
|
12594
12598
|
functionType: r.Text,
|
|
12595
12599
|
description: "formula.functionList.REGISTER_ID.description",
|
|
12596
12600
|
abstract: "formula.functionList.REGISTER_ID.abstract",
|
|
@@ -12611,7 +12615,7 @@ const ro = [], uo = [
|
|
|
12611
12615
|
}
|
|
12612
12616
|
]
|
|
12613
12617
|
}
|
|
12614
|
-
],
|
|
12618
|
+
], Io = [], No = [
|
|
12615
12619
|
{
|
|
12616
12620
|
functionName: yt.ENCODEURL,
|
|
12617
12621
|
functionType: r.Web,
|
|
@@ -12678,32 +12682,32 @@ const ro = [], uo = [
|
|
|
12678
12682
|
}
|
|
12679
12683
|
]
|
|
12680
12684
|
}
|
|
12681
|
-
],
|
|
12682
|
-
...so,
|
|
12683
|
-
...co,
|
|
12684
|
-
...Ao,
|
|
12685
|
-
...Po,
|
|
12685
|
+
], Ro = [
|
|
12686
12686
|
...Lo,
|
|
12687
|
-
...
|
|
12687
|
+
...lo,
|
|
12688
|
+
...To,
|
|
12689
|
+
...Eo,
|
|
12688
12690
|
...bo,
|
|
12691
|
+
...so,
|
|
12692
|
+
...So,
|
|
12693
|
+
...Po,
|
|
12694
|
+
...Ao,
|
|
12689
12695
|
...po,
|
|
12690
|
-
...lo,
|
|
12691
12696
|
...fo,
|
|
12692
|
-
...
|
|
12693
|
-
...
|
|
12694
|
-
...
|
|
12695
|
-
...
|
|
12696
|
-
...To
|
|
12697
|
+
...co,
|
|
12698
|
+
...No,
|
|
12699
|
+
...mo,
|
|
12700
|
+
...Io
|
|
12697
12701
|
];
|
|
12698
|
-
var
|
|
12699
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
12702
|
+
var Co = Object.defineProperty, ho = Object.getOwnPropertyDescriptor, _o = (a, e, t, n) => {
|
|
12703
|
+
for (var i = n > 1 ? void 0 : n ? ho(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
12700
12704
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
12701
|
-
return n && i &&
|
|
12702
|
-
},
|
|
12703
|
-
const
|
|
12705
|
+
return n && i && Co(e, t, i), i;
|
|
12706
|
+
}, yn = (a, e) => (t, n) => e(t, n, a);
|
|
12707
|
+
const et = Mt("formula-ui.description-service");
|
|
12704
12708
|
let Zt = class {
|
|
12705
12709
|
constructor(a = [], e, t) {
|
|
12706
|
-
|
|
12710
|
+
q(this, "_descriptions", []);
|
|
12707
12711
|
this._description = a, this._functionService = e, this._localeService = t, this._initialize();
|
|
12708
12712
|
}
|
|
12709
12713
|
dispose() {
|
|
@@ -12759,7 +12763,7 @@ let Zt = class {
|
|
|
12759
12763
|
if (e.length === 0)
|
|
12760
12764
|
return !1;
|
|
12761
12765
|
const t = e[0].description;
|
|
12762
|
-
return !
|
|
12766
|
+
return !Ja(t);
|
|
12763
12767
|
}
|
|
12764
12768
|
_initialize() {
|
|
12765
12769
|
this._localeService.localeChanged$.subscribe(() => {
|
|
@@ -12768,8 +12772,6 @@ let Zt = class {
|
|
|
12768
12772
|
}
|
|
12769
12773
|
_initDescription() {
|
|
12770
12774
|
const a = [
|
|
12771
|
-
...Za,
|
|
12772
|
-
...Ja,
|
|
12773
12775
|
...ei,
|
|
12774
12776
|
...ti,
|
|
12775
12777
|
...ni,
|
|
@@ -12783,13 +12785,15 @@ let Zt = class {
|
|
|
12783
12785
|
...fi,
|
|
12784
12786
|
...si,
|
|
12785
12787
|
...li,
|
|
12786
|
-
...di
|
|
12787
|
-
|
|
12788
|
+
...di,
|
|
12789
|
+
...pi,
|
|
12790
|
+
...Li
|
|
12791
|
+
].map((t) => t[1]), e = Ro.filter((t) => a.includes(t.functionName));
|
|
12788
12792
|
this._descriptions = e.concat(this._description);
|
|
12789
12793
|
}
|
|
12790
12794
|
_registerDescriptions() {
|
|
12791
12795
|
const a = this._localeService, e = this._descriptions.map((t) => ({
|
|
12792
|
-
functionName:
|
|
12796
|
+
functionName: _u(t, a),
|
|
12793
12797
|
functionType: t.functionType,
|
|
12794
12798
|
description: a.t(t.description),
|
|
12795
12799
|
abstract: a.t(t.abstract),
|
|
@@ -12804,36 +12808,36 @@ let Zt = class {
|
|
|
12804
12808
|
this._functionService.registerDescriptions(...e);
|
|
12805
12809
|
}
|
|
12806
12810
|
};
|
|
12807
|
-
Zt =
|
|
12808
|
-
|
|
12809
|
-
|
|
12811
|
+
Zt = _o([
|
|
12812
|
+
yn(1, Yn),
|
|
12813
|
+
yn(2, y(xe))
|
|
12810
12814
|
], Zt);
|
|
12811
|
-
const
|
|
12812
|
-
formulaSelectFunctionSelect:
|
|
12813
|
-
formulaSelectFunctionResult:
|
|
12814
|
-
formulaSelectFunctionResultItem:
|
|
12815
|
-
formulaSelectFunctionResultItemNameLight:
|
|
12816
|
-
formulaSelectFunctionResultItemSelected:
|
|
12817
|
-
formulaSelectFunctionResultItemActive:
|
|
12818
|
-
formulaSelectFunctionContent:
|
|
12815
|
+
const Oo = "univer-formula-select-function-select", Mo = "univer-formula-select-function-result", Do = "univer-formula-select-function-result-item", go = "univer-formula-select-function-result-item-name-light", xo = "univer-formula-select-function-result-item-selected", vo = "univer-formula-select-function-result-item-active", qo = "univer-formula-select-function-content", Ae = {
|
|
12816
|
+
formulaSelectFunctionSelect: Oo,
|
|
12817
|
+
formulaSelectFunctionResult: Mo,
|
|
12818
|
+
formulaSelectFunctionResultItem: Do,
|
|
12819
|
+
formulaSelectFunctionResultItemNameLight: go,
|
|
12820
|
+
formulaSelectFunctionResultItemSelected: xo,
|
|
12821
|
+
formulaSelectFunctionResultItemActive: vo,
|
|
12822
|
+
formulaSelectFunctionContent: qo
|
|
12819
12823
|
};
|
|
12820
|
-
function
|
|
12821
|
-
const { onChange: e } = a, t = "-1", [n, i] = X(""), [u, o] = X([]), [m, c] = X(0), [f, d] = X(t), [s, l] = X(0), [L, b] = X(null), E = me(
|
|
12824
|
+
function yo(a) {
|
|
12825
|
+
const { onChange: e } = a, t = "-1", [n, i] = X(""), [u, o] = X([]), [m, c] = X(0), [f, d] = X(t), [s, l] = X(0), [L, b] = X(null), E = me(et), p = me(xe), R = hu(r, p);
|
|
12822
12826
|
R.unshift({
|
|
12823
12827
|
label: p.t("formula.moreFunctions.allFunctions"),
|
|
12824
12828
|
value: t
|
|
12825
12829
|
});
|
|
12826
12830
|
const T = p.t("formula.prompt.required"), A = p.t("formula.prompt.optional");
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
}, []),
|
|
12831
|
+
Rt(() => {
|
|
12832
|
+
D(t);
|
|
12833
|
+
}, []), Rt(() => {
|
|
12830
12834
|
S(0);
|
|
12831
12835
|
}, [u]);
|
|
12832
12836
|
const h = (I) => {
|
|
12833
12837
|
if (n.trim() === "")
|
|
12834
12838
|
return I;
|
|
12835
12839
|
const F = new RegExp(`(${n.toLocaleUpperCase()})`);
|
|
12836
|
-
return I.split(F).filter(Boolean).map((oe,
|
|
12840
|
+
return I.split(F).filter(Boolean).map((oe, Ie) => oe.match(F) ? /* @__PURE__ */ C.jsx("span", { className: Ae.formulaSelectFunctionResultItemNameLight, children: oe }, Ie) : oe);
|
|
12837
12841
|
}, S = (I) => {
|
|
12838
12842
|
if (u.length === 0) {
|
|
12839
12843
|
b(null);
|
|
@@ -12847,7 +12851,7 @@ function xo(a) {
|
|
|
12847
12851
|
}
|
|
12848
12852
|
b(F), e(F);
|
|
12849
12853
|
};
|
|
12850
|
-
function
|
|
12854
|
+
function D(I) {
|
|
12851
12855
|
d(I);
|
|
12852
12856
|
const F = E.getSearchListByType(+I);
|
|
12853
12857
|
o(F);
|
|
@@ -12857,7 +12861,7 @@ function xo(a) {
|
|
|
12857
12861
|
const F = E.getSearchListByName(I);
|
|
12858
12862
|
o(F);
|
|
12859
12863
|
}
|
|
12860
|
-
function
|
|
12864
|
+
function v(I) {
|
|
12861
12865
|
if (I.stopPropagation(), I.key === "ArrowDown") {
|
|
12862
12866
|
const F = m + 1;
|
|
12863
12867
|
c(F === u.length ? 0 : F);
|
|
@@ -12867,19 +12871,19 @@ function xo(a) {
|
|
|
12867
12871
|
} else
|
|
12868
12872
|
I.key === "Enter" && S(m);
|
|
12869
12873
|
}
|
|
12870
|
-
const
|
|
12874
|
+
const g = (I) => {
|
|
12871
12875
|
c(I);
|
|
12872
12876
|
}, U = () => {
|
|
12873
12877
|
c(-1);
|
|
12874
12878
|
};
|
|
12875
12879
|
return /* @__PURE__ */ C.jsxs("div", { children: [
|
|
12876
12880
|
/* @__PURE__ */ C.jsxs("div", { className: Ae.formulaSelectFunctionSelect, children: [
|
|
12877
|
-
/* @__PURE__ */ C.jsx(
|
|
12881
|
+
/* @__PURE__ */ C.jsx(xr, { value: f, options: R, onChange: D }),
|
|
12878
12882
|
/* @__PURE__ */ C.jsx(
|
|
12879
|
-
|
|
12883
|
+
vr,
|
|
12880
12884
|
{
|
|
12881
12885
|
placeholder: p.t("formula.moreFunctions.searchFunctionPlaceholder"),
|
|
12882
|
-
onKeyDown:
|
|
12886
|
+
onKeyDown: v,
|
|
12883
12887
|
value: n,
|
|
12884
12888
|
onChange: M,
|
|
12885
12889
|
size: "large",
|
|
@@ -12887,38 +12891,38 @@ function xo(a) {
|
|
|
12887
12891
|
}
|
|
12888
12892
|
)
|
|
12889
12893
|
] }),
|
|
12890
|
-
/* @__PURE__ */ C.jsx("ul", { className: Ae.formulaSelectFunctionResult, onKeyDown:
|
|
12894
|
+
/* @__PURE__ */ C.jsx("ul", { className: Ae.formulaSelectFunctionResult, onKeyDown: v, tabIndex: -1, children: u.map(({ name: I }, F) => /* @__PURE__ */ C.jsxs(
|
|
12891
12895
|
"li",
|
|
12892
12896
|
{
|
|
12893
12897
|
className: m === F ? `${Ae.formulaSelectFunctionResultItem} ${Ae.formulaSelectFunctionResultItemActive}` : Ae.formulaSelectFunctionResultItem,
|
|
12894
|
-
onMouseEnter: () =>
|
|
12898
|
+
onMouseEnter: () => g(F),
|
|
12895
12899
|
onMouseLeave: U,
|
|
12896
12900
|
onClick: () => S(F),
|
|
12897
12901
|
children: [
|
|
12898
|
-
s === F && /* @__PURE__ */ C.jsx(
|
|
12902
|
+
s === F && /* @__PURE__ */ C.jsx(Tu, { className: Ae.formulaSelectFunctionResultItemSelected }),
|
|
12899
12903
|
/* @__PURE__ */ C.jsx("span", { className: Ae.formulaSelectFunctionResultItemName, children: h(I) })
|
|
12900
12904
|
]
|
|
12901
12905
|
},
|
|
12902
12906
|
F
|
|
12903
12907
|
)) }),
|
|
12904
12908
|
L && /* @__PURE__ */ C.jsxs("div", { className: Ae.formulaSelectFunctionContent, children: [
|
|
12905
|
-
/* @__PURE__ */ C.jsx(
|
|
12909
|
+
/* @__PURE__ */ C.jsx(Xe, { title: L.functionName, value: L.description }),
|
|
12906
12910
|
/* @__PURE__ */ C.jsx(
|
|
12907
|
-
|
|
12911
|
+
Xe,
|
|
12908
12912
|
{
|
|
12909
12913
|
title: p.t("formula.moreFunctions.syntax"),
|
|
12910
|
-
value: /* @__PURE__ */ C.jsx(
|
|
12914
|
+
value: /* @__PURE__ */ C.jsx(Ma, { prefix: L.functionName, value: L.functionParameter })
|
|
12911
12915
|
}
|
|
12912
12916
|
),
|
|
12913
12917
|
/* @__PURE__ */ C.jsx(
|
|
12914
|
-
|
|
12918
|
+
Xe,
|
|
12915
12919
|
{
|
|
12916
12920
|
title: p.t("formula.prompt.helpExample"),
|
|
12917
12921
|
value: `${L.functionName}(${L.functionParameter.map((I) => I.example).join(",")})`
|
|
12918
12922
|
}
|
|
12919
12923
|
),
|
|
12920
12924
|
L.functionParameter && L.functionParameter.map((I, F) => /* @__PURE__ */ C.jsx(
|
|
12921
|
-
|
|
12925
|
+
Xe,
|
|
12922
12926
|
{
|
|
12923
12927
|
title: I.name,
|
|
12924
12928
|
value: `${I.require ? T : A} ${I.detail}`
|
|
@@ -12928,19 +12932,19 @@ function xo(a) {
|
|
|
12928
12932
|
] })
|
|
12929
12933
|
] });
|
|
12930
12934
|
}
|
|
12931
|
-
function
|
|
12932
|
-
const a =
|
|
12935
|
+
function Fo() {
|
|
12936
|
+
const a = ur(), [e, t] = X(!0), [n, i] = X(!1), [u, o] = X(null), m = me(xe), c = me(Qe);
|
|
12933
12937
|
function f() {
|
|
12934
12938
|
t(!e), i(!n);
|
|
12935
12939
|
}
|
|
12936
12940
|
function d() {
|
|
12937
12941
|
c.setFormula(`=${u == null ? void 0 : u.functionName}(`);
|
|
12938
12942
|
}
|
|
12939
|
-
return /* @__PURE__ */ C.jsxs("div", { className:
|
|
12940
|
-
e && /* @__PURE__ */ C.jsx(
|
|
12941
|
-
n && /* @__PURE__ */ C.jsx(
|
|
12943
|
+
return /* @__PURE__ */ C.jsxs("div", { className: qn.formulaMoreFunctions, children: [
|
|
12944
|
+
e && /* @__PURE__ */ C.jsx(yo, { onChange: o }),
|
|
12945
|
+
n && /* @__PURE__ */ C.jsx(oo, { functionInfo: u, onChange: () => {
|
|
12942
12946
|
} }),
|
|
12943
|
-
/* @__PURE__ */ C.jsxs("div", { className:
|
|
12947
|
+
/* @__PURE__ */ C.jsxs("div", { className: qn.formulaMoreFunctionsOperation, children: [
|
|
12944
12948
|
n && /* @__PURE__ */ C.jsx(Vt, { type: "primary", size: "small", onClick: f, children: m.t("formula.moreFunctions.next") }),
|
|
12945
12949
|
n && /* @__PURE__ */ C.jsx(Vt, { size: "small", onClick: f, children: m.t("formula.moreFunctions.prev") }),
|
|
12946
12950
|
e && !!a && /* @__PURE__ */ C.jsx(Vt, { type: "primary", size: "small", onClick: d, children: m.t("formula.moreFunctions.confirm") })
|
|
@@ -12954,14 +12958,14 @@ const At = {
|
|
|
12954
12958
|
return !0;
|
|
12955
12959
|
}
|
|
12956
12960
|
};
|
|
12957
|
-
function
|
|
12961
|
+
function Uo(a) {
|
|
12958
12962
|
return {
|
|
12959
|
-
id:
|
|
12963
|
+
id: ln.id,
|
|
12960
12964
|
icon: "FunctionSingle",
|
|
12961
12965
|
tooltip: "formula.insert.tooltip",
|
|
12962
|
-
group:
|
|
12963
|
-
type:
|
|
12964
|
-
positions: [
|
|
12966
|
+
group: pr.TOOLBAR_FORMULAS_INSERT,
|
|
12967
|
+
type: sn.SELECTOR,
|
|
12968
|
+
positions: [Lr.TOOLBAR_START],
|
|
12965
12969
|
selections: [
|
|
12966
12970
|
{
|
|
12967
12971
|
label: "SUM",
|
|
@@ -12989,53 +12993,56 @@ function qo(a) {
|
|
|
12989
12993
|
icon: "MinSingle"
|
|
12990
12994
|
}
|
|
12991
12995
|
],
|
|
12992
|
-
hidden$:
|
|
12993
|
-
disabled$:
|
|
12996
|
+
hidden$: Ar(a, Y.UNIVER_SHEET),
|
|
12997
|
+
disabled$: la(a, { workbookTypes: [Wn], worksheetTypes: [Kn, kn], rangeTypes: [$n] })
|
|
12994
12998
|
};
|
|
12995
12999
|
}
|
|
12996
|
-
function
|
|
13000
|
+
function Bo(a) {
|
|
12997
13001
|
return {
|
|
12998
|
-
id:
|
|
13002
|
+
id: Ea.id,
|
|
12999
13003
|
title: "formula.insert.more",
|
|
13000
|
-
positions:
|
|
13001
|
-
type:
|
|
13004
|
+
positions: ln.id,
|
|
13005
|
+
type: sn.BUTTON
|
|
13002
13006
|
};
|
|
13003
13007
|
}
|
|
13004
|
-
function
|
|
13005
|
-
return new
|
|
13008
|
+
function Vo(a) {
|
|
13009
|
+
return new Or((t) => t.next(!a.get(Pr).supportClipboard));
|
|
13006
13010
|
}
|
|
13007
|
-
function
|
|
13011
|
+
function Ho(a) {
|
|
13008
13012
|
return {
|
|
13009
|
-
id:
|
|
13010
|
-
type:
|
|
13013
|
+
id: Pa.id,
|
|
13014
|
+
type: sn.BUTTON,
|
|
13011
13015
|
title: "formula.operation.pasteFormula",
|
|
13012
|
-
positions: [
|
|
13013
|
-
disabled$:
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
+
positions: [or],
|
|
13017
|
+
disabled$: Vo(a).pipe(
|
|
13018
|
+
_r(la(a, { workbookTypes: [Wn], rangeTypes: [$n], worksheetTypes: [kn, Kn] })),
|
|
13019
|
+
We(([e, t]) => e || t)
|
|
13016
13020
|
)
|
|
13017
13021
|
};
|
|
13018
13022
|
}
|
|
13019
|
-
const
|
|
13020
|
-
function
|
|
13021
|
-
return a.getContextValue(
|
|
13023
|
+
const Da = "meta_key_ctrl_And_Shift";
|
|
13024
|
+
function wo(a) {
|
|
13025
|
+
return a.getContextValue(Xa) && a.getContextValue(Ya) && a.getContextValue(Wa);
|
|
13022
13026
|
}
|
|
13023
|
-
function
|
|
13024
|
-
return
|
|
13027
|
+
function ga(a) {
|
|
13028
|
+
return (Ee(a == null ? void 0 : a.f) || ge(a == null ? void 0 : a.si)) && typeof (a == null ? void 0 : a.v) == "string" && Ai.has(a.v) ? a.v : null;
|
|
13029
|
+
}
|
|
13030
|
+
function Go(a) {
|
|
13031
|
+
return (Ee(a == null ? void 0 : a.f) || ge(a == null ? void 0 : a.si)) && (a == null ? void 0 : a.t) === Ue.NUMBER && typeof (a == null ? void 0 : a.v) == "number" ? Gn(a.v) : null;
|
|
13025
13032
|
}
|
|
13026
13033
|
const xt = [
|
|
13027
13034
|
H.ARROW_DOWN,
|
|
13028
13035
|
H.ARROW_UP,
|
|
13029
13036
|
H.ARROW_LEFT,
|
|
13030
13037
|
H.ARROW_RIGHT
|
|
13031
|
-
],
|
|
13032
|
-
function
|
|
13038
|
+
], Xo = [...xt, H.ENTER, H.TAB, H.ESC];
|
|
13039
|
+
function Yo() {
|
|
13033
13040
|
const a = [];
|
|
13034
|
-
for (const e of
|
|
13041
|
+
for (const e of Xo)
|
|
13035
13042
|
a.push({
|
|
13036
|
-
id:
|
|
13043
|
+
id: ve.id,
|
|
13037
13044
|
binding: e,
|
|
13038
|
-
preconditions: (t) =>
|
|
13045
|
+
preconditions: (t) => je(t),
|
|
13039
13046
|
staticParameters: {
|
|
13040
13047
|
eventType: se.Keyboard,
|
|
13041
13048
|
keycode: e
|
|
@@ -13043,63 +13050,63 @@ function Ho() {
|
|
|
13043
13050
|
});
|
|
13044
13051
|
return a;
|
|
13045
13052
|
}
|
|
13046
|
-
function
|
|
13053
|
+
function Wo() {
|
|
13047
13054
|
const a = [];
|
|
13048
13055
|
for (const e of xt)
|
|
13049
13056
|
a.push({
|
|
13050
|
-
id:
|
|
13051
|
-
binding: e |
|
|
13052
|
-
preconditions: (t) =>
|
|
13057
|
+
id: ve.id,
|
|
13058
|
+
binding: e | Se.SHIFT,
|
|
13059
|
+
preconditions: (t) => je(t),
|
|
13053
13060
|
staticParameters: {
|
|
13054
13061
|
eventType: se.Keyboard,
|
|
13055
13062
|
keycode: e,
|
|
13056
|
-
metaKey:
|
|
13063
|
+
metaKey: Se.SHIFT
|
|
13057
13064
|
}
|
|
13058
13065
|
});
|
|
13059
13066
|
return a;
|
|
13060
13067
|
}
|
|
13061
|
-
function
|
|
13068
|
+
function Ko() {
|
|
13062
13069
|
const a = [];
|
|
13063
13070
|
for (const e of xt)
|
|
13064
13071
|
a.push({
|
|
13065
|
-
id:
|
|
13066
|
-
binding: e |
|
|
13067
|
-
preconditions: (t) =>
|
|
13072
|
+
id: ve.id,
|
|
13073
|
+
binding: e | Se.CTRL_COMMAND,
|
|
13074
|
+
preconditions: (t) => je(t),
|
|
13068
13075
|
staticParameters: {
|
|
13069
13076
|
eventType: se.Keyboard,
|
|
13070
13077
|
keycode: e,
|
|
13071
|
-
metaKey:
|
|
13078
|
+
metaKey: Se.CTRL_COMMAND
|
|
13072
13079
|
}
|
|
13073
13080
|
});
|
|
13074
13081
|
return a;
|
|
13075
13082
|
}
|
|
13076
|
-
function
|
|
13083
|
+
function ko() {
|
|
13077
13084
|
const a = [];
|
|
13078
13085
|
for (const e of xt)
|
|
13079
13086
|
a.push({
|
|
13080
|
-
id:
|
|
13081
|
-
binding: e |
|
|
13082
|
-
preconditions: (t) =>
|
|
13087
|
+
id: ve.id,
|
|
13088
|
+
binding: e | Se.SHIFT | Se.CTRL_COMMAND,
|
|
13089
|
+
preconditions: (t) => je(t),
|
|
13083
13090
|
staticParameters: {
|
|
13084
13091
|
eventType: se.Keyboard,
|
|
13085
13092
|
keycode: e,
|
|
13086
|
-
metaKey:
|
|
13093
|
+
metaKey: Da
|
|
13087
13094
|
}
|
|
13088
13095
|
});
|
|
13089
13096
|
return a;
|
|
13090
13097
|
}
|
|
13091
|
-
const
|
|
13092
|
-
id:
|
|
13098
|
+
const $o = {
|
|
13099
|
+
id: dn.id,
|
|
13093
13100
|
binding: H.F4,
|
|
13094
|
-
preconditions: (a) =>
|
|
13101
|
+
preconditions: (a) => je(a)
|
|
13095
13102
|
};
|
|
13096
|
-
function
|
|
13103
|
+
function jo() {
|
|
13097
13104
|
const a = [];
|
|
13098
13105
|
for (const e of [H.ENTER, H.TAB, H.ARROW_DOWN, H.ARROW_UP])
|
|
13099
13106
|
a.push({
|
|
13100
|
-
id:
|
|
13107
|
+
id: ve.id,
|
|
13101
13108
|
binding: e,
|
|
13102
|
-
preconditions: (t) =>
|
|
13109
|
+
preconditions: (t) => wo(t),
|
|
13103
13110
|
staticParameters: {
|
|
13104
13111
|
eventType: se.Keyboard,
|
|
13105
13112
|
keycode: e,
|
|
@@ -13108,13 +13115,13 @@ function Wo() {
|
|
|
13108
13115
|
});
|
|
13109
13116
|
return a;
|
|
13110
13117
|
}
|
|
13111
|
-
var
|
|
13112
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
13118
|
+
var Qo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, Zo = (a, e, t, n) => {
|
|
13119
|
+
for (var i = n > 1 ? void 0 : n ? zo(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
13113
13120
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
13114
|
-
return n && i &&
|
|
13115
|
-
},
|
|
13116
|
-
const
|
|
13117
|
-
let
|
|
13121
|
+
return n && i && Qo(e, t, i), i;
|
|
13122
|
+
}, Re = (a, e) => (t, n) => e(t, n, a);
|
|
13123
|
+
const Jo = {};
|
|
13124
|
+
let Ke = class extends ne {
|
|
13118
13125
|
constructor(a, e, t, n, i, u, o, m) {
|
|
13119
13126
|
super(), this._config = a, this._injector = e, this._menuService = t, this._commandService = n, this._shortcutService = i, this._uiPartsService = u, this._renderManagerService = o, this._componentManager = m, this._initialize();
|
|
13120
13127
|
}
|
|
@@ -13123,7 +13130,7 @@ let We = class extends ne {
|
|
|
13123
13130
|
}
|
|
13124
13131
|
_registerMenus() {
|
|
13125
13132
|
const { menu: a = {} } = this._config;
|
|
13126
|
-
[
|
|
13133
|
+
[Uo, Bo, Ho].forEach(
|
|
13127
13134
|
(e) => {
|
|
13128
13135
|
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(e), a));
|
|
13129
13136
|
}
|
|
@@ -13131,51 +13138,51 @@ let We = class extends ne {
|
|
|
13131
13138
|
}
|
|
13132
13139
|
_registerCommands() {
|
|
13133
13140
|
[
|
|
13134
|
-
Ta,
|
|
13135
13141
|
ba,
|
|
13136
|
-
|
|
13137
|
-
|
|
13142
|
+
Pa,
|
|
13143
|
+
ln,
|
|
13144
|
+
Ea,
|
|
13138
13145
|
zt,
|
|
13139
13146
|
Qt,
|
|
13140
|
-
|
|
13141
|
-
|
|
13147
|
+
ve,
|
|
13148
|
+
dn,
|
|
13142
13149
|
At
|
|
13143
13150
|
].forEach((a) => this.disposeWithMe(this._commandService.registerCommand(a)));
|
|
13144
13151
|
}
|
|
13145
13152
|
_registerShortcuts() {
|
|
13146
13153
|
[
|
|
13147
|
-
...
|
|
13148
|
-
...wo(),
|
|
13149
|
-
...Go(),
|
|
13150
|
-
...Xo(),
|
|
13154
|
+
...Yo(),
|
|
13151
13155
|
...Wo(),
|
|
13152
|
-
|
|
13156
|
+
...Ko(),
|
|
13157
|
+
...ko(),
|
|
13158
|
+
...jo(),
|
|
13159
|
+
$o
|
|
13153
13160
|
].forEach((a) => {
|
|
13154
13161
|
this.disposeWithMe(this._shortcutService.registerShortcut(a));
|
|
13155
13162
|
});
|
|
13156
13163
|
}
|
|
13157
13164
|
_registerComponents() {
|
|
13158
13165
|
this.disposeWithMe(
|
|
13159
|
-
this._uiPartsService.registerComponent(
|
|
13160
|
-
), this._componentManager.register(
|
|
13166
|
+
this._uiPartsService.registerComponent(Tr.CONTENT, () => hr(Zu, this._injector))
|
|
13167
|
+
), this._componentManager.register(Ta, Fo);
|
|
13161
13168
|
}
|
|
13162
13169
|
_registerRenderControllers() {
|
|
13163
|
-
this.disposeWithMe(this._renderManagerService.registerRenderController(Y.UNIVER_SHEET,
|
|
13170
|
+
this.disposeWithMe(this._renderManagerService.registerRenderController(Y.UNIVER_SHEET, Ct));
|
|
13164
13171
|
}
|
|
13165
13172
|
};
|
|
13166
|
-
|
|
13167
|
-
ce(fe.Ready,
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
],
|
|
13176
|
-
const
|
|
13173
|
+
Ke = Zo([
|
|
13174
|
+
ce(fe.Ready, Ke),
|
|
13175
|
+
Re(1, y(Ot)),
|
|
13176
|
+
Re(2, Er),
|
|
13177
|
+
Re(3, ue),
|
|
13178
|
+
Re(4, Sr),
|
|
13179
|
+
Re(5, Ir),
|
|
13180
|
+
Re(6, fn),
|
|
13181
|
+
Re(7, y(br))
|
|
13182
|
+
], Ke);
|
|
13183
|
+
const Fn = "formula_reference_selection_plugin_name";
|
|
13177
13184
|
function Gt(a, e, t) {
|
|
13178
|
-
const n = a.getCurrentTheme(), i = new
|
|
13185
|
+
const n = a.getCurrentTheme(), i = new Vn(e).setAlpha(0.05).toRgbString();
|
|
13179
13186
|
return {
|
|
13180
13187
|
id: t,
|
|
13181
13188
|
strokeWidth: 1,
|
|
@@ -13191,30 +13198,30 @@ function Gt(a, e, t) {
|
|
|
13191
13198
|
hasColumnHeader: !1
|
|
13192
13199
|
};
|
|
13193
13200
|
}
|
|
13194
|
-
var
|
|
13195
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
13201
|
+
var em = Object.defineProperty, tm = Object.getOwnPropertyDescriptor, nm = (a, e, t, n) => {
|
|
13202
|
+
for (var i = n > 1 ? void 0 : n ? tm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
13196
13203
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
13197
|
-
return n && i &&
|
|
13198
|
-
},
|
|
13199
|
-
const
|
|
13204
|
+
return n && i && em(e, t, i), i;
|
|
13205
|
+
}, ee = (a, e) => (t, n) => e(t, n, a);
|
|
13206
|
+
const am = [Ka, ka];
|
|
13200
13207
|
let Pt = class extends ne {
|
|
13201
|
-
constructor(e, t, n, i, u, o, m, c, f, d, s, l, L, b, E, p
|
|
13208
|
+
constructor(e, t, n, i, u, o, m, c, f, d, s, l, L, b, E, p) {
|
|
13202
13209
|
super();
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = i, this._formulaPromptService = u, this._lexerTreeBuilder = o, this._renderManagerService = m, this._themeService = c, this._selectionManagerService = f, this.
|
|
13210
|
+
q(this, "_formulaRefColors", []);
|
|
13211
|
+
q(this, "_previousSequenceNodes");
|
|
13212
|
+
q(this, "_previousRangesCount", 0);
|
|
13213
|
+
q(this, "_previousInsertRefStringIndex");
|
|
13214
|
+
q(this, "_currentInsertRefStringIndex", -1);
|
|
13215
|
+
q(this, "_arrowMoveActionState", 0);
|
|
13216
|
+
q(this, "_isSelectionMovingRefSelections", []);
|
|
13217
|
+
q(this, "_stringColor", "");
|
|
13218
|
+
q(this, "_numberColor", "");
|
|
13219
|
+
q(this, "_insertSelections", []);
|
|
13220
|
+
q(this, "_inputPanelState", 0);
|
|
13221
|
+
q(this, "_userCursorMove", !1);
|
|
13222
|
+
q(this, "_previousEditorUnitId");
|
|
13223
|
+
q(this, "_existsSequenceNode", !1);
|
|
13224
|
+
this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = i, this._formulaPromptService = u, this._lexerTreeBuilder = o, this._renderManagerService = m, this._themeService = c, this._selectionManagerService = f, this._univerInstanceService = d, this._selectionRenderService = s, this._descriptionService = l, this._textSelectionManagerService = L, this._docViewModelManagerService = b, this._contextMenuService = E, this._editorService = p, this._initialize();
|
|
13218
13225
|
}
|
|
13219
13226
|
dispose() {
|
|
13220
13227
|
this._formulaRefColors = [], this._resetTemp();
|
|
@@ -13282,27 +13289,27 @@ let Pt = class extends ne {
|
|
|
13282
13289
|
})
|
|
13283
13290
|
), this.disposeWithMe(
|
|
13284
13291
|
this._editorService.closeRangePrompt$.subscribe(() => {
|
|
13285
|
-
(!this._editorService.getSpreadsheetFocusState() || !this._formulaPromptService.isLockedSelectionInsert()) && (this._closeRangePrompt(), this._selectionManagerService.changePlugin(
|
|
13292
|
+
(!this._editorService.getSpreadsheetFocusState() || !this._formulaPromptService.isLockedSelectionInsert()) && (this._closeRangePrompt(), this._selectionManagerService.changePlugin(he));
|
|
13286
13293
|
})
|
|
13287
13294
|
);
|
|
13288
13295
|
}
|
|
13289
13296
|
_closeRangePrompt(e) {
|
|
13290
13297
|
const t = this._selectionManagerService.getCurrent();
|
|
13291
|
-
if (this._insertSelections = [], (t == null ? void 0 : t.pluginName) ===
|
|
13298
|
+
if (this._insertSelections = [], (t == null ? void 0 : t.pluginName) === he) {
|
|
13292
13299
|
this._disableForceKeepVisible();
|
|
13293
13300
|
return;
|
|
13294
13301
|
}
|
|
13295
|
-
this._selectionManagerService.clear(), e && this._editorService.isSheetEditor(e) ? (this._selectionManagerService.changePlugin(
|
|
13296
|
-
`, [])) : this._selectionManagerService.changePluginNoRefresh(
|
|
13302
|
+
this._selectionManagerService.clear(), e && this._editorService.isSheetEditor(e) ? (this._selectionManagerService.changePlugin(he), this._updateEditorModel(`\r
|
|
13303
|
+
`, [])) : this._selectionManagerService.changePluginNoRefresh(he), this._contextService.setContextValue(nt, !1), this._disableForceKeepVisible(), this._selectionRenderService.resetStyle(), this._resetTemp(), this._hideFunctionPanel();
|
|
13297
13304
|
}
|
|
13298
13305
|
_initialRefSelectionUpdateEvent() {
|
|
13299
|
-
const e = new
|
|
13306
|
+
const e = new Hn();
|
|
13300
13307
|
this.disposeWithMe(
|
|
13301
13308
|
Q(
|
|
13302
13309
|
this._selectionManagerService.selectionMoveEnd$.subscribe(() => {
|
|
13303
13310
|
e.dispose();
|
|
13304
13311
|
const t = this._selectionManagerService.getCurrent();
|
|
13305
|
-
if (this._formulaPromptService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !==
|
|
13312
|
+
if (this._formulaPromptService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !== Fn)
|
|
13306
13313
|
return;
|
|
13307
13314
|
this._updateRefSelectionStyle(this._isSelectionMovingRefSelections), this._selectionRenderService.getCurrentControls().forEach((i) => {
|
|
13308
13315
|
i.disableHelperSelection(), e.add(
|
|
@@ -13382,7 +13389,7 @@ let Pt = class extends ne {
|
|
|
13382
13389
|
const m = e.length - o.token.length, c = { ...o };
|
|
13383
13390
|
c.token = e, c.endIndex += m, i[u] = c;
|
|
13384
13391
|
const f = this._descriptionService.hasDefinedNameDescription(e), d = this._descriptionService.isFormulaDefinedName(e), s = e.length + 1, l = !f || d;
|
|
13385
|
-
l && i.splice(u + 1, 0,
|
|
13392
|
+
l && i.splice(u + 1, 0, ye.OPEN_BRACKET);
|
|
13386
13393
|
for (let b = u + 2, E = i.length; b < E; b++) {
|
|
13387
13394
|
const p = i[b];
|
|
13388
13395
|
if (typeof p == "string")
|
|
@@ -13462,7 +13469,7 @@ let Pt = class extends ne {
|
|
|
13462
13469
|
this._disableForceKeepVisible();
|
|
13463
13470
|
return;
|
|
13464
13471
|
}
|
|
13465
|
-
|
|
13472
|
+
Tn(e) ? (this._editorBridgeService.enableForceKeepVisible(), this._contextMenuService.disable(), this._formulaPromptService.enableLockedSelectionInsert(), this._selectionRenderService.enableRemainLast(), this._arrowMoveActionState !== 1 && (this._arrowMoveActionState = 2)) : this._disableForceKeepVisible();
|
|
13466
13473
|
}
|
|
13467
13474
|
/**
|
|
13468
13475
|
*
|
|
@@ -13502,7 +13509,7 @@ let Pt = class extends ne {
|
|
|
13502
13509
|
}
|
|
13503
13510
|
_editorModelUnitIds() {
|
|
13504
13511
|
const t = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId();
|
|
13505
|
-
return this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) ? [t] :
|
|
13512
|
+
return this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) ? [t] : am;
|
|
13506
13513
|
}
|
|
13507
13514
|
/**
|
|
13508
13515
|
* Detect whether the user's input content is a formula. If it is a formula,
|
|
@@ -13512,8 +13519,8 @@ let Pt = class extends ne {
|
|
|
13512
13519
|
*/
|
|
13513
13520
|
_contextSwitch() {
|
|
13514
13521
|
const e = this._getCurrentBodyDataStreamAndOffset();
|
|
13515
|
-
if (e &&
|
|
13516
|
-
this._contextService.setContextValue(
|
|
13522
|
+
if (e && Ee(e.dataStream)) {
|
|
13523
|
+
this._contextService.setContextValue(nt, !0);
|
|
13517
13524
|
const t = this._lexerTreeBuilder.sequenceNodesBuilder(e.dataStream.replace(/\r/g, "").replace(/\n/g, "")) || [];
|
|
13518
13525
|
this._formulaPromptService.setSequenceNodes(t);
|
|
13519
13526
|
const n = this._textSelectionManagerService.getActiveRange();
|
|
@@ -13523,21 +13530,21 @@ let Pt = class extends ne {
|
|
|
13523
13530
|
this._currentInsertRefStringIndex = i - 1 + e.offset;
|
|
13524
13531
|
return;
|
|
13525
13532
|
}
|
|
13526
|
-
this._contextService.setContextValue(
|
|
13533
|
+
this._contextService.setContextValue(nt, !1), this._formulaPromptService.disableLockedSelectionChange(), this._formulaPromptService.disableLockedSelectionInsert(), this._formulaPromptService.clearSequenceNodes(), this._hideFunctionPanel();
|
|
13527
13534
|
}
|
|
13528
13535
|
_getContextState() {
|
|
13529
|
-
return this._contextService.getContextValue(
|
|
13536
|
+
return this._contextService.getContextValue(nt);
|
|
13530
13537
|
}
|
|
13531
13538
|
/**
|
|
13532
13539
|
* Switch from formula selection state to regular selection state.
|
|
13533
13540
|
*/
|
|
13534
13541
|
_switchSelectionPlugin() {
|
|
13535
13542
|
if (this._getContextState() === !0) {
|
|
13536
|
-
this._selectionManagerService.changePluginNoRefresh(
|
|
13537
|
-
const e =
|
|
13543
|
+
this._selectionManagerService.changePluginNoRefresh(Fn);
|
|
13544
|
+
const e = xi(this._themeService);
|
|
13538
13545
|
e.strokeDash = 8, e.hasAutoFill = !1, e.hasRowHeader = !1, e.hasColumnHeader = !1, this._selectionRenderService.setStyle(e);
|
|
13539
13546
|
} else
|
|
13540
|
-
this._selectionManagerService.changePluginNoRefresh(
|
|
13547
|
+
this._selectionManagerService.changePluginNoRefresh(he), this._selectionRenderService.resetStyle();
|
|
13541
13548
|
}
|
|
13542
13549
|
/**
|
|
13543
13550
|
* Highlight cell editor and formula bar editor.
|
|
@@ -13611,7 +13618,7 @@ let Pt = class extends ne {
|
|
|
13611
13618
|
return;
|
|
13612
13619
|
let m = null;
|
|
13613
13620
|
for (let c = 0, f = e.length; c < f; c++) {
|
|
13614
|
-
const d = e[c], { themeColor: s, token: l, refIndex: L } = d, b =
|
|
13621
|
+
const d = e[c], { themeColor: s, token: l, refIndex: L } = d, b = De(l), { unitId: E, sheetName: p, range: R } = b, T = vi(R, o.getRowCount(), o.getColumnCount());
|
|
13615
13622
|
if (E != null && E.length > 0 && t !== E)
|
|
13616
13623
|
continue;
|
|
13617
13624
|
const A = this._getSheetIdByName(t, p.trim());
|
|
@@ -13622,8 +13629,8 @@ let Pt = class extends ne {
|
|
|
13622
13629
|
m = h;
|
|
13623
13630
|
continue;
|
|
13624
13631
|
}
|
|
13625
|
-
const S =
|
|
13626
|
-
!
|
|
13632
|
+
const S = qi(T, o);
|
|
13633
|
+
!_e.equals(S, T) && T.startRow === T.endRow && T.startColumn === T.endColumn && (T.startRow = S.startRow, T.endRow = S.endRow, T.startColumn = S.startColumn, T.endColumn = S.endColumn), i.push({
|
|
13627
13634
|
range: T,
|
|
13628
13635
|
primary: S,
|
|
13629
13636
|
style: Gt(this._themeService, s, L.toString())
|
|
@@ -13656,7 +13663,7 @@ let Pt = class extends ne {
|
|
|
13656
13663
|
_getSheetIdByName(e, t) {
|
|
13657
13664
|
var i;
|
|
13658
13665
|
const n = this._univerInstanceService.getUniverSheetInstance(e);
|
|
13659
|
-
return (i = n == null ? void 0 : n.getSheetBySheetName(
|
|
13666
|
+
return (i = n == null ? void 0 : n.getSheetBySheetName(Pi(t))) == null ? void 0 : i.getSheetId();
|
|
13660
13667
|
}
|
|
13661
13668
|
_getSheetNameById(e, t) {
|
|
13662
13669
|
var u;
|
|
@@ -13664,19 +13671,12 @@ let Pt = class extends ne {
|
|
|
13664
13671
|
return ((u = n == null ? void 0 : n.getSheetBySheetId(t)) == null ? void 0 : u.getName()) || "";
|
|
13665
13672
|
}
|
|
13666
13673
|
_getCurrentUnitIdAndSheetId() {
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
const u = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), o = u.getActiveSheet();
|
|
13670
|
-
return {
|
|
13671
|
-
unitId: u.getUnitId(),
|
|
13672
|
-
sheetId: o.getSheetId()
|
|
13673
|
-
};
|
|
13674
|
-
}
|
|
13675
|
-
const { unitId: t, sheetId: n, skeleton: i } = e;
|
|
13674
|
+
var i, u;
|
|
13675
|
+
const e = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), t = e.getActiveSheet(), n = (u = (i = this._renderManagerService.getRenderById(e.getUnitId())) == null ? void 0 : i.with(fa)) == null ? void 0 : u.getCurrentSkeleton();
|
|
13676
13676
|
return {
|
|
13677
|
-
unitId:
|
|
13678
|
-
sheetId:
|
|
13679
|
-
skeleton:
|
|
13677
|
+
unitId: e.getUnitId(),
|
|
13678
|
+
sheetId: t.getSheetId(),
|
|
13679
|
+
skeleton: n
|
|
13680
13680
|
};
|
|
13681
13681
|
}
|
|
13682
13682
|
_getOpenForCurrentSheet() {
|
|
@@ -13708,9 +13708,9 @@ let Pt = class extends ne {
|
|
|
13708
13708
|
startRow: A,
|
|
13709
13709
|
endRow: h,
|
|
13710
13710
|
startColumn: S,
|
|
13711
|
-
endColumn:
|
|
13711
|
+
endColumn: D
|
|
13712
13712
|
} = f;
|
|
13713
|
-
(R || T) && A === d && S === l && h === s &&
|
|
13713
|
+
(R || T) && A === d && S === l && h === s && D === L && (d = A, l = S, s = A, L = S);
|
|
13714
13714
|
}
|
|
13715
13715
|
return st({
|
|
13716
13716
|
sheetName: u,
|
|
@@ -13743,7 +13743,7 @@ let Pt = class extends ne {
|
|
|
13743
13743
|
const s = this._editorService.getEditor(n);
|
|
13744
13744
|
s != null && s.isSingleChoice() && (u = u.split(",")[0]);
|
|
13745
13745
|
let l = u, L = 1;
|
|
13746
|
-
(!s || !s.onlyInputRange()) && (l = `${Ft.EQUALS}${u}`, L = 0), i ? this._commandService.executeCommand(
|
|
13746
|
+
(!s || !s.onlyInputRange()) && (l = `${Ft.EQUALS}${u}`, L = 0), i ? this._commandService.executeCommand(qr.id, {
|
|
13747
13747
|
unitId: n,
|
|
13748
13748
|
body: {
|
|
13749
13749
|
dataStream: l,
|
|
@@ -13771,7 +13771,7 @@ let Pt = class extends ne {
|
|
|
13771
13771
|
}
|
|
13772
13772
|
_fitEditorSize() {
|
|
13773
13773
|
const t = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId();
|
|
13774
|
-
this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) || this._commandService.executeCommand(
|
|
13774
|
+
this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) || this._commandService.executeCommand(Nr.id, {
|
|
13775
13775
|
unitId: t
|
|
13776
13776
|
});
|
|
13777
13777
|
}
|
|
@@ -13836,7 +13836,7 @@ let Pt = class extends ne {
|
|
|
13836
13836
|
const i = this._getCurrentChar();
|
|
13837
13837
|
if (i == null)
|
|
13838
13838
|
return;
|
|
13839
|
-
this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, !
|
|
13839
|
+
this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, !Tn(i) && this._focusIsOnlyRange(e.length) && (this._formulaPromptService.insertSequenceString(this._currentInsertRefStringIndex, ye.COMMA), n = this._formulaPromptService.getSequenceNodes(), this._previousInsertRefStringIndex += 1), this._previousSequenceNodes = te.deepClone(n);
|
|
13840
13840
|
const u = this._getRefString(t);
|
|
13841
13841
|
this._formulaPromptService.setSequenceNodes(n), this._formulaPromptService.insertSequenceRef(this._previousInsertRefStringIndex, u), this._selectionRenderService.disableSkipRemainLast();
|
|
13842
13842
|
}
|
|
@@ -13845,15 +13845,15 @@ let Pt = class extends ne {
|
|
|
13845
13845
|
_updateRefSelectionStyle(e) {
|
|
13846
13846
|
const t = this._selectionRenderService.getCurrentControls(), { unitId: n, sheetId: i } = this._getCurrentUnitIdAndSheetId();
|
|
13847
13847
|
for (let u = 0, o = e.length; u < o; u++) {
|
|
13848
|
-
const m = e[u], { refIndex: c, themeColor: f, token: d } = m, s =
|
|
13848
|
+
const m = e[u], { refIndex: c, themeColor: f, token: d } = m, s = De(d), { unitId: l, sheetName: L, range: b } = s;
|
|
13849
13849
|
if (l != null && l.length > 0 && n !== l)
|
|
13850
13850
|
continue;
|
|
13851
13851
|
const E = this._getSheetIdByName(n, L.trim());
|
|
13852
13852
|
if (E != null && E !== i)
|
|
13853
13853
|
continue;
|
|
13854
13854
|
const p = t.find((T) => {
|
|
13855
|
-
const { startRow: A, startColumn: h, endRow: S, endColumn:
|
|
13856
|
-
return M ===
|
|
13855
|
+
const { startRow: A, startColumn: h, endRow: S, endColumn: D, rangeType: M } = T.getRange();
|
|
13856
|
+
return M === Oe.COLUMN && h === b.startColumn && D === b.endColumn || M === Oe.ROW && A === b.startRow && S === b.endRow || A === b.startRow && h === b.startColumn && S === b.endRow && D === b.endColumn || A === b.startRow && h === b.startColumn && b.startRow === b.endRow && b.startColumn === b.endColumn;
|
|
13857
13857
|
});
|
|
13858
13858
|
if (p == null)
|
|
13859
13859
|
continue;
|
|
@@ -13871,7 +13871,7 @@ let Pt = class extends ne {
|
|
|
13871
13871
|
if (i == null || !te.isStringNumber(i))
|
|
13872
13872
|
return;
|
|
13873
13873
|
let { startRow: u, endRow: o, startColumn: m, endColumn: c } = e;
|
|
13874
|
-
const f =
|
|
13874
|
+
const f = sr(u, m, n == null ? void 0 : n.mergeData);
|
|
13875
13875
|
if (f) {
|
|
13876
13876
|
const {
|
|
13877
13877
|
isMerged: R,
|
|
@@ -13879,15 +13879,15 @@ let Pt = class extends ne {
|
|
|
13879
13879
|
startRow: A,
|
|
13880
13880
|
endRow: h,
|
|
13881
13881
|
startColumn: S,
|
|
13882
|
-
endColumn:
|
|
13882
|
+
endColumn: D
|
|
13883
13883
|
} = f;
|
|
13884
|
-
(R || T) && A === u && S === m && h === o &&
|
|
13884
|
+
(R || T) && A === u && S === m && h === o && D === c && (u = A, m = S, o = A, c = S);
|
|
13885
13885
|
}
|
|
13886
13886
|
const d = Number(i), s = this._formulaPromptService.getCurrentSequenceNodeByIndex(d);
|
|
13887
13887
|
let l = { startAbsoluteRefType: Z.NONE };
|
|
13888
13888
|
if (typeof s != "string") {
|
|
13889
13889
|
const R = s.token;
|
|
13890
|
-
l =
|
|
13890
|
+
l = bi(R), l.endAbsoluteRefType == null && (l.endAbsoluteRefType = l.startAbsoluteRefType);
|
|
13891
13891
|
}
|
|
13892
13892
|
const L = this._getRefString({
|
|
13893
13893
|
range: {
|
|
@@ -13907,12 +13907,12 @@ let Pt = class extends ne {
|
|
|
13907
13907
|
_refreshFormulaAndCellEditor(e) {
|
|
13908
13908
|
var t;
|
|
13909
13909
|
for (const n of e) {
|
|
13910
|
-
const i =
|
|
13910
|
+
const i = On(n, this._renderManagerService), u = i == null ? void 0 : i.document;
|
|
13911
13911
|
u != null && ((t = u.getSkeleton()) == null || t.calculate(), u.makeDirty());
|
|
13912
13912
|
}
|
|
13913
13913
|
}
|
|
13914
13914
|
_setRemainCapture() {
|
|
13915
|
-
const { unitId: e } = this._getCurrentUnitIdAndSheetId(), t =
|
|
13915
|
+
const { unitId: e } = this._getCurrentUnitIdAndSheetId(), t = On(e, this._renderManagerService), n = t == null ? void 0 : t.engine;
|
|
13916
13916
|
n == null || n.setRemainCapture();
|
|
13917
13917
|
}
|
|
13918
13918
|
_cursorStateListener() {
|
|
@@ -13938,7 +13938,7 @@ let Pt = class extends ne {
|
|
|
13938
13938
|
visible: !1,
|
|
13939
13939
|
eventType: se.Keyboard,
|
|
13940
13940
|
keycode: t
|
|
13941
|
-
}), this._commandService.executeCommand(
|
|
13941
|
+
}), this._commandService.executeCommand(it.id, {
|
|
13942
13942
|
direction: w.DOWN
|
|
13943
13943
|
}));
|
|
13944
13944
|
}
|
|
@@ -13952,7 +13952,7 @@ let Pt = class extends ne {
|
|
|
13952
13952
|
visible: !1,
|
|
13953
13953
|
eventType: se.Keyboard,
|
|
13954
13954
|
keycode: t
|
|
13955
|
-
}), this._commandService.executeCommand(
|
|
13955
|
+
}), this._commandService.executeCommand(it.id, {
|
|
13956
13956
|
direction: w.RIGHT
|
|
13957
13957
|
}));
|
|
13958
13958
|
}
|
|
@@ -13967,23 +13967,23 @@ let Pt = class extends ne {
|
|
|
13967
13967
|
_pressArrowKey(e) {
|
|
13968
13968
|
const { keycode: t, metaKey: n } = e;
|
|
13969
13969
|
let i = w.DOWN;
|
|
13970
|
-
t === H.ARROW_DOWN ? i = w.DOWN : t === H.ARROW_UP ? i = w.UP : t === H.ARROW_LEFT ? i = w.LEFT : t === H.ARROW_RIGHT && (i = w.RIGHT), n ===
|
|
13970
|
+
t === H.ARROW_DOWN ? i = w.DOWN : t === H.ARROW_UP ? i = w.UP : t === H.ARROW_LEFT ? i = w.LEFT : t === H.ARROW_RIGHT && (i = w.RIGHT), n === Se.CTRL_COMMAND ? this._commandService.executeCommand(it.id, {
|
|
13971
13971
|
direction: i,
|
|
13972
|
-
jumpOver:
|
|
13973
|
-
}) : n ===
|
|
13972
|
+
jumpOver: Mn.moveGap
|
|
13973
|
+
}) : n === Se.SHIFT ? this._commandService.executeCommand(Dn.id, {
|
|
13974
13974
|
direction: i
|
|
13975
|
-
}) : n ===
|
|
13975
|
+
}) : n === Da ? this._commandService.executeCommand(Dn.id, {
|
|
13976
13976
|
direction: i,
|
|
13977
|
-
jumpOver:
|
|
13978
|
-
}) : this._commandService.executeCommand(
|
|
13977
|
+
jumpOver: Mn.moveGap
|
|
13978
|
+
}) : this._commandService.executeCommand(it.id, {
|
|
13979
13979
|
direction: i
|
|
13980
13980
|
});
|
|
13981
13981
|
}
|
|
13982
13982
|
_commandExecutedListener() {
|
|
13983
|
-
const e = [
|
|
13983
|
+
const e = [ve.id];
|
|
13984
13984
|
this.disposeWithMe(
|
|
13985
13985
|
this._commandService.onCommandExecuted((t) => {
|
|
13986
|
-
if (t.id ===
|
|
13986
|
+
if (t.id === dn.id)
|
|
13987
13987
|
this._changeRefString();
|
|
13988
13988
|
else if (e.includes(t.id)) {
|
|
13989
13989
|
const n = t.params, { keycode: i, isSingleEditor: u = !1 } = n;
|
|
@@ -14024,7 +14024,7 @@ let Pt = class extends ne {
|
|
|
14024
14024
|
return;
|
|
14025
14025
|
}
|
|
14026
14026
|
if (this._arrowMoveActionState === 2 && (this._arrowMoveActionState = 3), (this._selectionManagerService.getSelectionRanges() || []).length === 0) {
|
|
14027
|
-
const f = this._selectionManagerService.getLastByPlugin(
|
|
14027
|
+
const f = this._selectionManagerService.getLastByPlugin(he);
|
|
14028
14028
|
if (f != null) {
|
|
14029
14029
|
const d = te.deepClone(f);
|
|
14030
14030
|
this._selectionManagerService.add([d]);
|
|
@@ -14041,7 +14041,7 @@ let Pt = class extends ne {
|
|
|
14041
14041
|
if (e == null)
|
|
14042
14042
|
return;
|
|
14043
14043
|
let t = w.LEFT;
|
|
14044
|
-
e === H.ARROW_DOWN ? t = w.DOWN : e === H.ARROW_UP ? t = w.UP : e === H.ARROW_RIGHT && (t = w.RIGHT), this._commandService.executeCommand(
|
|
14044
|
+
e === H.ARROW_DOWN ? t = w.DOWN : e === H.ARROW_UP ? t = w.UP : e === H.ARROW_RIGHT && (t = w.RIGHT), this._commandService.executeCommand(yr.id, {
|
|
14045
14045
|
direction: t
|
|
14046
14046
|
});
|
|
14047
14047
|
}
|
|
@@ -14093,12 +14093,12 @@ let Pt = class extends ne {
|
|
|
14093
14093
|
for (let s = 0, l = o.length; s < l - 1; s++)
|
|
14094
14094
|
c += o[s];
|
|
14095
14095
|
let f = m;
|
|
14096
|
-
if (m.indexOf(
|
|
14096
|
+
if (m.indexOf(ye.COLON) > -1)
|
|
14097
14097
|
if (!this._userCursorMove)
|
|
14098
14098
|
f = this._changeRangeRef(m);
|
|
14099
14099
|
else {
|
|
14100
|
-
const s = m.split(
|
|
14101
|
-
n - u.startIndex <= l.length ? f = this._changeSingleRef(l) +
|
|
14100
|
+
const s = m.split(ye.COLON), l = s[0], L = s[1];
|
|
14101
|
+
n - u.startIndex <= l.length ? f = this._changeSingleRef(l) + ye.COLON + L : f = l + ye.COLON + this._changeSingleRef(L);
|
|
14102
14102
|
}
|
|
14103
14103
|
else
|
|
14104
14104
|
f = this._changeSingleRef(m);
|
|
@@ -14107,54 +14107,53 @@ let Pt = class extends ne {
|
|
|
14107
14107
|
this._formulaPromptService.updateSequenceRef(i, f), this._syncToEditor(this._formulaPromptService.getSequenceNodes(), n + d + 1);
|
|
14108
14108
|
}
|
|
14109
14109
|
_changeRangeRef(e) {
|
|
14110
|
-
const t =
|
|
14110
|
+
const t = De(e).range;
|
|
14111
14111
|
let n = "";
|
|
14112
|
-
return t.startAbsoluteRefType === Z.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = Z.ALL, t.endAbsoluteRefType = Z.ALL) : (t.startAbsoluteRefType = Z.NONE, t.endAbsoluteRefType = Z.NONE), n =
|
|
14112
|
+
return t.startAbsoluteRefType === Z.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = Z.ALL, t.endAbsoluteRefType = Z.ALL) : (t.startAbsoluteRefType = Z.NONE, t.endAbsoluteRefType = Z.NONE), n = ke(t), n;
|
|
14113
14113
|
}
|
|
14114
14114
|
_changeSingleRef(e) {
|
|
14115
|
-
const t =
|
|
14115
|
+
const t = De(e).range, n = t.startAbsoluteRefType;
|
|
14116
14116
|
let i = "";
|
|
14117
|
-
return n === Z.NONE || n == null ? (t.startAbsoluteRefType = Z.ALL, t.endAbsoluteRefType = Z.ALL) : n === Z.ALL ? (t.startAbsoluteRefType = Z.ROW, t.endAbsoluteRefType = Z.ROW) : n === Z.ROW ? (t.startAbsoluteRefType = Z.COLUMN, t.endAbsoluteRefType = Z.COLUMN) : (t.startAbsoluteRefType = Z.NONE, t.endAbsoluteRefType = Z.NONE), i =
|
|
14117
|
+
return n === Z.NONE || n == null ? (t.startAbsoluteRefType = Z.ALL, t.endAbsoluteRefType = Z.ALL) : n === Z.ALL ? (t.startAbsoluteRefType = Z.ROW, t.endAbsoluteRefType = Z.ROW) : n === Z.ROW ? (t.startAbsoluteRefType = Z.COLUMN, t.endAbsoluteRefType = Z.COLUMN) : (t.startAbsoluteRefType = Z.NONE, t.endAbsoluteRefType = Z.NONE), i = ke(t), i;
|
|
14118
14118
|
}
|
|
14119
14119
|
_getEditorObject() {
|
|
14120
14120
|
const e = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId(), t = this._editorService.getEditor(e);
|
|
14121
14121
|
return t == null ? void 0 : t.render;
|
|
14122
14122
|
}
|
|
14123
14123
|
};
|
|
14124
|
-
Pt =
|
|
14124
|
+
Pt = nm([
|
|
14125
14125
|
ce(fe.Rendered, Pt),
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
J(16, je)
|
|
14126
|
+
ee(0, ue),
|
|
14127
|
+
ee(1, $a),
|
|
14128
|
+
ee(2, lr),
|
|
14129
|
+
ee(3, y(ca)),
|
|
14130
|
+
ee(4, y(Ve)),
|
|
14131
|
+
ee(5, y(Be)),
|
|
14132
|
+
ee(6, fn),
|
|
14133
|
+
ee(7, y(an)),
|
|
14134
|
+
ee(8, y(cn)),
|
|
14135
|
+
ee(9, de),
|
|
14136
|
+
ee(10, y(sa)),
|
|
14137
|
+
ee(11, y(et)),
|
|
14138
|
+
ee(12, y(Fr)),
|
|
14139
|
+
ee(13, y(Ur)),
|
|
14140
|
+
ee(14, Rr),
|
|
14141
|
+
ee(15, Qe)
|
|
14143
14142
|
], Pt);
|
|
14144
|
-
var
|
|
14145
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14143
|
+
var im = Object.defineProperty, rm = Object.getOwnPropertyDescriptor, um = (a, e, t, n) => {
|
|
14144
|
+
for (var i = n > 1 ? void 0 : n ? rm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
14146
14145
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14147
|
-
return n && i &&
|
|
14148
|
-
},
|
|
14146
|
+
return n && i && im(e, t, i), i;
|
|
14147
|
+
}, Ge = (a, e) => (t, n) => e(t, n, a);
|
|
14149
14148
|
let bt = class extends ne {
|
|
14150
14149
|
constructor(e, t, n, i, u) {
|
|
14151
14150
|
super();
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14151
|
+
q(this, "_waitingCommandQueue", []);
|
|
14152
|
+
q(this, "_executingCommandQueue", []);
|
|
14153
|
+
q(this, "_setTimeoutKey", -1);
|
|
14154
|
+
q(this, "_startExecutionTime", 0);
|
|
14155
|
+
q(this, "_formulaCalculationDoneCount", 0);
|
|
14156
|
+
q(this, "_arrayFormulaCalculationDoneCount", 0);
|
|
14158
14157
|
this._commandService = e, this._activeDirtyManagerService = t, this._numfmtService = n, this._formulaDataModel = i, this._progressService = u, this._initialize();
|
|
14159
14158
|
}
|
|
14160
14159
|
_initialize() {
|
|
@@ -14166,12 +14165,12 @@ let bt = class extends ne {
|
|
|
14166
14165
|
if (this._activeDirtyManagerService.get(e.id)) {
|
|
14167
14166
|
if (e.id === le.id) {
|
|
14168
14167
|
const n = e.params;
|
|
14169
|
-
if (t && t.onlyLocal === !0 || n.trigger === on.id || n.trigger ===
|
|
14168
|
+
if (t && t.onlyLocal === !0 || n.trigger === on.id || n.trigger === jn.id || n.trigger === Qn.id)
|
|
14170
14169
|
return;
|
|
14171
14170
|
}
|
|
14172
14171
|
this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
|
|
14173
14172
|
this._commandService.executeCommand(
|
|
14174
|
-
|
|
14173
|
+
En.id,
|
|
14175
14174
|
{
|
|
14176
14175
|
...this._generateDirty(this._waitingCommandQueue)
|
|
14177
14176
|
},
|
|
@@ -14220,11 +14219,11 @@ let bt = class extends ne {
|
|
|
14220
14219
|
});
|
|
14221
14220
|
}
|
|
14222
14221
|
_initialExecuteFormulaProcessListener() {
|
|
14223
|
-
const e =
|
|
14222
|
+
const e = An(this._pushFormulaTask.bind(this), 300), t = An(this._pushArrayFormulaTask.bind(this), 300);
|
|
14224
14223
|
let n = null, i = 0, u = 0, o = 0, m = !1, c = !1;
|
|
14225
14224
|
this.disposeWithMe(
|
|
14226
14225
|
this._commandService.onCommandExecuted((f) => {
|
|
14227
|
-
if (f.id !==
|
|
14226
|
+
if (f.id !== Ti.id)
|
|
14228
14227
|
return;
|
|
14229
14228
|
const d = f.params;
|
|
14230
14229
|
if (d.stageInfo != null) {
|
|
@@ -14243,27 +14242,27 @@ let bt = class extends ne {
|
|
|
14243
14242
|
const s = d.functionsExecutedState;
|
|
14244
14243
|
let l = "";
|
|
14245
14244
|
switch (s) {
|
|
14246
|
-
case
|
|
14245
|
+
case Fe.NOT_EXECUTED:
|
|
14247
14246
|
l = "No tasks are being executed anymore", this._executingCommandQueue = [];
|
|
14248
14247
|
break;
|
|
14249
|
-
case
|
|
14248
|
+
case Fe.STOP_EXECUTION:
|
|
14250
14249
|
l = "The execution of the formula has been stopped", this._waitingCommandQueue.unshift(...this._executingCommandQueue), this._executingCommandQueue = [];
|
|
14251
14250
|
break;
|
|
14252
|
-
case
|
|
14251
|
+
case Fe.SUCCESS:
|
|
14253
14252
|
l = `Formula calculation succeeded, Total time consumed: ${performance.now() - this._startExecutionTime} ms`, this._executingCommandQueue = [];
|
|
14254
14253
|
break;
|
|
14255
|
-
case
|
|
14254
|
+
case Fe.INITIAL:
|
|
14256
14255
|
l = "Waiting for calculation", this._executingCommandQueue = [];
|
|
14257
14256
|
break;
|
|
14258
14257
|
}
|
|
14259
|
-
i--, i === 0 && (n ? (clearTimeout(n), n = null) : s ===
|
|
14258
|
+
i--, i === 0 && (n ? (clearTimeout(n), n = null) : s === Fe.SUCCESS ? this._progressService.complete() : s === Fe.STOP_EXECUTION && this._progressService.stop(), this._formulaCalculationDoneCount = 0, this._arrayFormulaCalculationDoneCount = 0, m = !1, c = !1), console.warn(`execution result${l}`);
|
|
14260
14259
|
}
|
|
14261
14260
|
})
|
|
14262
14261
|
);
|
|
14263
14262
|
}
|
|
14264
14263
|
_initialExecuteFormula() {
|
|
14265
14264
|
this._commandService.executeCommand(
|
|
14266
|
-
|
|
14265
|
+
En.id,
|
|
14267
14266
|
{
|
|
14268
14267
|
commands: [],
|
|
14269
14268
|
forceCalculation: !0
|
|
@@ -14294,15 +14293,15 @@ let bt = class extends ne {
|
|
|
14294
14293
|
this._arrayFormulaCalculationDoneCount = e, this._progressService.pushTask({ count: t });
|
|
14295
14294
|
}
|
|
14296
14295
|
};
|
|
14297
|
-
bt =
|
|
14296
|
+
bt = um([
|
|
14298
14297
|
ce(fe.Ready, bt),
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14298
|
+
Ge(0, ue),
|
|
14299
|
+
Ge(1, rn),
|
|
14300
|
+
Ge(2, y(yi)),
|
|
14301
|
+
Ge(3, y($e)),
|
|
14302
|
+
Ge(4, y(Cr))
|
|
14304
14303
|
], bt);
|
|
14305
|
-
function
|
|
14304
|
+
function om(a, e, t) {
|
|
14306
14305
|
var n;
|
|
14307
14306
|
return a == null || a[e] == null || ((n = a[e]) == null ? void 0 : n[t]) == null;
|
|
14308
14307
|
}
|
|
@@ -14320,11 +14319,11 @@ function Xt(a, e, t) {
|
|
|
14320
14319
|
[e]: null
|
|
14321
14320
|
};
|
|
14322
14321
|
}
|
|
14323
|
-
function
|
|
14322
|
+
function mm(a, e, t) {
|
|
14324
14323
|
const { type: n } = t;
|
|
14325
|
-
return n === 11 || n === 12 ?
|
|
14324
|
+
return n === 11 || n === 12 ? cm(a, e) : fm(a, e, t);
|
|
14326
14325
|
}
|
|
14327
|
-
function
|
|
14326
|
+
function cm(a, e) {
|
|
14328
14327
|
const t = [], n = [];
|
|
14329
14328
|
return Object.keys(e).forEach((i) => {
|
|
14330
14329
|
const u = e[i], o = a[i];
|
|
@@ -14335,7 +14334,7 @@ function rm(a, e) {
|
|
|
14335
14334
|
if (c.forValue((p, R, T) => {
|
|
14336
14335
|
if (T == null)
|
|
14337
14336
|
return !0;
|
|
14338
|
-
const A =
|
|
14337
|
+
const A = pn(T);
|
|
14339
14338
|
A !== null && (d.setValue(p, R, A), s.setValue(p, R, f.getValue(p, R)));
|
|
14340
14339
|
}), d.getSizeOf() === 0)
|
|
14341
14340
|
return;
|
|
@@ -14363,8 +14362,8 @@ function rm(a, e) {
|
|
|
14363
14362
|
redos: n
|
|
14364
14363
|
};
|
|
14365
14364
|
}
|
|
14366
|
-
function
|
|
14367
|
-
const { sheetId: n, unitId: i } = t, { redoFormulaData: u, undoFormulaData: o } =
|
|
14365
|
+
function fm(a, e, t) {
|
|
14366
|
+
const { sheetId: n, unitId: i } = t, { redoFormulaData: u, undoFormulaData: o } = sm(a, e, t), m = [], c = [];
|
|
14368
14367
|
if (Object.keys(u).length !== 0) {
|
|
14369
14368
|
const f = {
|
|
14370
14369
|
subUnitId: n,
|
|
@@ -14392,10 +14391,10 @@ function um(a, e, t) {
|
|
|
14392
14391
|
redos: m
|
|
14393
14392
|
};
|
|
14394
14393
|
}
|
|
14395
|
-
function
|
|
14394
|
+
function sm(a, e, t) {
|
|
14396
14395
|
let n = {}, i = {};
|
|
14397
14396
|
const { type: u, unitId: o, sheetId: m, range: c, from: f, to: d } = t;
|
|
14398
|
-
if (
|
|
14397
|
+
if (om(a, o, m))
|
|
14399
14398
|
return {
|
|
14400
14399
|
redoFormulaData: n,
|
|
14401
14400
|
undoFormulaData: i
|
|
@@ -14405,52 +14404,52 @@ function om(a, e, t) {
|
|
|
14405
14404
|
return L.forValue((R, T, A) => {
|
|
14406
14405
|
if (A == null)
|
|
14407
14406
|
return !0;
|
|
14408
|
-
if (!
|
|
14407
|
+
if (!Cm(A))
|
|
14409
14408
|
return;
|
|
14410
|
-
const h =
|
|
14409
|
+
const h = ja(R, T);
|
|
14411
14410
|
let S = null;
|
|
14412
14411
|
switch (u) {
|
|
14413
14412
|
case 0:
|
|
14414
14413
|
if (f == null || d == null)
|
|
14415
14414
|
return;
|
|
14416
|
-
S =
|
|
14415
|
+
S = lm(f, d, h);
|
|
14417
14416
|
break;
|
|
14418
14417
|
case 1:
|
|
14419
14418
|
if (f == null || d == null)
|
|
14420
14419
|
return;
|
|
14421
|
-
S =
|
|
14420
|
+
S = dm(f, d, h);
|
|
14422
14421
|
break;
|
|
14423
14422
|
case 2:
|
|
14424
14423
|
if (f == null || d == null)
|
|
14425
14424
|
return;
|
|
14426
|
-
S =
|
|
14425
|
+
S = pm(f, d, h);
|
|
14427
14426
|
break;
|
|
14428
14427
|
}
|
|
14429
14428
|
if (te.isDefine(c))
|
|
14430
14429
|
switch (u) {
|
|
14431
14430
|
case 3:
|
|
14432
|
-
S =
|
|
14431
|
+
S = Lm(c, h), p = !0;
|
|
14433
14432
|
break;
|
|
14434
14433
|
case 4:
|
|
14435
|
-
S =
|
|
14434
|
+
S = Am(c, h), p = !0;
|
|
14436
14435
|
break;
|
|
14437
14436
|
case 5:
|
|
14438
|
-
S =
|
|
14437
|
+
S = Pm(c, h);
|
|
14439
14438
|
break;
|
|
14440
14439
|
case 6:
|
|
14441
|
-
S =
|
|
14440
|
+
S = bm(c, h);
|
|
14442
14441
|
break;
|
|
14443
14442
|
case 7:
|
|
14444
|
-
S =
|
|
14443
|
+
S = Tm(c, h);
|
|
14445
14444
|
break;
|
|
14446
14445
|
case 8:
|
|
14447
|
-
S =
|
|
14446
|
+
S = Em(c, h);
|
|
14448
14447
|
break;
|
|
14449
14448
|
case 9:
|
|
14450
|
-
S =
|
|
14449
|
+
S = Sm(c, h), p = !0;
|
|
14451
14450
|
break;
|
|
14452
14451
|
case 10:
|
|
14453
|
-
S =
|
|
14452
|
+
S = Im(c, h), p = !0;
|
|
14454
14453
|
break;
|
|
14455
14454
|
}
|
|
14456
14455
|
S != null && (p ? E.unshift({
|
|
@@ -14460,13 +14459,13 @@ function om(a, e, t) {
|
|
|
14460
14459
|
oldCell: h,
|
|
14461
14460
|
newCell: S
|
|
14462
14461
|
}));
|
|
14463
|
-
}), n =
|
|
14462
|
+
}), n = Nm(E, L, b), i = Rm(E, L), {
|
|
14464
14463
|
redoFormulaData: n,
|
|
14465
14464
|
undoFormulaData: i
|
|
14466
14465
|
};
|
|
14467
14466
|
}
|
|
14468
|
-
function
|
|
14469
|
-
const n =
|
|
14467
|
+
function lm(a, e, t) {
|
|
14468
|
+
const n = zn(
|
|
14470
14469
|
{
|
|
14471
14470
|
id: K.MoveRangeCommandId,
|
|
14472
14471
|
params: { toRange: e, fromRange: a }
|
|
@@ -14475,8 +14474,8 @@ function mm(a, e, t) {
|
|
|
14475
14474
|
);
|
|
14476
14475
|
return k(n, t);
|
|
14477
14476
|
}
|
|
14478
|
-
function
|
|
14479
|
-
const n =
|
|
14477
|
+
function dm(a, e, t) {
|
|
14478
|
+
const n = Zn(
|
|
14480
14479
|
{
|
|
14481
14480
|
id: K.MoveRowsCommandId,
|
|
14482
14481
|
params: { toRange: e, fromRange: a }
|
|
@@ -14485,8 +14484,8 @@ function cm(a, e, t) {
|
|
|
14485
14484
|
);
|
|
14486
14485
|
return k(n, t);
|
|
14487
14486
|
}
|
|
14488
|
-
function
|
|
14489
|
-
const n =
|
|
14487
|
+
function pm(a, e, t) {
|
|
14488
|
+
const n = Jn(
|
|
14490
14489
|
{
|
|
14491
14490
|
id: K.MoveColsCommandId,
|
|
14492
14491
|
params: { toRange: e, fromRange: a }
|
|
@@ -14495,8 +14494,8 @@ function fm(a, e, t) {
|
|
|
14495
14494
|
);
|
|
14496
14495
|
return k(n, t);
|
|
14497
14496
|
}
|
|
14498
|
-
function
|
|
14499
|
-
const t =
|
|
14497
|
+
function Lm(a, e) {
|
|
14498
|
+
const t = ea(
|
|
14500
14499
|
{
|
|
14501
14500
|
id: K.InsertRowCommandId,
|
|
14502
14501
|
params: { range: a, unitId: "", subUnitId: "", direction: w.DOWN }
|
|
@@ -14505,8 +14504,8 @@ function sm(a, e) {
|
|
|
14505
14504
|
);
|
|
14506
14505
|
return k(t, e);
|
|
14507
14506
|
}
|
|
14508
|
-
function
|
|
14509
|
-
const t =
|
|
14507
|
+
function Am(a, e) {
|
|
14508
|
+
const t = ta(
|
|
14510
14509
|
{
|
|
14511
14510
|
id: K.InsertColCommandId,
|
|
14512
14511
|
params: { range: a, unitId: "", subUnitId: "", direction: w.RIGHT }
|
|
@@ -14515,8 +14514,8 @@ function lm(a, e) {
|
|
|
14515
14514
|
);
|
|
14516
14515
|
return k(t, e);
|
|
14517
14516
|
}
|
|
14518
|
-
function
|
|
14519
|
-
const t =
|
|
14517
|
+
function Pm(a, e) {
|
|
14518
|
+
const t = na(
|
|
14520
14519
|
{
|
|
14521
14520
|
id: K.RemoveRowCommandId,
|
|
14522
14521
|
params: { range: a }
|
|
@@ -14525,8 +14524,8 @@ function dm(a, e) {
|
|
|
14525
14524
|
);
|
|
14526
14525
|
return k(t, e);
|
|
14527
14526
|
}
|
|
14528
|
-
function
|
|
14529
|
-
const t =
|
|
14527
|
+
function bm(a, e) {
|
|
14528
|
+
const t = aa(
|
|
14530
14529
|
{
|
|
14531
14530
|
id: K.RemoveColCommandId,
|
|
14532
14531
|
params: { range: a }
|
|
@@ -14535,8 +14534,8 @@ function pm(a, e) {
|
|
|
14535
14534
|
);
|
|
14536
14535
|
return k(t, e);
|
|
14537
14536
|
}
|
|
14538
|
-
function
|
|
14539
|
-
const t =
|
|
14537
|
+
function Tm(a, e) {
|
|
14538
|
+
const t = ia(
|
|
14540
14539
|
{
|
|
14541
14540
|
id: K.DeleteRangeMoveLeftCommandId,
|
|
14542
14541
|
params: { range: a }
|
|
@@ -14545,8 +14544,8 @@ function Lm(a, e) {
|
|
|
14545
14544
|
);
|
|
14546
14545
|
return k(t, e);
|
|
14547
14546
|
}
|
|
14548
|
-
function
|
|
14549
|
-
const t =
|
|
14547
|
+
function Em(a, e) {
|
|
14548
|
+
const t = ra(
|
|
14550
14549
|
{
|
|
14551
14550
|
id: K.DeleteRangeMoveUpCommandId,
|
|
14552
14551
|
params: { range: a }
|
|
@@ -14555,8 +14554,8 @@ function Am(a, e) {
|
|
|
14555
14554
|
);
|
|
14556
14555
|
return k(t, e);
|
|
14557
14556
|
}
|
|
14558
|
-
function
|
|
14559
|
-
const t =
|
|
14557
|
+
function Sm(a, e) {
|
|
14558
|
+
const t = ua(
|
|
14560
14559
|
{
|
|
14561
14560
|
id: K.InsertRangeMoveDownCommandId,
|
|
14562
14561
|
params: { range: a }
|
|
@@ -14565,8 +14564,8 @@ function Pm(a, e) {
|
|
|
14565
14564
|
);
|
|
14566
14565
|
return k(t, e);
|
|
14567
14566
|
}
|
|
14568
|
-
function
|
|
14569
|
-
const t =
|
|
14567
|
+
function Im(a, e) {
|
|
14568
|
+
const t = oa(
|
|
14570
14569
|
{
|
|
14571
14570
|
id: K.InsertRangeMoveRightCommandId,
|
|
14572
14571
|
params: { range: a }
|
|
@@ -14575,24 +14574,24 @@ function bm(a, e) {
|
|
|
14575
14574
|
);
|
|
14576
14575
|
return k(t, e);
|
|
14577
14576
|
}
|
|
14578
|
-
function
|
|
14577
|
+
function Nm(a, e, t) {
|
|
14579
14578
|
const n = new j({});
|
|
14580
14579
|
return a.forEach((i) => {
|
|
14581
|
-
const { oldCell: u, newCell: o } = i, { startRow: m, startColumn: c } = u, { startRow: f, startColumn: d } = o, s = t.getValue(m, c) || e.getValue(m, c), l =
|
|
14580
|
+
const { oldCell: u, newCell: o } = i, { startRow: m, startColumn: c } = u, { startRow: f, startColumn: d } = o, s = t.getValue(m, c) || e.getValue(m, c), l = pn(s);
|
|
14582
14581
|
n.setValue(m, c, { f: null, si: null }), n.setValue(f, d, l);
|
|
14583
14582
|
}), n.clone();
|
|
14584
14583
|
}
|
|
14585
|
-
function
|
|
14584
|
+
function Rm(a, e) {
|
|
14586
14585
|
const t = new j({});
|
|
14587
14586
|
return a.forEach((n) => {
|
|
14588
|
-
const { oldCell: i, newCell: u } = n, { startRow: o, startColumn: m } = i, { startRow: c, startColumn: f } = u, d = e.getValue(o, m), s =
|
|
14587
|
+
const { oldCell: i, newCell: u } = n, { startRow: o, startColumn: m } = i, { startRow: c, startColumn: f } = u, d = e.getValue(o, m), s = pn(d);
|
|
14589
14588
|
t.setValue(c, f, { f: null, si: null }), t.setValue(o, m, s);
|
|
14590
14589
|
}), t.clone();
|
|
14591
14590
|
}
|
|
14592
|
-
function
|
|
14591
|
+
function pn(a) {
|
|
14593
14592
|
if (a == null)
|
|
14594
14593
|
return;
|
|
14595
|
-
const { f: e, si: t, x: n = 0, y: i = 0 } = a, u =
|
|
14594
|
+
const { f: e, si: t, x: n = 0, y: i = 0 } = a, u = Ee(e), o = ge(t);
|
|
14596
14595
|
if (!u && !o)
|
|
14597
14596
|
return {
|
|
14598
14597
|
f: null,
|
|
@@ -14601,15 +14600,15 @@ function Ln(a) {
|
|
|
14601
14600
|
const m = {};
|
|
14602
14601
|
return o && (m.si = t), u && n === 0 && i === 0 && (m.f = e), m;
|
|
14603
14602
|
}
|
|
14604
|
-
function
|
|
14605
|
-
const e = (a == null ? void 0 : a.f) || "", t = (a == null ? void 0 : a.si) || "", n =
|
|
14603
|
+
function Cm(a) {
|
|
14604
|
+
const e = (a == null ? void 0 : a.f) || "", t = (a == null ? void 0 : a.si) || "", n = Ee(e), i = ge(t);
|
|
14606
14605
|
return !!(n || i);
|
|
14607
14606
|
}
|
|
14608
|
-
var
|
|
14609
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
14607
|
+
var hm = Object.defineProperty, _m = Object.getOwnPropertyDescriptor, Om = (a, e, t, n) => {
|
|
14608
|
+
for (var i = n > 1 ? void 0 : n ? _m(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
14610
14609
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
14611
|
-
return n && i &&
|
|
14612
|
-
},
|
|
14610
|
+
return n && i && hm(e, t, i), i;
|
|
14611
|
+
}, Ce = (a, e) => (t, n) => e(t, n, a);
|
|
14613
14612
|
let Tt = class extends ne {
|
|
14614
14613
|
constructor(a, e, t, n, i, u, o) {
|
|
14615
14614
|
super(), this._univerInstanceService = a, this._commandService = e, this._lexerTreeBuilder = t, this._formulaDataModel = n, this._sheetInterceptorService = i, this._selectionManagerService = u, this._injector = o, this._initialize();
|
|
@@ -14627,7 +14626,7 @@ let Tt = class extends ne {
|
|
|
14627
14626
|
if (a.params)
|
|
14628
14627
|
if (a.id === le.id) {
|
|
14629
14628
|
const t = a.params;
|
|
14630
|
-
if (e && e.onlyLocal === !0 || t.trigger === on.id || t.trigger ===
|
|
14629
|
+
if (e && e.onlyLocal === !0 || t.trigger === on.id || t.trigger === jn.id || t.trigger === Qn.id)
|
|
14631
14630
|
return;
|
|
14632
14631
|
this._handleSetRangeValuesMutation(t);
|
|
14633
14632
|
} else if (a.id === kt.id) {
|
|
@@ -14638,7 +14637,7 @@ let Tt = class extends ne {
|
|
|
14638
14637
|
})
|
|
14639
14638
|
), this.disposeWithMe(
|
|
14640
14639
|
Q(
|
|
14641
|
-
|
|
14640
|
+
gn(
|
|
14642
14641
|
this._univerInstanceService.getTypeOfUnitAdded$(Y.UNIVER_SHEET),
|
|
14643
14642
|
this._univerInstanceService.getTypeOfUnitAdded$(Y.UNIVER_DOC),
|
|
14644
14643
|
this._univerInstanceService.getTypeOfUnitAdded$(Y.UNIVER_SLIDE)
|
|
@@ -14646,10 +14645,10 @@ let Tt = class extends ne {
|
|
|
14646
14645
|
)
|
|
14647
14646
|
), this.disposeWithMe(
|
|
14648
14647
|
Q(
|
|
14649
|
-
|
|
14650
|
-
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_SHEET).pipe(
|
|
14651
|
-
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_DOC).pipe(
|
|
14652
|
-
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_SLIDE).pipe(
|
|
14648
|
+
gn(
|
|
14649
|
+
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_SHEET).pipe(We((a) => a.getUnitId())),
|
|
14650
|
+
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_DOC).pipe(We((a) => a.getUnitId())),
|
|
14651
|
+
this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_SLIDE).pipe(We((a) => a.getUnitId()))
|
|
14653
14652
|
).subscribe((a) => this._handleRemoveSheetMutation(a))
|
|
14654
14653
|
)
|
|
14655
14654
|
);
|
|
@@ -14664,7 +14663,7 @@ let Tt = class extends ne {
|
|
|
14664
14663
|
}
|
|
14665
14664
|
};
|
|
14666
14665
|
this._formulaDataModel.updateArrayFormulaCellData(t, e, n), this._formulaDataModel.updateArrayFormulaRange(t, e, n), this._commandService.executeCommand(
|
|
14667
|
-
|
|
14666
|
+
at.id,
|
|
14668
14667
|
{
|
|
14669
14668
|
formulaData: u
|
|
14670
14669
|
},
|
|
@@ -14672,7 +14671,7 @@ let Tt = class extends ne {
|
|
|
14672
14671
|
onlyLocal: !0
|
|
14673
14672
|
}
|
|
14674
14673
|
), this._commandService.executeCommand(
|
|
14675
|
-
|
|
14674
|
+
Nt.id,
|
|
14676
14675
|
{
|
|
14677
14676
|
arrayFormulaRange: this._formulaDataModel.getArrayFormulaRange(),
|
|
14678
14677
|
arrayFormulaCellData: this._formulaDataModel.getArrayFormulaCellData()
|
|
@@ -14687,7 +14686,7 @@ let Tt = class extends ne {
|
|
|
14687
14686
|
_handleRemoveSheetMutation(a, e) {
|
|
14688
14687
|
const t = this._formulaDataModel.getFormulaData(), n = Xt(t, a, e), i = this._formulaDataModel.getArrayFormulaRange(), u = Xt(i, a, e), o = this._formulaDataModel.getArrayFormulaCellData(), m = Xt(o, a, e);
|
|
14689
14688
|
n && this._commandService.executeCommand(
|
|
14690
|
-
|
|
14689
|
+
at.id,
|
|
14691
14690
|
{
|
|
14692
14691
|
formulaData: n
|
|
14693
14692
|
},
|
|
@@ -14695,7 +14694,7 @@ let Tt = class extends ne {
|
|
|
14695
14694
|
onlyLocal: !0
|
|
14696
14695
|
}
|
|
14697
14696
|
), u && m && this._commandService.executeCommand(
|
|
14698
|
-
|
|
14697
|
+
Nt.id,
|
|
14699
14698
|
{
|
|
14700
14699
|
arrayFormulaRange: i,
|
|
14701
14700
|
arrayFormulaCellData: o
|
|
@@ -14706,9 +14705,9 @@ let Tt = class extends ne {
|
|
|
14706
14705
|
);
|
|
14707
14706
|
}
|
|
14708
14707
|
_handleInsertSheetMutation(a) {
|
|
14709
|
-
const { sheet: e, unitId: t } = a, n = this._formulaDataModel.getFormulaData(), { id: i, cellData: u } = e, o = new j(u), m =
|
|
14708
|
+
const { sheet: e, unitId: t } = a, n = this._formulaDataModel.getFormulaData(), { id: i, cellData: u } = e, o = new j(u), m = Sn(n, t, i, o);
|
|
14710
14709
|
this._commandService.executeCommand(
|
|
14711
|
-
|
|
14710
|
+
at.id,
|
|
14712
14711
|
{
|
|
14713
14712
|
formulaData: m
|
|
14714
14713
|
},
|
|
@@ -14723,10 +14722,10 @@ let Tt = class extends ne {
|
|
|
14723
14722
|
};
|
|
14724
14723
|
n === Y.UNIVER_SHEET ? a.getSheets().forEach((o) => {
|
|
14725
14724
|
var d;
|
|
14726
|
-
const m = o.getCellMatrix(), c = o.getSheetId(), f =
|
|
14725
|
+
const m = o.getCellMatrix(), c = o.getSheetId(), f = Sn(e, t, c, m);
|
|
14727
14726
|
i[t][c] = (d = f[t]) == null ? void 0 : d[c];
|
|
14728
14727
|
}) : n === Y.UNIVER_DOC || Y.UNIVER_SLIDE, this._commandService.executeCommand(
|
|
14729
|
-
|
|
14728
|
+
at.id,
|
|
14730
14729
|
{
|
|
14731
14730
|
formulaData: i
|
|
14732
14731
|
},
|
|
@@ -14739,43 +14738,43 @@ let Tt = class extends ne {
|
|
|
14739
14738
|
const { id: e } = a;
|
|
14740
14739
|
let t = null;
|
|
14741
14740
|
switch (e) {
|
|
14742
|
-
case
|
|
14741
|
+
case $i.id:
|
|
14743
14742
|
t = this._handleMoveRange(a);
|
|
14744
14743
|
break;
|
|
14745
|
-
case
|
|
14744
|
+
case ki.id:
|
|
14746
14745
|
t = this._handleMoveRows(a);
|
|
14747
14746
|
break;
|
|
14748
|
-
case
|
|
14747
|
+
case Ki.id:
|
|
14749
14748
|
t = this._handleMoveCols(a);
|
|
14750
14749
|
break;
|
|
14751
|
-
case
|
|
14750
|
+
case Wi.id:
|
|
14752
14751
|
t = this._handleInsertRow(a);
|
|
14753
14752
|
break;
|
|
14754
|
-
case
|
|
14753
|
+
case Yi.id:
|
|
14755
14754
|
t = this._handleInsertCol(a);
|
|
14756
14755
|
break;
|
|
14757
|
-
case
|
|
14756
|
+
case Xi.id:
|
|
14758
14757
|
t = this._handleInsertRangeMoveRight(a);
|
|
14759
14758
|
break;
|
|
14760
|
-
case
|
|
14759
|
+
case Gi.id:
|
|
14761
14760
|
t = this._handleInsertRangeMoveDown(a);
|
|
14762
14761
|
break;
|
|
14763
|
-
case
|
|
14762
|
+
case wi.id:
|
|
14764
14763
|
t = this._handleRemoveRow(a);
|
|
14765
14764
|
break;
|
|
14766
|
-
case
|
|
14765
|
+
case Hi.id:
|
|
14767
14766
|
t = this._handleRemoveCol(a);
|
|
14768
14767
|
break;
|
|
14769
|
-
case
|
|
14768
|
+
case Vi.id:
|
|
14770
14769
|
t = this._handleDeleteRangeMoveUp(a);
|
|
14771
14770
|
break;
|
|
14772
|
-
case
|
|
14771
|
+
case Bi.id:
|
|
14773
14772
|
t = this._handleDeleteRangeMoveLeft(a);
|
|
14774
14773
|
break;
|
|
14775
|
-
case
|
|
14774
|
+
case Ui.id:
|
|
14776
14775
|
t = this._handleSetWorksheetName(a);
|
|
14777
14776
|
break;
|
|
14778
|
-
case
|
|
14777
|
+
case Fi.id:
|
|
14779
14778
|
t = this._handleRemoveWorksheet(a);
|
|
14780
14779
|
break;
|
|
14781
14780
|
}
|
|
@@ -14784,7 +14783,7 @@ let Tt = class extends ne {
|
|
|
14784
14783
|
i,
|
|
14785
14784
|
n,
|
|
14786
14785
|
t
|
|
14787
|
-
), { undos: o, redos: m } =
|
|
14786
|
+
), { undos: o, redos: m } = mm(i, u, t);
|
|
14788
14787
|
return {
|
|
14789
14788
|
undos: o,
|
|
14790
14789
|
redos: m
|
|
@@ -14823,13 +14822,13 @@ let Tt = class extends ne {
|
|
|
14823
14822
|
startColumn: 0,
|
|
14824
14823
|
endRow: n,
|
|
14825
14824
|
endColumn: c.getColumnCount() - 1,
|
|
14826
|
-
rangeType:
|
|
14825
|
+
rangeType: Oe.ROW
|
|
14827
14826
|
}, s = {
|
|
14828
14827
|
startRow: i,
|
|
14829
14828
|
startColumn: 0,
|
|
14830
14829
|
endRow: u,
|
|
14831
14830
|
endColumn: c.getColumnCount() - 1,
|
|
14832
|
-
rangeType:
|
|
14831
|
+
rangeType: Oe.ROW
|
|
14833
14832
|
};
|
|
14834
14833
|
return {
|
|
14835
14834
|
type: 1,
|
|
@@ -14851,13 +14850,13 @@ let Tt = class extends ne {
|
|
|
14851
14850
|
startColumn: t,
|
|
14852
14851
|
endRow: c.getRowCount() - 1,
|
|
14853
14852
|
endColumn: n,
|
|
14854
|
-
rangeType:
|
|
14853
|
+
rangeType: Oe.COLUMN
|
|
14855
14854
|
}, s = {
|
|
14856
14855
|
startRow: 0,
|
|
14857
14856
|
startColumn: i,
|
|
14858
14857
|
endRow: c.getRowCount() - 1,
|
|
14859
14858
|
endColumn: u,
|
|
14860
|
-
rangeType:
|
|
14859
|
+
rangeType: Oe.COLUMN
|
|
14861
14860
|
};
|
|
14862
14861
|
return {
|
|
14863
14862
|
type: 2,
|
|
@@ -15002,83 +15001,83 @@ let Tt = class extends ne {
|
|
|
15002
15001
|
for (const d of f) {
|
|
15003
15002
|
const s = new j(c[d] || {}), l = new j(), L = new j();
|
|
15004
15003
|
s.forValue((b, E, p) => {
|
|
15005
|
-
var
|
|
15004
|
+
var g;
|
|
15006
15005
|
if (!p)
|
|
15007
15006
|
return !0;
|
|
15008
15007
|
const { f: R, x: T, y: A, si: h } = p, S = this._lexerTreeBuilder.sequenceNodesBuilder(R);
|
|
15009
15008
|
if (S == null)
|
|
15010
15009
|
return !0;
|
|
15011
|
-
let
|
|
15010
|
+
let D = !1;
|
|
15012
15011
|
const M = [];
|
|
15013
15012
|
for (let U = 0, I = S.length; U < I; U++) {
|
|
15014
15013
|
const F = S[U];
|
|
15015
15014
|
if (typeof F == "string" || F.nodeType !== ie.REFERENCE)
|
|
15016
15015
|
continue;
|
|
15017
|
-
const { token: pe } = F, oe =
|
|
15018
|
-
o.push({ row: b, column: E, range:
|
|
15019
|
-
const
|
|
15016
|
+
const { token: pe } = F, oe = De(pe), { range: Ie, sheetName: tt, unitId: qe } = oe;
|
|
15017
|
+
o.push({ row: b, column: E, range: Ie });
|
|
15018
|
+
const ya = qe == null || qe.length === 0 ? m : qe, be = (g = e == null ? void 0 : e[ya]) == null ? void 0 : g[tt];
|
|
15020
15019
|
if (!this._checkIsSameUnitAndSheet(
|
|
15021
15020
|
t.unitId,
|
|
15022
15021
|
t.sheetId,
|
|
15023
15022
|
m,
|
|
15024
15023
|
d,
|
|
15025
|
-
|
|
15024
|
+
qe,
|
|
15026
15025
|
be || ""
|
|
15027
15026
|
))
|
|
15028
15027
|
continue;
|
|
15029
|
-
const
|
|
15030
|
-
range:
|
|
15028
|
+
const Fa = {
|
|
15029
|
+
range: Ie,
|
|
15031
15030
|
sheetId: be,
|
|
15032
|
-
unitId:
|
|
15033
|
-
sheetName:
|
|
15031
|
+
unitId: qe,
|
|
15032
|
+
sheetName: tt,
|
|
15034
15033
|
refOffsetX: T || 0,
|
|
15035
15034
|
refOffsetY: A || 0
|
|
15036
15035
|
};
|
|
15037
|
-
let
|
|
15036
|
+
let He = null;
|
|
15038
15037
|
if (t.type === 11) {
|
|
15039
15038
|
const {
|
|
15040
|
-
unitId:
|
|
15039
|
+
unitId: Ua,
|
|
15041
15040
|
sheetId: vt,
|
|
15042
15041
|
sheetName: qt
|
|
15043
15042
|
} = t;
|
|
15044
15043
|
if (qt == null || be == null || be.length === 0 || vt !== be)
|
|
15045
15044
|
continue;
|
|
15046
|
-
|
|
15047
|
-
range:
|
|
15045
|
+
He = st({
|
|
15046
|
+
range: Ie,
|
|
15048
15047
|
sheetName: qt,
|
|
15049
|
-
unitId:
|
|
15048
|
+
unitId: qe
|
|
15050
15049
|
});
|
|
15051
15050
|
} else if (t.type === 12) {
|
|
15052
15051
|
const {
|
|
15053
|
-
unitId:
|
|
15052
|
+
unitId: Ua,
|
|
15054
15053
|
sheetId: vt,
|
|
15055
15054
|
sheetName: qt
|
|
15056
15055
|
} = t;
|
|
15057
15056
|
if (be == null || be.length === 0 || vt !== be)
|
|
15058
15057
|
continue;
|
|
15059
|
-
|
|
15058
|
+
He = W.REF;
|
|
15060
15059
|
} else
|
|
15061
|
-
|
|
15062
|
-
|
|
15060
|
+
He = this._getNewRangeByMoveParam(
|
|
15061
|
+
Fa,
|
|
15063
15062
|
t,
|
|
15064
15063
|
m,
|
|
15065
15064
|
d
|
|
15066
15065
|
);
|
|
15067
|
-
|
|
15066
|
+
He != null && (S[U] = {
|
|
15068
15067
|
...F,
|
|
15069
|
-
token:
|
|
15070
|
-
},
|
|
15068
|
+
token: He
|
|
15069
|
+
}, D = !0, M.push(U));
|
|
15071
15070
|
}
|
|
15072
|
-
if (!
|
|
15071
|
+
if (!D)
|
|
15073
15072
|
return !0;
|
|
15074
|
-
const
|
|
15073
|
+
const v = this._updateRefOffset(S, M, T, A);
|
|
15075
15074
|
l.setValue(b, E, {
|
|
15076
15075
|
f: R,
|
|
15077
15076
|
x: T,
|
|
15078
15077
|
y: A,
|
|
15079
15078
|
si: h
|
|
15080
15079
|
}), L.setValue(b, E, {
|
|
15081
|
-
f: `=${un(
|
|
15080
|
+
f: `=${un(v)}`,
|
|
15082
15081
|
x: T,
|
|
15083
15082
|
y: A,
|
|
15084
15083
|
si: h
|
|
@@ -15106,15 +15105,15 @@ let Tt = class extends ne {
|
|
|
15106
15105
|
s
|
|
15107
15106
|
))
|
|
15108
15107
|
return;
|
|
15109
|
-
const p =
|
|
15108
|
+
const p = _e.moveOffset(d, b, E);
|
|
15110
15109
|
let R = null;
|
|
15111
15110
|
if (i === 0) {
|
|
15112
15111
|
if (c == null || f == null)
|
|
15113
15112
|
return;
|
|
15114
|
-
const T = this._checkMoveEdge(p, c), A =
|
|
15113
|
+
const T = this._checkMoveEdge(p, c), A = _e.getIntersects(p, c);
|
|
15115
15114
|
if (A == null)
|
|
15116
15115
|
return;
|
|
15117
|
-
const h =
|
|
15116
|
+
const h = zn(
|
|
15118
15117
|
{ id: K.MoveRangeCommandId, params: { toRange: f, fromRange: c } },
|
|
15119
15118
|
A
|
|
15120
15119
|
), S = k(h, A);
|
|
@@ -15124,10 +15123,10 @@ let Tt = class extends ne {
|
|
|
15124
15123
|
} else if (i === 1) {
|
|
15125
15124
|
if (c == null || f == null)
|
|
15126
15125
|
return;
|
|
15127
|
-
const T = this._checkMoveEdge(p, c), A =
|
|
15126
|
+
const T = this._checkMoveEdge(p, c), A = _e.getIntersects(p, c);
|
|
15128
15127
|
if (A == null)
|
|
15129
15128
|
return;
|
|
15130
|
-
const h =
|
|
15129
|
+
const h = Zn(
|
|
15131
15130
|
{ id: K.MoveRowsCommandId, params: { toRange: f, fromRange: c } },
|
|
15132
15131
|
A
|
|
15133
15132
|
), S = k(h, A);
|
|
@@ -15137,10 +15136,10 @@ let Tt = class extends ne {
|
|
|
15137
15136
|
} else if (i === 2) {
|
|
15138
15137
|
if (c == null || f == null)
|
|
15139
15138
|
return;
|
|
15140
|
-
const T = this._checkMoveEdge(p, c), A =
|
|
15139
|
+
const T = this._checkMoveEdge(p, c), A = _e.getIntersects(p, c);
|
|
15141
15140
|
if (A == null)
|
|
15142
15141
|
return;
|
|
15143
|
-
const h =
|
|
15142
|
+
const h = Jn(
|
|
15144
15143
|
{ id: K.MoveColsCommandId, params: { toRange: f, fromRange: c } },
|
|
15145
15144
|
A
|
|
15146
15145
|
), S = k(h, A);
|
|
@@ -15150,7 +15149,7 @@ let Tt = class extends ne {
|
|
|
15150
15149
|
}
|
|
15151
15150
|
if (m != null) {
|
|
15152
15151
|
if (i === 3) {
|
|
15153
|
-
const T =
|
|
15152
|
+
const T = ea(
|
|
15154
15153
|
{
|
|
15155
15154
|
id: K.InsertRowCommandId,
|
|
15156
15155
|
params: { range: m, unitId: "", subUnitId: "", direction: w.DOWN }
|
|
@@ -15164,7 +15163,7 @@ let Tt = class extends ne {
|
|
|
15164
15163
|
...A
|
|
15165
15164
|
};
|
|
15166
15165
|
} else if (i === 4) {
|
|
15167
|
-
const T =
|
|
15166
|
+
const T = ta(
|
|
15168
15167
|
{
|
|
15169
15168
|
id: K.InsertColCommandId,
|
|
15170
15169
|
params: { range: m, unitId: "", subUnitId: "", direction: w.RIGHT }
|
|
@@ -15178,7 +15177,7 @@ let Tt = class extends ne {
|
|
|
15178
15177
|
...A
|
|
15179
15178
|
};
|
|
15180
15179
|
} else if (i === 5) {
|
|
15181
|
-
const T =
|
|
15180
|
+
const T = na(
|
|
15182
15181
|
{
|
|
15183
15182
|
id: K.RemoveRowCommandId,
|
|
15184
15183
|
params: { range: m }
|
|
@@ -15192,7 +15191,7 @@ let Tt = class extends ne {
|
|
|
15192
15191
|
...A
|
|
15193
15192
|
};
|
|
15194
15193
|
} else if (i === 6) {
|
|
15195
|
-
const T =
|
|
15194
|
+
const T = aa(
|
|
15196
15195
|
{
|
|
15197
15196
|
id: K.RemoveColCommandId,
|
|
15198
15197
|
params: { range: m }
|
|
@@ -15206,7 +15205,7 @@ let Tt = class extends ne {
|
|
|
15206
15205
|
...A
|
|
15207
15206
|
};
|
|
15208
15207
|
} else if (i === 7) {
|
|
15209
|
-
const T =
|
|
15208
|
+
const T = ia(
|
|
15210
15209
|
{
|
|
15211
15210
|
id: K.DeleteRangeMoveLeftCommandId,
|
|
15212
15211
|
params: { range: m }
|
|
@@ -15220,7 +15219,7 @@ let Tt = class extends ne {
|
|
|
15220
15219
|
...A
|
|
15221
15220
|
};
|
|
15222
15221
|
} else if (i === 8) {
|
|
15223
|
-
const T =
|
|
15222
|
+
const T = ra(
|
|
15224
15223
|
{
|
|
15225
15224
|
id: K.DeleteRangeMoveUpCommandId,
|
|
15226
15225
|
params: { range: m }
|
|
@@ -15234,7 +15233,7 @@ let Tt = class extends ne {
|
|
|
15234
15233
|
...A
|
|
15235
15234
|
};
|
|
15236
15235
|
} else if (i === 9) {
|
|
15237
|
-
const T =
|
|
15236
|
+
const T = ua(
|
|
15238
15237
|
{
|
|
15239
15238
|
id: K.InsertRangeMoveDownCommandId,
|
|
15240
15239
|
params: { range: m }
|
|
@@ -15248,7 +15247,7 @@ let Tt = class extends ne {
|
|
|
15248
15247
|
...A
|
|
15249
15248
|
};
|
|
15250
15249
|
} else if (i === 10) {
|
|
15251
|
-
const T =
|
|
15250
|
+
const T = oa(
|
|
15252
15251
|
{
|
|
15253
15252
|
id: K.InsertRangeMoveRightCommandId,
|
|
15254
15253
|
params: { range: m }
|
|
@@ -15289,7 +15288,7 @@ let Tt = class extends ne {
|
|
|
15289
15288
|
i.push(m);
|
|
15290
15289
|
continue;
|
|
15291
15290
|
}
|
|
15292
|
-
const { token: c } = m, f =
|
|
15291
|
+
const { token: c } = m, f = De(c), { range: d, sheetName: s, unitId: l } = f, L = _e.moveOffset(d, t, n);
|
|
15293
15292
|
i.push({
|
|
15294
15293
|
...m,
|
|
15295
15294
|
token: st({
|
|
@@ -15341,76 +15340,76 @@ let Tt = class extends ne {
|
|
|
15341
15340
|
startColumn: s,
|
|
15342
15341
|
endRow: l,
|
|
15343
15342
|
endColumn: L,
|
|
15344
|
-
rangeType: b =
|
|
15343
|
+
rangeType: b = Oe.NORMAL
|
|
15345
15344
|
} = t, { startRow: E, startColumn: p, endRow: R, endColumn: T } = n, {
|
|
15346
15345
|
startRow: A,
|
|
15347
15346
|
endRow: h,
|
|
15348
15347
|
startColumn: S,
|
|
15349
|
-
endColumn:
|
|
15348
|
+
endColumn: D
|
|
15350
15349
|
} = u, {
|
|
15351
15350
|
startRow: M,
|
|
15352
|
-
endRow:
|
|
15353
|
-
startColumn:
|
|
15351
|
+
endRow: v,
|
|
15352
|
+
startColumn: g,
|
|
15354
15353
|
endColumn: U
|
|
15355
15354
|
} = i, I = { ...i };
|
|
15356
15355
|
if (a === 0)
|
|
15357
|
-
if (c ===
|
|
15356
|
+
if (c === g && f === U)
|
|
15358
15357
|
if (o < M)
|
|
15359
15358
|
I.startRow = o;
|
|
15360
|
-
else if (m <
|
|
15359
|
+
else if (m < v)
|
|
15361
15360
|
I.startRow = o;
|
|
15362
|
-
else if (m >=
|
|
15361
|
+
else if (m >= v && E <= v)
|
|
15363
15362
|
I.startRow = l + 1, I.endRow = m;
|
|
15364
|
-
else if (E >
|
|
15363
|
+
else if (E > v)
|
|
15365
15364
|
I.endRow -= l + 1 - M;
|
|
15366
15365
|
else
|
|
15367
15366
|
return;
|
|
15368
15367
|
else
|
|
15369
15368
|
return;
|
|
15370
15369
|
else if (a === 1)
|
|
15371
|
-
if (c ===
|
|
15372
|
-
if (m >
|
|
15370
|
+
if (c === g && f === U)
|
|
15371
|
+
if (m > v)
|
|
15373
15372
|
I.endRow = m;
|
|
15374
15373
|
else if (o > M)
|
|
15375
15374
|
I.endRow = m;
|
|
15376
15375
|
else if (o <= M && R >= M)
|
|
15377
15376
|
I.endRow = d + 1, I.startRow = o;
|
|
15378
15377
|
else if (R < M)
|
|
15379
|
-
I.startRow +=
|
|
15378
|
+
I.startRow += v - d + 1;
|
|
15380
15379
|
else
|
|
15381
15380
|
return;
|
|
15382
15381
|
else
|
|
15383
15382
|
return;
|
|
15384
15383
|
else if (a === 2)
|
|
15385
|
-
if (o === M && m ===
|
|
15386
|
-
if (c <
|
|
15384
|
+
if (o === M && m === v)
|
|
15385
|
+
if (c < g)
|
|
15387
15386
|
I.startColumn = c;
|
|
15388
15387
|
else if (f < U)
|
|
15389
15388
|
I.startColumn = c;
|
|
15390
15389
|
else if (f >= U && p <= U)
|
|
15391
15390
|
I.startColumn = L + 1, I.endColumn = f;
|
|
15392
15391
|
else if (p > U)
|
|
15393
|
-
I.endColumn -= L + 1 -
|
|
15392
|
+
I.endColumn -= L + 1 - g;
|
|
15394
15393
|
else
|
|
15395
15394
|
return;
|
|
15396
15395
|
else
|
|
15397
15396
|
return;
|
|
15398
15397
|
else if (a === 3)
|
|
15399
|
-
if (o === M && m ===
|
|
15398
|
+
if (o === M && m === v)
|
|
15400
15399
|
if (f > U)
|
|
15401
15400
|
I.endColumn = f;
|
|
15402
|
-
else if (c >
|
|
15401
|
+
else if (c > g)
|
|
15403
15402
|
I.endColumn = f;
|
|
15404
|
-
else if (c <=
|
|
15403
|
+
else if (c <= g && T >= g)
|
|
15405
15404
|
I.endColumn = s + 1, I.startColumn = c;
|
|
15406
|
-
else if (T <
|
|
15405
|
+
else if (T < g)
|
|
15407
15406
|
I.startColumn += U - s + 1;
|
|
15408
15407
|
else
|
|
15409
15408
|
return;
|
|
15410
15409
|
else
|
|
15411
15410
|
return;
|
|
15412
15411
|
else
|
|
15413
|
-
a === 4 ? (I.startRow = o, I.startColumn = c, I.endRow = m, I.endColumn = f) : s <=
|
|
15412
|
+
a === 4 ? (I.startRow = o, I.startColumn = c, I.endRow = m, I.endColumn = f) : s <= g && L >= U ? E > v ? I.endRow -= l - d + 1 : R < M && (I.startRow += l - d + 1) : d <= M && l >= v ? p > U ? I.endColumn -= L - s + 1 : T < g && (I.startColumn += L - s + 1) : ((p <= D + 1 && T >= U || p <= g && T >= S - 1) && E <= M && R >= v || (E <= h + 1 && R >= v || E <= M && R >= A - 1) && p <= g && T >= U) && (I.startRow = o, I.startColumn = c, I.endRow = m, I.endColumn = f);
|
|
15414
15413
|
return I;
|
|
15415
15414
|
}
|
|
15416
15415
|
_getCurrentSheetInfo() {
|
|
@@ -15421,22 +15420,22 @@ let Tt = class extends ne {
|
|
|
15421
15420
|
};
|
|
15422
15421
|
}
|
|
15423
15422
|
};
|
|
15424
|
-
Tt =
|
|
15423
|
+
Tt = Om([
|
|
15425
15424
|
ce(fe.Ready, Tt),
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15425
|
+
Ce(0, de),
|
|
15426
|
+
Ce(1, ue),
|
|
15427
|
+
Ce(2, y(Be)),
|
|
15428
|
+
Ce(3, y($e)),
|
|
15429
|
+
Ce(4, y(Dt)),
|
|
15430
|
+
Ce(5, y(cn)),
|
|
15431
|
+
Ce(6, y(Ot))
|
|
15433
15432
|
], Tt);
|
|
15434
|
-
var
|
|
15435
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15433
|
+
var Mm = Object.defineProperty, Dm = Object.getOwnPropertyDescriptor, gm = (a, e, t, n) => {
|
|
15434
|
+
for (var i = n > 1 ? void 0 : n ? Dm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15436
15435
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15437
|
-
return n && i &&
|
|
15438
|
-
},
|
|
15439
|
-
const
|
|
15436
|
+
return n && i && Mm(e, t, i), i;
|
|
15437
|
+
}, xm = (a, e) => (t, n) => e(t, n, a);
|
|
15438
|
+
const xa = Mt(
|
|
15440
15439
|
"formula-ui.formula-custom-function-service"
|
|
15441
15440
|
);
|
|
15442
15441
|
let Jt = class extends ne {
|
|
@@ -15446,7 +15445,7 @@ let Jt = class extends ne {
|
|
|
15446
15445
|
registerFunctions(a) {
|
|
15447
15446
|
const e = [], t = a.map((n) => (e.push(n[1]), [n[0].toString(), n[1]]));
|
|
15448
15447
|
return this._commandService.executeCommand(
|
|
15449
|
-
|
|
15448
|
+
Ei.id,
|
|
15450
15449
|
{
|
|
15451
15450
|
functions: t
|
|
15452
15451
|
},
|
|
@@ -15455,7 +15454,7 @@ let Jt = class extends ne {
|
|
|
15455
15454
|
}
|
|
15456
15455
|
), Q(() => {
|
|
15457
15456
|
this._commandService.executeCommand(
|
|
15458
|
-
|
|
15457
|
+
Si.id,
|
|
15459
15458
|
{
|
|
15460
15459
|
functions: e
|
|
15461
15460
|
},
|
|
@@ -15466,15 +15465,15 @@ let Jt = class extends ne {
|
|
|
15466
15465
|
});
|
|
15467
15466
|
}
|
|
15468
15467
|
};
|
|
15469
|
-
Jt =
|
|
15470
|
-
|
|
15468
|
+
Jt = gm([
|
|
15469
|
+
xm(0, ue)
|
|
15471
15470
|
], Jt);
|
|
15472
|
-
var
|
|
15473
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15471
|
+
var vm = Object.defineProperty, qm = Object.getOwnPropertyDescriptor, ym = (a, e, t, n) => {
|
|
15472
|
+
for (var i = n > 1 ? void 0 : n ? qm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15474
15473
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15475
|
-
return n && i &&
|
|
15476
|
-
},
|
|
15477
|
-
const
|
|
15474
|
+
return n && i && vm(e, t, i), i;
|
|
15475
|
+
}, mt = (a, e) => (t, n) => e(t, n, a);
|
|
15476
|
+
const Fm = Mt(
|
|
15478
15477
|
"formula-ui.register-function-service"
|
|
15479
15478
|
);
|
|
15480
15479
|
let en = class extends ne {
|
|
@@ -15503,22 +15502,22 @@ let en = class extends ne {
|
|
|
15503
15502
|
});
|
|
15504
15503
|
}
|
|
15505
15504
|
};
|
|
15506
|
-
en =
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15510
|
-
|
|
15505
|
+
en = ym([
|
|
15506
|
+
mt(0, y(xe)),
|
|
15507
|
+
mt(1, y(et)),
|
|
15508
|
+
mt(2, y(xa)),
|
|
15509
|
+
mt(3, Yn)
|
|
15511
15510
|
], en);
|
|
15512
|
-
var
|
|
15513
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15511
|
+
var Um = Object.defineProperty, Bm = Object.getOwnPropertyDescriptor, Vm = (a, e, t, n) => {
|
|
15512
|
+
for (var i = n > 1 ? void 0 : n ? Bm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15514
15513
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15515
|
-
return n && i &&
|
|
15516
|
-
},
|
|
15514
|
+
return n && i && Um(e, t, i), i;
|
|
15515
|
+
}, ct = (a, e) => (t, n) => e(t, n, a);
|
|
15517
15516
|
const Yt = "AllDefaultWorkbook";
|
|
15518
15517
|
let Et = class extends ne {
|
|
15519
15518
|
constructor(e, t, n, i) {
|
|
15520
15519
|
super();
|
|
15521
|
-
|
|
15520
|
+
q(this, "_preUnitId", null);
|
|
15522
15521
|
this._descriptionService = e, this._definedNamesService = t, this._univerInstanceService = n, this._commandService = i, this._initialize();
|
|
15523
15522
|
}
|
|
15524
15523
|
_initialize() {
|
|
@@ -15542,12 +15541,12 @@ let Et = class extends ne {
|
|
|
15542
15541
|
this.disposeWithMe(
|
|
15543
15542
|
this._commandService.onCommandExecuted((e, t) => {
|
|
15544
15543
|
if (!(t != null && t.fromCollab)) {
|
|
15545
|
-
if (e.id ===
|
|
15544
|
+
if (e.id === ji.id)
|
|
15546
15545
|
this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
|
|
15547
|
-
else if (e.id ===
|
|
15546
|
+
else if (e.id === Qi.id) {
|
|
15548
15547
|
const n = e.params;
|
|
15549
15548
|
this._registerDescription(n);
|
|
15550
|
-
} else if (e.id ===
|
|
15549
|
+
} else if (e.id === zi.id) {
|
|
15551
15550
|
const n = e.params;
|
|
15552
15551
|
this._unregisterDescription(n);
|
|
15553
15552
|
} else if (e.id === jt.id) {
|
|
@@ -15630,32 +15629,32 @@ let Et = class extends ne {
|
|
|
15630
15629
|
}), this._descriptionService.unregisterDescriptions(i);
|
|
15631
15630
|
}
|
|
15632
15631
|
};
|
|
15633
|
-
Et =
|
|
15632
|
+
Et = Vm([
|
|
15634
15633
|
ce(fe.Rendered, Et),
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15634
|
+
ct(0, et),
|
|
15635
|
+
ct(1, wn),
|
|
15636
|
+
ct(2, de),
|
|
15637
|
+
ct(3, ue)
|
|
15639
15638
|
], Et);
|
|
15640
|
-
var
|
|
15641
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15639
|
+
var Hm = Object.defineProperty, wm = Object.getOwnPropertyDescriptor, Gm = (a, e, t, n) => {
|
|
15640
|
+
for (var i = n > 1 ? void 0 : n ? wm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15642
15641
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15643
|
-
return n && i &&
|
|
15642
|
+
return n && i && Hm(e, t, i), i;
|
|
15644
15643
|
}, Wt = (a, e) => (t, n) => e(t, n, a);
|
|
15645
15644
|
let tn = class extends ne {
|
|
15646
15645
|
constructor(a, e, t) {
|
|
15647
15646
|
super(), this._refRangeService = a, this._lexerTreeBuilder = e, this._univerInstanceService = t;
|
|
15648
15647
|
}
|
|
15649
15648
|
registerFormula(a, e) {
|
|
15650
|
-
const t = /* @__PURE__ */ new Map(), n = this._lexerTreeBuilder.sequenceNodesBuilder(a), i = new
|
|
15649
|
+
const t = /* @__PURE__ */ new Map(), n = this._lexerTreeBuilder.sequenceNodesBuilder(a), i = new Hn(), u = (o) => {
|
|
15651
15650
|
const m = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), c = m.getActiveSheet(), f = m.getUnitId(), d = c.getSheetId(), s = n == null ? void 0 : n.map((L) => {
|
|
15652
15651
|
if (typeof L == "object" && L.nodeType === ie.REFERENCE) {
|
|
15653
15652
|
const b = t.get(L.token);
|
|
15654
15653
|
if (b.unitId && b.unitId !== f && b.subUnitId && b.subUnitId !== d)
|
|
15655
15654
|
return L;
|
|
15656
|
-
const E =
|
|
15655
|
+
const E = Ji(b.range, o);
|
|
15657
15656
|
let p = "";
|
|
15658
|
-
return b.unitId && b.sheetName ? p =
|
|
15657
|
+
return b.unitId && b.sheetName ? p = Ii(b.unitId, b.sheetName, b.range) : b.sheetName ? p = Ni(b.sheetName, b.range) : p = E ? ke(E) : W.ERROR, {
|
|
15659
15658
|
...L,
|
|
15660
15659
|
token: p
|
|
15661
15660
|
};
|
|
@@ -15666,7 +15665,7 @@ let tn = class extends ne {
|
|
|
15666
15665
|
};
|
|
15667
15666
|
return n == null || n.forEach((o) => {
|
|
15668
15667
|
if (typeof o == "object" && o.nodeType === ie.REFERENCE) {
|
|
15669
|
-
const m =
|
|
15668
|
+
const m = De(o.token), { range: c, unitId: f, sheetName: d } = m, s = f ? this._univerInstanceService.getUniverSheetInstance(f) : this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET), l = d ? s == null ? void 0 : s.getSheetBySheetName(d) : s == null ? void 0 : s.getActiveSheet();
|
|
15670
15669
|
if (!l)
|
|
15671
15670
|
return;
|
|
15672
15671
|
const L = l.getSheetId(), b = {
|
|
@@ -15680,24 +15679,24 @@ let tn = class extends ne {
|
|
|
15680
15679
|
}), i;
|
|
15681
15680
|
}
|
|
15682
15681
|
};
|
|
15683
|
-
tn =
|
|
15684
|
-
Wt(0, y(
|
|
15685
|
-
Wt(1, y(
|
|
15682
|
+
tn = Gm([
|
|
15683
|
+
Wt(0, y(Zi)),
|
|
15684
|
+
Wt(1, y(Be)),
|
|
15686
15685
|
Wt(2, de)
|
|
15687
15686
|
], tn);
|
|
15688
|
-
var
|
|
15689
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15687
|
+
var Ye = /* @__PURE__ */ ((a) => (a[a.NOT_REGISTER = 1] = "NOT_REGISTER", a[a.SUCCESS = 2] = "SUCCESS", a[a.WAIT = 3] = "WAIT", a[a.ERROR = 4] = "ERROR", a))(Ye || {}), Xm = Object.defineProperty, Ym = Object.getOwnPropertyDescriptor, Wm = (a, e, t, n) => {
|
|
15688
|
+
for (var i = n > 1 ? void 0 : n ? Ym(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15690
15689
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15691
|
-
return n && i &&
|
|
15692
|
-
},
|
|
15690
|
+
return n && i && Xm(e, t, i), i;
|
|
15691
|
+
}, Un = (a, e) => (t, n) => e(t, n, a);
|
|
15693
15692
|
let nn = class extends ne {
|
|
15694
15693
|
constructor(e, t) {
|
|
15695
15694
|
super();
|
|
15696
|
-
|
|
15697
|
-
|
|
15698
|
-
|
|
15699
|
-
|
|
15700
|
-
|
|
15695
|
+
q(this, "_formulaCacheMap", /* @__PURE__ */ new Map());
|
|
15696
|
+
q(this, "_formulaChange$", new Me());
|
|
15697
|
+
q(this, "formulaChange$", this._formulaChange$.asObservable());
|
|
15698
|
+
q(this, "_formulaResult$", new Me());
|
|
15699
|
+
q(this, "formulaResult$", this._formulaResult$.asObservable());
|
|
15701
15700
|
this._commandService = e, this._activeDirtyManagerService = t, this._initFormulaRegister(), this._initFormulaCalculationResultChange();
|
|
15702
15701
|
}
|
|
15703
15702
|
_ensureCacheMap(e, t) {
|
|
@@ -15720,14 +15719,14 @@ let nn = class extends ne {
|
|
|
15720
15719
|
};
|
|
15721
15720
|
}
|
|
15722
15721
|
}
|
|
15723
|
-
), this.formulaChange$.pipe(
|
|
15722
|
+
), this.formulaChange$.pipe(Mr(16), Dr((e) => !!e.length), We((e) => e.reduce((t, n) => {
|
|
15724
15723
|
const { unitId: i, subUnitId: u, formulaId: o, formulaText: m } = n;
|
|
15725
15724
|
return t[i] || (t[i] = {}), t[i][u] || (t[i][u] = {}), t[i][u][o] = { f: m }, t;
|
|
15726
15725
|
}, {}))).subscribe((e) => {
|
|
15727
15726
|
for (const t in e)
|
|
15728
15727
|
for (const n in e[t]) {
|
|
15729
15728
|
const i = e[t][n], u = { unitId: t, subUnitId: n, formulaMap: i };
|
|
15730
|
-
this._commandService.executeCommand(
|
|
15729
|
+
this._commandService.executeCommand(Ri.id, u).then(() => {
|
|
15731
15730
|
this._commandService.executeCommand(
|
|
15732
15731
|
At.id,
|
|
15733
15732
|
{ [t]: { [n]: i } }
|
|
@@ -15738,7 +15737,7 @@ let nn = class extends ne {
|
|
|
15738
15737
|
}
|
|
15739
15738
|
_initFormulaCalculationResultChange() {
|
|
15740
15739
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
15741
|
-
if (e.id ===
|
|
15740
|
+
if (e.id === Xn.id) {
|
|
15742
15741
|
const t = e.params, { unitOtherData: n } = t, i = {};
|
|
15743
15742
|
for (const u in n) {
|
|
15744
15743
|
const o = n[u], m = {};
|
|
@@ -15750,7 +15749,7 @@ let nn = class extends ne {
|
|
|
15750
15749
|
const L = d[l];
|
|
15751
15750
|
if (f.has(l)) {
|
|
15752
15751
|
const b = f.get(l);
|
|
15753
|
-
b.result = L, b.status =
|
|
15752
|
+
b.result = L, b.status = Ye.SUCCESS, b.callbacks.forEach((E) => {
|
|
15754
15753
|
E(L);
|
|
15755
15754
|
}), b.callbacks.clear(), s.push(b);
|
|
15756
15755
|
}
|
|
@@ -15765,7 +15764,7 @@ let nn = class extends ne {
|
|
|
15765
15764
|
const u = this._createFormulaId(e, t);
|
|
15766
15765
|
return this._ensureCacheMap(e, t).set(u, {
|
|
15767
15766
|
result: void 0,
|
|
15768
|
-
status:
|
|
15767
|
+
status: Ye.WAIT,
|
|
15769
15768
|
formulaId: u,
|
|
15770
15769
|
callbacks: /* @__PURE__ */ new Set(),
|
|
15771
15770
|
extra: i
|
|
@@ -15782,13 +15781,13 @@ let nn = class extends ne {
|
|
|
15782
15781
|
subUnitId: t,
|
|
15783
15782
|
formulaIdList: n
|
|
15784
15783
|
};
|
|
15785
|
-
this._commandService.executeCommand(
|
|
15784
|
+
this._commandService.executeCommand(Ci.id, i);
|
|
15786
15785
|
const u = this._ensureCacheMap(e, t);
|
|
15787
15786
|
n.forEach((o) => u.delete(o));
|
|
15788
15787
|
}
|
|
15789
15788
|
getFormulaValue(e, t, n) {
|
|
15790
15789
|
const i = this._ensureCacheMap(e, t), u = i.get(n);
|
|
15791
|
-
return u ? u.status ===
|
|
15790
|
+
return u ? u.status === Ye.SUCCESS || u.status === Ye.ERROR ? Promise.resolve(u) : new Promise((o) => {
|
|
15792
15791
|
u.callbacks.add(() => {
|
|
15793
15792
|
o(i.get(n));
|
|
15794
15793
|
});
|
|
@@ -15798,16 +15797,16 @@ let nn = class extends ne {
|
|
|
15798
15797
|
return this._ensureCacheMap(e, t).get(n);
|
|
15799
15798
|
}
|
|
15800
15799
|
};
|
|
15801
|
-
nn =
|
|
15802
|
-
|
|
15803
|
-
|
|
15800
|
+
nn = Wm([
|
|
15801
|
+
Un(0, ue),
|
|
15802
|
+
Un(1, rn)
|
|
15804
15803
|
], nn);
|
|
15805
|
-
var
|
|
15806
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15804
|
+
var Km = Object.defineProperty, km = Object.getOwnPropertyDescriptor, $m = (a, e, t, n) => {
|
|
15805
|
+
for (var i = n > 1 ? void 0 : n ? km(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15807
15806
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15808
|
-
return n && i &&
|
|
15809
|
-
},
|
|
15810
|
-
const Kt = "SHEET_FORMULA_ALERT",
|
|
15807
|
+
return n && i && Km(e, t, i), i;
|
|
15808
|
+
}, ft = (a, e) => (t, n) => e(t, n, a);
|
|
15809
|
+
const Kt = "SHEET_FORMULA_ALERT", jm = {
|
|
15811
15810
|
[W.DIV_BY_ZERO]: "divByZero",
|
|
15812
15811
|
[W.NAME]: "name",
|
|
15813
15812
|
[W.VALUE]: "value",
|
|
@@ -15834,16 +15833,16 @@ let St = class extends ne {
|
|
|
15834
15833
|
if (a) {
|
|
15835
15834
|
const i = this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET).getActiveSheet().getCell(a.location.row, a.location.col);
|
|
15836
15835
|
if (i) {
|
|
15837
|
-
const u =
|
|
15836
|
+
const u = ga(i);
|
|
15838
15837
|
if (!u)
|
|
15839
15838
|
return;
|
|
15840
15839
|
const o = this._cellAlertManagerService.currentAlert.get(Kt), m = (e = o == null ? void 0 : o.alert) == null ? void 0 : e.location;
|
|
15841
15840
|
if (m && m.row === a.location.row && m.col === a.location.col && m.subUnitId === a.location.subUnitId && m.unitId === a.location.unitId)
|
|
15842
15841
|
return;
|
|
15843
15842
|
this._cellAlertManagerService.showAlert({
|
|
15844
|
-
type:
|
|
15843
|
+
type: mr.ERROR,
|
|
15845
15844
|
title: this._localeService.t("formula.error.title"),
|
|
15846
|
-
message: this._localeService.t(`formula.error.${
|
|
15845
|
+
message: this._localeService.t(`formula.error.${jm[u]}`),
|
|
15847
15846
|
location: a.location,
|
|
15848
15847
|
width: 200,
|
|
15849
15848
|
height: 74,
|
|
@@ -15856,65 +15855,62 @@ let St = class extends ne {
|
|
|
15856
15855
|
}));
|
|
15857
15856
|
}
|
|
15858
15857
|
};
|
|
15859
|
-
St =
|
|
15858
|
+
St = $m([
|
|
15860
15859
|
ce(fe.Rendered, St),
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15860
|
+
ft(0, y(cr)),
|
|
15861
|
+
ft(1, y(fr)),
|
|
15862
|
+
ft(2, de),
|
|
15863
|
+
ft(3, y(xe))
|
|
15865
15864
|
], St);
|
|
15866
|
-
var
|
|
15867
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15865
|
+
var Qm = Object.defineProperty, zm = Object.getOwnPropertyDescriptor, Zm = (a, e, t, n) => {
|
|
15866
|
+
for (var i = n > 1 ? void 0 : n ? zm(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15868
15867
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15869
|
-
return n && i &&
|
|
15870
|
-
},
|
|
15871
|
-
|
|
15872
|
-
|
|
15873
|
-
|
|
15868
|
+
return n && i && Qm(e, t, i), i;
|
|
15869
|
+
}, Jm = (a, e) => (t, n) => e(t, n, a);
|
|
15870
|
+
const ec = {
|
|
15871
|
+
tl: {
|
|
15872
|
+
size: 6,
|
|
15873
|
+
color: "#409f11"
|
|
15874
15874
|
}
|
|
15875
|
-
|
|
15876
|
-
|
|
15875
|
+
};
|
|
15876
|
+
let It = class extends Qa {
|
|
15877
|
+
constructor(a) {
|
|
15878
|
+
super(), this._sheetInterceptorService = a, this._init();
|
|
15877
15879
|
}
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15880
|
+
_init() {
|
|
15881
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
15882
|
+
mn.CELL_CONTENT,
|
|
15883
|
+
{
|
|
15884
|
+
handler: (a, e, t) => {
|
|
15885
|
+
const n = Go(a);
|
|
15886
|
+
return n !== null ? t({
|
|
15887
|
+
...a,
|
|
15888
|
+
v: n
|
|
15889
|
+
}) : ga(a) ? t({
|
|
15890
|
+
...a,
|
|
15891
|
+
markers: {
|
|
15892
|
+
...a == null ? void 0 : a.markers,
|
|
15893
|
+
...ec
|
|
15894
|
+
}
|
|
15895
|
+
}) : t(a);
|
|
15896
|
+
},
|
|
15897
|
+
priority: 10
|
|
15883
15898
|
}
|
|
15884
|
-
|
|
15885
|
-
this.disposeWithMe(
|
|
15886
|
-
this._sheetInterceptorService.intercept(
|
|
15887
|
-
mn.CELL_CONTENT,
|
|
15888
|
-
{
|
|
15889
|
-
handler: (e, t, n) => {
|
|
15890
|
-
var o;
|
|
15891
|
-
return !((o = this._sheetSkeletonManagerService.getCurrent()) == null ? void 0 : o.skeleton) || !xa(e) ? n(e) : n({
|
|
15892
|
-
...e,
|
|
15893
|
-
markers: {
|
|
15894
|
-
...e == null ? void 0 : e.markers,
|
|
15895
|
-
...a
|
|
15896
|
-
}
|
|
15897
|
-
});
|
|
15898
|
-
},
|
|
15899
|
-
priority: 10
|
|
15900
|
-
}
|
|
15901
|
-
)
|
|
15902
|
-
);
|
|
15899
|
+
));
|
|
15903
15900
|
}
|
|
15904
15901
|
};
|
|
15905
|
-
It =
|
|
15902
|
+
It = Zm([
|
|
15906
15903
|
ce(fe.Rendered, It),
|
|
15907
|
-
|
|
15908
|
-
Vn(1, y(Dt))
|
|
15904
|
+
Jm(0, y(Dt))
|
|
15909
15905
|
], It);
|
|
15910
|
-
var
|
|
15911
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
15906
|
+
var va = Object.defineProperty, tc = Object.getOwnPropertyDescriptor, nc = (a, e, t) => e in a ? va(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, ac = (a, e, t, n) => {
|
|
15907
|
+
for (var i = n > 1 ? void 0 : n ? tc(e, t) : e, u = a.length - 1, o; u >= 0; u--)
|
|
15912
15908
|
(o = a[u]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
15913
|
-
return n && i &&
|
|
15914
|
-
},
|
|
15915
|
-
let
|
|
15909
|
+
return n && i && va(e, t, i), i;
|
|
15910
|
+
}, Bn = (a, e) => (t, n) => e(t, n, a), qa = (a, e, t) => (nc(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
15911
|
+
let _t = class extends za {
|
|
15916
15912
|
constructor(a = {}, e, t) {
|
|
15917
|
-
super(), this._config = a, this._injector = e, this._localeService = t, this._config = te.deepMerge({},
|
|
15913
|
+
super(), this._config = a, this._injector = e, this._localeService = t, this._config = te.deepMerge({}, Jo, this._config);
|
|
15918
15914
|
}
|
|
15919
15915
|
onStarting() {
|
|
15920
15916
|
this._init();
|
|
@@ -15922,9 +15918,9 @@ let wn = (ft = class extends Qa {
|
|
|
15922
15918
|
_init() {
|
|
15923
15919
|
[
|
|
15924
15920
|
// services
|
|
15925
|
-
[
|
|
15921
|
+
[Ve, { useClass: au }],
|
|
15926
15922
|
[
|
|
15927
|
-
|
|
15923
|
+
et,
|
|
15928
15924
|
{
|
|
15929
15925
|
useFactory: () => {
|
|
15930
15926
|
var e;
|
|
@@ -15932,15 +15928,15 @@ let wn = (ft = class extends Qa {
|
|
|
15932
15928
|
}
|
|
15933
15929
|
}
|
|
15934
15930
|
],
|
|
15935
|
-
[
|
|
15936
|
-
[
|
|
15931
|
+
[xa, { useClass: Jt }],
|
|
15932
|
+
[Fm, { useClass: en }],
|
|
15937
15933
|
[tn],
|
|
15938
15934
|
[nn],
|
|
15939
15935
|
// controllers
|
|
15940
15936
|
[
|
|
15941
|
-
|
|
15937
|
+
Ke,
|
|
15942
15938
|
{
|
|
15943
|
-
useFactory: () => this._injector.createInstance(
|
|
15939
|
+
useFactory: () => this._injector.createInstance(Ke, this._config)
|
|
15944
15940
|
}
|
|
15945
15941
|
],
|
|
15946
15942
|
[Pt],
|
|
@@ -15949,27 +15945,30 @@ let wn = (ft = class extends Qa {
|
|
|
15949
15945
|
[dt],
|
|
15950
15946
|
[bt],
|
|
15951
15947
|
[Tt],
|
|
15952
|
-
[
|
|
15948
|
+
[Ct],
|
|
15953
15949
|
[lt],
|
|
15954
15950
|
[Et],
|
|
15955
15951
|
[It],
|
|
15956
15952
|
[St]
|
|
15957
15953
|
].forEach((e) => this._injector.add(e));
|
|
15958
15954
|
}
|
|
15959
|
-
}
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15955
|
+
};
|
|
15956
|
+
qa(_t, "pluginName", La);
|
|
15957
|
+
qa(_t, "type", Y.UNIVER_SHEET);
|
|
15958
|
+
_t = ac([
|
|
15959
|
+
Za(hi),
|
|
15960
|
+
Bn(1, y(Ot)),
|
|
15961
|
+
Bn(2, y(xe))
|
|
15962
|
+
], _t);
|
|
15964
15963
|
export {
|
|
15965
15964
|
Zt as DescriptionService,
|
|
15966
15965
|
Jt as FormulaCustomFunctionService,
|
|
15967
15966
|
tn as FormulaRefRangeService,
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
15967
|
+
et as IDescriptionService,
|
|
15968
|
+
xa as IFormulaCustomFunctionService,
|
|
15969
|
+
Fm as IRegisterFunctionService,
|
|
15971
15970
|
en as RegisterFunctionService,
|
|
15972
15971
|
nn as RegisterOtherFormulaService,
|
|
15973
|
-
|
|
15974
|
-
|
|
15972
|
+
Aa as SPECIAL_PASTE_FORMULA,
|
|
15973
|
+
_t as UniverSheetsFormulaPlugin
|
|
15975
15974
|
};
|