@univerjs/sheets-formula 0.1.8 → 0.1.9
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 +5 -5
- package/lib/es/index.js +520 -515
- package/lib/umd/index.js +5 -5
- package/package.json +20 -20
package/lib/es/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var Tr = (a, e, t) => e in a ? Ir(a, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var x = (a, e, t) => (Tr(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { Disposable as ee, ObjectMatrix as W, Dimension as cn, OnLifecycle as fe, LifecycleStages as le, IUniverInstanceService as he, CellValueType as Lt, ThemeService as jt, ICommandService as oe, isFormulaString as ye, isFormulaId as ze, Tools as Z, Direction as V, CommandType as Ee, UniverInstanceType as ie, toDisposable as J, ColorKit as _n, Rectangle as Ne, DEFAULT_EMPTY_DOCUMENT_VALUE as Sr, isRealNum as Nr, getCellValueType as Cr, LocaleService as Be, FOCUSING_DOC as Dr, FOCUSING_UNIVER_EDITOR as gr, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Or, FOCUSING_EDITOR_INPUT_FORMULA as Ze, DisposableCollection as vn, RANGE_TYPE as Ce, AbsoluteRefType as $, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as _r, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as vr, IContextService as Mr, throttle as xr, cellToRange as yr, Plugin as Br } from "@univerjs/core";
|
|
5
5
|
import { Inject as k, Injector as Tt, createIdentifier as St } from "@wendellhu/redi";
|
|
6
|
-
import { SetDefinedNameMutation as mn, RemoveDefinedNameMutation as sn, FormulaDataModel as Xe, IActiveDirtyManagerService as Jt, IDefinedNamesService as Mn, SetArrayFormulaDataMutation as At, LexerTreeBuilder as ke, ErrorType as ce, SetFormulaCalculationResultMutation as xn, sequenceNodeType as ne, serializeRange as Ge, FUNCTION_NAMES_COMPATIBILITY as F, FunctionType as i, FUNCTION_NAMES_CUBE as Ie, FUNCTION_NAMES_DATABASE as te, FUNCTION_NAMES_DATE as H, FUNCTION_NAMES_ENGINEERING as g, FUNCTION_NAMES_FINANCIAL as D, FUNCTION_NAMES_INFORMATION as Y, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as q, FUNCTION_NAMES_MATH as
|
|
6
|
+
import { SetDefinedNameMutation as mn, RemoveDefinedNameMutation as sn, FormulaDataModel as Xe, IActiveDirtyManagerService as Jt, IDefinedNamesService as Mn, SetArrayFormulaDataMutation as At, LexerTreeBuilder as ke, ErrorType as ce, SetFormulaCalculationResultMutation as xn, sequenceNodeType as ne, serializeRange as Ge, FUNCTION_NAMES_COMPATIBILITY as F, FunctionType as i, FUNCTION_NAMES_CUBE as Ie, FUNCTION_NAMES_DATABASE as te, FUNCTION_NAMES_DATE as H, FUNCTION_NAMES_ENGINEERING as g, FUNCTION_NAMES_FINANCIAL as D, FUNCTION_NAMES_INFORMATION as Y, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as q, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as h, FUNCTION_NAMES_TEXT as y, FUNCTION_NAMES_WEB as Ot, isReferenceStrings as kr, functionArray as Ur, functionCompatibility as Fr, functionCube as qr, functionDatabase as wr, functionDate as Vr, functionEngineering as Hr, functionFinancial as zr, functionInformation as Gr, functionLogical as Xr, functionLookup as Yr, functionMath as Wr, functionMeta as Kr, functionStatistical as $r, functionText as Qr, functionUniver as jr, functionWeb as Jr, IFunctionService as yn, matchToken as ve, matchRefDrawToken as fn, compareToken as _t, deserializeRangeWithSheet as ge, normalizeSheetName as Zr, serializeRangeToRefString as ut, generateStringWithSequence as Zt, getAbsoluteRefTypeWitString as ea, SetFormulaCalculationStartMutation as ln, SetFormulaCalculationNotificationMutation as ta, FormulaExecuteStageType as vt, FormulaExecutedStateType as Me, SetFormulaDataMutation as Mt, initSheetFormulaData as na, RegisterFunctionMutation as ra, UnregisterFunctionMutation as aa, serializeRangeWithSpreadsheet as ia, serializeRangeWithSheet as oa, SetOtherFormulaMutation as ua, RemoveOtherFormulaMutation as ca } from "@univerjs/engine-formula";
|
|
7
7
|
import { SetRangeValuesMutation as se, SetStyleCommand as en, MoveRangeMutation as dn, MoveRowsMutation as bn, MoveColsMutation as pn, RemoveRowMutation as hn, RemoveColMutation as En, RemoveSheetMutation as Vt, InsertSheetMutation as Ht, SetDefinedNameCommand as zt, INTERCEPTOR_POINT as Bn, SheetInterceptorService as tn, SetRangeValuesUndoMutationFactory as ma, SetRangeValuesCommand as sa, SelectionManagerService as nn, getSheetCommandTarget as fa, getCellAtRowCol as la, SetSelectionsOperation as da, NORMAL_SELECTION_PLUGIN_NAME as Se, getCurrentSheetDisabled$ as ba, convertSelectionDataToRange as xt, getNormalSelectionStyle as pa, setEndForRange as ha, getPrimaryForRange as Ea, SetBorderCommand as kn, ClearSelectionFormatCommand as Un, INumfmtService as Pa, handleMoveRange as Fn, EffectRefRangId as G, runRefRangeMutations as X, handleMoveRows as qn, handleMoveCols as wn, handleInsertRow as Vn, handleInsertCol as Hn, handleIRemoveRow as zn, handleIRemoveCol as Gn, handleDeleteRangeMoveLeft as Xn, handleDeleteRangeMoveUp as Yn, handleInsertRangeMoveDown as Wn, handleInsertRangeMoveRight as Kn, RemoveSheetCommand as La, SetWorksheetNameCommand as Aa, DeleteRangeMoveLeftCommand as Ra, DeleteRangeMoveUpCommand as Ia, RemoveColCommand as Ta, RemoveRowCommand as Sa, InsertRangeMoveDownCommand as Na, InsertRangeMoveRightCommand as Ca, InsertColCommand as Da, InsertRowCommand as ga, MoveColsCommand as Oa, MoveRowsCommand as _a, MoveRangeCommand as va, SetWorksheetActiveOperation as Ma, InsertDefinedNameCommand as xa, RemoveDefinedNameCommand as ya, RefRangeService as Ba, handleDefaultRangeChangeWithEffectRefCommands as ka } from "@univerjs/sheets";
|
|
8
8
|
import { DATA_TYPE as Pn, APPLY_TYPE as Ua, IAutoFillService as Fa, SheetPasteCommand as qa, COPY_TYPE as $n, PREDEFINED_HOOK_NAME as wa, ISheetClipboardService as Va, SelectionShape as Ha, IEditorBridgeService as Qn, SheetSkeletonManagerService as jn, ISelectionRenderService as Jn, PASTE_SPECIAL_MENU_ID as za, whenFormulaEditorActivated as Ye, getEditorObject as Ln, MoveSelectionCommand as et, JumpOver as An, ExpandSelectionCommand as Rn } from "@univerjs/sheets-ui";
|
|
9
9
|
import { IRenderManagerService as Zn, DeviceInputEventType as me, getCellInfoInMergeData as Ga, ITextSelectionRenderManager as Xa } from "@univerjs/engine-render";
|
|
@@ -136,39 +136,39 @@ let ct = class extends ee {
|
|
|
136
136
|
return o.push(...this._getDirtyRangesByCellValue(t, e, u)), o.push(...this._getDirtyRangesByCellValue(t, e, c)), o.push(...this._getDirtyRangesForArrayFormula(t, e, c)), o;
|
|
137
137
|
}
|
|
138
138
|
_getDeleteRangeMutationDirtyRange(a) {
|
|
139
|
-
const { subUnitId: e, unitId: t, range: n, shiftDimension: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(t), c = u == null ? void 0 : u.getSheetBySheetId(e), m = (c == null ? void 0 : c.getLastRowWithContent()) || 0, s = (c == null ? void 0 : c.getLastColumnWithContent()) || 0,
|
|
139
|
+
const { subUnitId: e, unitId: t, range: n, shiftDimension: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(t), c = u == null ? void 0 : u.getSheetBySheetId(e), m = (c == null ? void 0 : c.getLastRowWithContent()) || 0, s = (c == null ? void 0 : c.getLastColumnWithContent()) || 0, l = new W();
|
|
140
140
|
let f = null;
|
|
141
|
-
const { startRow:
|
|
141
|
+
const { startRow: d, startColumn: E, endRow: P, endColumn: R } = n;
|
|
142
142
|
r === cn.ROWS ? f = this._rangeToMatrix({
|
|
143
|
-
startRow:
|
|
144
|
-
startColumn:
|
|
143
|
+
startRow: d,
|
|
144
|
+
startColumn: E,
|
|
145
145
|
endRow: m,
|
|
146
|
-
endColumn:
|
|
146
|
+
endColumn: R
|
|
147
147
|
}) : r === cn.COLUMNS && (f = this._rangeToMatrix({
|
|
148
|
-
startRow:
|
|
149
|
-
startColumn:
|
|
150
|
-
endRow:
|
|
148
|
+
startRow: d,
|
|
149
|
+
startColumn: E,
|
|
150
|
+
endRow: P,
|
|
151
151
|
endColumn: s
|
|
152
|
-
})), f != null &&
|
|
153
|
-
const p =
|
|
152
|
+
})), f != null && l.merge(f);
|
|
153
|
+
const p = l.getData();
|
|
154
154
|
return o.push(...this._getDirtyRangesByCellValue(t, e, p)), o.push(...this._getDirtyRangesForArrayFormula(t, e, p)), o;
|
|
155
155
|
}
|
|
156
156
|
_getRemoveRowOrColumnMutation(a, e = !0) {
|
|
157
|
-
const { subUnitId: t, unitId: n, range: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(n), c = u == null ? void 0 : u.getSheetBySheetId(t), m = (c == null ? void 0 : c.getRowCount()) || 0, s = (c == null ? void 0 : c.getColumnCount()) || 0,
|
|
157
|
+
const { subUnitId: t, unitId: n, range: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(n), c = u == null ? void 0 : u.getSheetBySheetId(t), m = (c == null ? void 0 : c.getRowCount()) || 0, s = (c == null ? void 0 : c.getColumnCount()) || 0, l = new W();
|
|
158
158
|
let f = null;
|
|
159
|
-
const { startRow:
|
|
159
|
+
const { startRow: d, endRow: E, startColumn: P, endColumn: R } = r;
|
|
160
160
|
e === !0 ? f = this._rangeToMatrix({
|
|
161
|
-
startRow:
|
|
161
|
+
startRow: d,
|
|
162
162
|
startColumn: 0,
|
|
163
|
-
endRow:
|
|
163
|
+
endRow: E,
|
|
164
164
|
endColumn: s - 1
|
|
165
165
|
}) : f = this._rangeToMatrix({
|
|
166
166
|
startRow: 0,
|
|
167
|
-
startColumn:
|
|
167
|
+
startColumn: P,
|
|
168
168
|
endRow: m,
|
|
169
|
-
endColumn:
|
|
170
|
-
}), f != null &&
|
|
171
|
-
const p =
|
|
169
|
+
endColumn: R
|
|
170
|
+
}), f != null && l.merge(f);
|
|
171
|
+
const p = l.getData();
|
|
172
172
|
return o.push(...this._getDirtyRangesByCellValue(n, t, p)), o.push(...this._getDirtyRangesForArrayFormula(n, t, p)), o;
|
|
173
173
|
}
|
|
174
174
|
_getRemoveSheetMutation(a) {
|
|
@@ -204,19 +204,19 @@ let ct = class extends ee {
|
|
|
204
204
|
const r = new W(t), o = this._formulaDataModel.getArrayFormulaRange();
|
|
205
205
|
if ((u = o == null ? void 0 : o[a]) != null && u[e]) {
|
|
206
206
|
const m = new W((c = o == null ? void 0 : o[a]) == null ? void 0 : c[e]);
|
|
207
|
-
r.forValue((s,
|
|
208
|
-
m.forValue((f,
|
|
209
|
-
if (
|
|
207
|
+
r.forValue((s, l) => {
|
|
208
|
+
m.forValue((f, d, E) => {
|
|
209
|
+
if (E == null)
|
|
210
210
|
return !0;
|
|
211
|
-
const { startRow:
|
|
212
|
-
s >=
|
|
211
|
+
const { startRow: P, startColumn: R, endRow: p, endColumn: S } = E;
|
|
212
|
+
s >= P && s <= p && l >= R && l <= S && n.push({
|
|
213
213
|
unitId: a,
|
|
214
214
|
sheetId: e,
|
|
215
215
|
range: {
|
|
216
|
-
startRow:
|
|
217
|
-
startColumn:
|
|
218
|
-
endRow:
|
|
219
|
-
endColumn:
|
|
216
|
+
startRow: P,
|
|
217
|
+
startColumn: R,
|
|
218
|
+
endRow: P,
|
|
219
|
+
endColumn: R
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
222
|
});
|
|
@@ -262,8 +262,8 @@ let mt = class extends ee {
|
|
|
262
262
|
this._sheetInterceptorService.intercept(Bn.CELL_CONTENT, {
|
|
263
263
|
priority: 100,
|
|
264
264
|
handler: (a, e, t) => {
|
|
265
|
-
var s,
|
|
266
|
-
const { unitId: n, subUnitId: r, row: o, col: u } = e, c = this._formulaDataModel.getArrayFormulaCellData(), m = (f = (
|
|
265
|
+
var s, l, f;
|
|
266
|
+
const { unitId: n, subUnitId: r, row: o, col: u } = e, c = this._formulaDataModel.getArrayFormulaCellData(), m = (f = (l = (s = c == null ? void 0 : c[n]) == null ? void 0 : s[r]) == null ? void 0 : l[o]) == null ? void 0 : f[u];
|
|
267
267
|
return m == null ? t(a) : m.v == null && m.t == null ? t({
|
|
268
268
|
...a,
|
|
269
269
|
...m,
|
|
@@ -313,26 +313,26 @@ let st = class extends ee {
|
|
|
313
313
|
_fillCopyFormula(a, e, t, n, r) {
|
|
314
314
|
var m, s;
|
|
315
315
|
const o = Ci(r), u = [], c = /* @__PURE__ */ new Map();
|
|
316
|
-
for (let
|
|
317
|
-
const f = (
|
|
318
|
-
if (
|
|
319
|
-
const
|
|
320
|
-
if (ze(
|
|
321
|
-
|
|
322
|
-
else if (
|
|
323
|
-
let
|
|
324
|
-
if (
|
|
325
|
-
|
|
316
|
+
for (let l = 1; l <= e; l++) {
|
|
317
|
+
const f = (l - 1) % a.length, d = Z.deepClone(a[f]);
|
|
318
|
+
if (d) {
|
|
319
|
+
const E = ((m = a[f]) == null ? void 0 : m.f) || "", P = ((s = a[f]) == null ? void 0 : s.si) || "", R = ye(E);
|
|
320
|
+
if (ze(P))
|
|
321
|
+
d.si = P, d.f = null, d.v = null, d.p = null, t === V.DOWN || t === V.RIGHT ? u.push(d) : u.unshift(d);
|
|
322
|
+
else if (R) {
|
|
323
|
+
let S = c.get(f);
|
|
324
|
+
if (S)
|
|
325
|
+
d.si = S, d.f = null, d.v = null, d.p = null;
|
|
326
326
|
else {
|
|
327
|
-
|
|
328
|
-
const { offsetX: L, offsetY: b } = Ni(o, t),
|
|
329
|
-
|
|
327
|
+
S = Z.generateRandomId(6), c.set(f, S);
|
|
328
|
+
const { offsetX: L, offsetY: b } = Ni(o, t), N = this._lexerTreeBuilder.moveFormulaRefOffset(
|
|
329
|
+
E,
|
|
330
330
|
L,
|
|
331
331
|
b
|
|
332
332
|
);
|
|
333
|
-
|
|
333
|
+
d.si = S, d.f = N, d.v = null, d.p = null;
|
|
334
334
|
}
|
|
335
|
-
t === V.DOWN || t === V.RIGHT ? u.push(
|
|
335
|
+
t === V.DOWN || t === V.RIGHT ? u.push(d) : u.unshift(d);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
@@ -413,10 +413,10 @@ let ft = class extends ee {
|
|
|
413
413
|
copyType: n.copyType || $n.COPY,
|
|
414
414
|
copyRange: a == null ? void 0 : a.range,
|
|
415
415
|
pasteType: n.pasteType
|
|
416
|
-
}, u = e.range, c = t, m = this._currentUniverSheet.getCurrentUnitForType(ie.UNIVER_SHEET), s = m.getUnitId(),
|
|
416
|
+
}, u = e.range, c = t, m = this._currentUniverSheet.getCurrentUnitForType(ie.UNIVER_SHEET), s = m.getUnitId(), l = m.getActiveSheet().getSheetId();
|
|
417
417
|
return this._injector.invoke((f) => vi(
|
|
418
418
|
s,
|
|
419
|
-
|
|
419
|
+
l,
|
|
420
420
|
u,
|
|
421
421
|
c,
|
|
422
422
|
f,
|
|
@@ -434,49 +434,49 @@ ft = Oi([
|
|
|
434
434
|
rt(3, k(Tt))
|
|
435
435
|
], ft);
|
|
436
436
|
function vi(a, e, t, n, r, o, u, c = !1) {
|
|
437
|
-
const m = [], s = [],
|
|
438
|
-
let
|
|
437
|
+
const m = [], s = [], l = new W(), f = /* @__PURE__ */ new Map();
|
|
438
|
+
let d = 0, E = 0;
|
|
439
439
|
if (o && o.copyRange) {
|
|
440
|
-
const { copyType: p, copyRange:
|
|
441
|
-
p === $n.COPY &&
|
|
440
|
+
const { copyType: p, copyRange: S } = o;
|
|
441
|
+
p === $n.COPY && S && (d = S.rows.length, E = S.cols.length);
|
|
442
442
|
}
|
|
443
|
-
n.forValue((p,
|
|
443
|
+
n.forValue((p, S, L) => {
|
|
444
444
|
var O, v;
|
|
445
|
-
const b = L.f || "",
|
|
445
|
+
const b = L.f || "", N = L.si || "";
|
|
446
446
|
let A = {};
|
|
447
|
-
if (c && (A = Z.deepClone(L)), !(!
|
|
448
|
-
if (ze(
|
|
449
|
-
A.si =
|
|
447
|
+
if (c && (A = Z.deepClone(L)), !(!d || !E)) {
|
|
448
|
+
if (ze(N))
|
|
449
|
+
A.si = N, A.f = null, A.v = null, A.p = null;
|
|
450
450
|
else if (ye(b) && o.pasteType === wa.DEFAULT_PASTE) {
|
|
451
|
-
const _ = p %
|
|
452
|
-
let
|
|
453
|
-
if (
|
|
454
|
-
A.si =
|
|
451
|
+
const _ = p % d, M = S % E, U = `${_}_${M}`;
|
|
452
|
+
let I = f.get(U);
|
|
453
|
+
if (I)
|
|
454
|
+
A.si = I, A.f = null, A.v = null, A.p = null;
|
|
455
455
|
else {
|
|
456
|
-
|
|
457
|
-
const B = o != null && o.copyRange ? (O = o == null ? void 0 : o.copyRange) == null ? void 0 : O.cols[M] : M, de = o != null && o.copyRange ? (v = o == null ? void 0 : o.copyRange) == null ? void 0 : v.rows[_] : _, ue = t.cols[
|
|
458
|
-
A.si =
|
|
456
|
+
I = Z.generateRandomId(6), f.set(U, I);
|
|
457
|
+
const B = o != null && o.copyRange ? (O = o == null ? void 0 : o.copyRange) == null ? void 0 : O.cols[M] : M, de = o != null && o.copyRange ? (v = o == null ? void 0 : o.copyRange) == null ? void 0 : v.rows[_] : _, ue = t.cols[S] - B, Re = t.rows[p] - de, Je = u.moveFormulaRefOffset(b, ue, Re);
|
|
458
|
+
A.si = I, A.f = Je, A.v = null, A.p = null;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
l.setValue(t.rows[p], t.cols[S], A);
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
|
-
const
|
|
464
|
+
const P = {
|
|
465
465
|
unitId: a,
|
|
466
466
|
subUnitId: e,
|
|
467
|
-
cellValue:
|
|
467
|
+
cellValue: l.getData()
|
|
468
468
|
};
|
|
469
469
|
m.push({
|
|
470
470
|
id: se.id,
|
|
471
|
-
params:
|
|
471
|
+
params: P
|
|
472
472
|
});
|
|
473
|
-
const
|
|
473
|
+
const R = ma(
|
|
474
474
|
r,
|
|
475
|
-
|
|
475
|
+
P
|
|
476
476
|
);
|
|
477
477
|
return s.push({
|
|
478
478
|
id: se.id,
|
|
479
|
-
params:
|
|
479
|
+
params: R
|
|
480
480
|
}), {
|
|
481
481
|
undos: s,
|
|
482
482
|
redos: m
|
|
@@ -500,20 +500,20 @@ let lt = class extends ee {
|
|
|
500
500
|
this._editorBridgeService.interceptor.getInterceptPoints().BEFORE_CELL_EDIT,
|
|
501
501
|
{
|
|
502
502
|
handler: (e, t, n) => {
|
|
503
|
-
var
|
|
504
|
-
const { row: r, col: o, unitId: u, subUnitId: c, worksheet: m } = t, s = this._formulaDataModel.getArrayFormulaRange(),
|
|
503
|
+
var P, R, p, S;
|
|
504
|
+
const { row: r, col: o, unitId: u, subUnitId: c, worksheet: m } = t, s = this._formulaDataModel.getArrayFormulaRange(), l = this._formulaDataModel.getArrayFormulaCellData();
|
|
505
505
|
if (this._removeArrayFormulaRangeShape(), e == null)
|
|
506
506
|
return n(e);
|
|
507
507
|
let f = null;
|
|
508
|
-
const
|
|
508
|
+
const d = this._formulaDataModel.getFormulaDataItem(
|
|
509
509
|
r,
|
|
510
510
|
o,
|
|
511
511
|
c,
|
|
512
512
|
u
|
|
513
513
|
);
|
|
514
|
-
if (
|
|
515
|
-
const { f: L, si: b, x:
|
|
516
|
-
if (b != null && (
|
|
514
|
+
if (d != null) {
|
|
515
|
+
const { f: L, si: b, x: N = 0, y: A = 0 } = d;
|
|
516
|
+
if (b != null && (N !== 0 || A !== 0)) {
|
|
517
517
|
let O = "";
|
|
518
518
|
if (L.length > 0)
|
|
519
519
|
O = L;
|
|
@@ -529,20 +529,20 @@ let lt = class extends ee {
|
|
|
529
529
|
}
|
|
530
530
|
f = { f: this._lexerTreeBuilder.moveFormulaRefOffset(
|
|
531
531
|
O,
|
|
532
|
-
|
|
532
|
+
N,
|
|
533
533
|
A
|
|
534
534
|
) };
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
if (e.v != null && e.v !== "" && ((p = (
|
|
537
|
+
if (e.v != null && e.v !== "" && ((p = (R = (P = l[u]) == null ? void 0 : P[c]) == null ? void 0 : R[r]) == null ? void 0 : p[o]) == null)
|
|
538
538
|
return f ? { ...e, ...f } : n(e);
|
|
539
|
-
const
|
|
540
|
-
return
|
|
541
|
-
if (
|
|
539
|
+
const E = (S = s == null ? void 0 : s[u]) == null ? void 0 : S[c];
|
|
540
|
+
return E != null && new W(E).forValue((L, b, N) => {
|
|
541
|
+
if (N == null)
|
|
542
542
|
return !0;
|
|
543
|
-
const { startRow: A, startColumn: O, endRow: v, endColumn: _ } =
|
|
543
|
+
const { startRow: A, startColumn: O, endRow: v, endColumn: _ } = N;
|
|
544
544
|
if (L === r && b === o)
|
|
545
|
-
return this._createArrayFormulaRangeShape(
|
|
545
|
+
return this._createArrayFormulaRangeShape(N, u), !1;
|
|
546
546
|
if (r >= A && r <= v && o >= O && o <= _) {
|
|
547
547
|
const M = m.getCell(A, O);
|
|
548
548
|
if ((M == null ? void 0 : M.v) === ce.SPILL)
|
|
@@ -556,7 +556,7 @@ let lt = class extends ee {
|
|
|
556
556
|
return U == null || U.f == null ? !0 : (f == null && (f = {
|
|
557
557
|
f: U.f,
|
|
558
558
|
isInArrayFormulaRange: !0
|
|
559
|
-
}), this._createArrayFormulaRangeShape(
|
|
559
|
+
}), this._createArrayFormulaRangeShape(N, u), !1);
|
|
560
560
|
}
|
|
561
561
|
}), f ? { ...e, ...f } : n(e);
|
|
562
562
|
}
|
|
@@ -585,7 +585,7 @@ let lt = class extends ee {
|
|
|
585
585
|
);
|
|
586
586
|
}
|
|
587
587
|
_createArrayFormulaRangeShape(e, t) {
|
|
588
|
-
var
|
|
588
|
+
var E;
|
|
589
589
|
const n = this._themeService.getCurrentTheme(), r = new _n(n.colorWhite).setAlpha(0).toString(), o = {
|
|
590
590
|
strokeWidth: 1,
|
|
591
591
|
stroke: n.hyacinth700,
|
|
@@ -598,11 +598,11 @@ let lt = class extends ee {
|
|
|
598
598
|
range: e,
|
|
599
599
|
primary: null,
|
|
600
600
|
style: o
|
|
601
|
-
}), s = (
|
|
601
|
+
}), s = (E = this._sheetSkeletonManagerService.getCurrent()) == null ? void 0 : E.skeleton;
|
|
602
602
|
if (!u || !s)
|
|
603
603
|
return;
|
|
604
|
-
const { rowHeaderWidth:
|
|
605
|
-
|
|
604
|
+
const { rowHeaderWidth: l, columnHeaderHeight: f } = s, d = new Ha(u, 100, !1, this._themeService);
|
|
605
|
+
d.update(c, l, f, o, m), d.setEvent(!1), this._previousShape = d;
|
|
606
606
|
}
|
|
607
607
|
_removeArrayFormulaRangeShape() {
|
|
608
608
|
this._previousShape != null && (this._previousShape.dispose(), this._previousShape = null);
|
|
@@ -626,16 +626,16 @@ const or = {
|
|
|
626
626
|
handler: async (a, e) => {
|
|
627
627
|
const { list: t } = e, n = a.get(oe), r = new W();
|
|
628
628
|
t.forEach((u) => {
|
|
629
|
-
const { range: c, primary: m, formula: s } = u, { row:
|
|
630
|
-
r.setValue(
|
|
629
|
+
const { range: c, primary: m, formula: s } = u, { row: l, column: f } = m, d = Z.generateRandomId(6);
|
|
630
|
+
r.setValue(l, f, {
|
|
631
631
|
f: s,
|
|
632
|
-
si:
|
|
632
|
+
si: d
|
|
633
633
|
});
|
|
634
|
-
const { startRow:
|
|
635
|
-
for (let
|
|
636
|
-
for (let L =
|
|
637
|
-
(
|
|
638
|
-
si:
|
|
634
|
+
const { startRow: E, startColumn: P, endRow: R, endColumn: p } = c;
|
|
635
|
+
for (let S = E; S <= R; S++)
|
|
636
|
+
for (let L = P; L <= p; L++)
|
|
637
|
+
(S !== l || L !== f) && r.setValue(S, L, {
|
|
638
|
+
si: d
|
|
639
639
|
});
|
|
640
640
|
});
|
|
641
641
|
const o = {
|
|
@@ -849,29 +849,29 @@ const Gt = {
|
|
|
849
849
|
id: "formula-ui.operation.insert-function",
|
|
850
850
|
type: Ee.OPERATION,
|
|
851
851
|
handler: async (a, e) => {
|
|
852
|
-
var
|
|
852
|
+
var S, L;
|
|
853
853
|
const t = a.get(nn), n = a.get(We), r = t.getSelections();
|
|
854
854
|
if (!r || !r.length)
|
|
855
855
|
return !1;
|
|
856
856
|
const o = fa(a.get(he));
|
|
857
857
|
if (!o)
|
|
858
858
|
return !1;
|
|
859
|
-
const { worksheet: u, unitId: c, subUnitId: m } = o, s = u.getCellMatrix(), { value:
|
|
860
|
-
let
|
|
859
|
+
const { worksheet: u, unitId: c, subUnitId: m } = o, s = u.getCellMatrix(), { value: l } = e, f = a.get(oe), d = [];
|
|
860
|
+
let E = null, P = 0, R = 0, p = "";
|
|
861
861
|
if (r.length === 1 && (Fi(r[0].range) || qi(r[0].range))) {
|
|
862
|
-
const { range: b, primary:
|
|
863
|
-
|
|
862
|
+
const { range: b, primary: N } = r[0], A = (S = N == null ? void 0 : N.actualRow) != null ? S : b.startRow, O = (L = N == null ? void 0 : N.actualColumn) != null ? L : b.startColumn;
|
|
863
|
+
E = b, P = A, R = O;
|
|
864
864
|
const v = Tn(s, A, O);
|
|
865
865
|
v && (p = Ge(v));
|
|
866
866
|
} else
|
|
867
867
|
r.some((b) => {
|
|
868
|
-
var
|
|
869
|
-
const { range:
|
|
868
|
+
var I, B;
|
|
869
|
+
const { range: N, primary: A } = b, O = (I = A == null ? void 0 : A.actualRow) != null ? I : N.startRow, v = (B = A == null ? void 0 : A.actualColumn) != null ? B : N.startColumn, _ = Tn(s, O, v);
|
|
870
870
|
if (!_)
|
|
871
|
-
return
|
|
872
|
-
const M = Ge(_), U = `=${
|
|
873
|
-
return
|
|
874
|
-
range:
|
|
871
|
+
return E = N, P = O, R = v, !0;
|
|
872
|
+
const M = Ge(_), U = `=${l}(${M})`;
|
|
873
|
+
return d.push({
|
|
874
|
+
range: N,
|
|
875
875
|
primary: {
|
|
876
876
|
row: O,
|
|
877
877
|
column: v
|
|
@@ -879,31 +879,31 @@ const Gt = {
|
|
|
879
879
|
formula: U
|
|
880
880
|
}), !1;
|
|
881
881
|
});
|
|
882
|
-
if (
|
|
883
|
-
const b = la(
|
|
884
|
-
range: Ne.clone(
|
|
882
|
+
if (E) {
|
|
883
|
+
const b = la(P, R, u), N = {
|
|
884
|
+
range: Ne.clone(E),
|
|
885
885
|
primary: {
|
|
886
886
|
startRow: b.startRow,
|
|
887
887
|
startColumn: b.startColumn,
|
|
888
888
|
endRow: b.endRow,
|
|
889
889
|
endColumn: b.endColumn,
|
|
890
|
-
actualRow:
|
|
891
|
-
actualColumn:
|
|
890
|
+
actualRow: P,
|
|
891
|
+
actualColumn: R,
|
|
892
892
|
isMerged: b.isMerged,
|
|
893
|
-
isMergedMainCell: b.startRow ===
|
|
893
|
+
isMergedMainCell: b.startRow === P && b.startColumn === R
|
|
894
894
|
}
|
|
895
895
|
}, A = {
|
|
896
896
|
unitId: c,
|
|
897
897
|
subUnitId: m,
|
|
898
898
|
pluginName: Se,
|
|
899
|
-
selections: [
|
|
899
|
+
selections: [N]
|
|
900
900
|
};
|
|
901
901
|
await f.executeCommand(da.id, A), setTimeout(() => {
|
|
902
|
-
n.setFormula(`=${
|
|
902
|
+
n.setFormula(`=${l}(${p}`);
|
|
903
903
|
}, 0);
|
|
904
904
|
}
|
|
905
|
-
return
|
|
906
|
-
list:
|
|
905
|
+
return d.length === 0 ? !1 : f.executeCommand(or.id, {
|
|
906
|
+
list: d
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
};
|
|
@@ -1117,25 +1117,25 @@ const ro = pr, ao = "univer-formula-help-function", io = "univer-formula-help-fu
|
|
|
1117
1117
|
formulaHelpParamActive: Lo
|
|
1118
1118
|
};
|
|
1119
1119
|
function Ao() {
|
|
1120
|
-
const [a, e] = z(!1), [t, n] = z(!0), [r, o] = z(!0), [u, c] = z(0), [m, s] = z([0, 0]), [
|
|
1120
|
+
const [a, e] = z(!1), [t, n] = z(!0), [r, o] = z(!0), [u, c] = z(0), [m, s] = z([0, 0]), [l, f] = z({ left: 0, top: 0 }), [d, E] = z(null), P = ae(Ue), R = ae(Be), p = R.t("formula.prompt.required"), S = R.t("formula.prompt.optional"), L = ae(he), b = ae(We);
|
|
1121
1121
|
Rt(() => {
|
|
1122
|
-
const O =
|
|
1122
|
+
const O = P.help$.subscribe((v) => {
|
|
1123
1123
|
const { visible: _, paramIndex: M, functionInfo: U } = v;
|
|
1124
1124
|
if (!_) {
|
|
1125
1125
|
e(_);
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
|
-
const
|
|
1129
|
-
if (
|
|
1128
|
+
const I = N();
|
|
1129
|
+
if (I == null)
|
|
1130
1130
|
return;
|
|
1131
|
-
const { left: B, top: de, height: ue } =
|
|
1132
|
-
U.description === "" && U.functionParameter.length === 0 || (s([B, de + ue]), c(M),
|
|
1131
|
+
const { left: B, top: de, height: ue } = I;
|
|
1132
|
+
U.description === "" && U.functionParameter.length === 0 || (s([B, de + ue]), c(M), E(U), f({ left: B, top: de }), e(_));
|
|
1133
1133
|
});
|
|
1134
1134
|
return () => {
|
|
1135
1135
|
O == null || O.unsubscribe();
|
|
1136
1136
|
};
|
|
1137
1137
|
}, []);
|
|
1138
|
-
function
|
|
1138
|
+
function N() {
|
|
1139
1139
|
const v = L.getCurrentUniverDocInstance().getUnitId();
|
|
1140
1140
|
if (!b.isEditor(v))
|
|
1141
1141
|
return;
|
|
@@ -1145,13 +1145,13 @@ function Ao() {
|
|
|
1145
1145
|
function A(O) {
|
|
1146
1146
|
c(O);
|
|
1147
1147
|
}
|
|
1148
|
-
return /* @__PURE__ */ C.jsx(C.Fragment, { children: r ? /* @__PURE__ */ C.jsx(nr, { visible: a, offset: m, children:
|
|
1148
|
+
return /* @__PURE__ */ C.jsx(C.Fragment, { children: r ? /* @__PURE__ */ C.jsx(nr, { visible: a, offset: m, children: d ? /* @__PURE__ */ C.jsxs("div", { className: j.formulaHelpFunction, children: [
|
|
1149
1149
|
/* @__PURE__ */ C.jsxs("div", { className: j.formulaHelpFunctionTitle, children: [
|
|
1150
1150
|
/* @__PURE__ */ C.jsx(
|
|
1151
1151
|
Ro,
|
|
1152
1152
|
{
|
|
1153
|
-
prefix:
|
|
1154
|
-
value:
|
|
1153
|
+
prefix: d.functionName,
|
|
1154
|
+
value: d.functionParameter,
|
|
1155
1155
|
active: u,
|
|
1156
1156
|
onClick: A
|
|
1157
1157
|
}
|
|
@@ -1188,23 +1188,23 @@ function Ao() {
|
|
|
1188
1188
|
/* @__PURE__ */ C.jsx(
|
|
1189
1189
|
Bt,
|
|
1190
1190
|
{
|
|
1191
|
-
title:
|
|
1192
|
-
value: `${
|
|
1191
|
+
title: R.t("formula.prompt.helpExample"),
|
|
1192
|
+
value: `${d.functionName}(${d.functionParameter.map((O) => O.example).join(",")})`
|
|
1193
1193
|
}
|
|
1194
1194
|
),
|
|
1195
1195
|
/* @__PURE__ */ C.jsx(
|
|
1196
1196
|
Bt,
|
|
1197
1197
|
{
|
|
1198
|
-
title:
|
|
1199
|
-
value:
|
|
1198
|
+
title: R.t("formula.prompt.helpAbstract"),
|
|
1199
|
+
value: d.description
|
|
1200
1200
|
}
|
|
1201
1201
|
),
|
|
1202
|
-
|
|
1202
|
+
d && d.functionParameter && d.functionParameter.map((O, v) => /* @__PURE__ */ C.jsx(
|
|
1203
1203
|
Bt,
|
|
1204
1204
|
{
|
|
1205
1205
|
className: u === v ? j.formulaHelpFunctionActive : "",
|
|
1206
1206
|
title: O.name,
|
|
1207
|
-
value: `${O.require ? p :
|
|
1207
|
+
value: `${O.require ? p : S} ${O.detail}`
|
|
1208
1208
|
},
|
|
1209
1209
|
v
|
|
1210
1210
|
))
|
|
@@ -1216,7 +1216,7 @@ function Ao() {
|
|
|
1216
1216
|
{
|
|
1217
1217
|
className: j.formulaHelpDecorator,
|
|
1218
1218
|
onClick: () => o(!r),
|
|
1219
|
-
style: { left:
|
|
1219
|
+
style: { left: l.left - 24, top: l.top },
|
|
1220
1220
|
children: /* @__PURE__ */ C.jsx(to, {})
|
|
1221
1221
|
}
|
|
1222
1222
|
) : /* @__PURE__ */ C.jsx(C.Fragment, {}) });
|
|
@@ -1256,19 +1256,19 @@ const Bt = (a) => /* @__PURE__ */ C.jsxs("div", { className: j.formulaHelpFuncti
|
|
|
1256
1256
|
formulaSearchFunctionItemActive: Do
|
|
1257
1257
|
};
|
|
1258
1258
|
function go() {
|
|
1259
|
-
const [a, e] = z(!1), [t, n] = z(0), [r, o] = z([0, 0]), [u, c] = z([]), [m, s] = z(""),
|
|
1259
|
+
const [a, e] = z(!1), [t, n] = z(0), [r, o] = z([0, 0]), [u, c] = z([]), [m, s] = z(""), l = tr(null), f = ae(Ue), d = ae(he), E = ae(We);
|
|
1260
1260
|
Rt(() => {
|
|
1261
1261
|
let L = [], b = 0;
|
|
1262
|
-
const
|
|
1262
|
+
const N = f.search$.subscribe((v) => {
|
|
1263
1263
|
const { visible: _, searchText: M, searchList: U } = v;
|
|
1264
1264
|
if (!_) {
|
|
1265
1265
|
e(_);
|
|
1266
1266
|
return;
|
|
1267
1267
|
}
|
|
1268
|
-
const
|
|
1269
|
-
if (
|
|
1268
|
+
const I = P();
|
|
1269
|
+
if (I == null)
|
|
1270
1270
|
return;
|
|
1271
|
-
const { left: B, top: de, height: ue } =
|
|
1271
|
+
const { left: B, top: de, height: ue } = I;
|
|
1272
1272
|
s(M), c(U), L = U, o([B, de + ue]), e(_), n(0), b = 0;
|
|
1273
1273
|
}), A = f.navigate$.subscribe((v) => {
|
|
1274
1274
|
const { direction: _ } = v;
|
|
@@ -1279,50 +1279,50 @@ function go() {
|
|
|
1279
1279
|
let M = b + 1;
|
|
1280
1280
|
M = M >= L.length ? 0 : M, n(M), b = M;
|
|
1281
1281
|
}
|
|
1282
|
-
|
|
1282
|
+
S(b);
|
|
1283
1283
|
}), O = f.accept$.subscribe((v) => {
|
|
1284
1284
|
const _ = L[b].name;
|
|
1285
1285
|
f.acceptFormulaName(_);
|
|
1286
1286
|
});
|
|
1287
1287
|
return () => {
|
|
1288
|
-
|
|
1288
|
+
N == null || N.unsubscribe(), A == null || A.unsubscribe(), O == null || O.unsubscribe();
|
|
1289
1289
|
};
|
|
1290
1290
|
}, []);
|
|
1291
|
-
function
|
|
1292
|
-
const b =
|
|
1293
|
-
if (!
|
|
1291
|
+
function P() {
|
|
1292
|
+
const b = d.getCurrentUniverDocInstance().getUnitId();
|
|
1293
|
+
if (!E.isEditor(b))
|
|
1294
1294
|
return;
|
|
1295
|
-
const
|
|
1296
|
-
return
|
|
1295
|
+
const N = E.getEditor(b);
|
|
1296
|
+
return N == null ? void 0 : N.getBoundingClientRect();
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function R(L) {
|
|
1299
1299
|
n(L);
|
|
1300
1300
|
}
|
|
1301
1301
|
function p() {
|
|
1302
1302
|
n(-1);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function S(L) {
|
|
1305
1305
|
var B;
|
|
1306
|
-
const b = (B =
|
|
1306
|
+
const b = (B = l.current) == null ? void 0 : B.querySelectorAll(`.${Le.formulaSearchFunctionItem}`)[L];
|
|
1307
1307
|
if (!b)
|
|
1308
1308
|
return;
|
|
1309
|
-
const
|
|
1310
|
-
if (!
|
|
1309
|
+
const N = b.parentNode;
|
|
1310
|
+
if (!N)
|
|
1311
1311
|
return;
|
|
1312
|
-
const O =
|
|
1312
|
+
const O = N.getBoundingClientRect().top, v = N.offsetHeight, _ = b.getBoundingClientRect(), M = _.top, U = _.height;
|
|
1313
1313
|
if (M >= 0 && M > O && M - O + U <= v)
|
|
1314
1314
|
return;
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
top:
|
|
1315
|
+
const I = b.offsetTop - (v - U) / 2;
|
|
1316
|
+
N.scrollTo({
|
|
1317
|
+
top: I,
|
|
1318
1318
|
behavior: "smooth"
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
|
-
return u.length > 0 && /* @__PURE__ */ C.jsx(nr, { visible: a, offset: r, children: /* @__PURE__ */ C.jsx("ul", { className: Le.formulaSearchFunction, ref:
|
|
1321
|
+
return u.length > 0 && /* @__PURE__ */ C.jsx(nr, { visible: a, offset: r, children: /* @__PURE__ */ C.jsx("ul", { className: Le.formulaSearchFunction, ref: l, children: u.map((L, b) => /* @__PURE__ */ C.jsxs(
|
|
1322
1322
|
"li",
|
|
1323
1323
|
{
|
|
1324
1324
|
className: t === b ? `${Le.formulaSearchFunctionItem} ${Le.formulaSearchFunctionItemActive}` : Le.formulaSearchFunctionItem,
|
|
1325
|
-
onMouseEnter: () =>
|
|
1325
|
+
onMouseEnter: () => R(b),
|
|
1326
1326
|
onMouseLeave: p,
|
|
1327
1327
|
onClick: () => f.acceptFormulaName(L.name),
|
|
1328
1328
|
children: [
|
|
@@ -7325,7 +7325,7 @@ const qo = [], wo = [
|
|
|
7325
7325
|
}
|
|
7326
7326
|
], $o = [
|
|
7327
7327
|
{
|
|
7328
|
-
functionName:
|
|
7328
|
+
functionName: T.ABS,
|
|
7329
7329
|
functionType: i.Math,
|
|
7330
7330
|
description: "formula.functionList.ABS.description",
|
|
7331
7331
|
abstract: "formula.functionList.ABS.abstract",
|
|
@@ -7340,7 +7340,7 @@ const qo = [], wo = [
|
|
|
7340
7340
|
]
|
|
7341
7341
|
},
|
|
7342
7342
|
{
|
|
7343
|
-
functionName:
|
|
7343
|
+
functionName: T.ACOS,
|
|
7344
7344
|
functionType: i.Math,
|
|
7345
7345
|
description: "formula.functionList.ACOS.description",
|
|
7346
7346
|
abstract: "formula.functionList.ACOS.abstract",
|
|
@@ -7355,7 +7355,7 @@ const qo = [], wo = [
|
|
|
7355
7355
|
]
|
|
7356
7356
|
},
|
|
7357
7357
|
{
|
|
7358
|
-
functionName:
|
|
7358
|
+
functionName: T.ACOSH,
|
|
7359
7359
|
functionType: i.Math,
|
|
7360
7360
|
description: "formula.functionList.ACOSH.description",
|
|
7361
7361
|
abstract: "formula.functionList.ACOSH.abstract",
|
|
@@ -7370,7 +7370,7 @@ const qo = [], wo = [
|
|
|
7370
7370
|
]
|
|
7371
7371
|
},
|
|
7372
7372
|
{
|
|
7373
|
-
functionName:
|
|
7373
|
+
functionName: T.ACOT,
|
|
7374
7374
|
functionType: i.Math,
|
|
7375
7375
|
description: "formula.functionList.ACOT.description",
|
|
7376
7376
|
abstract: "formula.functionList.ACOT.abstract",
|
|
@@ -7385,7 +7385,7 @@ const qo = [], wo = [
|
|
|
7385
7385
|
]
|
|
7386
7386
|
},
|
|
7387
7387
|
{
|
|
7388
|
-
functionName:
|
|
7388
|
+
functionName: T.ACOTH,
|
|
7389
7389
|
functionType: i.Math,
|
|
7390
7390
|
description: "formula.functionList.ACOTH.description",
|
|
7391
7391
|
abstract: "formula.functionList.ACOTH.abstract",
|
|
@@ -7407,7 +7407,7 @@ const qo = [], wo = [
|
|
|
7407
7407
|
]
|
|
7408
7408
|
},
|
|
7409
7409
|
{
|
|
7410
|
-
functionName:
|
|
7410
|
+
functionName: T.AGGREGATE,
|
|
7411
7411
|
functionType: i.Math,
|
|
7412
7412
|
description: "formula.functionList.AGGREGATE.description",
|
|
7413
7413
|
abstract: "formula.functionList.AGGREGATE.abstract",
|
|
@@ -7429,7 +7429,7 @@ const qo = [], wo = [
|
|
|
7429
7429
|
]
|
|
7430
7430
|
},
|
|
7431
7431
|
{
|
|
7432
|
-
functionName:
|
|
7432
|
+
functionName: T.ARABIC,
|
|
7433
7433
|
functionType: i.Math,
|
|
7434
7434
|
description: "formula.functionList.ARABIC.description",
|
|
7435
7435
|
abstract: "formula.functionList.ARABIC.abstract",
|
|
@@ -7451,7 +7451,7 @@ const qo = [], wo = [
|
|
|
7451
7451
|
]
|
|
7452
7452
|
},
|
|
7453
7453
|
{
|
|
7454
|
-
functionName:
|
|
7454
|
+
functionName: T.ASIN,
|
|
7455
7455
|
functionType: i.Math,
|
|
7456
7456
|
description: "formula.functionList.ASIN.description",
|
|
7457
7457
|
abstract: "formula.functionList.ASIN.abstract",
|
|
@@ -7473,7 +7473,7 @@ const qo = [], wo = [
|
|
|
7473
7473
|
]
|
|
7474
7474
|
},
|
|
7475
7475
|
{
|
|
7476
|
-
functionName:
|
|
7476
|
+
functionName: T.ASINH,
|
|
7477
7477
|
functionType: i.Math,
|
|
7478
7478
|
description: "formula.functionList.ASINH.description",
|
|
7479
7479
|
abstract: "formula.functionList.ASINH.abstract",
|
|
@@ -7495,7 +7495,7 @@ const qo = [], wo = [
|
|
|
7495
7495
|
]
|
|
7496
7496
|
},
|
|
7497
7497
|
{
|
|
7498
|
-
functionName:
|
|
7498
|
+
functionName: T.ATAN,
|
|
7499
7499
|
functionType: i.Math,
|
|
7500
7500
|
description: "formula.functionList.ATAN.description",
|
|
7501
7501
|
abstract: "formula.functionList.ATAN.abstract",
|
|
@@ -7517,7 +7517,7 @@ const qo = [], wo = [
|
|
|
7517
7517
|
]
|
|
7518
7518
|
},
|
|
7519
7519
|
{
|
|
7520
|
-
functionName:
|
|
7520
|
+
functionName: T.ATAN2,
|
|
7521
7521
|
functionType: i.Math,
|
|
7522
7522
|
description: "formula.functionList.ATAN2.description",
|
|
7523
7523
|
abstract: "formula.functionList.ATAN2.abstract",
|
|
@@ -7539,7 +7539,7 @@ const qo = [], wo = [
|
|
|
7539
7539
|
]
|
|
7540
7540
|
},
|
|
7541
7541
|
{
|
|
7542
|
-
functionName:
|
|
7542
|
+
functionName: T.ATANH,
|
|
7543
7543
|
functionType: i.Math,
|
|
7544
7544
|
description: "formula.functionList.ATANH.description",
|
|
7545
7545
|
abstract: "formula.functionList.ATANH.abstract",
|
|
@@ -7561,7 +7561,7 @@ const qo = [], wo = [
|
|
|
7561
7561
|
]
|
|
7562
7562
|
},
|
|
7563
7563
|
{
|
|
7564
|
-
functionName:
|
|
7564
|
+
functionName: T.BASE,
|
|
7565
7565
|
functionType: i.Math,
|
|
7566
7566
|
description: "formula.functionList.BASE.description",
|
|
7567
7567
|
abstract: "formula.functionList.BASE.abstract",
|
|
@@ -7583,7 +7583,7 @@ const qo = [], wo = [
|
|
|
7583
7583
|
]
|
|
7584
7584
|
},
|
|
7585
7585
|
{
|
|
7586
|
-
functionName:
|
|
7586
|
+
functionName: T.CEILING,
|
|
7587
7587
|
functionType: i.Math,
|
|
7588
7588
|
description: "formula.functionList.CEILING.description",
|
|
7589
7589
|
abstract: "formula.functionList.CEILING.abstract",
|
|
@@ -7605,7 +7605,7 @@ const qo = [], wo = [
|
|
|
7605
7605
|
]
|
|
7606
7606
|
},
|
|
7607
7607
|
{
|
|
7608
|
-
functionName:
|
|
7608
|
+
functionName: T.CEILING_MATH,
|
|
7609
7609
|
functionType: i.Math,
|
|
7610
7610
|
description: "formula.functionList.CEILING_MATH.description",
|
|
7611
7611
|
abstract: "formula.functionList.CEILING_MATH.abstract",
|
|
@@ -7627,7 +7627,7 @@ const qo = [], wo = [
|
|
|
7627
7627
|
]
|
|
7628
7628
|
},
|
|
7629
7629
|
{
|
|
7630
|
-
functionName:
|
|
7630
|
+
functionName: T.CEILING_PRECISE,
|
|
7631
7631
|
functionType: i.Math,
|
|
7632
7632
|
description: "formula.functionList.CEILING_PRECISE.description",
|
|
7633
7633
|
abstract: "formula.functionList.CEILING_PRECISE.abstract",
|
|
@@ -7649,7 +7649,7 @@ const qo = [], wo = [
|
|
|
7649
7649
|
]
|
|
7650
7650
|
},
|
|
7651
7651
|
{
|
|
7652
|
-
functionName:
|
|
7652
|
+
functionName: T.COMBIN,
|
|
7653
7653
|
functionType: i.Math,
|
|
7654
7654
|
description: "formula.functionList.COMBIN.description",
|
|
7655
7655
|
abstract: "formula.functionList.COMBIN.abstract",
|
|
@@ -7671,7 +7671,7 @@ const qo = [], wo = [
|
|
|
7671
7671
|
]
|
|
7672
7672
|
},
|
|
7673
7673
|
{
|
|
7674
|
-
functionName:
|
|
7674
|
+
functionName: T.COMBINA,
|
|
7675
7675
|
functionType: i.Math,
|
|
7676
7676
|
description: "formula.functionList.COMBINA.description",
|
|
7677
7677
|
abstract: "formula.functionList.COMBINA.abstract",
|
|
@@ -7693,7 +7693,7 @@ const qo = [], wo = [
|
|
|
7693
7693
|
]
|
|
7694
7694
|
},
|
|
7695
7695
|
{
|
|
7696
|
-
functionName:
|
|
7696
|
+
functionName: T.COS,
|
|
7697
7697
|
functionType: i.Math,
|
|
7698
7698
|
description: "formula.functionList.COS.description",
|
|
7699
7699
|
abstract: "formula.functionList.COS.abstract",
|
|
@@ -7715,7 +7715,7 @@ const qo = [], wo = [
|
|
|
7715
7715
|
]
|
|
7716
7716
|
},
|
|
7717
7717
|
{
|
|
7718
|
-
functionName:
|
|
7718
|
+
functionName: T.COSH,
|
|
7719
7719
|
functionType: i.Math,
|
|
7720
7720
|
description: "formula.functionList.COSH.description",
|
|
7721
7721
|
abstract: "formula.functionList.COSH.abstract",
|
|
@@ -7737,7 +7737,7 @@ const qo = [], wo = [
|
|
|
7737
7737
|
]
|
|
7738
7738
|
},
|
|
7739
7739
|
{
|
|
7740
|
-
functionName:
|
|
7740
|
+
functionName: T.COT,
|
|
7741
7741
|
functionType: i.Math,
|
|
7742
7742
|
description: "formula.functionList.COT.description",
|
|
7743
7743
|
abstract: "formula.functionList.COT.abstract",
|
|
@@ -7759,7 +7759,7 @@ const qo = [], wo = [
|
|
|
7759
7759
|
]
|
|
7760
7760
|
},
|
|
7761
7761
|
{
|
|
7762
|
-
functionName:
|
|
7762
|
+
functionName: T.COTH,
|
|
7763
7763
|
functionType: i.Math,
|
|
7764
7764
|
description: "formula.functionList.COTH.description",
|
|
7765
7765
|
abstract: "formula.functionList.COTH.abstract",
|
|
@@ -7781,7 +7781,7 @@ const qo = [], wo = [
|
|
|
7781
7781
|
]
|
|
7782
7782
|
},
|
|
7783
7783
|
{
|
|
7784
|
-
functionName:
|
|
7784
|
+
functionName: T.CSC,
|
|
7785
7785
|
functionType: i.Math,
|
|
7786
7786
|
description: "formula.functionList.CSC.description",
|
|
7787
7787
|
abstract: "formula.functionList.CSC.abstract",
|
|
@@ -7803,7 +7803,7 @@ const qo = [], wo = [
|
|
|
7803
7803
|
]
|
|
7804
7804
|
},
|
|
7805
7805
|
{
|
|
7806
|
-
functionName:
|
|
7806
|
+
functionName: T.CSCH,
|
|
7807
7807
|
functionType: i.Math,
|
|
7808
7808
|
description: "formula.functionList.CSCH.description",
|
|
7809
7809
|
abstract: "formula.functionList.CSCH.abstract",
|
|
@@ -7825,7 +7825,7 @@ const qo = [], wo = [
|
|
|
7825
7825
|
]
|
|
7826
7826
|
},
|
|
7827
7827
|
{
|
|
7828
|
-
functionName:
|
|
7828
|
+
functionName: T.DECIMAL,
|
|
7829
7829
|
functionType: i.Math,
|
|
7830
7830
|
description: "formula.functionList.DECIMAL.description",
|
|
7831
7831
|
abstract: "formula.functionList.DECIMAL.abstract",
|
|
@@ -7847,7 +7847,7 @@ const qo = [], wo = [
|
|
|
7847
7847
|
]
|
|
7848
7848
|
},
|
|
7849
7849
|
{
|
|
7850
|
-
functionName:
|
|
7850
|
+
functionName: T.DEGREES,
|
|
7851
7851
|
functionType: i.Math,
|
|
7852
7852
|
description: "formula.functionList.DEGREES.description",
|
|
7853
7853
|
abstract: "formula.functionList.DEGREES.abstract",
|
|
@@ -7869,7 +7869,7 @@ const qo = [], wo = [
|
|
|
7869
7869
|
]
|
|
7870
7870
|
},
|
|
7871
7871
|
{
|
|
7872
|
-
functionName:
|
|
7872
|
+
functionName: T.EVEN,
|
|
7873
7873
|
functionType: i.Math,
|
|
7874
7874
|
description: "formula.functionList.EVEN.description",
|
|
7875
7875
|
abstract: "formula.functionList.EVEN.abstract",
|
|
@@ -7891,7 +7891,7 @@ const qo = [], wo = [
|
|
|
7891
7891
|
]
|
|
7892
7892
|
},
|
|
7893
7893
|
{
|
|
7894
|
-
functionName:
|
|
7894
|
+
functionName: T.EXP,
|
|
7895
7895
|
functionType: i.Math,
|
|
7896
7896
|
description: "formula.functionList.EXP.description",
|
|
7897
7897
|
abstract: "formula.functionList.EXP.abstract",
|
|
@@ -7913,7 +7913,7 @@ const qo = [], wo = [
|
|
|
7913
7913
|
]
|
|
7914
7914
|
},
|
|
7915
7915
|
{
|
|
7916
|
-
functionName:
|
|
7916
|
+
functionName: T.FACT,
|
|
7917
7917
|
functionType: i.Math,
|
|
7918
7918
|
description: "formula.functionList.FACT.description",
|
|
7919
7919
|
abstract: "formula.functionList.FACT.abstract",
|
|
@@ -7935,7 +7935,7 @@ const qo = [], wo = [
|
|
|
7935
7935
|
]
|
|
7936
7936
|
},
|
|
7937
7937
|
{
|
|
7938
|
-
functionName:
|
|
7938
|
+
functionName: T.FACTDOUBLE,
|
|
7939
7939
|
functionType: i.Math,
|
|
7940
7940
|
description: "formula.functionList.FACTDOUBLE.description",
|
|
7941
7941
|
abstract: "formula.functionList.FACTDOUBLE.abstract",
|
|
@@ -7957,7 +7957,7 @@ const qo = [], wo = [
|
|
|
7957
7957
|
]
|
|
7958
7958
|
},
|
|
7959
7959
|
{
|
|
7960
|
-
functionName:
|
|
7960
|
+
functionName: T.FLOOR,
|
|
7961
7961
|
functionType: i.Math,
|
|
7962
7962
|
description: "formula.functionList.FLOOR.description",
|
|
7963
7963
|
abstract: "formula.functionList.FLOOR.abstract",
|
|
@@ -7979,7 +7979,7 @@ const qo = [], wo = [
|
|
|
7979
7979
|
]
|
|
7980
7980
|
},
|
|
7981
7981
|
{
|
|
7982
|
-
functionName:
|
|
7982
|
+
functionName: T.FLOOR_MATH,
|
|
7983
7983
|
functionType: i.Math,
|
|
7984
7984
|
description: "formula.functionList.FLOOR_MATH.description",
|
|
7985
7985
|
abstract: "formula.functionList.FLOOR_MATH.abstract",
|
|
@@ -8001,7 +8001,7 @@ const qo = [], wo = [
|
|
|
8001
8001
|
]
|
|
8002
8002
|
},
|
|
8003
8003
|
{
|
|
8004
|
-
functionName:
|
|
8004
|
+
functionName: T.FLOOR_PRECISE,
|
|
8005
8005
|
functionType: i.Math,
|
|
8006
8006
|
description: "formula.functionList.FLOOR_PRECISE.description",
|
|
8007
8007
|
abstract: "formula.functionList.FLOOR_PRECISE.abstract",
|
|
@@ -8023,7 +8023,7 @@ const qo = [], wo = [
|
|
|
8023
8023
|
]
|
|
8024
8024
|
},
|
|
8025
8025
|
{
|
|
8026
|
-
functionName:
|
|
8026
|
+
functionName: T.GCD,
|
|
8027
8027
|
functionType: i.Math,
|
|
8028
8028
|
description: "formula.functionList.GCD.description",
|
|
8029
8029
|
abstract: "formula.functionList.GCD.abstract",
|
|
@@ -8045,7 +8045,7 @@ const qo = [], wo = [
|
|
|
8045
8045
|
]
|
|
8046
8046
|
},
|
|
8047
8047
|
{
|
|
8048
|
-
functionName:
|
|
8048
|
+
functionName: T.INT,
|
|
8049
8049
|
functionType: i.Math,
|
|
8050
8050
|
description: "formula.functionList.INT.description",
|
|
8051
8051
|
abstract: "formula.functionList.INT.abstract",
|
|
@@ -8067,7 +8067,7 @@ const qo = [], wo = [
|
|
|
8067
8067
|
]
|
|
8068
8068
|
},
|
|
8069
8069
|
{
|
|
8070
|
-
functionName:
|
|
8070
|
+
functionName: T.ISO_CEILING,
|
|
8071
8071
|
functionType: i.Math,
|
|
8072
8072
|
description: "formula.functionList.ISO_CEILING.description",
|
|
8073
8073
|
abstract: "formula.functionList.ISO_CEILING.abstract",
|
|
@@ -8089,7 +8089,7 @@ const qo = [], wo = [
|
|
|
8089
8089
|
]
|
|
8090
8090
|
},
|
|
8091
8091
|
{
|
|
8092
|
-
functionName:
|
|
8092
|
+
functionName: T.LCM,
|
|
8093
8093
|
functionType: i.Math,
|
|
8094
8094
|
description: "formula.functionList.LCM.description",
|
|
8095
8095
|
abstract: "formula.functionList.LCM.abstract",
|
|
@@ -8111,7 +8111,7 @@ const qo = [], wo = [
|
|
|
8111
8111
|
]
|
|
8112
8112
|
},
|
|
8113
8113
|
{
|
|
8114
|
-
functionName:
|
|
8114
|
+
functionName: T.LET,
|
|
8115
8115
|
functionType: i.Math,
|
|
8116
8116
|
description: "formula.functionList.LET.description",
|
|
8117
8117
|
abstract: "formula.functionList.LET.abstract",
|
|
@@ -8133,7 +8133,7 @@ const qo = [], wo = [
|
|
|
8133
8133
|
]
|
|
8134
8134
|
},
|
|
8135
8135
|
{
|
|
8136
|
-
functionName:
|
|
8136
|
+
functionName: T.LN,
|
|
8137
8137
|
functionType: i.Math,
|
|
8138
8138
|
description: "formula.functionList.LN.description",
|
|
8139
8139
|
abstract: "formula.functionList.LN.abstract",
|
|
@@ -8155,7 +8155,7 @@ const qo = [], wo = [
|
|
|
8155
8155
|
]
|
|
8156
8156
|
},
|
|
8157
8157
|
{
|
|
8158
|
-
functionName:
|
|
8158
|
+
functionName: T.LOG,
|
|
8159
8159
|
functionType: i.Math,
|
|
8160
8160
|
description: "formula.functionList.LOG.description",
|
|
8161
8161
|
abstract: "formula.functionList.LOG.abstract",
|
|
@@ -8177,7 +8177,7 @@ const qo = [], wo = [
|
|
|
8177
8177
|
]
|
|
8178
8178
|
},
|
|
8179
8179
|
{
|
|
8180
|
-
functionName:
|
|
8180
|
+
functionName: T.LOG10,
|
|
8181
8181
|
functionType: i.Math,
|
|
8182
8182
|
description: "formula.functionList.LOG10.description",
|
|
8183
8183
|
abstract: "formula.functionList.LOG10.abstract",
|
|
@@ -8199,7 +8199,7 @@ const qo = [], wo = [
|
|
|
8199
8199
|
]
|
|
8200
8200
|
},
|
|
8201
8201
|
{
|
|
8202
|
-
functionName:
|
|
8202
|
+
functionName: T.MDETERM,
|
|
8203
8203
|
functionType: i.Math,
|
|
8204
8204
|
description: "formula.functionList.MDETERM.description",
|
|
8205
8205
|
abstract: "formula.functionList.MDETERM.abstract",
|
|
@@ -8221,7 +8221,7 @@ const qo = [], wo = [
|
|
|
8221
8221
|
]
|
|
8222
8222
|
},
|
|
8223
8223
|
{
|
|
8224
|
-
functionName:
|
|
8224
|
+
functionName: T.MINVERSE,
|
|
8225
8225
|
functionType: i.Math,
|
|
8226
8226
|
description: "formula.functionList.MINVERSE.description",
|
|
8227
8227
|
abstract: "formula.functionList.MINVERSE.abstract",
|
|
@@ -8243,7 +8243,7 @@ const qo = [], wo = [
|
|
|
8243
8243
|
]
|
|
8244
8244
|
},
|
|
8245
8245
|
{
|
|
8246
|
-
functionName:
|
|
8246
|
+
functionName: T.MMULT,
|
|
8247
8247
|
functionType: i.Math,
|
|
8248
8248
|
description: "formula.functionList.MMULT.description",
|
|
8249
8249
|
abstract: "formula.functionList.MMULT.abstract",
|
|
@@ -8265,7 +8265,7 @@ const qo = [], wo = [
|
|
|
8265
8265
|
]
|
|
8266
8266
|
},
|
|
8267
8267
|
{
|
|
8268
|
-
functionName:
|
|
8268
|
+
functionName: T.MOD,
|
|
8269
8269
|
functionType: i.Math,
|
|
8270
8270
|
description: "formula.functionList.MOD.description",
|
|
8271
8271
|
abstract: "formula.functionList.MOD.abstract",
|
|
@@ -8287,7 +8287,7 @@ const qo = [], wo = [
|
|
|
8287
8287
|
]
|
|
8288
8288
|
},
|
|
8289
8289
|
{
|
|
8290
|
-
functionName:
|
|
8290
|
+
functionName: T.MROUND,
|
|
8291
8291
|
functionType: i.Math,
|
|
8292
8292
|
description: "formula.functionList.MROUND.description",
|
|
8293
8293
|
abstract: "formula.functionList.MROUND.abstract",
|
|
@@ -8309,7 +8309,7 @@ const qo = [], wo = [
|
|
|
8309
8309
|
]
|
|
8310
8310
|
},
|
|
8311
8311
|
{
|
|
8312
|
-
functionName:
|
|
8312
|
+
functionName: T.MULTINOMIAL,
|
|
8313
8313
|
functionType: i.Math,
|
|
8314
8314
|
description: "formula.functionList.MULTINOMIAL.description",
|
|
8315
8315
|
abstract: "formula.functionList.MULTINOMIAL.abstract",
|
|
@@ -8331,7 +8331,7 @@ const qo = [], wo = [
|
|
|
8331
8331
|
]
|
|
8332
8332
|
},
|
|
8333
8333
|
{
|
|
8334
|
-
functionName:
|
|
8334
|
+
functionName: T.MUNIT,
|
|
8335
8335
|
functionType: i.Math,
|
|
8336
8336
|
description: "formula.functionList.MUNIT.description",
|
|
8337
8337
|
abstract: "formula.functionList.MUNIT.abstract",
|
|
@@ -8353,7 +8353,7 @@ const qo = [], wo = [
|
|
|
8353
8353
|
]
|
|
8354
8354
|
},
|
|
8355
8355
|
{
|
|
8356
|
-
functionName:
|
|
8356
|
+
functionName: T.ODD,
|
|
8357
8357
|
functionType: i.Math,
|
|
8358
8358
|
description: "formula.functionList.ODD.description",
|
|
8359
8359
|
abstract: "formula.functionList.ODD.abstract",
|
|
@@ -8375,7 +8375,7 @@ const qo = [], wo = [
|
|
|
8375
8375
|
]
|
|
8376
8376
|
},
|
|
8377
8377
|
{
|
|
8378
|
-
functionName:
|
|
8378
|
+
functionName: T.PI,
|
|
8379
8379
|
functionType: i.Math,
|
|
8380
8380
|
description: "formula.functionList.PI.description",
|
|
8381
8381
|
abstract: "formula.functionList.PI.abstract",
|
|
@@ -8397,7 +8397,7 @@ const qo = [], wo = [
|
|
|
8397
8397
|
]
|
|
8398
8398
|
},
|
|
8399
8399
|
{
|
|
8400
|
-
functionName:
|
|
8400
|
+
functionName: T.POWER,
|
|
8401
8401
|
functionType: i.Math,
|
|
8402
8402
|
description: "formula.functionList.POWER.description",
|
|
8403
8403
|
abstract: "formula.functionList.POWER.abstract",
|
|
@@ -8419,7 +8419,7 @@ const qo = [], wo = [
|
|
|
8419
8419
|
]
|
|
8420
8420
|
},
|
|
8421
8421
|
{
|
|
8422
|
-
functionName:
|
|
8422
|
+
functionName: T.PRODUCT,
|
|
8423
8423
|
functionType: i.Math,
|
|
8424
8424
|
description: "formula.functionList.PRODUCT.description",
|
|
8425
8425
|
abstract: "formula.functionList.PRODUCT.abstract",
|
|
@@ -8441,7 +8441,7 @@ const qo = [], wo = [
|
|
|
8441
8441
|
]
|
|
8442
8442
|
},
|
|
8443
8443
|
{
|
|
8444
|
-
functionName:
|
|
8444
|
+
functionName: T.QUOTIENT,
|
|
8445
8445
|
functionType: i.Math,
|
|
8446
8446
|
description: "formula.functionList.QUOTIENT.description",
|
|
8447
8447
|
abstract: "formula.functionList.QUOTIENT.abstract",
|
|
@@ -8463,7 +8463,7 @@ const qo = [], wo = [
|
|
|
8463
8463
|
]
|
|
8464
8464
|
},
|
|
8465
8465
|
{
|
|
8466
|
-
functionName:
|
|
8466
|
+
functionName: T.RADIANS,
|
|
8467
8467
|
functionType: i.Math,
|
|
8468
8468
|
description: "formula.functionList.RADIANS.description",
|
|
8469
8469
|
abstract: "formula.functionList.RADIANS.abstract",
|
|
@@ -8485,7 +8485,7 @@ const qo = [], wo = [
|
|
|
8485
8485
|
]
|
|
8486
8486
|
},
|
|
8487
8487
|
{
|
|
8488
|
-
functionName:
|
|
8488
|
+
functionName: T.RAND,
|
|
8489
8489
|
functionType: i.Math,
|
|
8490
8490
|
description: "formula.functionList.RAND.description",
|
|
8491
8491
|
abstract: "formula.functionList.RAND.abstract",
|
|
@@ -8507,7 +8507,7 @@ const qo = [], wo = [
|
|
|
8507
8507
|
]
|
|
8508
8508
|
},
|
|
8509
8509
|
{
|
|
8510
|
-
functionName:
|
|
8510
|
+
functionName: T.RANDARRAY,
|
|
8511
8511
|
functionType: i.Math,
|
|
8512
8512
|
description: "formula.functionList.RANDARRAY.description",
|
|
8513
8513
|
abstract: "formula.functionList.RANDARRAY.abstract",
|
|
@@ -8529,7 +8529,7 @@ const qo = [], wo = [
|
|
|
8529
8529
|
]
|
|
8530
8530
|
},
|
|
8531
8531
|
{
|
|
8532
|
-
functionName:
|
|
8532
|
+
functionName: T.RANDBETWEEN,
|
|
8533
8533
|
functionType: i.Math,
|
|
8534
8534
|
description: "formula.functionList.RANDBETWEEN.description",
|
|
8535
8535
|
abstract: "formula.functionList.RANDBETWEEN.abstract",
|
|
@@ -8551,7 +8551,7 @@ const qo = [], wo = [
|
|
|
8551
8551
|
]
|
|
8552
8552
|
},
|
|
8553
8553
|
{
|
|
8554
|
-
functionName:
|
|
8554
|
+
functionName: T.ROMAN,
|
|
8555
8555
|
functionType: i.Math,
|
|
8556
8556
|
description: "formula.functionList.ROMAN.description",
|
|
8557
8557
|
abstract: "formula.functionList.ROMAN.abstract",
|
|
@@ -8573,7 +8573,7 @@ const qo = [], wo = [
|
|
|
8573
8573
|
]
|
|
8574
8574
|
},
|
|
8575
8575
|
{
|
|
8576
|
-
functionName:
|
|
8576
|
+
functionName: T.ROUND,
|
|
8577
8577
|
functionType: i.Math,
|
|
8578
8578
|
description: "formula.functionList.ROUND.description",
|
|
8579
8579
|
abstract: "formula.functionList.ROUND.abstract",
|
|
@@ -8595,7 +8595,7 @@ const qo = [], wo = [
|
|
|
8595
8595
|
]
|
|
8596
8596
|
},
|
|
8597
8597
|
{
|
|
8598
|
-
functionName:
|
|
8598
|
+
functionName: T.ROUNDDOWN,
|
|
8599
8599
|
functionType: i.Math,
|
|
8600
8600
|
description: "formula.functionList.ROUNDDOWN.description",
|
|
8601
8601
|
abstract: "formula.functionList.ROUNDDOWN.abstract",
|
|
@@ -8617,7 +8617,7 @@ const qo = [], wo = [
|
|
|
8617
8617
|
]
|
|
8618
8618
|
},
|
|
8619
8619
|
{
|
|
8620
|
-
functionName:
|
|
8620
|
+
functionName: T.ROUNDUP,
|
|
8621
8621
|
functionType: i.Math,
|
|
8622
8622
|
description: "formula.functionList.ROUNDUP.description",
|
|
8623
8623
|
abstract: "formula.functionList.ROUNDUP.abstract",
|
|
@@ -8639,7 +8639,7 @@ const qo = [], wo = [
|
|
|
8639
8639
|
]
|
|
8640
8640
|
},
|
|
8641
8641
|
{
|
|
8642
|
-
functionName:
|
|
8642
|
+
functionName: T.SEC,
|
|
8643
8643
|
functionType: i.Math,
|
|
8644
8644
|
description: "formula.functionList.SEC.description",
|
|
8645
8645
|
abstract: "formula.functionList.SEC.abstract",
|
|
@@ -8661,7 +8661,7 @@ const qo = [], wo = [
|
|
|
8661
8661
|
]
|
|
8662
8662
|
},
|
|
8663
8663
|
{
|
|
8664
|
-
functionName:
|
|
8664
|
+
functionName: T.SECH,
|
|
8665
8665
|
functionType: i.Math,
|
|
8666
8666
|
description: "formula.functionList.SECH.description",
|
|
8667
8667
|
abstract: "formula.functionList.SECH.abstract",
|
|
@@ -8683,7 +8683,7 @@ const qo = [], wo = [
|
|
|
8683
8683
|
]
|
|
8684
8684
|
},
|
|
8685
8685
|
{
|
|
8686
|
-
functionName:
|
|
8686
|
+
functionName: T.SERIESSUM,
|
|
8687
8687
|
functionType: i.Math,
|
|
8688
8688
|
description: "formula.functionList.SERIESSUM.description",
|
|
8689
8689
|
abstract: "formula.functionList.SERIESSUM.abstract",
|
|
@@ -8705,7 +8705,7 @@ const qo = [], wo = [
|
|
|
8705
8705
|
]
|
|
8706
8706
|
},
|
|
8707
8707
|
{
|
|
8708
|
-
functionName:
|
|
8708
|
+
functionName: T.SEQUENCE,
|
|
8709
8709
|
functionType: i.Math,
|
|
8710
8710
|
description: "formula.functionList.SEQUENCE.description",
|
|
8711
8711
|
abstract: "formula.functionList.SEQUENCE.abstract",
|
|
@@ -8727,7 +8727,7 @@ const qo = [], wo = [
|
|
|
8727
8727
|
]
|
|
8728
8728
|
},
|
|
8729
8729
|
{
|
|
8730
|
-
functionName:
|
|
8730
|
+
functionName: T.SIGN,
|
|
8731
8731
|
functionType: i.Math,
|
|
8732
8732
|
description: "formula.functionList.SIGN.description",
|
|
8733
8733
|
abstract: "formula.functionList.SIGN.abstract",
|
|
@@ -8749,7 +8749,7 @@ const qo = [], wo = [
|
|
|
8749
8749
|
]
|
|
8750
8750
|
},
|
|
8751
8751
|
{
|
|
8752
|
-
functionName:
|
|
8752
|
+
functionName: T.SIN,
|
|
8753
8753
|
functionType: i.Math,
|
|
8754
8754
|
description: "formula.functionList.SIN.description",
|
|
8755
8755
|
abstract: "formula.functionList.SIN.abstract",
|
|
@@ -8771,7 +8771,7 @@ const qo = [], wo = [
|
|
|
8771
8771
|
]
|
|
8772
8772
|
},
|
|
8773
8773
|
{
|
|
8774
|
-
functionName:
|
|
8774
|
+
functionName: T.SINH,
|
|
8775
8775
|
functionType: i.Math,
|
|
8776
8776
|
description: "formula.functionList.SINH.description",
|
|
8777
8777
|
abstract: "formula.functionList.SINH.abstract",
|
|
@@ -8793,7 +8793,7 @@ const qo = [], wo = [
|
|
|
8793
8793
|
]
|
|
8794
8794
|
},
|
|
8795
8795
|
{
|
|
8796
|
-
functionName:
|
|
8796
|
+
functionName: T.SQRT,
|
|
8797
8797
|
functionType: i.Math,
|
|
8798
8798
|
description: "formula.functionList.SQRT.description",
|
|
8799
8799
|
abstract: "formula.functionList.SQRT.abstract",
|
|
@@ -8815,7 +8815,7 @@ const qo = [], wo = [
|
|
|
8815
8815
|
]
|
|
8816
8816
|
},
|
|
8817
8817
|
{
|
|
8818
|
-
functionName:
|
|
8818
|
+
functionName: T.SQRTPI,
|
|
8819
8819
|
functionType: i.Math,
|
|
8820
8820
|
description: "formula.functionList.SQRTPI.description",
|
|
8821
8821
|
abstract: "formula.functionList.SQRTPI.abstract",
|
|
@@ -8837,7 +8837,7 @@ const qo = [], wo = [
|
|
|
8837
8837
|
]
|
|
8838
8838
|
},
|
|
8839
8839
|
{
|
|
8840
|
-
functionName:
|
|
8840
|
+
functionName: T.SUBTOTAL,
|
|
8841
8841
|
functionType: i.Math,
|
|
8842
8842
|
description: "formula.functionList.SUBTOTAL.description",
|
|
8843
8843
|
abstract: "formula.functionList.SUBTOTAL.abstract",
|
|
@@ -8866,7 +8866,7 @@ const qo = [], wo = [
|
|
|
8866
8866
|
]
|
|
8867
8867
|
},
|
|
8868
8868
|
{
|
|
8869
|
-
functionName:
|
|
8869
|
+
functionName: T.SUM,
|
|
8870
8870
|
aliasFunctionName: "formula.functionList.SUM.aliasFunctionName",
|
|
8871
8871
|
functionType: i.Math,
|
|
8872
8872
|
description: "formula.functionList.SUM.description",
|
|
@@ -8889,7 +8889,7 @@ const qo = [], wo = [
|
|
|
8889
8889
|
]
|
|
8890
8890
|
},
|
|
8891
8891
|
{
|
|
8892
|
-
functionName:
|
|
8892
|
+
functionName: T.SUMIF,
|
|
8893
8893
|
aliasFunctionName: "formula.functionList.SUMIF.aliasFunctionName",
|
|
8894
8894
|
functionType: i.Math,
|
|
8895
8895
|
description: "formula.functionList.SUMIF.description",
|
|
@@ -8919,7 +8919,7 @@ const qo = [], wo = [
|
|
|
8919
8919
|
]
|
|
8920
8920
|
},
|
|
8921
8921
|
{
|
|
8922
|
-
functionName:
|
|
8922
|
+
functionName: T.SUMIFS,
|
|
8923
8923
|
functionType: i.Math,
|
|
8924
8924
|
description: "formula.functionList.SUMIFS.description",
|
|
8925
8925
|
abstract: "formula.functionList.SUMIFS.abstract",
|
|
@@ -8962,7 +8962,7 @@ const qo = [], wo = [
|
|
|
8962
8962
|
]
|
|
8963
8963
|
},
|
|
8964
8964
|
{
|
|
8965
|
-
functionName:
|
|
8965
|
+
functionName: T.SUMPRODUCT,
|
|
8966
8966
|
functionType: i.Math,
|
|
8967
8967
|
description: "formula.functionList.SUMPRODUCT.description",
|
|
8968
8968
|
abstract: "formula.functionList.SUMPRODUCT.abstract",
|
|
@@ -8984,7 +8984,7 @@ const qo = [], wo = [
|
|
|
8984
8984
|
]
|
|
8985
8985
|
},
|
|
8986
8986
|
{
|
|
8987
|
-
functionName:
|
|
8987
|
+
functionName: T.SUMSQ,
|
|
8988
8988
|
functionType: i.Math,
|
|
8989
8989
|
description: "formula.functionList.SUMSQ.description",
|
|
8990
8990
|
abstract: "formula.functionList.SUMSQ.abstract",
|
|
@@ -9006,7 +9006,7 @@ const qo = [], wo = [
|
|
|
9006
9006
|
]
|
|
9007
9007
|
},
|
|
9008
9008
|
{
|
|
9009
|
-
functionName:
|
|
9009
|
+
functionName: T.SUMX2MY2,
|
|
9010
9010
|
functionType: i.Math,
|
|
9011
9011
|
description: "formula.functionList.SUMX2MY2.description",
|
|
9012
9012
|
abstract: "formula.functionList.SUMX2MY2.abstract",
|
|
@@ -9028,7 +9028,7 @@ const qo = [], wo = [
|
|
|
9028
9028
|
]
|
|
9029
9029
|
},
|
|
9030
9030
|
{
|
|
9031
|
-
functionName:
|
|
9031
|
+
functionName: T.SUMX2PY2,
|
|
9032
9032
|
functionType: i.Math,
|
|
9033
9033
|
description: "formula.functionList.SUMX2PY2.description",
|
|
9034
9034
|
abstract: "formula.functionList.SUMX2PY2.abstract",
|
|
@@ -9050,7 +9050,7 @@ const qo = [], wo = [
|
|
|
9050
9050
|
]
|
|
9051
9051
|
},
|
|
9052
9052
|
{
|
|
9053
|
-
functionName:
|
|
9053
|
+
functionName: T.SUMXMY2,
|
|
9054
9054
|
functionType: i.Math,
|
|
9055
9055
|
description: "formula.functionList.SUMXMY2.description",
|
|
9056
9056
|
abstract: "formula.functionList.SUMXMY2.abstract",
|
|
@@ -9072,7 +9072,7 @@ const qo = [], wo = [
|
|
|
9072
9072
|
]
|
|
9073
9073
|
},
|
|
9074
9074
|
{
|
|
9075
|
-
functionName:
|
|
9075
|
+
functionName: T.TAN,
|
|
9076
9076
|
functionType: i.Math,
|
|
9077
9077
|
description: "formula.functionList.TAN.description",
|
|
9078
9078
|
abstract: "formula.functionList.TAN.abstract",
|
|
@@ -9094,7 +9094,7 @@ const qo = [], wo = [
|
|
|
9094
9094
|
]
|
|
9095
9095
|
},
|
|
9096
9096
|
{
|
|
9097
|
-
functionName:
|
|
9097
|
+
functionName: T.TANH,
|
|
9098
9098
|
functionType: i.Math,
|
|
9099
9099
|
description: "formula.functionList.TANH.description",
|
|
9100
9100
|
abstract: "formula.functionList.TANH.abstract",
|
|
@@ -9116,7 +9116,7 @@ const qo = [], wo = [
|
|
|
9116
9116
|
]
|
|
9117
9117
|
},
|
|
9118
9118
|
{
|
|
9119
|
-
functionName:
|
|
9119
|
+
functionName: T.TRUNC,
|
|
9120
9120
|
functionType: i.Math,
|
|
9121
9121
|
description: "formula.functionList.TRUNC.description",
|
|
9122
9122
|
abstract: "formula.functionList.TRUNC.abstract",
|
|
@@ -12834,8 +12834,8 @@ const ou = "univer-formula-select-function-select", uu = "univer-formula-select-
|
|
|
12834
12834
|
formulaSelectFunctionContent: lu
|
|
12835
12835
|
};
|
|
12836
12836
|
function du(a) {
|
|
12837
|
-
const { onChange: e } = a, t = "-1", [n, r] = z(""), [o, u] = z([]), [c, m] = z(0), [s,
|
|
12838
|
-
|
|
12837
|
+
const { onChange: e } = a, t = "-1", [n, r] = z(""), [o, u] = z([]), [c, m] = z(0), [s, l] = z(t), [f, d] = z(0), [E, P] = z(null), R = ae(je), p = ae(Be), S = tu(i, p);
|
|
12838
|
+
S.unshift({
|
|
12839
12839
|
label: p.t("formula.moreFunctions.allFunctions"),
|
|
12840
12840
|
value: t
|
|
12841
12841
|
});
|
|
@@ -12845,52 +12845,52 @@ function du(a) {
|
|
|
12845
12845
|
}, []), Rt(() => {
|
|
12846
12846
|
A(0);
|
|
12847
12847
|
}, [o]);
|
|
12848
|
-
const
|
|
12848
|
+
const N = (I) => {
|
|
12849
12849
|
if (n.trim() === "")
|
|
12850
|
-
return
|
|
12850
|
+
return I;
|
|
12851
12851
|
const B = new RegExp(`(${n.toLocaleUpperCase()})`);
|
|
12852
|
-
return
|
|
12853
|
-
}, A = (
|
|
12852
|
+
return I.split(B).filter(Boolean).map((ue, Re) => ue.match(B) ? /* @__PURE__ */ C.jsx("span", { className: pe.formulaSelectFunctionResultItemNameLight, children: ue }, Re) : ue);
|
|
12853
|
+
}, A = (I) => {
|
|
12854
12854
|
if (o.length === 0) {
|
|
12855
|
-
|
|
12855
|
+
P(null);
|
|
12856
12856
|
return;
|
|
12857
12857
|
}
|
|
12858
|
-
|
|
12859
|
-
const B =
|
|
12858
|
+
d(I);
|
|
12859
|
+
const B = R.getFunctionInfo(o[I].name);
|
|
12860
12860
|
if (!B) {
|
|
12861
|
-
|
|
12861
|
+
P(null);
|
|
12862
12862
|
return;
|
|
12863
12863
|
}
|
|
12864
|
-
|
|
12864
|
+
P(B), e(B);
|
|
12865
12865
|
};
|
|
12866
|
-
function O(
|
|
12867
|
-
|
|
12868
|
-
const B =
|
|
12866
|
+
function O(I) {
|
|
12867
|
+
l(I);
|
|
12868
|
+
const B = R.getSearchListByType(+I);
|
|
12869
12869
|
u(B);
|
|
12870
12870
|
}
|
|
12871
|
-
function v(
|
|
12872
|
-
r(
|
|
12873
|
-
const B =
|
|
12871
|
+
function v(I) {
|
|
12872
|
+
r(I);
|
|
12873
|
+
const B = R.getSearchListByName(I);
|
|
12874
12874
|
u(B);
|
|
12875
12875
|
}
|
|
12876
|
-
function _(
|
|
12877
|
-
if (
|
|
12876
|
+
function _(I) {
|
|
12877
|
+
if (I.stopPropagation(), I.key === "ArrowDown") {
|
|
12878
12878
|
const B = c + 1;
|
|
12879
12879
|
m(B === o.length ? 0 : B);
|
|
12880
|
-
} else if (
|
|
12880
|
+
} else if (I.key === "ArrowUp") {
|
|
12881
12881
|
const B = c - 1;
|
|
12882
12882
|
m(B === -1 ? o.length - 1 : B);
|
|
12883
12883
|
} else
|
|
12884
|
-
|
|
12884
|
+
I.key === "Enter" && A(c);
|
|
12885
12885
|
}
|
|
12886
|
-
const M = (
|
|
12887
|
-
m(
|
|
12886
|
+
const M = (I) => {
|
|
12887
|
+
m(I);
|
|
12888
12888
|
}, U = () => {
|
|
12889
12889
|
m(-1);
|
|
12890
12890
|
};
|
|
12891
12891
|
return /* @__PURE__ */ C.jsxs("div", { children: [
|
|
12892
12892
|
/* @__PURE__ */ C.jsxs("div", { className: pe.formulaSelectFunctionSelect, children: [
|
|
12893
|
-
/* @__PURE__ */ C.jsx(si, { value: s, options:
|
|
12893
|
+
/* @__PURE__ */ C.jsx(si, { value: s, options: S, onChange: O }),
|
|
12894
12894
|
/* @__PURE__ */ C.jsx(
|
|
12895
12895
|
fi,
|
|
12896
12896
|
{
|
|
@@ -12903,7 +12903,7 @@ function du(a) {
|
|
|
12903
12903
|
}
|
|
12904
12904
|
)
|
|
12905
12905
|
] }),
|
|
12906
|
-
/* @__PURE__ */ C.jsx("ul", { className: pe.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: o.map(({ name:
|
|
12906
|
+
/* @__PURE__ */ C.jsx("ul", { className: pe.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: o.map(({ name: I }, B) => /* @__PURE__ */ C.jsxs(
|
|
12907
12907
|
"li",
|
|
12908
12908
|
{
|
|
12909
12909
|
className: c === B ? `${pe.formulaSelectFunctionResultItem} ${pe.formulaSelectFunctionResultItemActive}` : pe.formulaSelectFunctionResultItem,
|
|
@@ -12912,32 +12912,32 @@ function du(a) {
|
|
|
12912
12912
|
onClick: () => A(B),
|
|
12913
12913
|
children: [
|
|
12914
12914
|
f === B && /* @__PURE__ */ C.jsx(ji, { className: pe.formulaSelectFunctionResultItemSelected }),
|
|
12915
|
-
/* @__PURE__ */ C.jsx("span", { className: pe.formulaSelectFunctionResultItemName, children:
|
|
12915
|
+
/* @__PURE__ */ C.jsx("span", { className: pe.formulaSelectFunctionResultItemName, children: N(I) })
|
|
12916
12916
|
]
|
|
12917
12917
|
},
|
|
12918
12918
|
B
|
|
12919
12919
|
)) }),
|
|
12920
|
-
|
|
12921
|
-
/* @__PURE__ */ C.jsx(Ve, { title:
|
|
12920
|
+
E && /* @__PURE__ */ C.jsxs("div", { className: pe.formulaSelectFunctionContent, children: [
|
|
12921
|
+
/* @__PURE__ */ C.jsx(Ve, { title: E.functionName, value: E.description }),
|
|
12922
12922
|
/* @__PURE__ */ C.jsx(
|
|
12923
12923
|
Ve,
|
|
12924
12924
|
{
|
|
12925
12925
|
title: p.t("formula.moreFunctions.syntax"),
|
|
12926
|
-
value: /* @__PURE__ */ C.jsx(hr, { prefix:
|
|
12926
|
+
value: /* @__PURE__ */ C.jsx(hr, { prefix: E.functionName, value: E.functionParameter })
|
|
12927
12927
|
}
|
|
12928
12928
|
),
|
|
12929
12929
|
/* @__PURE__ */ C.jsx(
|
|
12930
12930
|
Ve,
|
|
12931
12931
|
{
|
|
12932
12932
|
title: p.t("formula.prompt.helpExample"),
|
|
12933
|
-
value: `${
|
|
12933
|
+
value: `${E.functionName}(${E.functionParameter.map((I) => I.example).join(",")})`
|
|
12934
12934
|
}
|
|
12935
12935
|
),
|
|
12936
|
-
|
|
12936
|
+
E.functionParameter && E.functionParameter.map((I, B) => /* @__PURE__ */ C.jsx(
|
|
12937
12937
|
Ve,
|
|
12938
12938
|
{
|
|
12939
|
-
title:
|
|
12940
|
-
value: `${
|
|
12939
|
+
title: I.name,
|
|
12940
|
+
value: `${I.require ? L : b} ${I.detail}`
|
|
12941
12941
|
},
|
|
12942
12942
|
B
|
|
12943
12943
|
))
|
|
@@ -12948,7 +12948,7 @@ function bu() {
|
|
|
12948
12948
|
const [a, e] = z(!0), [t, n] = z(!1), [r, o] = z([]), [u, c] = z(null), m = ae(Be);
|
|
12949
12949
|
ae(er);
|
|
12950
12950
|
const s = ae(We);
|
|
12951
|
-
function
|
|
12951
|
+
function l() {
|
|
12952
12952
|
e(!a), n(!t);
|
|
12953
12953
|
}
|
|
12954
12954
|
function f() {
|
|
@@ -12958,8 +12958,8 @@ function bu() {
|
|
|
12958
12958
|
a && /* @__PURE__ */ C.jsx(du, { onChange: c }),
|
|
12959
12959
|
t && /* @__PURE__ */ C.jsx(Fo, { functionInfo: u, onChange: o }),
|
|
12960
12960
|
/* @__PURE__ */ C.jsxs("div", { className: Sn.formulaMoreFunctionsOperation, children: [
|
|
12961
|
-
t && /* @__PURE__ */ C.jsx(yt, { type: "primary", size: "small", onClick:
|
|
12962
|
-
t && /* @__PURE__ */ C.jsx(yt, { size: "small", onClick:
|
|
12961
|
+
t && /* @__PURE__ */ C.jsx(yt, { type: "primary", size: "small", onClick: l, children: m.t("formula.moreFunctions.next") }),
|
|
12962
|
+
t && /* @__PURE__ */ C.jsx(yt, { size: "small", onClick: l, children: m.t("formula.moreFunctions.prev") }),
|
|
12963
12963
|
a && /* @__PURE__ */ C.jsx(yt, { type: "primary", size: "small", onClick: f, children: m.t("formula.moreFunctions.confirm") })
|
|
12964
12964
|
] })
|
|
12965
12965
|
] });
|
|
@@ -13203,7 +13203,7 @@ var _u = Object.defineProperty, vu = Object.getOwnPropertyDescriptor, Mu = (a, e
|
|
|
13203
13203
|
}, Q = (a, e) => (t, n) => e(t, n, a);
|
|
13204
13204
|
const xu = [_r, vr];
|
|
13205
13205
|
let pt = class extends ee {
|
|
13206
|
-
constructor(e, t, n, r, o, u, c, m, s,
|
|
13206
|
+
constructor(e, t, n, r, o, u, c, m, s, l, f, d, E, P, R, p, S) {
|
|
13207
13207
|
super();
|
|
13208
13208
|
x(this, "_formulaRefColors", []);
|
|
13209
13209
|
x(this, "_previousSequenceNodes");
|
|
@@ -13219,7 +13219,7 @@ let pt = class extends ee {
|
|
|
13219
13219
|
x(this, "_userCursorMove", !1);
|
|
13220
13220
|
x(this, "_previousEditorUnitId");
|
|
13221
13221
|
x(this, "_existsSequenceNode", !1);
|
|
13222
|
-
this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = o, this._lexerTreeBuilder = u, this._renderManagerService = c, this._themeService = m, this._selectionManagerService = s, this._sheetSkeletonManagerService =
|
|
13222
|
+
this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = o, this._lexerTreeBuilder = u, this._renderManagerService = c, this._themeService = m, this._selectionManagerService = s, this._sheetSkeletonManagerService = l, this._univerInstanceService = f, this._selectionRenderService = d, this._descriptionService = E, this._textSelectionManagerService = P, this._docViewModelManagerService = R, this._contextMenuService = p, this._editorService = S, this._initialize();
|
|
13223
13223
|
}
|
|
13224
13224
|
dispose() {
|
|
13225
13225
|
this._formulaRefColors = [], this._resetTemp();
|
|
@@ -13386,17 +13386,17 @@ let pt = class extends ee {
|
|
|
13386
13386
|
}
|
|
13387
13387
|
const c = e.length - u.token.length, m = { ...u };
|
|
13388
13388
|
m.token = e, m.endIndex += c, r[o] = m;
|
|
13389
|
-
const s = this._descriptionService.hasDefinedNameDescription(e),
|
|
13390
|
-
|
|
13391
|
-
for (let
|
|
13392
|
-
const p = r[
|
|
13389
|
+
const s = this._descriptionService.hasDefinedNameDescription(e), l = this._descriptionService.isFormulaDefinedName(e), f = e.length + 1, d = !s || l;
|
|
13390
|
+
d && r.splice(o + 1, 0, ve.OPEN_BRACKET);
|
|
13391
|
+
for (let P = o + 2, R = r.length; P < R; P++) {
|
|
13392
|
+
const p = r[P];
|
|
13393
13393
|
if (typeof p == "string")
|
|
13394
13394
|
continue;
|
|
13395
|
-
const
|
|
13396
|
-
|
|
13395
|
+
const S = { ...p };
|
|
13396
|
+
S.startIndex += f, S.endIndex += f, r[P] = S;
|
|
13397
13397
|
}
|
|
13398
|
-
let
|
|
13399
|
-
|
|
13398
|
+
let E = m.endIndex + 1;
|
|
13399
|
+
d && (E += 1), this._syncToEditor(r, E);
|
|
13400
13400
|
})
|
|
13401
13401
|
)
|
|
13402
13402
|
);
|
|
@@ -13566,31 +13566,36 @@ let pt = class extends ee {
|
|
|
13566
13566
|
* Generate styles for formula text, highlighting references, text, numbers, and arrays.
|
|
13567
13567
|
*/
|
|
13568
13568
|
_buildTextRuns(e) {
|
|
13569
|
-
var
|
|
13570
|
-
const t = [], n = [];
|
|
13571
|
-
let
|
|
13572
|
-
const
|
|
13573
|
-
for (let
|
|
13574
|
-
const
|
|
13575
|
-
if (typeof
|
|
13569
|
+
var c;
|
|
13570
|
+
const t = [], n = [], r = /* @__PURE__ */ new Map();
|
|
13571
|
+
let o = 0;
|
|
13572
|
+
const u = ((c = this._getCurrentBodyDataStreamAndOffset()) == null ? void 0 : c.offset) || 0;
|
|
13573
|
+
for (let m = 0, s = e.length; m < s; m++) {
|
|
13574
|
+
const l = e[m];
|
|
13575
|
+
if (typeof l == "string" || this._descriptionService.hasDefinedNameDescription(l.token.trim()))
|
|
13576
13576
|
continue;
|
|
13577
|
-
const { startIndex:
|
|
13578
|
-
let
|
|
13579
|
-
if (
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13577
|
+
const { startIndex: f, endIndex: d, nodeType: E, token: P } = l;
|
|
13578
|
+
let R = "";
|
|
13579
|
+
if (E === ne.REFERENCE) {
|
|
13580
|
+
if (r.has(P))
|
|
13581
|
+
R = r.get(P);
|
|
13582
|
+
else {
|
|
13583
|
+
const p = o % this._formulaRefColors.length;
|
|
13584
|
+
R = this._formulaRefColors[p], r.set(P, R), o++;
|
|
13585
|
+
}
|
|
13586
|
+
n.push({
|
|
13587
|
+
refIndex: m,
|
|
13588
|
+
themeColor: R,
|
|
13584
13589
|
token: P
|
|
13585
|
-
})
|
|
13590
|
+
});
|
|
13586
13591
|
} else
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
st:
|
|
13590
|
-
ed:
|
|
13592
|
+
E === ne.NUMBER ? R = this._numberColor : E === ne.STRING ? R = this._stringColor : E === ne.ARRAY && (R = this._stringColor);
|
|
13593
|
+
R && R.length > 0 && t.push({
|
|
13594
|
+
st: f + 1 - u,
|
|
13595
|
+
ed: d + 2 - u,
|
|
13591
13596
|
ts: {
|
|
13592
13597
|
cl: {
|
|
13593
|
-
rgb:
|
|
13598
|
+
rgb: R
|
|
13594
13599
|
}
|
|
13595
13600
|
}
|
|
13596
13601
|
});
|
|
@@ -13611,31 +13616,31 @@ let pt = class extends ee {
|
|
|
13611
13616
|
return;
|
|
13612
13617
|
let c = null;
|
|
13613
13618
|
for (let m = 0, s = e.length; m < s; m++) {
|
|
13614
|
-
const
|
|
13615
|
-
if (
|
|
13619
|
+
const l = e[m], { themeColor: f, token: d, refIndex: E } = l, P = ge(d), { unitId: R, sheetName: p, range: S } = P, L = ha(S, u.getRowCount(), u.getColumnCount());
|
|
13620
|
+
if (R != null && R.length > 0 && t !== R)
|
|
13616
13621
|
continue;
|
|
13617
13622
|
const b = this._getSheetIdByName(t, p.trim());
|
|
13618
13623
|
if (p.length !== 0 && b !== n || this._exceedCurrentRange(L, u.getRowCount(), u.getColumnCount()))
|
|
13619
13624
|
continue;
|
|
13620
|
-
const
|
|
13621
|
-
if (
|
|
13622
|
-
c =
|
|
13625
|
+
const N = this._getPrimary(L, f, E);
|
|
13626
|
+
if (N) {
|
|
13627
|
+
c = N;
|
|
13623
13628
|
continue;
|
|
13624
13629
|
}
|
|
13625
13630
|
const A = Ea(L, u);
|
|
13626
13631
|
!Ne.equals(A, L) && L.startRow === L.endRow && L.startColumn === L.endColumn && (L.startRow = A.startRow, L.endRow = A.endRow, L.startColumn = A.startColumn, L.endColumn = A.endColumn), r.push({
|
|
13627
13632
|
range: L,
|
|
13628
13633
|
primary: A,
|
|
13629
|
-
style: Ut(this._themeService, f,
|
|
13634
|
+
style: Ut(this._themeService, f, E.toString())
|
|
13630
13635
|
});
|
|
13631
13636
|
}
|
|
13632
13637
|
c && r.push(c), r.length !== 0 && this._selectionManagerService.add(r);
|
|
13633
13638
|
}
|
|
13634
13639
|
_getPrimary(e, t, n) {
|
|
13635
13640
|
var f;
|
|
13636
|
-
const r = (f = this._insertSelections.find((
|
|
13637
|
-
const { startRow:
|
|
13638
|
-
return
|
|
13641
|
+
const r = (f = this._insertSelections.find((d) => {
|
|
13642
|
+
const { startRow: E, startColumn: P, endRow: R, endColumn: p } = d.range;
|
|
13643
|
+
return E === e.startRow && P === e.startColumn && R === e.endRow && p === e.endColumn || E === e.startRow && P === e.startColumn && e.startRow === e.endRow && e.startColumn === e.endColumn;
|
|
13639
13644
|
})) == null ? void 0 : f.primary;
|
|
13640
13645
|
if (r == null)
|
|
13641
13646
|
return;
|
|
@@ -13645,9 +13650,9 @@ let pt = class extends ee {
|
|
|
13645
13650
|
startRow: c,
|
|
13646
13651
|
endRow: m,
|
|
13647
13652
|
startColumn: s,
|
|
13648
|
-
endColumn:
|
|
13653
|
+
endColumn: l
|
|
13649
13654
|
} = r;
|
|
13650
|
-
return (o || u) && c === e.startRow && s === e.startColumn && e.startRow === e.endRow && e.startColumn === e.endColumn && (e.endRow = m, e.endColumn =
|
|
13655
|
+
return (o || u) && c === e.startRow && s === e.startColumn && e.startRow === e.endRow && e.startColumn === e.endColumn && (e.endRow = m, e.endColumn = l), {
|
|
13651
13656
|
range: e,
|
|
13652
13657
|
primary: r,
|
|
13653
13658
|
style: Ut(this._themeService, t, n.toString())
|
|
@@ -13699,30 +13704,30 @@ let pt = class extends ee {
|
|
|
13699
13704
|
const { openUnitId: u, openSheetId: c } = this._getOpenForCurrentSheet();
|
|
13700
13705
|
t === u ? r = "" : r = t, n === c ? o = "" : o = this._getSheetNameById(t, n);
|
|
13701
13706
|
const { range: m, primary: s } = e;
|
|
13702
|
-
let { startRow:
|
|
13703
|
-
const { startAbsoluteRefType:
|
|
13707
|
+
let { startRow: l, endRow: f, startColumn: d, endColumn: E } = m;
|
|
13708
|
+
const { startAbsoluteRefType: P, endAbsoluteRefType: R, rangeType: p } = m;
|
|
13704
13709
|
if (s) {
|
|
13705
13710
|
const {
|
|
13706
|
-
isMerged:
|
|
13711
|
+
isMerged: S,
|
|
13707
13712
|
isMergedMainCell: L,
|
|
13708
13713
|
startRow: b,
|
|
13709
|
-
endRow:
|
|
13714
|
+
endRow: N,
|
|
13710
13715
|
startColumn: A,
|
|
13711
13716
|
endColumn: O
|
|
13712
13717
|
} = s;
|
|
13713
|
-
(
|
|
13718
|
+
(S || L) && b === l && A === d && N === f && O === E && (l = b, d = A, f = b, E = A);
|
|
13714
13719
|
}
|
|
13715
13720
|
return ut({
|
|
13716
13721
|
sheetName: o,
|
|
13717
13722
|
unitId: r,
|
|
13718
13723
|
range: {
|
|
13719
|
-
startRow:
|
|
13724
|
+
startRow: l,
|
|
13720
13725
|
endRow: f,
|
|
13721
|
-
startColumn:
|
|
13722
|
-
endColumn:
|
|
13726
|
+
startColumn: d,
|
|
13727
|
+
endColumn: E,
|
|
13723
13728
|
rangeType: p,
|
|
13724
|
-
startAbsoluteRefType:
|
|
13725
|
-
endAbsoluteRefType:
|
|
13729
|
+
startAbsoluteRefType: P,
|
|
13730
|
+
endAbsoluteRefType: R
|
|
13726
13731
|
}
|
|
13727
13732
|
});
|
|
13728
13733
|
}
|
|
@@ -13738,32 +13743,32 @@ let pt = class extends ee {
|
|
|
13738
13743
|
const m = this._textSelectionManagerService.getActiveRange();
|
|
13739
13744
|
if (m == null)
|
|
13740
13745
|
return;
|
|
13741
|
-
const { collapsed: s, style:
|
|
13746
|
+
const { collapsed: s, style: l } = m;
|
|
13742
13747
|
this._currentInsertRefStringIndex = t, n == null && (n = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId()), this._fitEditorSize();
|
|
13743
13748
|
const f = this._editorService.getEditor(n);
|
|
13744
13749
|
f != null && f.isSingleChoice() && (o = o.split(",")[0]);
|
|
13745
|
-
let
|
|
13746
|
-
(!f || !f.onlyInputRange()) && (
|
|
13750
|
+
let d = o, E = 1;
|
|
13751
|
+
(!f || !f.onlyInputRange()) && (d = `${_t.EQUALS}${o}`, E = 0), r ? this._commandService.executeCommand(li.id, {
|
|
13747
13752
|
unitId: n,
|
|
13748
13753
|
body: {
|
|
13749
|
-
dataStream:
|
|
13754
|
+
dataStream: d,
|
|
13750
13755
|
textRuns: u
|
|
13751
13756
|
},
|
|
13752
13757
|
textRanges: [
|
|
13753
13758
|
{
|
|
13754
|
-
startOffset: t + 1 -
|
|
13755
|
-
endOffset: t + 1 -
|
|
13759
|
+
startOffset: t + 1 - E,
|
|
13760
|
+
endOffset: t + 1 - E,
|
|
13756
13761
|
collapsed: s,
|
|
13757
|
-
style:
|
|
13762
|
+
style: l
|
|
13758
13763
|
}
|
|
13759
13764
|
],
|
|
13760
13765
|
segmentId: null
|
|
13761
|
-
}) : (this._updateEditorModel(`${
|
|
13766
|
+
}) : (this._updateEditorModel(`${d}\r
|
|
13762
13767
|
`, u), this._textSelectionManagerService.replaceTextRanges([
|
|
13763
13768
|
{
|
|
13764
|
-
startOffset: t + 1 -
|
|
13765
|
-
endOffset: t + 1 -
|
|
13766
|
-
style:
|
|
13769
|
+
startOffset: t + 1 - E,
|
|
13770
|
+
endOffset: t + 1 - E,
|
|
13771
|
+
style: l
|
|
13767
13772
|
}
|
|
13768
13773
|
])), setTimeout(() => {
|
|
13769
13774
|
this._textSelectionRenderManager.focus(), this._setRemainCapture();
|
|
@@ -13845,20 +13850,20 @@ let pt = class extends ee {
|
|
|
13845
13850
|
_updateRefSelectionStyle(e) {
|
|
13846
13851
|
const t = this._selectionRenderService.getCurrentControls(), { unitId: n, sheetId: r } = this._getCurrentUnitIdAndSheetId();
|
|
13847
13852
|
for (let o = 0, u = e.length; o < u; o++) {
|
|
13848
|
-
const c = e[o], { refIndex: m, themeColor: s, token:
|
|
13849
|
-
if (
|
|
13853
|
+
const c = e[o], { refIndex: m, themeColor: s, token: l } = c, f = ge(l), { unitId: d, sheetName: E, range: P } = f;
|
|
13854
|
+
if (d != null && d.length > 0 && n !== d)
|
|
13850
13855
|
continue;
|
|
13851
|
-
const
|
|
13852
|
-
if (
|
|
13856
|
+
const R = this._getSheetIdByName(n, E.trim());
|
|
13857
|
+
if (R != null && R !== r)
|
|
13853
13858
|
continue;
|
|
13854
13859
|
const p = t.find((L) => {
|
|
13855
|
-
const { startRow: b, startColumn:
|
|
13856
|
-
return v === Ce.COLUMN &&
|
|
13860
|
+
const { startRow: b, startColumn: N, endRow: A, endColumn: O, rangeType: v } = L.getRange();
|
|
13861
|
+
return v === Ce.COLUMN && N === P.startColumn && O === P.endColumn || v === Ce.ROW && b === P.startRow && A === P.endRow || b === P.startRow && N === P.startColumn && A === P.endRow && O === P.endColumn || b === P.startRow && N === P.startColumn && P.startRow === P.endRow && P.startColumn === P.endColumn;
|
|
13857
13862
|
});
|
|
13858
13863
|
if (p == null)
|
|
13859
13864
|
continue;
|
|
13860
|
-
const
|
|
13861
|
-
p.updateStyle(
|
|
13865
|
+
const S = Ut(this._themeService, s, m.toString());
|
|
13866
|
+
p.updateStyle(S);
|
|
13862
13867
|
}
|
|
13863
13868
|
}
|
|
13864
13869
|
_changeControlSelection(e, t) {
|
|
@@ -13874,35 +13879,35 @@ let pt = class extends ee {
|
|
|
13874
13879
|
const s = Ga(o, c, n == null ? void 0 : n.mergeData);
|
|
13875
13880
|
if (s) {
|
|
13876
13881
|
const {
|
|
13877
|
-
isMerged:
|
|
13882
|
+
isMerged: S,
|
|
13878
13883
|
isMergedMainCell: L,
|
|
13879
13884
|
startRow: b,
|
|
13880
|
-
endRow:
|
|
13885
|
+
endRow: N,
|
|
13881
13886
|
startColumn: A,
|
|
13882
13887
|
endColumn: O
|
|
13883
13888
|
} = s;
|
|
13884
|
-
(
|
|
13889
|
+
(S || L) && b === o && A === c && N === u && O === m && (o = b, c = A, u = b, m = A);
|
|
13885
13890
|
}
|
|
13886
|
-
const
|
|
13887
|
-
let
|
|
13891
|
+
const l = Number(r), f = this._formulaPromptService.getCurrentSequenceNodeByIndex(l);
|
|
13892
|
+
let d = { startAbsoluteRefType: $.NONE };
|
|
13888
13893
|
if (typeof f != "string") {
|
|
13889
|
-
const
|
|
13890
|
-
|
|
13894
|
+
const S = f.token;
|
|
13895
|
+
d = ea(S), d.endAbsoluteRefType == null && (d.endAbsoluteRefType = d.startAbsoluteRefType);
|
|
13891
13896
|
}
|
|
13892
|
-
const
|
|
13897
|
+
const E = this._getRefString({
|
|
13893
13898
|
range: {
|
|
13894
13899
|
startRow: Math.min(o, u),
|
|
13895
13900
|
endRow: Math.max(o, u),
|
|
13896
13901
|
startColumn: Math.min(c, m),
|
|
13897
13902
|
endColumn: Math.max(c, m),
|
|
13898
|
-
...
|
|
13903
|
+
...d
|
|
13899
13904
|
},
|
|
13900
13905
|
primary: s,
|
|
13901
13906
|
style: null
|
|
13902
13907
|
});
|
|
13903
|
-
this._formulaPromptService.updateSequenceRef(
|
|
13904
|
-
const
|
|
13905
|
-
typeof
|
|
13908
|
+
this._formulaPromptService.updateSequenceRef(l, E);
|
|
13909
|
+
const P = this._formulaPromptService.getSequenceNodes(), R = P[l];
|
|
13910
|
+
typeof R != "string" && (this._syncToEditor(P, R.endIndex + 1), t.update(e, void 0, void 0, void 0, this._selectionRenderService.convertCellRangeToInfo(s)));
|
|
13906
13911
|
}
|
|
13907
13912
|
_refreshFormulaAndCellEditor(e) {
|
|
13908
13913
|
var t;
|
|
@@ -14026,8 +14031,8 @@ let pt = class extends ee {
|
|
|
14026
14031
|
if (this._arrowMoveActionState === 2 && (this._arrowMoveActionState = 3), (this._selectionManagerService.getSelectionRanges() || []).length === 0) {
|
|
14027
14032
|
const s = this._selectionManagerService.getLastByPlugin(Se);
|
|
14028
14033
|
if (s != null) {
|
|
14029
|
-
const
|
|
14030
|
-
this._selectionManagerService.add([
|
|
14034
|
+
const l = Z.deepClone(s);
|
|
14035
|
+
this._selectionManagerService.add([l]);
|
|
14031
14036
|
}
|
|
14032
14037
|
}
|
|
14033
14038
|
this._pressArrowKey(n);
|
|
@@ -14090,21 +14095,21 @@ let pt = class extends ee {
|
|
|
14090
14095
|
let c = o.token;
|
|
14091
14096
|
u.length > 1 && (c = u[u.length - 1]);
|
|
14092
14097
|
let m = "";
|
|
14093
|
-
for (let f = 0,
|
|
14098
|
+
for (let f = 0, d = u.length; f < d - 1; f++)
|
|
14094
14099
|
m += u[f];
|
|
14095
14100
|
let s = c;
|
|
14096
14101
|
if (c.indexOf(ve.COLON) > -1)
|
|
14097
14102
|
if (!this._userCursorMove)
|
|
14098
14103
|
s = this._changeRangeRef(c);
|
|
14099
14104
|
else {
|
|
14100
|
-
const f = c.split(ve.COLON),
|
|
14101
|
-
n - o.startIndex <=
|
|
14105
|
+
const f = c.split(ve.COLON), d = f[0], E = f[1];
|
|
14106
|
+
n - o.startIndex <= d.length ? s = this._changeSingleRef(d) + ve.COLON + E : s = d + ve.COLON + this._changeSingleRef(E);
|
|
14102
14107
|
}
|
|
14103
14108
|
else
|
|
14104
14109
|
s = this._changeSingleRef(c);
|
|
14105
14110
|
s = m + s;
|
|
14106
|
-
const
|
|
14107
|
-
this._formulaPromptService.updateSequenceRef(r, s), this._syncToEditor(this._formulaPromptService.getSequenceNodes(), n +
|
|
14111
|
+
const l = s.length - o.token.length;
|
|
14112
|
+
this._formulaPromptService.updateSequenceRef(r, s), this._syncToEditor(this._formulaPromptService.getSequenceNodes(), n + l + 1);
|
|
14108
14113
|
}
|
|
14109
14114
|
_changeRangeRef(e) {
|
|
14110
14115
|
const t = ge(e).range;
|
|
@@ -14189,8 +14194,8 @@ let ht = class extends ee {
|
|
|
14189
14194
|
const m = this._activeDirtyManagerService.get(c.id);
|
|
14190
14195
|
if (m == null)
|
|
14191
14196
|
continue;
|
|
14192
|
-
const s = m.getDirtyData(c), { dirtyRanges:
|
|
14193
|
-
|
|
14197
|
+
const s = m.getDirtyData(c), { dirtyRanges: l, dirtyNameMap: f, dirtyDefinedNameMap: d, dirtyUnitFeatureMap: E, dirtyUnitOtherFormulaMap: P } = s;
|
|
14198
|
+
l != null && t.push(...l), f != null && this._mergeDirtyNameMap(n, f), d != null && this._mergeDirtyNameMap(r, d), E != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(o, E), P != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(u, P);
|
|
14194
14199
|
}
|
|
14195
14200
|
return {
|
|
14196
14201
|
dirtyRanges: t,
|
|
@@ -14231,12 +14236,12 @@ let ht = class extends ee {
|
|
|
14231
14236
|
totalFormulasToCalculate: c,
|
|
14232
14237
|
completedFormulasCount: m,
|
|
14233
14238
|
totalArrayFormulasToCalculate: s,
|
|
14234
|
-
completedArrayFormulasCount:
|
|
14239
|
+
completedArrayFormulasCount: l,
|
|
14235
14240
|
stage: f
|
|
14236
14241
|
} = u.stageInfo;
|
|
14237
14242
|
f === vt.START_DEPENDENCY ? t = setTimeout(() => {
|
|
14238
14243
|
this._progressService.insertTaskCount(100), this._progressService.pushTask({ count: 5 }), t = null;
|
|
14239
|
-
}, 1e3) : f === vt.CURRENTLY_CALCULATING ? (!n && !t && (n = !0, this._progressService.insertTaskCount(c)), e(m)) : f === vt.CURRENTLY_CALCULATING_ARRAY_FORMULA && (!r && !t && (r = !0, this._progressService.insertTaskCount(s)), e(
|
|
14244
|
+
}, 1e3) : f === vt.CURRENTLY_CALCULATING ? (!n && !t && (n = !0, this._progressService.insertTaskCount(c)), e(m)) : f === vt.CURRENTLY_CALCULATING_ARRAY_FORMULA && (!r && !t && (r = !0, this._progressService.insertTaskCount(s)), e(l));
|
|
14240
14245
|
} else {
|
|
14241
14246
|
const c = u.functionsExecutedState;
|
|
14242
14247
|
let m = "";
|
|
@@ -14312,32 +14317,32 @@ function qu(a, e) {
|
|
|
14312
14317
|
if (o == null || u == null)
|
|
14313
14318
|
return !0;
|
|
14314
14319
|
Object.keys(o).forEach((c) => {
|
|
14315
|
-
const m = new W(o[c] || {}), s = new W(u[c] || {}),
|
|
14316
|
-
if (m.forValue((p,
|
|
14320
|
+
const m = new W(o[c] || {}), s = new W(u[c] || {}), l = new W(), f = new W();
|
|
14321
|
+
if (m.forValue((p, S, L) => {
|
|
14317
14322
|
if (L == null)
|
|
14318
14323
|
return !0;
|
|
14319
14324
|
const b = un(L);
|
|
14320
|
-
b !== null && (
|
|
14321
|
-
}),
|
|
14325
|
+
b !== null && (l.setValue(p, S, b), f.setValue(p, S, s.getValue(p, S)));
|
|
14326
|
+
}), l.getSizeOf() === 0)
|
|
14322
14327
|
return;
|
|
14323
|
-
const
|
|
14328
|
+
const d = {
|
|
14324
14329
|
subUnitId: c,
|
|
14325
14330
|
unitId: r,
|
|
14326
|
-
cellValue:
|
|
14327
|
-
},
|
|
14331
|
+
cellValue: l.clone()
|
|
14332
|
+
}, E = {
|
|
14328
14333
|
id: se.id,
|
|
14329
|
-
params:
|
|
14334
|
+
params: d
|
|
14330
14335
|
};
|
|
14331
|
-
n.push(
|
|
14332
|
-
const
|
|
14336
|
+
n.push(E);
|
|
14337
|
+
const P = {
|
|
14333
14338
|
subUnitId: c,
|
|
14334
14339
|
unitId: r,
|
|
14335
14340
|
cellValue: f.clone()
|
|
14336
|
-
},
|
|
14341
|
+
}, R = {
|
|
14337
14342
|
id: se.id,
|
|
14338
|
-
params:
|
|
14343
|
+
params: P
|
|
14339
14344
|
};
|
|
14340
|
-
t.push(
|
|
14345
|
+
t.push(R);
|
|
14341
14346
|
});
|
|
14342
14347
|
}), {
|
|
14343
14348
|
undos: t,
|
|
@@ -14351,22 +14356,22 @@ function wu(a, e, t) {
|
|
|
14351
14356
|
subUnitId: n,
|
|
14352
14357
|
unitId: r,
|
|
14353
14358
|
cellValue: o
|
|
14354
|
-
},
|
|
14359
|
+
}, l = {
|
|
14355
14360
|
id: se.id,
|
|
14356
14361
|
params: s
|
|
14357
14362
|
};
|
|
14358
|
-
c.push(
|
|
14363
|
+
c.push(l);
|
|
14359
14364
|
}
|
|
14360
14365
|
if (Object.keys(u).length !== 0) {
|
|
14361
14366
|
const s = {
|
|
14362
14367
|
subUnitId: n,
|
|
14363
14368
|
unitId: r,
|
|
14364
14369
|
cellValue: u
|
|
14365
|
-
},
|
|
14370
|
+
}, l = {
|
|
14366
14371
|
id: se.id,
|
|
14367
14372
|
params: s
|
|
14368
14373
|
};
|
|
14369
|
-
m.push(
|
|
14374
|
+
m.push(l);
|
|
14370
14375
|
}
|
|
14371
14376
|
return {
|
|
14372
14377
|
undos: m,
|
|
@@ -14375,73 +14380,73 @@ function wu(a, e, t) {
|
|
|
14375
14380
|
}
|
|
14376
14381
|
function Vu(a, e, t) {
|
|
14377
14382
|
let n = {}, r = {};
|
|
14378
|
-
const { type: o, unitId: u, sheetId: c, range: m, from: s, to:
|
|
14383
|
+
const { type: o, unitId: u, sheetId: c, range: m, from: s, to: l } = t;
|
|
14379
14384
|
if (Uu(a, u, c))
|
|
14380
14385
|
return {
|
|
14381
14386
|
redoFormulaData: n,
|
|
14382
14387
|
undoFormulaData: r
|
|
14383
14388
|
};
|
|
14384
|
-
const f = a[u][c],
|
|
14389
|
+
const f = a[u][c], d = e[u][c], E = new W(f || {}), P = new W(d || {}), R = [];
|
|
14385
14390
|
let p = !1;
|
|
14386
|
-
return
|
|
14391
|
+
return E.forValue((S, L, b) => {
|
|
14387
14392
|
if (b == null)
|
|
14388
14393
|
return !0;
|
|
14389
14394
|
if (!tc(b))
|
|
14390
14395
|
return;
|
|
14391
|
-
const
|
|
14396
|
+
const N = yr(S, L);
|
|
14392
14397
|
let A = null;
|
|
14393
14398
|
switch (o) {
|
|
14394
14399
|
case 0:
|
|
14395
|
-
if (s == null ||
|
|
14400
|
+
if (s == null || l == null)
|
|
14396
14401
|
return;
|
|
14397
|
-
A = Hu(s,
|
|
14402
|
+
A = Hu(s, l, N);
|
|
14398
14403
|
break;
|
|
14399
14404
|
case 1:
|
|
14400
|
-
if (s == null ||
|
|
14405
|
+
if (s == null || l == null)
|
|
14401
14406
|
return;
|
|
14402
|
-
A = zu(s,
|
|
14407
|
+
A = zu(s, l, N);
|
|
14403
14408
|
break;
|
|
14404
14409
|
case 2:
|
|
14405
|
-
if (s == null ||
|
|
14410
|
+
if (s == null || l == null)
|
|
14406
14411
|
return;
|
|
14407
|
-
A = Gu(s,
|
|
14412
|
+
A = Gu(s, l, N);
|
|
14408
14413
|
break;
|
|
14409
14414
|
}
|
|
14410
14415
|
if (Z.isDefine(m))
|
|
14411
14416
|
switch (o) {
|
|
14412
14417
|
case 3:
|
|
14413
|
-
A = Xu(m,
|
|
14418
|
+
A = Xu(m, N), p = !0;
|
|
14414
14419
|
break;
|
|
14415
14420
|
case 4:
|
|
14416
|
-
A = Yu(m,
|
|
14421
|
+
A = Yu(m, N), p = !0;
|
|
14417
14422
|
break;
|
|
14418
14423
|
case 5:
|
|
14419
|
-
A = Wu(m,
|
|
14424
|
+
A = Wu(m, N);
|
|
14420
14425
|
break;
|
|
14421
14426
|
case 6:
|
|
14422
|
-
A = Ku(m,
|
|
14427
|
+
A = Ku(m, N);
|
|
14423
14428
|
break;
|
|
14424
14429
|
case 7:
|
|
14425
|
-
A = $u(m,
|
|
14430
|
+
A = $u(m, N);
|
|
14426
14431
|
break;
|
|
14427
14432
|
case 8:
|
|
14428
|
-
A = Qu(m,
|
|
14433
|
+
A = Qu(m, N);
|
|
14429
14434
|
break;
|
|
14430
14435
|
case 9:
|
|
14431
|
-
A = ju(m,
|
|
14436
|
+
A = ju(m, N), p = !0;
|
|
14432
14437
|
break;
|
|
14433
14438
|
case 10:
|
|
14434
|
-
A = Ju(m,
|
|
14439
|
+
A = Ju(m, N), p = !0;
|
|
14435
14440
|
break;
|
|
14436
14441
|
}
|
|
14437
|
-
A != null && (p ?
|
|
14438
|
-
oldCell:
|
|
14442
|
+
A != null && (p ? R.unshift({
|
|
14443
|
+
oldCell: N,
|
|
14439
14444
|
newCell: A
|
|
14440
|
-
}) :
|
|
14441
|
-
oldCell:
|
|
14445
|
+
}) : R.push({
|
|
14446
|
+
oldCell: N,
|
|
14442
14447
|
newCell: A
|
|
14443
14448
|
}));
|
|
14444
|
-
}), n = Zu(
|
|
14449
|
+
}), n = Zu(R, E, P), r = ec(R, E), {
|
|
14445
14450
|
redoFormulaData: n,
|
|
14446
14451
|
undoFormulaData: r
|
|
14447
14452
|
};
|
|
@@ -14559,14 +14564,14 @@ function Ju(a, e) {
|
|
|
14559
14564
|
function Zu(a, e, t) {
|
|
14560
14565
|
const n = new W({});
|
|
14561
14566
|
return a.forEach((r) => {
|
|
14562
|
-
const { oldCell: o, newCell: u } = r, { startRow: c, startColumn: m } = o, { startRow: s, startColumn:
|
|
14563
|
-
n.setValue(c, m, { f: null, si: null }), n.setValue(s,
|
|
14567
|
+
const { oldCell: o, newCell: u } = r, { startRow: c, startColumn: m } = o, { startRow: s, startColumn: l } = u, f = t.getValue(c, m) || e.getValue(c, m), d = un(f);
|
|
14568
|
+
n.setValue(c, m, { f: null, si: null }), n.setValue(s, l, d);
|
|
14564
14569
|
}), n.clone();
|
|
14565
14570
|
}
|
|
14566
14571
|
function ec(a, e) {
|
|
14567
14572
|
const t = new W({});
|
|
14568
14573
|
return a.forEach((n) => {
|
|
14569
|
-
const { oldCell: r, newCell: o } = n, { startRow: u, startColumn: c } = r, { startRow: m, startColumn: s } = o,
|
|
14574
|
+
const { oldCell: r, newCell: o } = n, { startRow: u, startColumn: c } = r, { startRow: m, startColumn: s } = o, l = e.getValue(u, c), f = un(l);
|
|
14570
14575
|
t.setValue(m, s, { f: null, si: null }), t.setValue(u, c, f);
|
|
14571
14576
|
}), t.clone();
|
|
14572
14577
|
}
|
|
@@ -14762,7 +14767,7 @@ let Et = class extends ee {
|
|
|
14762
14767
|
const {
|
|
14763
14768
|
fromRange: { startRow: t, endRow: n },
|
|
14764
14769
|
toRange: { startRow: r, endRow: o }
|
|
14765
|
-
} = e, u = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), c = u.getUnitId(), m = u.getActiveSheet(), s = m.getSheetId(),
|
|
14770
|
+
} = e, u = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), c = u.getUnitId(), m = u.getActiveSheet(), s = m.getSheetId(), l = {
|
|
14766
14771
|
startRow: t,
|
|
14767
14772
|
startColumn: 0,
|
|
14768
14773
|
endRow: n,
|
|
@@ -14777,7 +14782,7 @@ let Et = class extends ee {
|
|
|
14777
14782
|
};
|
|
14778
14783
|
return {
|
|
14779
14784
|
type: 1,
|
|
14780
|
-
from:
|
|
14785
|
+
from: l,
|
|
14781
14786
|
to: f,
|
|
14782
14787
|
unitId: c,
|
|
14783
14788
|
sheetId: s
|
|
@@ -14790,7 +14795,7 @@ let Et = class extends ee {
|
|
|
14790
14795
|
const {
|
|
14791
14796
|
fromRange: { startColumn: t, endColumn: n },
|
|
14792
14797
|
toRange: { startColumn: r, endColumn: o }
|
|
14793
|
-
} = e, u = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), c = u.getUnitId(), m = u.getActiveSheet(), s = m.getSheetId(),
|
|
14798
|
+
} = e, u = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), c = u.getUnitId(), m = u.getActiveSheet(), s = m.getSheetId(), l = {
|
|
14794
14799
|
startRow: 0,
|
|
14795
14800
|
startColumn: t,
|
|
14796
14801
|
endRow: m.getRowCount() - 1,
|
|
@@ -14805,7 +14810,7 @@ let Et = class extends ee {
|
|
|
14805
14810
|
};
|
|
14806
14811
|
return {
|
|
14807
14812
|
type: 2,
|
|
14808
|
-
from:
|
|
14813
|
+
from: l,
|
|
14809
14814
|
to: f,
|
|
14810
14815
|
unitId: c,
|
|
14811
14816
|
sheetId: s
|
|
@@ -14943,29 +14948,29 @@ let Et = class extends ee {
|
|
|
14943
14948
|
continue;
|
|
14944
14949
|
const s = Object.keys(m);
|
|
14945
14950
|
Z.isDefine(r[c]) || (r[c] = {}), Z.isDefine(o[c]) || (o[c] = {});
|
|
14946
|
-
for (const
|
|
14947
|
-
const f = new W(m[
|
|
14948
|
-
f.forValue((
|
|
14951
|
+
for (const l of s) {
|
|
14952
|
+
const f = new W(m[l] || {}), d = new W(), E = new W();
|
|
14953
|
+
f.forValue((P, R, p) => {
|
|
14949
14954
|
var M;
|
|
14950
14955
|
if (!p)
|
|
14951
14956
|
return !0;
|
|
14952
|
-
const { f:
|
|
14957
|
+
const { f: S, x: L, y: b, si: N } = p, A = this._lexerTreeBuilder.sequenceNodesBuilder(S);
|
|
14953
14958
|
if (A == null)
|
|
14954
14959
|
return !0;
|
|
14955
14960
|
let O = !1;
|
|
14956
14961
|
const v = [];
|
|
14957
|
-
for (let U = 0,
|
|
14962
|
+
for (let U = 0, I = A.length; U < I; U++) {
|
|
14958
14963
|
const B = A[U];
|
|
14959
14964
|
if (typeof B == "string" || B.nodeType !== ne.REFERENCE)
|
|
14960
14965
|
continue;
|
|
14961
14966
|
const { token: de } = B, ue = ge(de), { range: Re, sheetName: Je, unitId: _e } = ue;
|
|
14962
|
-
u.push({ row:
|
|
14967
|
+
u.push({ row: P, column: R, range: Re });
|
|
14963
14968
|
const Lr = _e == null || _e.length === 0 ? c : _e, Pe = (M = e == null ? void 0 : e[Lr]) == null ? void 0 : M[Je];
|
|
14964
14969
|
if (!this._checkIsSameUnitAndSheet(
|
|
14965
14970
|
t.unitId,
|
|
14966
14971
|
t.sheetId,
|
|
14967
14972
|
c,
|
|
14968
|
-
|
|
14973
|
+
l,
|
|
14969
14974
|
_e,
|
|
14970
14975
|
Pe || ""
|
|
14971
14976
|
))
|
|
@@ -15006,7 +15011,7 @@ let Et = class extends ee {
|
|
|
15006
15011
|
Ar,
|
|
15007
15012
|
t,
|
|
15008
15013
|
c,
|
|
15009
|
-
|
|
15014
|
+
l
|
|
15010
15015
|
);
|
|
15011
15016
|
Fe != null && (A[U] = {
|
|
15012
15017
|
...B,
|
|
@@ -15016,81 +15021,81 @@ let Et = class extends ee {
|
|
|
15016
15021
|
if (!O)
|
|
15017
15022
|
return !0;
|
|
15018
15023
|
const _ = this._updateRefOffset(A, v, L, b);
|
|
15019
|
-
|
|
15020
|
-
f:
|
|
15024
|
+
d.setValue(P, R, {
|
|
15025
|
+
f: S,
|
|
15021
15026
|
x: L,
|
|
15022
15027
|
y: b,
|
|
15023
|
-
si:
|
|
15024
|
-
}),
|
|
15028
|
+
si: N
|
|
15029
|
+
}), E.setValue(P, R, {
|
|
15025
15030
|
f: `=${Zt(_)}`,
|
|
15026
15031
|
x: L,
|
|
15027
15032
|
y: b,
|
|
15028
|
-
si:
|
|
15033
|
+
si: N
|
|
15029
15034
|
});
|
|
15030
|
-
}), r[c] && (r[c][
|
|
15035
|
+
}), r[c] && (r[c][l] = d.getData()), o[c] && (o[c][l] = E.getData());
|
|
15031
15036
|
}
|
|
15032
15037
|
}
|
|
15033
15038
|
return { newFormulaData: o, oldFormulaData: r, refRanges: u };
|
|
15034
15039
|
}
|
|
15035
15040
|
_getNewRangeByMoveParam(a, e, t, n) {
|
|
15036
15041
|
const { type: r, unitId: o, sheetId: u, range: c, from: m, to: s } = e, {
|
|
15037
|
-
range:
|
|
15042
|
+
range: l,
|
|
15038
15043
|
sheetId: f,
|
|
15039
|
-
unitId:
|
|
15040
|
-
sheetName:
|
|
15041
|
-
refOffsetX:
|
|
15042
|
-
refOffsetY:
|
|
15044
|
+
unitId: d,
|
|
15045
|
+
sheetName: E,
|
|
15046
|
+
refOffsetX: P,
|
|
15047
|
+
refOffsetY: R
|
|
15043
15048
|
} = a;
|
|
15044
15049
|
if (!this._checkIsSameUnitAndSheet(
|
|
15045
15050
|
o,
|
|
15046
15051
|
u,
|
|
15047
15052
|
t,
|
|
15048
15053
|
n,
|
|
15049
|
-
|
|
15054
|
+
d,
|
|
15050
15055
|
f
|
|
15051
15056
|
))
|
|
15052
15057
|
return;
|
|
15053
|
-
const p = Ne.moveOffset(
|
|
15054
|
-
let
|
|
15058
|
+
const p = Ne.moveOffset(l, P, R);
|
|
15059
|
+
let S = null;
|
|
15055
15060
|
if (r === 0) {
|
|
15056
15061
|
if (m == null || s == null)
|
|
15057
15062
|
return;
|
|
15058
15063
|
const L = this._checkMoveEdge(p, m), b = Ne.getIntersects(p, m);
|
|
15059
15064
|
if (b == null)
|
|
15060
15065
|
return;
|
|
15061
|
-
const
|
|
15066
|
+
const N = Fn(
|
|
15062
15067
|
{ id: G.MoveRangeCommandId, params: { toRange: s, fromRange: m } },
|
|
15063
15068
|
b
|
|
15064
|
-
), A = X(
|
|
15069
|
+
), A = X(N, b);
|
|
15065
15070
|
if (A == null)
|
|
15066
15071
|
return ce.REF;
|
|
15067
|
-
|
|
15072
|
+
S = this._getMoveNewRange(L, A, m, s, p, b);
|
|
15068
15073
|
} else if (r === 1) {
|
|
15069
15074
|
if (m == null || s == null)
|
|
15070
15075
|
return;
|
|
15071
15076
|
const L = this._checkMoveEdge(p, m), b = Ne.getIntersects(p, m);
|
|
15072
15077
|
if (b == null)
|
|
15073
15078
|
return;
|
|
15074
|
-
const
|
|
15079
|
+
const N = qn(
|
|
15075
15080
|
{ id: G.MoveRowsCommandId, params: { toRange: s, fromRange: m } },
|
|
15076
15081
|
b
|
|
15077
|
-
), A = X(
|
|
15082
|
+
), A = X(N, b);
|
|
15078
15083
|
if (A == null)
|
|
15079
15084
|
return ce.REF;
|
|
15080
|
-
|
|
15085
|
+
S = this._getMoveNewRange(L, A, m, s, p, b);
|
|
15081
15086
|
} else if (r === 2) {
|
|
15082
15087
|
if (m == null || s == null)
|
|
15083
15088
|
return;
|
|
15084
15089
|
const L = this._checkMoveEdge(p, m), b = Ne.getIntersects(p, m);
|
|
15085
15090
|
if (b == null)
|
|
15086
15091
|
return;
|
|
15087
|
-
const
|
|
15092
|
+
const N = wn(
|
|
15088
15093
|
{ id: G.MoveColsCommandId, params: { toRange: s, fromRange: m } },
|
|
15089
15094
|
b
|
|
15090
|
-
), A = X(
|
|
15095
|
+
), A = X(N, b);
|
|
15091
15096
|
if (A == null)
|
|
15092
15097
|
return ce.REF;
|
|
15093
|
-
|
|
15098
|
+
S = this._getMoveNewRange(L, A, m, s, p, b);
|
|
15094
15099
|
}
|
|
15095
15100
|
if (c != null) {
|
|
15096
15101
|
if (r === 3) {
|
|
@@ -15103,7 +15108,7 @@ let Et = class extends ee {
|
|
|
15103
15108
|
), b = X(L, p);
|
|
15104
15109
|
if (b == null)
|
|
15105
15110
|
return;
|
|
15106
|
-
|
|
15111
|
+
S = {
|
|
15107
15112
|
...p,
|
|
15108
15113
|
...b
|
|
15109
15114
|
};
|
|
@@ -15117,7 +15122,7 @@ let Et = class extends ee {
|
|
|
15117
15122
|
), b = X(L, p);
|
|
15118
15123
|
if (b == null)
|
|
15119
15124
|
return;
|
|
15120
|
-
|
|
15125
|
+
S = {
|
|
15121
15126
|
...p,
|
|
15122
15127
|
...b
|
|
15123
15128
|
};
|
|
@@ -15131,7 +15136,7 @@ let Et = class extends ee {
|
|
|
15131
15136
|
), b = X(L, p);
|
|
15132
15137
|
if (b == null)
|
|
15133
15138
|
return ce.REF;
|
|
15134
|
-
|
|
15139
|
+
S = {
|
|
15135
15140
|
...p,
|
|
15136
15141
|
...b
|
|
15137
15142
|
};
|
|
@@ -15145,7 +15150,7 @@ let Et = class extends ee {
|
|
|
15145
15150
|
), b = X(L, p);
|
|
15146
15151
|
if (b == null)
|
|
15147
15152
|
return ce.REF;
|
|
15148
|
-
|
|
15153
|
+
S = {
|
|
15149
15154
|
...p,
|
|
15150
15155
|
...b
|
|
15151
15156
|
};
|
|
@@ -15159,7 +15164,7 @@ let Et = class extends ee {
|
|
|
15159
15164
|
), b = X(L, p);
|
|
15160
15165
|
if (b == null)
|
|
15161
15166
|
return ce.REF;
|
|
15162
|
-
|
|
15167
|
+
S = {
|
|
15163
15168
|
...p,
|
|
15164
15169
|
...b
|
|
15165
15170
|
};
|
|
@@ -15173,7 +15178,7 @@ let Et = class extends ee {
|
|
|
15173
15178
|
), b = X(L, p);
|
|
15174
15179
|
if (b == null)
|
|
15175
15180
|
return ce.REF;
|
|
15176
|
-
|
|
15181
|
+
S = {
|
|
15177
15182
|
...p,
|
|
15178
15183
|
...b
|
|
15179
15184
|
};
|
|
@@ -15187,7 +15192,7 @@ let Et = class extends ee {
|
|
|
15187
15192
|
), b = X(L, p);
|
|
15188
15193
|
if (b == null)
|
|
15189
15194
|
return;
|
|
15190
|
-
|
|
15195
|
+
S = {
|
|
15191
15196
|
...p,
|
|
15192
15197
|
...b
|
|
15193
15198
|
};
|
|
@@ -15201,17 +15206,17 @@ let Et = class extends ee {
|
|
|
15201
15206
|
), b = X(L, p);
|
|
15202
15207
|
if (b == null)
|
|
15203
15208
|
return;
|
|
15204
|
-
|
|
15209
|
+
S = {
|
|
15205
15210
|
...p,
|
|
15206
15211
|
...b
|
|
15207
15212
|
};
|
|
15208
15213
|
}
|
|
15209
15214
|
}
|
|
15210
|
-
if (
|
|
15215
|
+
if (S != null)
|
|
15211
15216
|
return ut({
|
|
15212
|
-
range:
|
|
15213
|
-
sheetName:
|
|
15214
|
-
unitId:
|
|
15217
|
+
range: S,
|
|
15218
|
+
sheetName: E,
|
|
15219
|
+
unitId: d
|
|
15215
15220
|
});
|
|
15216
15221
|
}
|
|
15217
15222
|
_checkIsSameUnitAndSheet(a, e, t, n, r, o) {
|
|
@@ -15233,12 +15238,12 @@ let Et = class extends ee {
|
|
|
15233
15238
|
r.push(c);
|
|
15234
15239
|
continue;
|
|
15235
15240
|
}
|
|
15236
|
-
const { token: m } = c, s = ge(m), { range:
|
|
15241
|
+
const { token: m } = c, s = ge(m), { range: l, sheetName: f, unitId: d } = s, E = Ne.moveOffset(l, t, n);
|
|
15237
15242
|
r.push({
|
|
15238
15243
|
...c,
|
|
15239
15244
|
token: ut({
|
|
15240
|
-
range:
|
|
15241
|
-
unitId:
|
|
15245
|
+
range: E,
|
|
15246
|
+
unitId: d,
|
|
15242
15247
|
sheetName: f
|
|
15243
15248
|
})
|
|
15244
15249
|
});
|
|
@@ -15281,14 +15286,14 @@ let Et = class extends ee {
|
|
|
15281
15286
|
*/
|
|
15282
15287
|
_getMoveNewRange(a, e, t, n, r, o) {
|
|
15283
15288
|
const { startRow: u, endRow: c, startColumn: m, endColumn: s } = e, {
|
|
15284
|
-
startRow:
|
|
15289
|
+
startRow: l,
|
|
15285
15290
|
startColumn: f,
|
|
15286
|
-
endRow:
|
|
15287
|
-
endColumn:
|
|
15288
|
-
rangeType:
|
|
15289
|
-
} = t, { startRow:
|
|
15291
|
+
endRow: d,
|
|
15292
|
+
endColumn: E,
|
|
15293
|
+
rangeType: P = Ce.NORMAL
|
|
15294
|
+
} = t, { startRow: R, startColumn: p, endRow: S, endColumn: L } = n, {
|
|
15290
15295
|
startRow: b,
|
|
15291
|
-
endRow:
|
|
15296
|
+
endRow: N,
|
|
15292
15297
|
startColumn: A,
|
|
15293
15298
|
endColumn: O
|
|
15294
15299
|
} = o, {
|
|
@@ -15296,17 +15301,17 @@ let Et = class extends ee {
|
|
|
15296
15301
|
endRow: _,
|
|
15297
15302
|
startColumn: M,
|
|
15298
15303
|
endColumn: U
|
|
15299
|
-
} = r,
|
|
15304
|
+
} = r, I = { ...r };
|
|
15300
15305
|
if (a === 0)
|
|
15301
15306
|
if (m === M && s === U)
|
|
15302
15307
|
if (u < v)
|
|
15303
|
-
|
|
15308
|
+
I.startRow = u;
|
|
15304
15309
|
else if (c < _)
|
|
15305
|
-
|
|
15306
|
-
else if (c >= _ &&
|
|
15307
|
-
|
|
15308
|
-
else if (
|
|
15309
|
-
|
|
15310
|
+
I.startRow = u;
|
|
15311
|
+
else if (c >= _ && R <= _)
|
|
15312
|
+
I.startRow = d + 1, I.endRow = c;
|
|
15313
|
+
else if (R > _)
|
|
15314
|
+
I.endRow -= d + 1 - v;
|
|
15310
15315
|
else
|
|
15311
15316
|
return;
|
|
15312
15317
|
else
|
|
@@ -15314,13 +15319,13 @@ let Et = class extends ee {
|
|
|
15314
15319
|
else if (a === 1)
|
|
15315
15320
|
if (m === M && s === U)
|
|
15316
15321
|
if (c > _)
|
|
15317
|
-
|
|
15322
|
+
I.endRow = c;
|
|
15318
15323
|
else if (u > v)
|
|
15319
|
-
|
|
15320
|
-
else if (u <= v &&
|
|
15321
|
-
|
|
15322
|
-
else if (
|
|
15323
|
-
|
|
15324
|
+
I.endRow = c;
|
|
15325
|
+
else if (u <= v && S >= v)
|
|
15326
|
+
I.endRow = l + 1, I.startRow = u;
|
|
15327
|
+
else if (S < v)
|
|
15328
|
+
I.startRow += _ - l + 1;
|
|
15324
15329
|
else
|
|
15325
15330
|
return;
|
|
15326
15331
|
else
|
|
@@ -15328,13 +15333,13 @@ let Et = class extends ee {
|
|
|
15328
15333
|
else if (a === 2)
|
|
15329
15334
|
if (u === v && c === _)
|
|
15330
15335
|
if (m < M)
|
|
15331
|
-
|
|
15336
|
+
I.startColumn = m;
|
|
15332
15337
|
else if (s < U)
|
|
15333
|
-
|
|
15338
|
+
I.startColumn = m;
|
|
15334
15339
|
else if (s >= U && p <= U)
|
|
15335
|
-
|
|
15340
|
+
I.startColumn = E + 1, I.endColumn = s;
|
|
15336
15341
|
else if (p > U)
|
|
15337
|
-
|
|
15342
|
+
I.endColumn -= E + 1 - M;
|
|
15338
15343
|
else
|
|
15339
15344
|
return;
|
|
15340
15345
|
else
|
|
@@ -15342,20 +15347,20 @@ let Et = class extends ee {
|
|
|
15342
15347
|
else if (a === 3)
|
|
15343
15348
|
if (u === v && c === _)
|
|
15344
15349
|
if (s > U)
|
|
15345
|
-
|
|
15350
|
+
I.endColumn = s;
|
|
15346
15351
|
else if (m > M)
|
|
15347
|
-
|
|
15352
|
+
I.endColumn = s;
|
|
15348
15353
|
else if (m <= M && L >= M)
|
|
15349
|
-
|
|
15354
|
+
I.endColumn = f + 1, I.startColumn = m;
|
|
15350
15355
|
else if (L < M)
|
|
15351
|
-
|
|
15356
|
+
I.startColumn += U - f + 1;
|
|
15352
15357
|
else
|
|
15353
15358
|
return;
|
|
15354
15359
|
else
|
|
15355
15360
|
return;
|
|
15356
15361
|
else
|
|
15357
|
-
a === 4 ? (
|
|
15358
|
-
return
|
|
15362
|
+
a === 4 ? (I.startRow = u, I.startColumn = m, I.endRow = c, I.endColumn = s) : f <= M && E >= U ? R > _ ? I.endRow -= d - l + 1 : S < v && (I.startRow += d - l + 1) : l <= v && d >= _ ? p > U ? I.endColumn -= E - f + 1 : L < M && (I.startColumn += E - f + 1) : ((p <= O + 1 && L >= U || p <= M && L >= A - 1) && R <= v && S >= _ || (R <= N + 1 && S >= _ || R <= v && S >= b - 1) && p <= M && L >= U) && (I.startRow = u, I.startColumn = m, I.endRow = c, I.endColumn = s);
|
|
15363
|
+
return I;
|
|
15359
15364
|
}
|
|
15360
15365
|
_getCurrentSheetInfo() {
|
|
15361
15366
|
const a = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), e = a.getUnitId(), t = a.getActiveSheet().getSheetId();
|
|
@@ -30324,34 +30329,34 @@ let $t = class extends ee {
|
|
|
30324
30329
|
}
|
|
30325
30330
|
registerFormula(a, e) {
|
|
30326
30331
|
const t = /* @__PURE__ */ new Map(), n = this._lexerTreeBuilder.sequenceNodesBuilder(a), r = new vn(), o = (u) => {
|
|
30327
|
-
const c = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), m = c.getActiveSheet(), s = c.getUnitId(),
|
|
30328
|
-
if (typeof
|
|
30329
|
-
const
|
|
30330
|
-
if (
|
|
30331
|
-
return
|
|
30332
|
-
const
|
|
30332
|
+
const c = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), m = c.getActiveSheet(), s = c.getUnitId(), l = m.getSheetId(), f = n == null ? void 0 : n.map((E) => {
|
|
30333
|
+
if (typeof E == "object" && E.nodeType === ne.REFERENCE) {
|
|
30334
|
+
const P = t.get(E.token);
|
|
30335
|
+
if (P.unitId && P.unitId !== s && P.subUnitId && P.subUnitId !== l)
|
|
30336
|
+
return E;
|
|
30337
|
+
const R = ka(P.range, u);
|
|
30333
30338
|
let p = "";
|
|
30334
|
-
return
|
|
30335
|
-
...
|
|
30339
|
+
return P.unitId && P.sheetName ? p = ia(P.unitId, P.sheetName, P.range) : P.sheetName ? p = oa(P.sheetName, P.range) : p = R ? Ge(R) : ce.ERROR, {
|
|
30340
|
+
...E,
|
|
30336
30341
|
token: p
|
|
30337
30342
|
};
|
|
30338
30343
|
} else
|
|
30339
|
-
return
|
|
30340
|
-
}),
|
|
30341
|
-
return e(`=${
|
|
30344
|
+
return E;
|
|
30345
|
+
}), d = f && Zt(f);
|
|
30346
|
+
return e(`=${d}`);
|
|
30342
30347
|
};
|
|
30343
30348
|
return n == null || n.forEach((u) => {
|
|
30344
30349
|
if (typeof u == "object" && u.nodeType === ne.REFERENCE) {
|
|
30345
|
-
const c = ge(u.token), { range: m, unitId: s, sheetName:
|
|
30346
|
-
if (!
|
|
30350
|
+
const c = ge(u.token), { range: m, unitId: s, sheetName: l } = c, f = s ? this._univerInstanceService.getUniverSheetInstance(s) : this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), d = l ? f == null ? void 0 : f.getSheetBySheetName(l) : f == null ? void 0 : f.getActiveSheet();
|
|
30351
|
+
if (!d)
|
|
30347
30352
|
return;
|
|
30348
|
-
const
|
|
30353
|
+
const E = d.getSheetId(), P = {
|
|
30349
30354
|
unitId: s,
|
|
30350
|
-
subUnitId:
|
|
30355
|
+
subUnitId: E,
|
|
30351
30356
|
range: m,
|
|
30352
|
-
sheetName:
|
|
30357
|
+
sheetName: l
|
|
30353
30358
|
};
|
|
30354
|
-
t.set(u.token,
|
|
30359
|
+
t.set(u.token, P), r.add(this._refRangeService.registerRefRange(m, o, s, E));
|
|
30355
30360
|
}
|
|
30356
30361
|
}), r;
|
|
30357
30362
|
}
|
|
@@ -30420,15 +30425,15 @@ let Qt = class extends ee {
|
|
|
30420
30425
|
const u = n[o], c = {};
|
|
30421
30426
|
r[o] = c;
|
|
30422
30427
|
for (const m in u) {
|
|
30423
|
-
const s = this._ensureCacheMap(o, m),
|
|
30428
|
+
const s = this._ensureCacheMap(o, m), l = u[m], f = [];
|
|
30424
30429
|
c[m] = f;
|
|
30425
|
-
for (const
|
|
30426
|
-
const
|
|
30427
|
-
if (s.has(
|
|
30428
|
-
const
|
|
30429
|
-
|
|
30430
|
-
|
|
30431
|
-
}),
|
|
30430
|
+
for (const d in l) {
|
|
30431
|
+
const E = l[d];
|
|
30432
|
+
if (s.has(d)) {
|
|
30433
|
+
const P = s.get(d);
|
|
30434
|
+
P.result = E, P.status = He.SUCCESS, P.callbacks.forEach((R) => {
|
|
30435
|
+
R(E);
|
|
30436
|
+
}), P.callbacks.clear(), f.push(P);
|
|
30432
30437
|
}
|
|
30433
30438
|
}
|
|
30434
30439
|
}
|