@univerjs/sheets-formula 0.5.2 → 0.5.3
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +61 -18
- package/lib/es/index.js +638 -606
- package/lib/types/facade/f-formula.d.ts +162 -2
- package/lib/types/facade/f-univer.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/register-function.service.d.ts +38 -2
- package/lib/types/services/remote/remote-register-function.service.d.ts +2 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -31
package/lib/es/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { SetRangeValuesCommand as
|
|
6
|
-
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as
|
|
7
|
-
import { Subject as
|
|
8
|
-
import { IRPCChannelService as qa, fromModule as
|
|
9
|
-
const
|
|
1
|
+
var Ha = Object.defineProperty;
|
|
2
|
+
var Ya = (n, e, a) => e in n ? Ha(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a;
|
|
3
|
+
var X = (n, e, a) => Ya(n, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
+
import { CommandType as ma, ICommandService as de, ObjectMatrix as w, Tools as Ne, Rectangle as De, cellToRange as fa, Direction as He, isFormulaString as be, isFormulaId as ca, getIntersectRange as Ve, RANGE_TYPE as Y, Inject as W, Disposable as te, UniverInstanceType as ee, IUniverInstanceService as xe, LifecycleService as wa, LocaleService as Ot, ILogService as Xa, IConfigService as _e, Injector as at, createIdentifier as Mt, toDisposable as se, moveRangeByOffset as Et, DisposableCollection as Ye, AbsoluteRefType as we, Optional as Wa, Dimension as Bt, InterceptorEffectEnum as Ka, CellValueType as vt, DependentOn as la, Plugin as sa, merge as pa, touchDependencies as qe, isNodeEnv as Vt } from "@univerjs/core";
|
|
5
|
+
import { SetRangeValuesCommand as Qa, SetRangeValuesMutation as ie, handleMoveRange as da, EffectRefRangId as G, runRefRangeMutations as H, handleMoveRows as La, handleMoveCols as Pa, handleInsertRow as Ta, handleInsertCol as Ea, handleIRemoveRow as Ia, handleIRemoveCol as Na, handleDeleteRangeMoveLeft as Ra, handleDeleteRangeMoveUp as Aa, handleInsertRangeMoveDown as Sa, handleInsertRangeMoveRight as Ca, RemoveDefinedNameCommand as Da, SetDefinedNameCommand as ba, RemoveSheetCommand as ka, SetWorksheetNameCommand as $a, DeleteRangeMoveLeftCommand as ja, DeleteRangeMoveUpCommand as za, RemoveColCommand as Za, RemoveRowCommand as Ja, InsertRangeMoveDownCommand as en, InsertRangeMoveRightCommand as tn, InsertColCommand as an, InsertRowCommand as nn, MoveColsCommand as rn, MoveRowsCommand as on, MoveRangeCommand as un, SheetInterceptorService as xt, SetStyleCommand as _t, SetBorderCommand as Oa, ClearSelectionFormatCommand as Ma, RemoveSheetMutation as It, InsertSheetMutation as Nt, RefRangeService as mn, handleDefaultRangeChangeWithEffectRefCommands as Gt, getSeparateEffectedRangesOnCommand as fn, handleCommonDefaultRangeChangeWithEffectRefCommands as cn, MoveRangeMutation as Ht, MoveRowsMutation as Yt, MoveColsMutation as wt, ReorderRangeMutation as Xt, RemoveRowMutation as Wt, RemoveColMutation as Kt, InsertColMutation as Qt, InsertRowMutation as kt, INTERCEPTOR_POINT as ln, SetWorksheetActiveOperation as sn, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as mt, UniverSheetsPlugin as pn } from "@univerjs/sheets";
|
|
6
|
+
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as pe, serializeRangeToRefString as nt, ErrorType as j, LexerTreeBuilder as yt, generateStringWithSequence as Xe, SetDefinedNameMutation as Me, IDefinedNamesService as qt, SetFormulaCalculationResultMutation as dn, RemoveOtherFormulaMutation as Ln, IActiveDirtyManagerService as gt, SetOtherFormulaMutation as Pn, FormulaDataModel as it, SetFormulaCalculationStartMutation as Se, SetFormulaCalculationStopMutation as $t, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as jt, SetFormulaCalculationNotificationMutation as Tn, FormulaExecuteStageType as ge, FormulaExecutedStateType as Re, SetFormulaDataMutation as he, SetArrayFormulaDataMutation as Rt, initSheetFormulaData as zt, FUNCTION_NAMES_ARRAY as Zt, FunctionType as t, FUNCTION_NAMES_COMPATIBILITY as _, FUNCTION_NAMES_CUBE as ce, FUNCTION_NAMES_DATABASE as $, FUNCTION_NAMES_DATE as B, FUNCTION_NAMES_ENGINEERING as A, FUNCTION_NAMES_FINANCIAL as C, FUNCTION_NAMES_INFORMATION as v, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as y, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as D, FUNCTION_NAMES_WEB as ft, isReferenceStrings as En, functionArray as In, functionCompatibility as Nn, functionCube as Rn, functionDatabase as An, functionDate as Sn, functionEngineering as Cn, functionFinancial as Dn, functionInformation as bn, functionLogical as On, functionLookup as Mn, functionMath as xn, functionMeta as _n, functionStatistical as yn, functionText as qn, functionUniver as gn, functionWeb as hn, IFunctionService as ht, serializeRangeWithSpreadsheet as Jt, serializeRangeWithSheet as ea, serializeRange as ta, CustomFunction as At, AsyncCustomFunction as xa, RemoveDefinedNameMutation as St, stripErrorMargin as Un, UniverFormulaEnginePlugin as _a } from "@univerjs/engine-formula";
|
|
7
|
+
import { Subject as aa, BehaviorSubject as ya, bufferWhen as Fn, filter as na, map as Bn } from "rxjs";
|
|
8
|
+
import { IRPCChannelService as qa, fromModule as vn, toModule as Vn } from "@univerjs/rpc";
|
|
9
|
+
const Gn = {
|
|
10
10
|
id: "formula.command.insert-function",
|
|
11
|
-
type:
|
|
11
|
+
type: ma.COMMAND,
|
|
12
12
|
handler: async (n, e) => {
|
|
13
|
-
const { list: a } = e, i = n.get(
|
|
13
|
+
const { list: a } = e, i = n.get(de), r = new w();
|
|
14
14
|
a.forEach((u) => {
|
|
15
|
-
const { range: m, primary: f, formula: s } = u, { row: p, column: d } = f, L =
|
|
15
|
+
const { range: m, primary: f, formula: s } = u, { row: p, column: d } = f, L = Ne.generateRandomId(6);
|
|
16
16
|
r.setValue(p, d, {
|
|
17
17
|
f: s,
|
|
18
18
|
si: L
|
|
@@ -27,20 +27,20 @@ const Vn = {
|
|
|
27
27
|
const o = {
|
|
28
28
|
value: r.getData()
|
|
29
29
|
};
|
|
30
|
-
return i.executeCommand(
|
|
30
|
+
return i.executeCommand(Qa.id, o);
|
|
31
31
|
}
|
|
32
32
|
}, Ge = {
|
|
33
|
-
type:
|
|
33
|
+
type: ma.MUTATION,
|
|
34
34
|
id: "sheet.mutation.data-validation-formula-mark-dirty",
|
|
35
35
|
handler() {
|
|
36
36
|
return !0;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Hn(n, e, a) {
|
|
40
40
|
var i;
|
|
41
41
|
return n == null || n[e] == null || ((i = n[e]) == null ? void 0 : i[a]) == null;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ct(n, e, a) {
|
|
44
44
|
var i;
|
|
45
45
|
if (a) {
|
|
46
46
|
if (n && n[e] && ((i = n[e]) != null && i[a]))
|
|
@@ -54,17 +54,17 @@ function ft(n, e, a) {
|
|
|
54
54
|
[e]: null
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
var
|
|
58
|
-
const
|
|
57
|
+
var q = /* @__PURE__ */ ((n) => (n[n.MoveRange = 0] = "MoveRange", n[n.MoveRows = 1] = "MoveRows", n[n.MoveCols = 2] = "MoveCols", n[n.InsertRow = 3] = "InsertRow", n[n.InsertColumn = 4] = "InsertColumn", n[n.RemoveRow = 5] = "RemoveRow", n[n.RemoveColumn = 6] = "RemoveColumn", n[n.DeleteMoveLeft = 7] = "DeleteMoveLeft", n[n.DeleteMoveUp = 8] = "DeleteMoveUp", n[n.InsertMoveDown = 9] = "InsertMoveDown", n[n.InsertMoveRight = 10] = "InsertMoveRight", n[n.SetName = 11] = "SetName", n[n.RemoveSheet = 12] = "RemoveSheet", n[n.SetDefinedName = 13] = "SetDefinedName", n[n.RemoveDefinedName = 14] = "RemoveDefinedName", n))(q || {});
|
|
58
|
+
const Yn = [
|
|
59
59
|
11,
|
|
60
60
|
12,
|
|
61
61
|
13,
|
|
62
62
|
14
|
|
63
63
|
/* RemoveDefinedName */
|
|
64
64
|
];
|
|
65
|
-
function
|
|
65
|
+
function wn(n, e, a) {
|
|
66
66
|
const { type: i } = a;
|
|
67
|
-
return
|
|
67
|
+
return Yn.includes(i) ? Xn(n, e) : Wn(n, e, a);
|
|
68
68
|
}
|
|
69
69
|
function Xn(n, e) {
|
|
70
70
|
const a = [], i = [];
|
|
@@ -73,11 +73,11 @@ function Xn(n, e) {
|
|
|
73
73
|
if (o == null || u == null)
|
|
74
74
|
return !0;
|
|
75
75
|
Object.keys(o).forEach((m) => {
|
|
76
|
-
const f = new
|
|
76
|
+
const f = new w(o[m] || {}), s = new w(u[m] || {}), p = new w(), d = new w();
|
|
77
77
|
if (f.forValue((c, N, R) => {
|
|
78
78
|
if (R == null)
|
|
79
79
|
return !0;
|
|
80
|
-
const P =
|
|
80
|
+
const P = rt(R);
|
|
81
81
|
P !== null && (p.setValue(c, N, P), d.setValue(c, N, s.getValue(c, N)));
|
|
82
82
|
}), p.getSizeOf() === 0)
|
|
83
83
|
return;
|
|
@@ -105,9 +105,9 @@ function Xn(n, e) {
|
|
|
105
105
|
redos: i
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const { redoFormulaData: i, undoFormulaData: r } =
|
|
110
|
-
if (
|
|
108
|
+
function Wn(n, e, a) {
|
|
109
|
+
const { redoFormulaData: i, undoFormulaData: r } = Kn(n, e, a);
|
|
110
|
+
if (Ne.diffValue(i, r))
|
|
111
111
|
return {
|
|
112
112
|
undos: [],
|
|
113
113
|
redos: []
|
|
@@ -146,20 +146,20 @@ function wn(n, e, a) {
|
|
|
146
146
|
redos: o
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Kn(n, e, a) {
|
|
150
150
|
const i = {}, r = {}, { type: o, unitId: u, sheetId: m, range: f, from: s, to: p } = a;
|
|
151
151
|
return (/* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])).forEach((L) => {
|
|
152
|
-
if (
|
|
152
|
+
if (Hn(n, L, m))
|
|
153
153
|
return;
|
|
154
154
|
(/* @__PURE__ */ new Set([
|
|
155
155
|
...Object.keys(n[L] || {}),
|
|
156
156
|
...Object.keys(e[L] || {})
|
|
157
157
|
])).forEach((I) => {
|
|
158
158
|
var F, U;
|
|
159
|
-
const S = (F = n[L]) == null ? void 0 : F[I], c = (U = e[L]) == null ? void 0 : U[I], N = new
|
|
159
|
+
const S = (F = n[L]) == null ? void 0 : F[I], c = (U = e[L]) == null ? void 0 : U[I], N = new w(S || {}), R = new w(c || {});
|
|
160
160
|
let P = [];
|
|
161
|
-
L !== u || I !== m ? P =
|
|
162
|
-
const O =
|
|
161
|
+
L !== u || I !== m ? P = kn(R) : P = Qn(N, o, s, p, f);
|
|
162
|
+
const O = mi(P, N, R), M = fi(P, N);
|
|
163
163
|
i[L] || (i[L] = {}), r[L] || (r[L] = {}), i[L][I] = {
|
|
164
164
|
...i[L][I],
|
|
165
165
|
...O
|
|
@@ -173,11 +173,11 @@ function Wn(n, e, a) {
|
|
|
173
173
|
undoFormulaData: r
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Qn(n, e, a, i, r) {
|
|
177
177
|
const o = [];
|
|
178
178
|
return n.forValue((u, m, f) => {
|
|
179
|
-
if (f == null || !
|
|
180
|
-
const s =
|
|
179
|
+
if (f == null || !ga(f)) return !0;
|
|
180
|
+
const s = fa(u, m);
|
|
181
181
|
let p = null, d = !1;
|
|
182
182
|
if ([
|
|
183
183
|
0,
|
|
@@ -185,68 +185,68 @@ function Kn(n, e, a, i, r) {
|
|
|
185
185
|
2
|
|
186
186
|
/* MoveCols */
|
|
187
187
|
].includes(e))
|
|
188
|
-
p =
|
|
188
|
+
p = $n(e, a, i, s);
|
|
189
189
|
else if (r != null) {
|
|
190
|
-
const L =
|
|
190
|
+
const L = jn(e, r, s);
|
|
191
191
|
p = L.newCell, d = L.isReverse;
|
|
192
192
|
}
|
|
193
193
|
d ? o.unshift({ oldCell: s, newCell: p }) : o.push({ oldCell: s, newCell: p });
|
|
194
194
|
}), o;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function kn(n) {
|
|
197
197
|
const e = [];
|
|
198
198
|
return n.forValue((a, i, r) => {
|
|
199
|
-
if (r == null || !
|
|
200
|
-
const o =
|
|
199
|
+
if (r == null || !ga(r)) return !0;
|
|
200
|
+
const o = fa(a, i);
|
|
201
201
|
e.push({ oldCell: o, newCell: o });
|
|
202
202
|
}), e;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function $n(n, e, a, i) {
|
|
205
205
|
if (e == null || a == null)
|
|
206
206
|
return null;
|
|
207
207
|
switch (n) {
|
|
208
208
|
case 0:
|
|
209
|
-
return jn(e, a, i);
|
|
210
|
-
case 1:
|
|
211
209
|
return zn(e, a, i);
|
|
212
|
-
case
|
|
210
|
+
case 1:
|
|
213
211
|
return Zn(e, a, i);
|
|
212
|
+
case 2:
|
|
213
|
+
return Jn(e, a, i);
|
|
214
214
|
default:
|
|
215
215
|
return null;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function jn(n, e, a) {
|
|
219
219
|
let i = null, r = !1;
|
|
220
220
|
switch (n) {
|
|
221
221
|
case 3:
|
|
222
|
-
i =
|
|
222
|
+
i = ei(e, a), r = !0;
|
|
223
223
|
break;
|
|
224
224
|
case 4:
|
|
225
|
-
i =
|
|
225
|
+
i = ti(e, a), r = !0;
|
|
226
226
|
break;
|
|
227
227
|
case 5:
|
|
228
|
-
i =
|
|
228
|
+
i = ai(e, a);
|
|
229
229
|
break;
|
|
230
230
|
case 6:
|
|
231
|
-
i =
|
|
231
|
+
i = ni(e, a);
|
|
232
232
|
break;
|
|
233
233
|
case 7:
|
|
234
|
-
i =
|
|
234
|
+
i = ii(e, a);
|
|
235
235
|
break;
|
|
236
236
|
case 8:
|
|
237
|
-
i =
|
|
237
|
+
i = ri(e, a);
|
|
238
238
|
break;
|
|
239
239
|
case 9:
|
|
240
|
-
i =
|
|
240
|
+
i = oi(e, a), r = !0;
|
|
241
241
|
break;
|
|
242
242
|
case 10:
|
|
243
|
-
i =
|
|
243
|
+
i = ui(e, a), r = !0;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
return { newCell: i, isReverse: r };
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
const i =
|
|
248
|
+
function zn(n, e, a) {
|
|
249
|
+
const i = da(
|
|
250
250
|
{
|
|
251
251
|
id: G.MoveRangeCommandId,
|
|
252
252
|
params: { toRange: e, fromRange: n }
|
|
@@ -255,8 +255,8 @@ function jn(n, e, a) {
|
|
|
255
255
|
);
|
|
256
256
|
return H(i, a);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
const i =
|
|
258
|
+
function Zn(n, e, a) {
|
|
259
|
+
const i = La(
|
|
260
260
|
{
|
|
261
261
|
id: G.MoveRowsCommandId,
|
|
262
262
|
params: { toRange: e, fromRange: n }
|
|
@@ -265,8 +265,8 @@ function zn(n, e, a) {
|
|
|
265
265
|
);
|
|
266
266
|
return H(i, a);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const i =
|
|
268
|
+
function Jn(n, e, a) {
|
|
269
|
+
const i = Pa(
|
|
270
270
|
{
|
|
271
271
|
id: G.MoveColsCommandId,
|
|
272
272
|
params: { toRange: e, fromRange: n }
|
|
@@ -275,8 +275,8 @@ function Zn(n, e, a) {
|
|
|
275
275
|
);
|
|
276
276
|
return H(i, a);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const a =
|
|
278
|
+
function ei(n, e) {
|
|
279
|
+
const a = Ta(
|
|
280
280
|
{
|
|
281
281
|
id: G.InsertRowCommandId,
|
|
282
282
|
params: { range: n, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
@@ -285,8 +285,8 @@ function Jn(n, e) {
|
|
|
285
285
|
);
|
|
286
286
|
return H(a, e);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
const a =
|
|
288
|
+
function ti(n, e) {
|
|
289
|
+
const a = Ea(
|
|
290
290
|
{
|
|
291
291
|
id: G.InsertColCommandId,
|
|
292
292
|
params: { range: n, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
@@ -295,8 +295,8 @@ function ei(n, e) {
|
|
|
295
295
|
);
|
|
296
296
|
return H(a, e);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
const a =
|
|
298
|
+
function ai(n, e) {
|
|
299
|
+
const a = Ia(
|
|
300
300
|
{
|
|
301
301
|
id: G.RemoveRowCommandId,
|
|
302
302
|
params: { range: n }
|
|
@@ -305,8 +305,8 @@ function ti(n, e) {
|
|
|
305
305
|
);
|
|
306
306
|
return H(a, e);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
const a =
|
|
308
|
+
function ni(n, e) {
|
|
309
|
+
const a = Na(
|
|
310
310
|
{
|
|
311
311
|
id: G.RemoveColCommandId,
|
|
312
312
|
params: { range: n }
|
|
@@ -315,8 +315,8 @@ function ai(n, e) {
|
|
|
315
315
|
);
|
|
316
316
|
return H(a, e);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
const a =
|
|
318
|
+
function ii(n, e) {
|
|
319
|
+
const a = Ra(
|
|
320
320
|
{
|
|
321
321
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
322
322
|
params: { range: n }
|
|
@@ -325,8 +325,8 @@ function ni(n, e) {
|
|
|
325
325
|
);
|
|
326
326
|
return H(a, e);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
const a =
|
|
328
|
+
function ri(n, e) {
|
|
329
|
+
const a = Aa(
|
|
330
330
|
{
|
|
331
331
|
id: G.DeleteRangeMoveUpCommandId,
|
|
332
332
|
params: { range: n }
|
|
@@ -335,8 +335,8 @@ function ii(n, e) {
|
|
|
335
335
|
);
|
|
336
336
|
return H(a, e);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
const a =
|
|
338
|
+
function oi(n, e) {
|
|
339
|
+
const a = Sa(
|
|
340
340
|
{
|
|
341
341
|
id: G.InsertRangeMoveDownCommandId,
|
|
342
342
|
params: { range: n }
|
|
@@ -345,8 +345,8 @@ function ri(n, e) {
|
|
|
345
345
|
);
|
|
346
346
|
return H(a, e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const a =
|
|
348
|
+
function ui(n, e) {
|
|
349
|
+
const a = Ca(
|
|
350
350
|
{
|
|
351
351
|
id: G.InsertRangeMoveRightCommandId,
|
|
352
352
|
params: { range: n }
|
|
@@ -355,20 +355,20 @@ function oi(n, e) {
|
|
|
355
355
|
);
|
|
356
356
|
return H(a, e);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
const i = new
|
|
358
|
+
function mi(n, e, a) {
|
|
359
|
+
const i = new w({});
|
|
360
360
|
return n.forEach((r) => {
|
|
361
|
-
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = a.getValue(m, f) || e.getValue(m, f), p =
|
|
361
|
+
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = a.getValue(m, f) || e.getValue(m, f), p = rt(s);
|
|
362
362
|
if (i.setValue(m, f, { f: null, si: null }), u) {
|
|
363
363
|
const { startRow: d, startColumn: L } = u;
|
|
364
364
|
i.setValue(d, L, p);
|
|
365
365
|
}
|
|
366
366
|
}), i.getMatrix();
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
const a = new
|
|
368
|
+
function fi(n, e) {
|
|
369
|
+
const a = new w({});
|
|
370
370
|
return n.reverse().forEach((i) => {
|
|
371
|
-
const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: m } = r, f = e.getValue(u, m), s =
|
|
371
|
+
const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: m } = r, f = e.getValue(u, m), s = rt(f);
|
|
372
372
|
if (o) {
|
|
373
373
|
const { startRow: p, startColumn: d } = o;
|
|
374
374
|
a.setValue(p, d, { f: null, si: null });
|
|
@@ -376,10 +376,10 @@ function mi(n, e) {
|
|
|
376
376
|
a.setValue(u, m, s);
|
|
377
377
|
}), a.getMatrix();
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function rt(n) {
|
|
380
380
|
if (n == null)
|
|
381
381
|
return;
|
|
382
|
-
const { f: e, si: a, x: i = 0, y: r = 0 } = n, o =
|
|
382
|
+
const { f: e, si: a, x: i = 0, y: r = 0 } = n, o = be(e), u = ca(a);
|
|
383
383
|
if (!o && !u)
|
|
384
384
|
return {
|
|
385
385
|
f: null,
|
|
@@ -388,18 +388,18 @@ function it(n) {
|
|
|
388
388
|
const m = {};
|
|
389
389
|
return u && (m.si = a), o && i === 0 && r === 0 && (m.f = e), m.f === void 0 && (m.f = null), m.si === void 0 && (m.si = null), m;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
const e = new
|
|
393
|
-
return new
|
|
394
|
-
const u =
|
|
391
|
+
function ci(n) {
|
|
392
|
+
const e = new w({});
|
|
393
|
+
return new w(n).forValue((i, r, o) => {
|
|
394
|
+
const u = rt(o);
|
|
395
395
|
u && e.setValue(i, r, u);
|
|
396
396
|
}), e.getMatrix();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
const e = (n == null ? void 0 : n.f) || "", a = (n == null ? void 0 : n.si) || "", i =
|
|
398
|
+
function ga(n) {
|
|
399
|
+
const e = (n == null ? void 0 : n.f) || "", a = (n == null ? void 0 : n.si) || "", i = be(e), r = ca(a);
|
|
400
400
|
return !!(i || r);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function ha(n, e, a, i, r, o) {
|
|
403
403
|
if ((r == null || r.length === 0) && (o == null || o.length === 0)) {
|
|
404
404
|
if (n === a && e === i)
|
|
405
405
|
return !0;
|
|
@@ -407,7 +407,7 @@ function ga(n, e, a, i, r, o) {
|
|
|
407
407
|
return !0;
|
|
408
408
|
return !1;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Ua(n, e, a = 0, i = 0) {
|
|
411
411
|
const r = [];
|
|
412
412
|
for (let o = 0, u = n.length; o < u; o++) {
|
|
413
413
|
const m = n[o];
|
|
@@ -415,10 +415,10 @@ function ha(n, e, a = 0, i = 0) {
|
|
|
415
415
|
r.push(m);
|
|
416
416
|
continue;
|
|
417
417
|
}
|
|
418
|
-
const { token: f } = m, s =
|
|
418
|
+
const { token: f } = m, s = pe(f), { range: p, sheetName: d, unitId: L } = s, E = De.moveOffset(p, a, i);
|
|
419
419
|
r.push({
|
|
420
420
|
...m,
|
|
421
|
-
token:
|
|
421
|
+
token: nt({
|
|
422
422
|
range: E,
|
|
423
423
|
unitId: L,
|
|
424
424
|
sheetName: d
|
|
@@ -427,7 +427,7 @@ function ha(n, e, a = 0, i = 0) {
|
|
|
427
427
|
}
|
|
428
428
|
return r;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Fa(n, e, a, i) {
|
|
431
431
|
const { type: r, unitId: o, sheetId: u, range: m, from: f, to: s } = e, {
|
|
432
432
|
range: p,
|
|
433
433
|
sheetId: d,
|
|
@@ -436,7 +436,7 @@ function Ua(n, e, a, i) {
|
|
|
436
436
|
refOffsetX: I,
|
|
437
437
|
refOffsetY: S
|
|
438
438
|
} = n;
|
|
439
|
-
if (!
|
|
439
|
+
if (!ha(
|
|
440
440
|
o,
|
|
441
441
|
u,
|
|
442
442
|
a,
|
|
@@ -445,25 +445,25 @@ function Ua(n, e, a, i) {
|
|
|
445
445
|
d
|
|
446
446
|
))
|
|
447
447
|
return;
|
|
448
|
-
const c =
|
|
448
|
+
const c = De.moveOffset(p, I, S);
|
|
449
449
|
let N = null;
|
|
450
|
-
if (r ===
|
|
450
|
+
if (r === q.MoveRange) {
|
|
451
451
|
if (f == null || s == null)
|
|
452
452
|
return;
|
|
453
|
-
const R =
|
|
453
|
+
const R = st(c, f), P = Ve(c, f);
|
|
454
454
|
if (P == null || R !== 4)
|
|
455
455
|
return;
|
|
456
|
-
const O =
|
|
456
|
+
const O = da(
|
|
457
457
|
{ id: G.MoveRangeCommandId, params: { toRange: s, fromRange: f } },
|
|
458
458
|
P
|
|
459
459
|
), M = H(O, P);
|
|
460
460
|
if (M == null)
|
|
461
461
|
return j.REF;
|
|
462
|
-
N =
|
|
463
|
-
} else if (r ===
|
|
462
|
+
N = lt(R, M, f, s, c, P);
|
|
463
|
+
} else if (r === q.MoveRows) {
|
|
464
464
|
if (f == null || s == null)
|
|
465
465
|
return;
|
|
466
|
-
const R =
|
|
466
|
+
const R = st(c, f);
|
|
467
467
|
let P = Ve(c, f);
|
|
468
468
|
if (P == null && (f.endRow < c.startRow && s.endRow < c.startRow || f.startRow > c.endRow && s.startRow > c.endRow))
|
|
469
469
|
return;
|
|
@@ -474,17 +474,17 @@ function Ua(n, e, a, i) {
|
|
|
474
474
|
endColumn: c.endColumn,
|
|
475
475
|
rangeType: Y.NORMAL
|
|
476
476
|
});
|
|
477
|
-
const O =
|
|
477
|
+
const O = La(
|
|
478
478
|
{ id: G.MoveRowsCommandId, params: { toRange: s, fromRange: f } },
|
|
479
479
|
P
|
|
480
480
|
), M = H(O, P);
|
|
481
481
|
if (M == null)
|
|
482
482
|
return j.REF;
|
|
483
|
-
N =
|
|
484
|
-
} else if (r ===
|
|
483
|
+
N = lt(R, M, f, s, c, P);
|
|
484
|
+
} else if (r === q.MoveCols) {
|
|
485
485
|
if (f == null || s == null)
|
|
486
486
|
return;
|
|
487
|
-
const R =
|
|
487
|
+
const R = st(c, f);
|
|
488
488
|
let P = Ve(c, f);
|
|
489
489
|
if (P == null && (f.endColumn < c.startColumn && s.endColumn < c.startColumn || f.startColumn > c.endColumn && s.startColumn > c.endColumn))
|
|
490
490
|
return;
|
|
@@ -495,17 +495,17 @@ function Ua(n, e, a, i) {
|
|
|
495
495
|
endColumn: c.endColumn,
|
|
496
496
|
rangeType: Y.NORMAL
|
|
497
497
|
});
|
|
498
|
-
const O =
|
|
498
|
+
const O = Pa(
|
|
499
499
|
{ id: G.MoveColsCommandId, params: { toRange: s, fromRange: f } },
|
|
500
500
|
P
|
|
501
501
|
), M = H(O, P);
|
|
502
502
|
if (M == null)
|
|
503
503
|
return j.REF;
|
|
504
|
-
N =
|
|
504
|
+
N = lt(R, M, f, s, c, P);
|
|
505
505
|
}
|
|
506
506
|
if (m != null) {
|
|
507
|
-
if (r ===
|
|
508
|
-
const R =
|
|
507
|
+
if (r === q.InsertRow) {
|
|
508
|
+
const R = Ta(
|
|
509
509
|
{
|
|
510
510
|
id: G.InsertRowCommandId,
|
|
511
511
|
params: { range: m, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
@@ -518,8 +518,8 @@ function Ua(n, e, a, i) {
|
|
|
518
518
|
...c,
|
|
519
519
|
...P
|
|
520
520
|
};
|
|
521
|
-
} else if (r ===
|
|
522
|
-
const R =
|
|
521
|
+
} else if (r === q.InsertColumn) {
|
|
522
|
+
const R = Ea(
|
|
523
523
|
{
|
|
524
524
|
id: G.InsertColCommandId,
|
|
525
525
|
params: { range: m, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
@@ -532,8 +532,8 @@ function Ua(n, e, a, i) {
|
|
|
532
532
|
...c,
|
|
533
533
|
...P
|
|
534
534
|
};
|
|
535
|
-
} else if (r ===
|
|
536
|
-
const R =
|
|
535
|
+
} else if (r === q.RemoveRow) {
|
|
536
|
+
const R = Ia(
|
|
537
537
|
{
|
|
538
538
|
id: G.RemoveRowCommandId,
|
|
539
539
|
params: { range: m }
|
|
@@ -546,8 +546,8 @@ function Ua(n, e, a, i) {
|
|
|
546
546
|
...c,
|
|
547
547
|
...P
|
|
548
548
|
};
|
|
549
|
-
} else if (r ===
|
|
550
|
-
const R =
|
|
549
|
+
} else if (r === q.RemoveColumn) {
|
|
550
|
+
const R = Na(
|
|
551
551
|
{
|
|
552
552
|
id: G.RemoveColCommandId,
|
|
553
553
|
params: { range: m }
|
|
@@ -560,8 +560,8 @@ function Ua(n, e, a, i) {
|
|
|
560
560
|
...c,
|
|
561
561
|
...P
|
|
562
562
|
};
|
|
563
|
-
} else if (r ===
|
|
564
|
-
const R =
|
|
563
|
+
} else if (r === q.DeleteMoveLeft) {
|
|
564
|
+
const R = Ra(
|
|
565
565
|
{
|
|
566
566
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
567
567
|
params: { range: m }
|
|
@@ -574,8 +574,8 @@ function Ua(n, e, a, i) {
|
|
|
574
574
|
...c,
|
|
575
575
|
...P
|
|
576
576
|
};
|
|
577
|
-
} else if (r ===
|
|
578
|
-
const R =
|
|
577
|
+
} else if (r === q.DeleteMoveUp) {
|
|
578
|
+
const R = Aa(
|
|
579
579
|
{
|
|
580
580
|
id: G.DeleteRangeMoveUpCommandId,
|
|
581
581
|
params: { range: m }
|
|
@@ -588,8 +588,8 @@ function Ua(n, e, a, i) {
|
|
|
588
588
|
...c,
|
|
589
589
|
...P
|
|
590
590
|
};
|
|
591
|
-
} else if (r ===
|
|
592
|
-
const R =
|
|
591
|
+
} else if (r === q.InsertMoveDown) {
|
|
592
|
+
const R = Sa(
|
|
593
593
|
{
|
|
594
594
|
id: G.InsertRangeMoveDownCommandId,
|
|
595
595
|
params: { range: m }
|
|
@@ -602,8 +602,8 @@ function Ua(n, e, a, i) {
|
|
|
602
602
|
...c,
|
|
603
603
|
...P
|
|
604
604
|
};
|
|
605
|
-
} else if (r ===
|
|
606
|
-
const R =
|
|
605
|
+
} else if (r === q.InsertMoveRight) {
|
|
606
|
+
const R = Ca(
|
|
607
607
|
{
|
|
608
608
|
id: G.InsertRangeMoveRightCommandId,
|
|
609
609
|
params: { range: m }
|
|
@@ -619,39 +619,39 @@ function Ua(n, e, a, i) {
|
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
if (N != null)
|
|
622
|
-
return
|
|
622
|
+
return nt({
|
|
623
623
|
range: N,
|
|
624
624
|
sheetName: E,
|
|
625
625
|
unitId: L
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
const { startRow: u, endRow: m, startColumn: f, endColumn: s, rangeType: p } =
|
|
628
|
+
function lt(n, e, a, i, r, o) {
|
|
629
|
+
const { startRow: u, endRow: m, startColumn: f, endColumn: s, rangeType: p } = Ae(e), {
|
|
630
630
|
startRow: d,
|
|
631
631
|
startColumn: L,
|
|
632
632
|
endRow: E,
|
|
633
633
|
endColumn: I,
|
|
634
634
|
rangeType: S = Y.NORMAL
|
|
635
|
-
} =
|
|
635
|
+
} = Ae(a), { startRow: c, startColumn: N, endRow: R, endColumn: P } = Ae(i), {
|
|
636
636
|
startRow: O,
|
|
637
637
|
endRow: M,
|
|
638
638
|
startColumn: F,
|
|
639
639
|
endColumn: U
|
|
640
|
-
} =
|
|
640
|
+
} = Ae(o), {
|
|
641
641
|
startRow: g,
|
|
642
642
|
endRow: x,
|
|
643
643
|
startColumn: h,
|
|
644
644
|
endColumn: V,
|
|
645
645
|
rangeType: k = Y.NORMAL
|
|
646
|
-
} =
|
|
647
|
-
function
|
|
646
|
+
} = Ae(r), b = { ...r };
|
|
647
|
+
function Le() {
|
|
648
648
|
return p === Y.COLUMN && k === Y.COLUMN ? !0 : f >= h && s <= V;
|
|
649
649
|
}
|
|
650
650
|
function ae() {
|
|
651
651
|
return p === Y.ROW && k === Y.ROW ? !0 : u >= g && m <= x;
|
|
652
652
|
}
|
|
653
653
|
if (n === 0)
|
|
654
|
-
if (
|
|
654
|
+
if (Le())
|
|
655
655
|
if (u < g)
|
|
656
656
|
b.startRow = u;
|
|
657
657
|
else if (u >= x)
|
|
@@ -661,7 +661,7 @@ function ct(n, e, a, i, r, o) {
|
|
|
661
661
|
else
|
|
662
662
|
return;
|
|
663
663
|
else if (n === 1)
|
|
664
|
-
if (
|
|
664
|
+
if (Le())
|
|
665
665
|
if (m > x)
|
|
666
666
|
b.endRow = m;
|
|
667
667
|
else if (m <= g)
|
|
@@ -693,8 +693,8 @@ function ct(n, e, a, i, r, o) {
|
|
|
693
693
|
else n === 4 ? (b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s) : L <= h && I >= V || S === Y.ROW && k === Y.ROW ? a.endRow < g ? (c >= g && (b.startRow -= E - d + 1), c >= x && (b.endRow -= E - d + 1)) : a.startRow > x ? (R <= x && (b.endRow += E - d + 1), R <= g && (b.startRow += E - d + 1)) : a.startRow >= g && a.endRow <= x && (c <= g ? b.startRow += E - d + 1 : c >= x && (b.endRow -= E - d + 1)) : d <= g && E >= x || S === Y.COLUMN && k === Y.COLUMN ? a.endColumn < h ? (N >= h && (b.startColumn -= I - L + 1), N >= V && (b.endColumn -= I - L + 1)) : a.startColumn > V ? (P <= V && (b.endColumn += I - L + 1), P <= h && (b.startColumn += I - L + 1)) : a.startColumn >= h && a.endColumn <= V && (N <= h ? b.startColumn += I - L + 1 : N >= V && (b.endColumn -= I - L + 1)) : ((N <= U + 1 && P >= V || N <= h && P >= F - 1) && c <= g && R >= x || (c <= M + 1 && R >= x || c <= g && R >= O - 1) && N <= h && P >= V, b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s);
|
|
694
694
|
return b;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
const a =
|
|
696
|
+
function st(n, e) {
|
|
697
|
+
const a = Ee(n.startRow), i = Ie(n.endRow), r = Ee(n.startColumn), o = Ie(n.endColumn), u = Ee(e.startRow), m = Ie(e.endRow), f = Ee(e.startColumn), s = Ie(e.endColumn);
|
|
698
698
|
function p() {
|
|
699
699
|
return n.rangeType === Y.COLUMN && e.rangeType === Y.COLUMN ? !0 : a >= u && i <= m;
|
|
700
700
|
}
|
|
@@ -706,71 +706,71 @@ function lt(n, e) {
|
|
|
706
706
|
}
|
|
707
707
|
return p() && d() || L() ? 4 : d() && a >= u && a <= m && i > m ? 0 : d() && i >= u && i <= m && a < u ? 1 : p() && r >= f && r <= s && o > s ? 2 : p() && o >= f && o <= s && r < f ? 3 : null;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Ee(n) {
|
|
710
710
|
return isNaN(n) ? -1 / 0 : n;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Ie(n) {
|
|
713
713
|
return isNaN(n) ? 1 / 0 : n;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function Ae(n) {
|
|
716
716
|
const { startRow: e, endRow: a, startColumn: i, endColumn: r } = n;
|
|
717
717
|
return {
|
|
718
718
|
...n,
|
|
719
|
-
startRow:
|
|
720
|
-
endRow:
|
|
721
|
-
startColumn:
|
|
722
|
-
endColumn:
|
|
719
|
+
startRow: Ee(e),
|
|
720
|
+
endRow: Ie(a),
|
|
721
|
+
startColumn: Ee(i),
|
|
722
|
+
endColumn: Ie(r)
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Ba(n, e) {
|
|
726
726
|
const { id: a } = e;
|
|
727
727
|
let i = null;
|
|
728
728
|
switch (a) {
|
|
729
|
+
case un.id:
|
|
730
|
+
i = li(e, n);
|
|
731
|
+
break;
|
|
729
732
|
case on.id:
|
|
730
|
-
i =
|
|
733
|
+
i = si(e, n);
|
|
731
734
|
break;
|
|
732
735
|
case rn.id:
|
|
733
|
-
i =
|
|
736
|
+
i = pi(e, n);
|
|
734
737
|
break;
|
|
735
738
|
case nn.id:
|
|
736
|
-
i =
|
|
739
|
+
i = di(e);
|
|
737
740
|
break;
|
|
738
741
|
case an.id:
|
|
739
|
-
i =
|
|
742
|
+
i = Li(e);
|
|
740
743
|
break;
|
|
741
744
|
case tn.id:
|
|
742
|
-
i = di(e);
|
|
743
|
-
break;
|
|
744
|
-
case en.id:
|
|
745
|
-
i = Li(e, n);
|
|
746
|
-
break;
|
|
747
|
-
case Ja.id:
|
|
748
745
|
i = Pi(e, n);
|
|
749
746
|
break;
|
|
750
|
-
case
|
|
747
|
+
case en.id:
|
|
751
748
|
i = Ti(e, n);
|
|
752
749
|
break;
|
|
753
|
-
case
|
|
750
|
+
case Ja.id:
|
|
754
751
|
i = Ei(e, n);
|
|
755
752
|
break;
|
|
756
|
-
case
|
|
753
|
+
case Za.id:
|
|
757
754
|
i = Ii(e, n);
|
|
758
755
|
break;
|
|
759
|
-
case
|
|
756
|
+
case za.id:
|
|
760
757
|
i = Ni(e, n);
|
|
761
758
|
break;
|
|
762
|
-
case
|
|
759
|
+
case ja.id:
|
|
763
760
|
i = Ri(e, n);
|
|
764
761
|
break;
|
|
765
|
-
case
|
|
762
|
+
case $a.id:
|
|
766
763
|
i = Ai(e, n);
|
|
767
764
|
break;
|
|
768
|
-
case
|
|
765
|
+
case ka.id:
|
|
769
766
|
i = Si(e, n);
|
|
770
767
|
break;
|
|
771
|
-
case
|
|
768
|
+
case ba.id:
|
|
772
769
|
i = Ci(e, n);
|
|
773
770
|
break;
|
|
771
|
+
case Da.id:
|
|
772
|
+
i = Di(e, n);
|
|
773
|
+
break;
|
|
774
774
|
}
|
|
775
775
|
return i;
|
|
776
776
|
}
|
|
@@ -782,21 +782,21 @@ function Z(n) {
|
|
|
782
782
|
sheetId: a
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function li(n, e) {
|
|
786
786
|
const { params: a } = n;
|
|
787
787
|
if (!a) return null;
|
|
788
788
|
const { fromRange: i, toRange: r } = a;
|
|
789
789
|
if (!i || !r) return null;
|
|
790
790
|
const { unitId: o, sheetId: u } = Z(e);
|
|
791
791
|
return {
|
|
792
|
-
type:
|
|
792
|
+
type: q.MoveRange,
|
|
793
793
|
from: i,
|
|
794
794
|
to: r,
|
|
795
795
|
unitId: o,
|
|
796
796
|
sheetId: u
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function si(n, e) {
|
|
800
800
|
const { params: a } = n;
|
|
801
801
|
if (!a) return null;
|
|
802
802
|
const {
|
|
@@ -818,14 +818,14 @@ function li(n, e) {
|
|
|
818
818
|
rangeType: Y.ROW
|
|
819
819
|
};
|
|
820
820
|
return {
|
|
821
|
-
type:
|
|
821
|
+
type: q.MoveRows,
|
|
822
822
|
from: p,
|
|
823
823
|
to: d,
|
|
824
824
|
unitId: m,
|
|
825
825
|
sheetId: s
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function pi(n, e) {
|
|
829
829
|
const { params: a } = n;
|
|
830
830
|
if (!a) return null;
|
|
831
831
|
const {
|
|
@@ -847,152 +847,152 @@ function si(n, e) {
|
|
|
847
847
|
rangeType: Y.COLUMN
|
|
848
848
|
};
|
|
849
849
|
return {
|
|
850
|
-
type:
|
|
850
|
+
type: q.MoveCols,
|
|
851
851
|
from: p,
|
|
852
852
|
to: d,
|
|
853
853
|
unitId: m,
|
|
854
854
|
sheetId: s
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function di(n) {
|
|
858
858
|
const { params: e } = n;
|
|
859
859
|
if (!e) return null;
|
|
860
860
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
861
861
|
return {
|
|
862
|
-
type:
|
|
862
|
+
type: q.InsertRow,
|
|
863
863
|
range: a,
|
|
864
864
|
unitId: i,
|
|
865
865
|
sheetId: r
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Li(n) {
|
|
869
869
|
const { params: e } = n;
|
|
870
870
|
if (!e) return null;
|
|
871
871
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
872
872
|
return {
|
|
873
|
-
type:
|
|
873
|
+
type: q.InsertColumn,
|
|
874
874
|
range: a,
|
|
875
875
|
unitId: i,
|
|
876
876
|
sheetId: r
|
|
877
877
|
};
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Pi(n, e) {
|
|
880
880
|
const { params: a } = n;
|
|
881
881
|
if (!a) return null;
|
|
882
882
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
883
883
|
return {
|
|
884
|
-
type:
|
|
884
|
+
type: q.InsertMoveRight,
|
|
885
885
|
range: i,
|
|
886
886
|
unitId: r,
|
|
887
887
|
sheetId: o
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Ti(n, e) {
|
|
891
891
|
const { params: a } = n;
|
|
892
892
|
if (!a) return null;
|
|
893
893
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
894
894
|
return {
|
|
895
|
-
type:
|
|
895
|
+
type: q.InsertMoveDown,
|
|
896
896
|
range: i,
|
|
897
897
|
unitId: r,
|
|
898
898
|
sheetId: o
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ei(n, e) {
|
|
902
902
|
const { params: a } = n;
|
|
903
903
|
if (!a) return null;
|
|
904
904
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
905
905
|
return {
|
|
906
|
-
type:
|
|
906
|
+
type: q.RemoveRow,
|
|
907
907
|
range: i,
|
|
908
908
|
unitId: r,
|
|
909
909
|
sheetId: o
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Ii(n, e) {
|
|
913
913
|
const { params: a } = n;
|
|
914
914
|
if (!a) return null;
|
|
915
915
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
916
916
|
return {
|
|
917
|
-
type:
|
|
917
|
+
type: q.RemoveColumn,
|
|
918
918
|
range: i,
|
|
919
919
|
unitId: r,
|
|
920
920
|
sheetId: o
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Ni(n, e) {
|
|
924
924
|
const { params: a } = n;
|
|
925
925
|
if (!a) return null;
|
|
926
926
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
927
927
|
return {
|
|
928
|
-
type:
|
|
928
|
+
type: q.DeleteMoveUp,
|
|
929
929
|
range: i,
|
|
930
930
|
unitId: r,
|
|
931
931
|
sheetId: o
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Ri(n, e) {
|
|
935
935
|
const { params: a } = n;
|
|
936
936
|
if (!a) return null;
|
|
937
937
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
938
938
|
return {
|
|
939
|
-
type:
|
|
939
|
+
type: q.DeleteMoveLeft,
|
|
940
940
|
range: i,
|
|
941
941
|
unitId: r,
|
|
942
942
|
sheetId: o
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ai(n, e) {
|
|
946
946
|
const { params: a } = n;
|
|
947
947
|
if (!a) return null;
|
|
948
948
|
const { unitId: i, subUnitId: r, name: o } = a, { unitId: u, sheetId: m } = Z(e);
|
|
949
949
|
return {
|
|
950
|
-
type:
|
|
950
|
+
type: q.SetName,
|
|
951
951
|
unitId: i || u,
|
|
952
952
|
sheetId: r || m,
|
|
953
953
|
sheetName: o
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Si(n, e) {
|
|
957
957
|
const { params: a } = n;
|
|
958
958
|
if (!a) return null;
|
|
959
959
|
const { unitId: i, subUnitId: r } = a, { unitId: o, sheetId: u } = Z(e);
|
|
960
960
|
return {
|
|
961
|
-
type:
|
|
961
|
+
type: q.RemoveSheet,
|
|
962
962
|
unitId: i || o,
|
|
963
963
|
sheetId: r || u
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Ci(n, e) {
|
|
967
967
|
const { params: a } = n;
|
|
968
968
|
if (!a) return null;
|
|
969
969
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
970
970
|
return {
|
|
971
|
-
type:
|
|
971
|
+
type: q.SetDefinedName,
|
|
972
972
|
unitId: i,
|
|
973
973
|
sheetId: u,
|
|
974
974
|
definedName: r,
|
|
975
975
|
definedNameId: o
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Di(n, e) {
|
|
979
979
|
const { params: a } = n;
|
|
980
980
|
if (!a) return null;
|
|
981
981
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
982
982
|
return {
|
|
983
|
-
type:
|
|
983
|
+
type: q.RemoveDefinedName,
|
|
984
984
|
unitId: i,
|
|
985
985
|
sheetId: u,
|
|
986
986
|
definedName: r,
|
|
987
987
|
definedNameId: o
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
|
-
var
|
|
991
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
990
|
+
var bi = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, Mi = (n, e, a, i) => {
|
|
991
|
+
for (var r = i > 1 ? void 0 : i ? Oi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
992
992
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
993
|
-
return i && r &&
|
|
993
|
+
return i && r && bi(e, a, r), r;
|
|
994
994
|
}, Ue = (n, e) => (a, i) => e(a, i, n);
|
|
995
|
-
let
|
|
995
|
+
let We = class extends te {
|
|
996
996
|
constructor(n, e, a, i) {
|
|
997
997
|
super(), this._definedNamesService = n, this._univerInstanceService = e, this._sheetInterceptorService = a, this._lexerTreeBuilder = i, this._initialize();
|
|
998
998
|
}
|
|
@@ -1003,7 +1003,7 @@ let we = class extends te {
|
|
|
1003
1003
|
this.disposeWithMe(
|
|
1004
1004
|
this._sheetInterceptorService.interceptCommand({
|
|
1005
1005
|
getMutations: (n) => {
|
|
1006
|
-
if (n.id ===
|
|
1006
|
+
if (n.id === ba.id || n.id === Da.id)
|
|
1007
1007
|
return {
|
|
1008
1008
|
redos: [],
|
|
1009
1009
|
undos: []
|
|
@@ -1014,7 +1014,7 @@ let we = class extends te {
|
|
|
1014
1014
|
redos: [],
|
|
1015
1015
|
undos: []
|
|
1016
1016
|
};
|
|
1017
|
-
const a =
|
|
1017
|
+
const a = Ba(e, n);
|
|
1018
1018
|
return a ? this._getUpdateDefinedNameMutations(e, a) : {
|
|
1019
1019
|
redos: [],
|
|
1020
1020
|
undos: []
|
|
@@ -1043,7 +1043,7 @@ let we = class extends te {
|
|
|
1043
1043
|
const P = p[N];
|
|
1044
1044
|
if (typeof P == "string" || P.nodeType !== J.REFERENCE)
|
|
1045
1045
|
continue;
|
|
1046
|
-
const { token: O } = P, M =
|
|
1046
|
+
const { token: O } = P, M = pe(O), { range: F, sheetName: U, unitId: g } = M, x = ((c = n.getSheetBySheetName(U)) == null ? void 0 : c.getSheetId()) || "", h = {
|
|
1047
1047
|
range: F,
|
|
1048
1048
|
sheetId: x,
|
|
1049
1049
|
unitId: g,
|
|
@@ -1052,22 +1052,22 @@ let we = class extends te {
|
|
|
1052
1052
|
refOffsetY: 0
|
|
1053
1053
|
};
|
|
1054
1054
|
let V = null;
|
|
1055
|
-
if (a ===
|
|
1055
|
+
if (a === q.RemoveSheet)
|
|
1056
1056
|
V = this._removeSheet(f, i, r);
|
|
1057
|
-
else if (a ===
|
|
1057
|
+
else if (a === q.SetName) {
|
|
1058
1058
|
const {
|
|
1059
1059
|
sheetId: k,
|
|
1060
1060
|
sheetName: b
|
|
1061
1061
|
} = e;
|
|
1062
1062
|
if (b == null || x == null || x.length === 0 || k !== x)
|
|
1063
1063
|
continue;
|
|
1064
|
-
V =
|
|
1064
|
+
V = nt({
|
|
1065
1065
|
range: F,
|
|
1066
1066
|
sheetName: b,
|
|
1067
1067
|
unitId: g
|
|
1068
1068
|
});
|
|
1069
1069
|
} else
|
|
1070
|
-
V =
|
|
1070
|
+
V = Fa(
|
|
1071
1071
|
h,
|
|
1072
1072
|
e,
|
|
1073
1073
|
i,
|
|
@@ -1080,7 +1080,7 @@ let we = class extends te {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
if (!d)
|
|
1082
1082
|
return !0;
|
|
1083
|
-
const E = Xe(
|
|
1083
|
+
const E = Xe(Ua(p, L)), I = {
|
|
1084
1084
|
id: Me.id,
|
|
1085
1085
|
params: {
|
|
1086
1086
|
unitId: i,
|
|
@@ -1108,27 +1108,27 @@ let we = class extends te {
|
|
|
1108
1108
|
return ((o = this._definedNamesService.getWorksheetByRef(e, i)) == null ? void 0 : o.getSheetId()) === a ? j.REF : null;
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
|
-
|
|
1111
|
+
We = Mi([
|
|
1112
1112
|
Ue(0, qt),
|
|
1113
1113
|
Ue(1, xe),
|
|
1114
|
-
Ue(2, W(
|
|
1115
|
-
Ue(3, W(
|
|
1116
|
-
],
|
|
1117
|
-
var
|
|
1118
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1114
|
+
Ue(2, W(xt)),
|
|
1115
|
+
Ue(3, W(yt))
|
|
1116
|
+
], We);
|
|
1117
|
+
var Ce = /* @__PURE__ */ ((n) => (n[n.NOT_REGISTER = 1] = "NOT_REGISTER", n[n.SUCCESS = 2] = "SUCCESS", n[n.WAIT = 3] = "WAIT", n[n.ERROR = 4] = "ERROR", n))(Ce || {}), xi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, yi = (n, e, a, i) => {
|
|
1118
|
+
for (var r = i > 1 ? void 0 : i ? _i(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1119
1119
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1120
|
-
return i && r &&
|
|
1121
|
-
},
|
|
1122
|
-
let
|
|
1120
|
+
return i && r && xi(e, a, r), r;
|
|
1121
|
+
}, pt = (n, e) => (a, i) => e(a, i, n);
|
|
1122
|
+
let Ke = class extends te {
|
|
1123
1123
|
constructor(e, a, i) {
|
|
1124
1124
|
super();
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1125
|
+
X(this, "_formulaCacheMap", /* @__PURE__ */ new Map());
|
|
1126
|
+
X(this, "_formulaChangeWithRange$", new aa());
|
|
1127
|
+
X(this, "formulaChangeWithRange$", this._formulaChangeWithRange$.asObservable());
|
|
1128
1128
|
// FIXME: this design could be improved.
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1129
|
+
X(this, "_formulaResult$", new aa());
|
|
1130
|
+
X(this, "formulaResult$", this._formulaResult$.asObservable());
|
|
1131
|
+
X(this, "calculateStarted$", new ya(!1));
|
|
1132
1132
|
this._commandService = e, this._activeDirtyManagerService = a, this._lifecycleService = i, this._initFormulaRegister(), this._initFormulaCalculationResultChange();
|
|
1133
1133
|
}
|
|
1134
1134
|
dispose() {
|
|
@@ -1141,7 +1141,7 @@ let We = class extends te {
|
|
|
1141
1141
|
return r || (r = /* @__PURE__ */ new Map(), i.set(a, r)), r;
|
|
1142
1142
|
}
|
|
1143
1143
|
_createFormulaId(e, a) {
|
|
1144
|
-
return `formula.${e}_${a}_${
|
|
1144
|
+
return `formula.${e}_${a}_${Ne.generateRandomId(8)}`;
|
|
1145
1145
|
}
|
|
1146
1146
|
_initFormulaRegister() {
|
|
1147
1147
|
this._activeDirtyManagerService.register(
|
|
@@ -1169,7 +1169,7 @@ let We = class extends te {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
this._commandService.executeCommand(
|
|
1172
|
+
this._commandService.executeCommand(Pn.id, s).then(() => {
|
|
1173
1173
|
this._commandService.executeCommand(
|
|
1174
1174
|
Ge.id,
|
|
1175
1175
|
{ [i]: { [r]: { [u]: !0 } } }
|
|
@@ -1177,14 +1177,14 @@ let We = class extends te {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
};
|
|
1179
1179
|
this.disposeWithMe(
|
|
1180
|
-
this._formulaChangeWithRange$.pipe(
|
|
1180
|
+
this._formulaChangeWithRange$.pipe(Fn(() => this.calculateStarted$.pipe(na((a) => a)))).subscribe((a) => a.forEach(e))
|
|
1181
1181
|
), this.disposeWithMe(
|
|
1182
|
-
this._formulaChangeWithRange$.pipe(
|
|
1182
|
+
this._formulaChangeWithRange$.pipe(na(() => this.calculateStarted$.getValue())).subscribe(e)
|
|
1183
1183
|
);
|
|
1184
1184
|
}
|
|
1185
1185
|
_initFormulaCalculationResultChange() {
|
|
1186
1186
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
1187
|
-
if (e.id ===
|
|
1187
|
+
if (e.id === dn.id) {
|
|
1188
1188
|
const a = e.params, { unitOtherData: i } = a, r = {};
|
|
1189
1189
|
for (const o in i) {
|
|
1190
1190
|
const u = i[o], m = {};
|
|
@@ -1199,10 +1199,10 @@ let We = class extends te {
|
|
|
1199
1199
|
if (!I)
|
|
1200
1200
|
continue;
|
|
1201
1201
|
I.result || (I.result = {});
|
|
1202
|
-
const S = new
|
|
1202
|
+
const S = new w(E), c = new w(I.result);
|
|
1203
1203
|
S.forValue((N, R, P) => {
|
|
1204
1204
|
c.setValue(N, R, P);
|
|
1205
|
-
}), I.status =
|
|
1205
|
+
}), I.status = Ce.SUCCESS, I.callbacks.forEach((N) => {
|
|
1206
1206
|
N(E);
|
|
1207
1207
|
}), I.callbacks.clear(), d.push(I);
|
|
1208
1208
|
}
|
|
@@ -1217,7 +1217,7 @@ let We = class extends te {
|
|
|
1217
1217
|
const u = this._createFormulaId(e, a);
|
|
1218
1218
|
return this._ensureCacheMap(e, a).set(u, {
|
|
1219
1219
|
result: void 0,
|
|
1220
|
-
status:
|
|
1220
|
+
status: Ce.WAIT,
|
|
1221
1221
|
formulaId: u,
|
|
1222
1222
|
callbacks: /* @__PURE__ */ new Set(),
|
|
1223
1223
|
extra: o
|
|
@@ -1235,13 +1235,13 @@ let We = class extends te {
|
|
|
1235
1235
|
subUnitId: a,
|
|
1236
1236
|
formulaIdList: i
|
|
1237
1237
|
};
|
|
1238
|
-
this._commandService.executeCommand(
|
|
1238
|
+
this._commandService.executeCommand(Ln.id, r);
|
|
1239
1239
|
const o = this._ensureCacheMap(e, a);
|
|
1240
1240
|
i.forEach((u) => o.delete(u));
|
|
1241
1241
|
}
|
|
1242
1242
|
getFormulaValue(e, a, i) {
|
|
1243
1243
|
const r = this._ensureCacheMap(e, a), o = r.get(i);
|
|
1244
|
-
return o ? o.status ===
|
|
1244
|
+
return o ? o.status === Ce.SUCCESS || o.status === Ce.ERROR ? Promise.resolve(o) : new Promise((u) => {
|
|
1245
1245
|
o.callbacks.add(() => {
|
|
1246
1246
|
u(r.get(i));
|
|
1247
1247
|
});
|
|
@@ -1251,26 +1251,26 @@ let We = class extends te {
|
|
|
1251
1251
|
return this._ensureCacheMap(e, a).get(i);
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
],
|
|
1259
|
-
const
|
|
1254
|
+
Ke = yi([
|
|
1255
|
+
pt(0, de),
|
|
1256
|
+
pt(1, gt),
|
|
1257
|
+
pt(2, W(wa))
|
|
1258
|
+
], Ke);
|
|
1259
|
+
const ot = "sheets-formula.base.config";
|
|
1260
1260
|
var ne = /* @__PURE__ */ ((n) => (n[n.FORCED = 0] = "FORCED", n[n.WHEN_EMPTY = 1] = "WHEN_EMPTY", n[n.NO_CALCULATION = 2] = "NO_CALCULATION", n))(ne || {});
|
|
1261
|
-
const
|
|
1262
|
-
var
|
|
1263
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1261
|
+
const ia = {}, qi = "sheets-formula.remote.config", ra = {};
|
|
1262
|
+
var gi = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, Ui = (n, e, a, i) => {
|
|
1263
|
+
for (var r = i > 1 ? void 0 : i ? hi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1264
1264
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1265
|
-
return i && r &&
|
|
1265
|
+
return i && r && gi(e, a, r), r;
|
|
1266
1266
|
}, le = (n, e) => (a, i) => e(a, i, n);
|
|
1267
|
-
const
|
|
1268
|
-
let
|
|
1267
|
+
const oa = { done: 0, count: 0 }, dt = { onlyLocal: !0 };
|
|
1268
|
+
let Oe = class extends te {
|
|
1269
1269
|
constructor(e, a, i, r, o, u, m) {
|
|
1270
1270
|
var s;
|
|
1271
1271
|
super();
|
|
1272
|
-
|
|
1273
|
-
|
|
1272
|
+
X(this, "_waitingCommandQueue", []);
|
|
1273
|
+
X(this, "_executingDirtyData", {
|
|
1274
1274
|
forceCalculation: !1,
|
|
1275
1275
|
dirtyRanges: [],
|
|
1276
1276
|
dirtyNameMap: {},
|
|
@@ -1279,21 +1279,21 @@ let be = class extends te {
|
|
|
1279
1279
|
dirtyUnitOtherFormulaMap: {},
|
|
1280
1280
|
clearDependencyTreeCache: {}
|
|
1281
1281
|
});
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1282
|
+
X(this, "_setTimeoutKey", -1);
|
|
1283
|
+
X(this, "_startExecutionTime", 0);
|
|
1284
|
+
X(this, "_totalCalculationTaskCount", 0);
|
|
1285
|
+
X(this, "_doneCalculationTaskCount", 0);
|
|
1286
|
+
X(this, "_executionInProgressParams", null);
|
|
1287
|
+
X(this, "_restartCalculation", !1);
|
|
1288
|
+
X(this, "_calculationMode", ne.WHEN_EMPTY);
|
|
1289
1289
|
/**
|
|
1290
1290
|
* The mark of forced calculation. If a new mutation triggers dirty area calculation during the forced calculation process, forced calculation is still required.
|
|
1291
1291
|
*/
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1292
|
+
X(this, "_forceCalculating", !1);
|
|
1293
|
+
X(this, "_progress$", new ya(oa));
|
|
1294
|
+
X(this, "progress$", this._progress$.asObservable());
|
|
1295
1295
|
this._commandService = e, this._activeDirtyManagerService = a, this._logService = i, this._configService = r, this._formulaDataModel = o, this._localeService = u, this._registerOtherFormulaService = m;
|
|
1296
|
-
const f = this._configService.getConfig(
|
|
1296
|
+
const f = this._configService.getConfig(ot);
|
|
1297
1297
|
this._calculationMode = (s = f == null ? void 0 : f.initialFormulaComputing) != null ? s : ne.WHEN_EMPTY, this._commandExecutedListener(), this._initialExecuteFormulaProcessListener(), this._initialExecuteFormula();
|
|
1298
1298
|
}
|
|
1299
1299
|
_emitProgress(e) {
|
|
@@ -1321,7 +1321,7 @@ let be = class extends te {
|
|
|
1321
1321
|
this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._emitProgress();
|
|
1322
1322
|
}
|
|
1323
1323
|
dispose() {
|
|
1324
|
-
super.dispose(), this._progress$.next(
|
|
1324
|
+
super.dispose(), this._progress$.next(oa), this._progress$.complete();
|
|
1325
1325
|
}
|
|
1326
1326
|
_commandExecutedListener() {
|
|
1327
1327
|
this.disposeWithMe(
|
|
@@ -1329,12 +1329,12 @@ let be = class extends te {
|
|
|
1329
1329
|
if (this._activeDirtyManagerService.get(e.id)) {
|
|
1330
1330
|
if (e.id === ie.id) {
|
|
1331
1331
|
const i = e.params;
|
|
1332
|
-
if (a && a.onlyLocal === !0 || i.trigger ===
|
|
1332
|
+
if (a && a.onlyLocal === !0 || i.trigger === _t.id || i.trigger === Oa.id || i.trigger === Ma.id)
|
|
1333
1333
|
return;
|
|
1334
1334
|
}
|
|
1335
1335
|
this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
|
|
1336
1336
|
const i = this._generateDirty(this._waitingCommandQueue);
|
|
1337
|
-
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(
|
|
1337
|
+
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(Se.id, { ...this._executingDirtyData }, dt) : (this._restartCalculation = !0, this._commandService.executeCommand($t.id, {})), this._waitingCommandQueue = [];
|
|
1338
1338
|
}, 100);
|
|
1339
1339
|
}
|
|
1340
1340
|
})
|
|
@@ -1357,7 +1357,7 @@ let be = class extends te {
|
|
|
1357
1357
|
dirtyUnitOtherFormulaMap: u,
|
|
1358
1358
|
forceCalculation: !1,
|
|
1359
1359
|
clearDependencyTreeCache: m,
|
|
1360
|
-
maxIteration: this._configService.getConfig(
|
|
1360
|
+
maxIteration: this._configService.getConfig(jt)
|
|
1361
1361
|
// numfmtItemMap,
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
@@ -1418,11 +1418,11 @@ let be = class extends te {
|
|
|
1418
1418
|
this.disposeWithMe(
|
|
1419
1419
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
1420
1420
|
this._commandService.onCommandExecuted((i) => {
|
|
1421
|
-
if (i.id ===
|
|
1421
|
+
if (i.id === Se.id) {
|
|
1422
1422
|
const { forceCalculation: o = !1 } = i.params;
|
|
1423
1423
|
o && (this._forceCalculating = !0);
|
|
1424
|
-
} else i.id ===
|
|
1425
|
-
if (i.id !==
|
|
1424
|
+
} else i.id === $t.id && this.clearProgress();
|
|
1425
|
+
if (i.id !== Tn.id)
|
|
1426
1426
|
return;
|
|
1427
1427
|
const r = i.params;
|
|
1428
1428
|
if (r.stageInfo != null) {
|
|
@@ -1453,25 +1453,25 @@ let be = class extends te {
|
|
|
1453
1453
|
const o = r.functionsExecutedState;
|
|
1454
1454
|
let u = "";
|
|
1455
1455
|
switch (a--, o) {
|
|
1456
|
-
case
|
|
1456
|
+
case Re.NOT_EXECUTED:
|
|
1457
1457
|
u = "No tasks are being executed anymore", this._resetExecutingDirtyData();
|
|
1458
1458
|
break;
|
|
1459
|
-
case
|
|
1459
|
+
case Re.STOP_EXECUTION:
|
|
1460
1460
|
u = "The execution of the formula has been stopped", a = 0;
|
|
1461
1461
|
break;
|
|
1462
|
-
case
|
|
1462
|
+
case Re.SUCCESS:
|
|
1463
1463
|
u = "Formula calculation succeeded", (a === 0 || a === -1) && (u += `. Total time consumed: ${performance.now() - this._startExecutionTime} ms`), this._resetExecutingDirtyData();
|
|
1464
1464
|
break;
|
|
1465
|
-
case
|
|
1465
|
+
case Re.INITIAL:
|
|
1466
1466
|
u = "Waiting for calculation", this._resetExecutingDirtyData();
|
|
1467
1467
|
break;
|
|
1468
1468
|
}
|
|
1469
|
-
(a === 0 || a === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), a = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o ===
|
|
1470
|
-
|
|
1469
|
+
(a === 0 || a === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), a = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o === Re.STOP_EXECUTION && this._restartCalculation ? (this._restartCalculation = !1, this._commandService.executeCommand(
|
|
1470
|
+
Se.id,
|
|
1471
1471
|
{
|
|
1472
1472
|
...this._executingDirtyData
|
|
1473
1473
|
},
|
|
1474
|
-
|
|
1474
|
+
dt
|
|
1475
1475
|
)) : this._executionInProgressParams = null, this._logService.debug("[TriggerCalculationController]", u);
|
|
1476
1476
|
}
|
|
1477
1477
|
})
|
|
@@ -1490,7 +1490,7 @@ let be = class extends te {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
_initialExecuteFormula() {
|
|
1492
1492
|
const e = this._getDirtyDataByCalculationMode(this._calculationMode);
|
|
1493
|
-
this._commandService.executeCommand(
|
|
1493
|
+
this._commandService.executeCommand(Se.id, e, dt), this._registerOtherFormulaService.calculateStarted$.next(!0);
|
|
1494
1494
|
}
|
|
1495
1495
|
_getDirtyDataByCalculationMode(e) {
|
|
1496
1496
|
const a = e === ne.FORCED, i = e === ne.WHEN_EMPTY ? this._formulaDataModel.getFormulaDirtyRanges() : [];
|
|
@@ -1502,25 +1502,25 @@ let be = class extends te {
|
|
|
1502
1502
|
dirtyUnitFeatureMap: {},
|
|
1503
1503
|
dirtyUnitOtherFormulaMap: {},
|
|
1504
1504
|
clearDependencyTreeCache: {},
|
|
1505
|
-
maxIteration: this._configService.getConfig(
|
|
1505
|
+
maxIteration: this._configService.getConfig(jt)
|
|
1506
1506
|
};
|
|
1507
1507
|
}
|
|
1508
1508
|
};
|
|
1509
|
-
|
|
1510
|
-
le(0,
|
|
1511
|
-
le(1,
|
|
1509
|
+
Oe = Ui([
|
|
1510
|
+
le(0, de),
|
|
1511
|
+
le(1, gt),
|
|
1512
1512
|
le(2, Xa),
|
|
1513
1513
|
le(3, _e),
|
|
1514
|
-
le(4, W(
|
|
1515
|
-
le(5, W(
|
|
1516
|
-
le(6, W(
|
|
1517
|
-
],
|
|
1518
|
-
var
|
|
1519
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1514
|
+
le(4, W(it)),
|
|
1515
|
+
le(5, W(Ot)),
|
|
1516
|
+
le(6, W(Ke))
|
|
1517
|
+
], Oe);
|
|
1518
|
+
var Fi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, vi = (n, e, a, i) => {
|
|
1519
|
+
for (var r = i > 1 ? void 0 : i ? Bi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1520
1520
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1521
|
-
return i && r &&
|
|
1521
|
+
return i && r && Fi(e, a, r), r;
|
|
1522
1522
|
}, me = (n, e) => (a, i) => e(a, i, n);
|
|
1523
|
-
let
|
|
1523
|
+
let Qe = class extends te {
|
|
1524
1524
|
constructor(n, e, a, i, r, o, u, m) {
|
|
1525
1525
|
super(), this._univerInstanceService = n, this._commandService = e, this._lexerTreeBuilder = a, this._formulaDataModel = i, this._sheetInterceptorService = r, this._definedNamesService = o, this._configService = u, this._injector = m, this._commandExecutedListener();
|
|
1526
1526
|
}
|
|
@@ -1539,12 +1539,12 @@ let Ke = class extends te {
|
|
|
1539
1539
|
this._commandService.beforeCommandExecuted((n, e) => {
|
|
1540
1540
|
if (n.id === ie.id) {
|
|
1541
1541
|
const a = n.params;
|
|
1542
|
-
if (e && e.onlyLocal === !0 || a.trigger ===
|
|
1542
|
+
if (e && e.onlyLocal === !0 || a.trigger === _t.id || a.trigger === Oa.id || a.trigger === Ma.id)
|
|
1543
1543
|
return;
|
|
1544
1544
|
this._handleSetRangeValuesMutation(a);
|
|
1545
1545
|
}
|
|
1546
1546
|
})
|
|
1547
|
-
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(
|
|
1547
|
+
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(Bn((n) => n.getUnitId())).subscribe((n) => this._handleWorkbookDisposed(n)));
|
|
1548
1548
|
}
|
|
1549
1549
|
_handleSetRangeValuesMutation(n) {
|
|
1550
1550
|
const { subUnitId: e, unitId: a, cellValue: i } = n;
|
|
@@ -1560,7 +1560,7 @@ let Ke = class extends te {
|
|
|
1560
1560
|
{
|
|
1561
1561
|
unitId: a,
|
|
1562
1562
|
subUnitId: e,
|
|
1563
|
-
cellValue:
|
|
1563
|
+
cellValue: ci(r)
|
|
1564
1564
|
},
|
|
1565
1565
|
{
|
|
1566
1566
|
onlyLocal: !0,
|
|
@@ -1588,7 +1588,7 @@ let Ke = class extends te {
|
|
|
1588
1588
|
);
|
|
1589
1589
|
}
|
|
1590
1590
|
_handleWorkbookDisposed(n, e) {
|
|
1591
|
-
const a = this._formulaDataModel.getFormulaData(), i =
|
|
1591
|
+
const a = this._formulaDataModel.getFormulaData(), i = ct(a, n, e), r = this._formulaDataModel.getArrayFormulaRange(), o = ct(r, n, e), u = this._formulaDataModel.getArrayFormulaCellData(), m = ct(u, n, e);
|
|
1592
1592
|
i && this._commandService.executeCommand(
|
|
1593
1593
|
he.id,
|
|
1594
1594
|
{
|
|
@@ -1609,7 +1609,7 @@ let Ke = class extends te {
|
|
|
1609
1609
|
);
|
|
1610
1610
|
}
|
|
1611
1611
|
_handleInsertSheetMutation(n) {
|
|
1612
|
-
const { sheet: e, unitId: a } = n, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new
|
|
1612
|
+
const { sheet: e, unitId: a } = n, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new w(o), m = zt(i, a, r, u);
|
|
1613
1613
|
this._commandService.executeCommand(
|
|
1614
1614
|
he.id,
|
|
1615
1615
|
{
|
|
@@ -1625,11 +1625,11 @@ let Ke = class extends te {
|
|
|
1625
1625
|
const e = {}, a = n.getUnitId(), i = { [a]: {} };
|
|
1626
1626
|
n.getSheets().forEach((s) => {
|
|
1627
1627
|
var E;
|
|
1628
|
-
const p = s.getCellMatrix(), d = s.getSheetId(), L =
|
|
1628
|
+
const p = s.getCellMatrix(), d = s.getSheetId(), L = zt(e, a, d, p);
|
|
1629
1629
|
i[a][d] = (E = L[a]) == null ? void 0 : E[d];
|
|
1630
1630
|
}), this._commandService.executeCommand(he.id, { formulaData: i }, { onlyLocal: !0 });
|
|
1631
|
-
const o = this._configService.getConfig(
|
|
1632
|
-
this._commandService.executeCommand(
|
|
1631
|
+
const o = this._configService.getConfig(ot), u = (f = o == null ? void 0 : o.initialFormulaComputing) != null ? f : ne.WHEN_EMPTY, m = this._getDiryDataByCalculationMode(u);
|
|
1632
|
+
this._commandService.executeCommand(Se.id, m, { onlyLocal: !0 });
|
|
1633
1633
|
}
|
|
1634
1634
|
_getDiryDataByCalculationMode(n) {
|
|
1635
1635
|
const e = n === ne.FORCED, a = n === ne.WHEN_EMPTY ? this._formulaDataModel.getFormulaDirtyRanges() : [];
|
|
@@ -1650,13 +1650,13 @@ let Ke = class extends te {
|
|
|
1650
1650
|
undos: [],
|
|
1651
1651
|
redos: []
|
|
1652
1652
|
};
|
|
1653
|
-
const a =
|
|
1653
|
+
const a = Ba(e, n);
|
|
1654
1654
|
if (a) {
|
|
1655
1655
|
const { unitSheetNameMap: i } = this._formulaDataModel.getCalculateData(), r = this._formulaDataModel.getFormulaData(), { newFormulaData: o } = this._getFormulaReferenceMoveInfo(
|
|
1656
1656
|
r,
|
|
1657
1657
|
i,
|
|
1658
1658
|
a
|
|
1659
|
-
), { undos: u, redos: m } =
|
|
1659
|
+
), { undos: u, redos: m } = wn(r, o, a);
|
|
1660
1660
|
return {
|
|
1661
1661
|
undos: u,
|
|
1662
1662
|
redos: m
|
|
@@ -1669,7 +1669,7 @@ let Ke = class extends te {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
// eslint-disable-next-line max-lines-per-function
|
|
1671
1671
|
_getFormulaReferenceMoveInfo(n, e, a) {
|
|
1672
|
-
if (!
|
|
1672
|
+
if (!Ne.isDefine(n)) return { newFormulaData: {}, oldFormulaData: {} };
|
|
1673
1673
|
const i = Object.keys(n);
|
|
1674
1674
|
if (i.length === 0) return { newFormulaData: {}, oldFormulaData: {} };
|
|
1675
1675
|
const r = {}, o = {};
|
|
@@ -1678,9 +1678,9 @@ let Ke = class extends te {
|
|
|
1678
1678
|
if (m == null)
|
|
1679
1679
|
continue;
|
|
1680
1680
|
const f = Object.keys(m);
|
|
1681
|
-
|
|
1681
|
+
Ne.isDefine(r[u]) || (r[u] = {}), Ne.isDefine(o[u]) || (o[u] = {});
|
|
1682
1682
|
for (const s of f) {
|
|
1683
|
-
const p = new
|
|
1683
|
+
const p = new w(m[s] || {}), d = new w();
|
|
1684
1684
|
p.forValue((L, E, I) => {
|
|
1685
1685
|
var U;
|
|
1686
1686
|
if (!I) return !0;
|
|
@@ -1694,22 +1694,22 @@ let Ke = class extends te {
|
|
|
1694
1694
|
if (typeof h == "string")
|
|
1695
1695
|
continue;
|
|
1696
1696
|
const { token: V, nodeType: k } = h, { type: b } = a;
|
|
1697
|
-
if ((b ===
|
|
1698
|
-
const { definedNameId:
|
|
1699
|
-
if (
|
|
1697
|
+
if ((b === q.SetDefinedName || b === q.RemoveDefinedName) && (k === J.DEFINED_NAME || k === J.FUNCTION)) {
|
|
1698
|
+
const { definedNameId: Pe, definedName: Te } = a;
|
|
1699
|
+
if (Pe === void 0 || Te === void 0)
|
|
1700
1700
|
continue;
|
|
1701
|
-
const fe = this._definedNamesService.getValueById(u,
|
|
1701
|
+
const fe = this._definedNamesService.getValueById(u, Pe);
|
|
1702
1702
|
if (fe == null || fe.name !== V)
|
|
1703
1703
|
continue;
|
|
1704
1704
|
P[g] = {
|
|
1705
1705
|
...h,
|
|
1706
|
-
token: b ===
|
|
1706
|
+
token: b === q.SetDefinedName ? Te : j.REF
|
|
1707
1707
|
}, O = !0, M.push(g);
|
|
1708
1708
|
continue;
|
|
1709
1709
|
} else if (k !== J.REFERENCE)
|
|
1710
1710
|
continue;
|
|
1711
|
-
const
|
|
1712
|
-
if (!
|
|
1711
|
+
const Le = pe(V), { range: ae, sheetName: re, unitId: Q } = Le, oe = Q == null || Q.length === 0 ? u : Q, z = ((U = e == null ? void 0 : e[oe]) == null ? void 0 : U[re]) || "";
|
|
1712
|
+
if (!ha(
|
|
1713
1713
|
a.unitId,
|
|
1714
1714
|
a.sheetId,
|
|
1715
1715
|
u,
|
|
@@ -1718,7 +1718,7 @@ let Ke = class extends te {
|
|
|
1718
1718
|
z
|
|
1719
1719
|
))
|
|
1720
1720
|
continue;
|
|
1721
|
-
const
|
|
1721
|
+
const ye = {
|
|
1722
1722
|
range: ae,
|
|
1723
1723
|
sheetId: z,
|
|
1724
1724
|
unitId: Q,
|
|
@@ -1727,30 +1727,30 @@ let Ke = class extends te {
|
|
|
1727
1727
|
refOffsetY: N || 0
|
|
1728
1728
|
};
|
|
1729
1729
|
let ue = null;
|
|
1730
|
-
if (b ===
|
|
1730
|
+
if (b === q.SetName) {
|
|
1731
1731
|
const {
|
|
1732
|
-
unitId:
|
|
1733
|
-
sheetId:
|
|
1732
|
+
unitId: Pe,
|
|
1733
|
+
sheetId: Te,
|
|
1734
1734
|
sheetName: fe
|
|
1735
1735
|
} = a;
|
|
1736
|
-
if (fe == null || z == null || z.length === 0 ||
|
|
1736
|
+
if (fe == null || z == null || z.length === 0 || Te !== z)
|
|
1737
1737
|
continue;
|
|
1738
|
-
ue =
|
|
1738
|
+
ue = nt({
|
|
1739
1739
|
range: ae,
|
|
1740
1740
|
sheetName: fe,
|
|
1741
1741
|
unitId: Q
|
|
1742
1742
|
});
|
|
1743
|
-
} else if (b ===
|
|
1743
|
+
} else if (b === q.RemoveSheet) {
|
|
1744
1744
|
const {
|
|
1745
|
-
unitId:
|
|
1746
|
-
sheetId:
|
|
1745
|
+
unitId: Pe,
|
|
1746
|
+
sheetId: Te,
|
|
1747
1747
|
sheetName: fe
|
|
1748
1748
|
} = a;
|
|
1749
|
-
if (z == null || z.length === 0 ||
|
|
1749
|
+
if (z == null || z.length === 0 || Te !== z)
|
|
1750
1750
|
continue;
|
|
1751
1751
|
ue = j.REF;
|
|
1752
|
-
} else b !==
|
|
1753
|
-
|
|
1752
|
+
} else b !== q.SetDefinedName && (ue = Fa(
|
|
1753
|
+
ye,
|
|
1754
1754
|
a,
|
|
1755
1755
|
u,
|
|
1756
1756
|
s
|
|
@@ -1762,7 +1762,7 @@ let Ke = class extends te {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
if (!O)
|
|
1764
1764
|
return !0;
|
|
1765
|
-
const F =
|
|
1765
|
+
const F = Ua(P, M, c, N);
|
|
1766
1766
|
d.setValue(L, E, {
|
|
1767
1767
|
f: `=${Xe(F)}`
|
|
1768
1768
|
});
|
|
@@ -1772,19 +1772,19 @@ let Ke = class extends te {
|
|
|
1772
1772
|
return { newFormulaData: o };
|
|
1773
1773
|
}
|
|
1774
1774
|
};
|
|
1775
|
-
|
|
1775
|
+
Qe = vi([
|
|
1776
1776
|
me(0, xe),
|
|
1777
|
-
me(1,
|
|
1778
|
-
me(2, W(
|
|
1779
|
-
me(3, W(
|
|
1780
|
-
me(4, W(
|
|
1777
|
+
me(1, de),
|
|
1778
|
+
me(2, W(yt)),
|
|
1779
|
+
me(3, W(it)),
|
|
1780
|
+
me(4, W(xt)),
|
|
1781
1781
|
me(5, qt),
|
|
1782
1782
|
me(6, _e),
|
|
1783
|
-
me(7, W(
|
|
1784
|
-
],
|
|
1785
|
-
const
|
|
1783
|
+
me(7, W(at))
|
|
1784
|
+
], Qe);
|
|
1785
|
+
const Vi = [
|
|
1786
1786
|
{
|
|
1787
|
-
functionName:
|
|
1787
|
+
functionName: Zt.ARRAY_CONSTRAIN,
|
|
1788
1788
|
functionType: t.Array,
|
|
1789
1789
|
description: "formula.functionList.ARRAY_CONSTRAIN.description",
|
|
1790
1790
|
abstract: "formula.functionList.ARRAY_CONSTRAIN.abstract",
|
|
@@ -1813,7 +1813,7 @@ const vi = [
|
|
|
1813
1813
|
]
|
|
1814
1814
|
},
|
|
1815
1815
|
{
|
|
1816
|
-
functionName:
|
|
1816
|
+
functionName: Zt.FLATTEN,
|
|
1817
1817
|
functionType: t.Array,
|
|
1818
1818
|
description: "formula.functionList.FLATTEN.description",
|
|
1819
1819
|
abstract: "formula.functionList.FLATTEN.abstract",
|
|
@@ -1834,7 +1834,7 @@ const vi = [
|
|
|
1834
1834
|
}
|
|
1835
1835
|
]
|
|
1836
1836
|
}
|
|
1837
|
-
],
|
|
1837
|
+
], Gi = [
|
|
1838
1838
|
{
|
|
1839
1839
|
functionName: _.BETADIST,
|
|
1840
1840
|
functionType: t.Compatibility,
|
|
@@ -2888,7 +2888,7 @@ const vi = [
|
|
|
2888
2888
|
}
|
|
2889
2889
|
]
|
|
2890
2890
|
}
|
|
2891
|
-
],
|
|
2891
|
+
], Hi = [
|
|
2892
2892
|
{
|
|
2893
2893
|
functionName: ce.CUBEKPIMEMBER,
|
|
2894
2894
|
functionType: t.Cube,
|
|
@@ -3043,7 +3043,7 @@ const vi = [
|
|
|
3043
3043
|
}
|
|
3044
3044
|
]
|
|
3045
3045
|
}
|
|
3046
|
-
],
|
|
3046
|
+
], Yi = [
|
|
3047
3047
|
{
|
|
3048
3048
|
functionName: $.DAVERAGE,
|
|
3049
3049
|
functionType: t.Database,
|
|
@@ -3392,7 +3392,7 @@ const vi = [
|
|
|
3392
3392
|
}
|
|
3393
3393
|
]
|
|
3394
3394
|
}
|
|
3395
|
-
],
|
|
3395
|
+
], wi = [
|
|
3396
3396
|
{
|
|
3397
3397
|
functionName: B.DATE,
|
|
3398
3398
|
functionType: t.Date,
|
|
@@ -5037,7 +5037,7 @@ const vi = [
|
|
|
5037
5037
|
}
|
|
5038
5038
|
]
|
|
5039
5039
|
}
|
|
5040
|
-
],
|
|
5040
|
+
], Wi = [
|
|
5041
5041
|
{
|
|
5042
5042
|
functionName: C.ACCRINT,
|
|
5043
5043
|
functionType: t.Financial,
|
|
@@ -7298,7 +7298,7 @@ const vi = [
|
|
|
7298
7298
|
}
|
|
7299
7299
|
]
|
|
7300
7300
|
}
|
|
7301
|
-
],
|
|
7301
|
+
], Ki = [
|
|
7302
7302
|
{
|
|
7303
7303
|
functionName: v.CELL,
|
|
7304
7304
|
functionType: t.Information,
|
|
@@ -7707,7 +7707,7 @@ const vi = [
|
|
|
7707
7707
|
}
|
|
7708
7708
|
]
|
|
7709
7709
|
}
|
|
7710
|
-
],
|
|
7710
|
+
], Qi = [
|
|
7711
7711
|
{
|
|
7712
7712
|
functionName: K.AND,
|
|
7713
7713
|
functionType: t.Logical,
|
|
@@ -8181,9 +8181,9 @@ const vi = [
|
|
|
8181
8181
|
}
|
|
8182
8182
|
]
|
|
8183
8183
|
}
|
|
8184
|
-
],
|
|
8184
|
+
], ki = [
|
|
8185
8185
|
{
|
|
8186
|
-
functionName:
|
|
8186
|
+
functionName: y.ADDRESS,
|
|
8187
8187
|
functionType: t.Lookup,
|
|
8188
8188
|
description: "formula.functionList.ADDRESS.description",
|
|
8189
8189
|
abstract: "formula.functionList.ADDRESS.abstract",
|
|
@@ -8226,7 +8226,7 @@ const vi = [
|
|
|
8226
8226
|
]
|
|
8227
8227
|
},
|
|
8228
8228
|
{
|
|
8229
|
-
functionName:
|
|
8229
|
+
functionName: y.AREAS,
|
|
8230
8230
|
functionType: t.Lookup,
|
|
8231
8231
|
description: "formula.functionList.AREAS.description",
|
|
8232
8232
|
abstract: "formula.functionList.AREAS.abstract",
|
|
@@ -8241,7 +8241,7 @@ const vi = [
|
|
|
8241
8241
|
]
|
|
8242
8242
|
},
|
|
8243
8243
|
{
|
|
8244
|
-
functionName:
|
|
8244
|
+
functionName: y.CHOOSE,
|
|
8245
8245
|
functionType: t.Lookup,
|
|
8246
8246
|
description: "formula.functionList.CHOOSE.description",
|
|
8247
8247
|
abstract: "formula.functionList.CHOOSE.abstract",
|
|
@@ -8270,7 +8270,7 @@ const vi = [
|
|
|
8270
8270
|
]
|
|
8271
8271
|
},
|
|
8272
8272
|
{
|
|
8273
|
-
functionName:
|
|
8273
|
+
functionName: y.CHOOSECOLS,
|
|
8274
8274
|
functionType: t.Lookup,
|
|
8275
8275
|
description: "formula.functionList.CHOOSECOLS.description",
|
|
8276
8276
|
abstract: "formula.functionList.CHOOSECOLS.abstract",
|
|
@@ -8299,7 +8299,7 @@ const vi = [
|
|
|
8299
8299
|
]
|
|
8300
8300
|
},
|
|
8301
8301
|
{
|
|
8302
|
-
functionName:
|
|
8302
|
+
functionName: y.CHOOSEROWS,
|
|
8303
8303
|
functionType: t.Lookup,
|
|
8304
8304
|
description: "formula.functionList.CHOOSEROWS.description",
|
|
8305
8305
|
abstract: "formula.functionList.CHOOSEROWS.abstract",
|
|
@@ -8328,7 +8328,7 @@ const vi = [
|
|
|
8328
8328
|
]
|
|
8329
8329
|
},
|
|
8330
8330
|
{
|
|
8331
|
-
functionName:
|
|
8331
|
+
functionName: y.COLUMN,
|
|
8332
8332
|
functionType: t.Lookup,
|
|
8333
8333
|
description: "formula.functionList.COLUMN.description",
|
|
8334
8334
|
abstract: "formula.functionList.COLUMN.abstract",
|
|
@@ -8343,7 +8343,7 @@ const vi = [
|
|
|
8343
8343
|
]
|
|
8344
8344
|
},
|
|
8345
8345
|
{
|
|
8346
|
-
functionName:
|
|
8346
|
+
functionName: y.COLUMNS,
|
|
8347
8347
|
functionType: t.Lookup,
|
|
8348
8348
|
description: "formula.functionList.COLUMNS.description",
|
|
8349
8349
|
abstract: "formula.functionList.COLUMNS.abstract",
|
|
@@ -8358,7 +8358,7 @@ const vi = [
|
|
|
8358
8358
|
]
|
|
8359
8359
|
},
|
|
8360
8360
|
{
|
|
8361
|
-
functionName:
|
|
8361
|
+
functionName: y.DROP,
|
|
8362
8362
|
functionType: t.Lookup,
|
|
8363
8363
|
description: "formula.functionList.DROP.description",
|
|
8364
8364
|
abstract: "formula.functionList.DROP.abstract",
|
|
@@ -8387,7 +8387,7 @@ const vi = [
|
|
|
8387
8387
|
]
|
|
8388
8388
|
},
|
|
8389
8389
|
{
|
|
8390
|
-
functionName:
|
|
8390
|
+
functionName: y.EXPAND,
|
|
8391
8391
|
functionType: t.Lookup,
|
|
8392
8392
|
description: "formula.functionList.EXPAND.description",
|
|
8393
8393
|
abstract: "formula.functionList.EXPAND.abstract",
|
|
@@ -8423,7 +8423,7 @@ const vi = [
|
|
|
8423
8423
|
]
|
|
8424
8424
|
},
|
|
8425
8425
|
{
|
|
8426
|
-
functionName:
|
|
8426
|
+
functionName: y.FILTER,
|
|
8427
8427
|
functionType: t.Lookup,
|
|
8428
8428
|
description: "formula.functionList.FILTER.description",
|
|
8429
8429
|
abstract: "formula.functionList.FILTER.abstract",
|
|
@@ -8452,7 +8452,7 @@ const vi = [
|
|
|
8452
8452
|
]
|
|
8453
8453
|
},
|
|
8454
8454
|
{
|
|
8455
|
-
functionName:
|
|
8455
|
+
functionName: y.FORMULATEXT,
|
|
8456
8456
|
functionType: t.Lookup,
|
|
8457
8457
|
description: "formula.functionList.FORMULATEXT.description",
|
|
8458
8458
|
abstract: "formula.functionList.FORMULATEXT.abstract",
|
|
@@ -8467,7 +8467,7 @@ const vi = [
|
|
|
8467
8467
|
]
|
|
8468
8468
|
},
|
|
8469
8469
|
{
|
|
8470
|
-
functionName:
|
|
8470
|
+
functionName: y.GETPIVOTDATA,
|
|
8471
8471
|
functionType: t.Lookup,
|
|
8472
8472
|
description: "formula.functionList.GETPIVOTDATA.description",
|
|
8473
8473
|
abstract: "formula.functionList.GETPIVOTDATA.abstract",
|
|
@@ -8489,7 +8489,7 @@ const vi = [
|
|
|
8489
8489
|
]
|
|
8490
8490
|
},
|
|
8491
8491
|
{
|
|
8492
|
-
functionName:
|
|
8492
|
+
functionName: y.HLOOKUP,
|
|
8493
8493
|
functionType: t.Lookup,
|
|
8494
8494
|
description: "formula.functionList.HLOOKUP.description",
|
|
8495
8495
|
abstract: "formula.functionList.HLOOKUP.abstract",
|
|
@@ -8525,7 +8525,7 @@ const vi = [
|
|
|
8525
8525
|
]
|
|
8526
8526
|
},
|
|
8527
8527
|
{
|
|
8528
|
-
functionName:
|
|
8528
|
+
functionName: y.HSTACK,
|
|
8529
8529
|
functionType: t.Lookup,
|
|
8530
8530
|
description: "formula.functionList.HSTACK.description",
|
|
8531
8531
|
abstract: "formula.functionList.HSTACK.abstract",
|
|
@@ -8547,7 +8547,7 @@ const vi = [
|
|
|
8547
8547
|
]
|
|
8548
8548
|
},
|
|
8549
8549
|
{
|
|
8550
|
-
functionName:
|
|
8550
|
+
functionName: y.HYPERLINK,
|
|
8551
8551
|
functionType: t.Lookup,
|
|
8552
8552
|
description: "formula.functionList.HYPERLINK.description",
|
|
8553
8553
|
abstract: "formula.functionList.HYPERLINK.abstract",
|
|
@@ -8569,7 +8569,7 @@ const vi = [
|
|
|
8569
8569
|
]
|
|
8570
8570
|
},
|
|
8571
8571
|
{
|
|
8572
|
-
functionName:
|
|
8572
|
+
functionName: y.IMAGE,
|
|
8573
8573
|
functionType: t.Lookup,
|
|
8574
8574
|
description: "formula.functionList.IMAGE.description",
|
|
8575
8575
|
abstract: "formula.functionList.IMAGE.abstract",
|
|
@@ -8591,7 +8591,7 @@ const vi = [
|
|
|
8591
8591
|
]
|
|
8592
8592
|
},
|
|
8593
8593
|
{
|
|
8594
|
-
functionName:
|
|
8594
|
+
functionName: y.INDEX,
|
|
8595
8595
|
functionType: t.Lookup,
|
|
8596
8596
|
description: "formula.functionList.INDEX.description",
|
|
8597
8597
|
abstract: "formula.functionList.INDEX.abstract",
|
|
@@ -8627,7 +8627,7 @@ const vi = [
|
|
|
8627
8627
|
]
|
|
8628
8628
|
},
|
|
8629
8629
|
{
|
|
8630
|
-
functionName:
|
|
8630
|
+
functionName: y.INDIRECT,
|
|
8631
8631
|
functionType: t.Lookup,
|
|
8632
8632
|
description: "formula.functionList.INDIRECT.description",
|
|
8633
8633
|
abstract: "formula.functionList.INDIRECT.abstract",
|
|
@@ -8649,7 +8649,7 @@ const vi = [
|
|
|
8649
8649
|
]
|
|
8650
8650
|
},
|
|
8651
8651
|
{
|
|
8652
|
-
functionName:
|
|
8652
|
+
functionName: y.LOOKUP,
|
|
8653
8653
|
functionType: t.Lookup,
|
|
8654
8654
|
description: "formula.functionList.LOOKUP.description",
|
|
8655
8655
|
abstract: "formula.functionList.LOOKUP.abstract",
|
|
@@ -8678,7 +8678,7 @@ const vi = [
|
|
|
8678
8678
|
]
|
|
8679
8679
|
},
|
|
8680
8680
|
{
|
|
8681
|
-
functionName:
|
|
8681
|
+
functionName: y.MATCH,
|
|
8682
8682
|
functionType: t.Lookup,
|
|
8683
8683
|
description: "formula.functionList.MATCH.description",
|
|
8684
8684
|
abstract: "formula.functionList.MATCH.abstract",
|
|
@@ -8707,7 +8707,7 @@ const vi = [
|
|
|
8707
8707
|
]
|
|
8708
8708
|
},
|
|
8709
8709
|
{
|
|
8710
|
-
functionName:
|
|
8710
|
+
functionName: y.OFFSET,
|
|
8711
8711
|
functionType: t.Lookup,
|
|
8712
8712
|
description: "formula.functionList.OFFSET.description",
|
|
8713
8713
|
abstract: "formula.functionList.OFFSET.abstract",
|
|
@@ -8750,7 +8750,7 @@ const vi = [
|
|
|
8750
8750
|
]
|
|
8751
8751
|
},
|
|
8752
8752
|
{
|
|
8753
|
-
functionName:
|
|
8753
|
+
functionName: y.ROW,
|
|
8754
8754
|
functionType: t.Lookup,
|
|
8755
8755
|
description: "formula.functionList.ROW.description",
|
|
8756
8756
|
abstract: "formula.functionList.ROW.abstract",
|
|
@@ -8765,7 +8765,7 @@ const vi = [
|
|
|
8765
8765
|
]
|
|
8766
8766
|
},
|
|
8767
8767
|
{
|
|
8768
|
-
functionName:
|
|
8768
|
+
functionName: y.ROWS,
|
|
8769
8769
|
functionType: t.Lookup,
|
|
8770
8770
|
description: "formula.functionList.ROWS.description",
|
|
8771
8771
|
abstract: "formula.functionList.ROWS.abstract",
|
|
@@ -8780,7 +8780,7 @@ const vi = [
|
|
|
8780
8780
|
]
|
|
8781
8781
|
},
|
|
8782
8782
|
{
|
|
8783
|
-
functionName:
|
|
8783
|
+
functionName: y.RTD,
|
|
8784
8784
|
functionType: t.Lookup,
|
|
8785
8785
|
description: "formula.functionList.RTD.description",
|
|
8786
8786
|
abstract: "formula.functionList.RTD.abstract",
|
|
@@ -8802,7 +8802,7 @@ const vi = [
|
|
|
8802
8802
|
]
|
|
8803
8803
|
},
|
|
8804
8804
|
{
|
|
8805
|
-
functionName:
|
|
8805
|
+
functionName: y.SORT,
|
|
8806
8806
|
functionType: t.Lookup,
|
|
8807
8807
|
description: "formula.functionList.SORT.description",
|
|
8808
8808
|
abstract: "formula.functionList.SORT.abstract",
|
|
@@ -8838,7 +8838,7 @@ const vi = [
|
|
|
8838
8838
|
]
|
|
8839
8839
|
},
|
|
8840
8840
|
{
|
|
8841
|
-
functionName:
|
|
8841
|
+
functionName: y.SORTBY,
|
|
8842
8842
|
functionType: t.Lookup,
|
|
8843
8843
|
description: "formula.functionList.SORTBY.description",
|
|
8844
8844
|
abstract: "formula.functionList.SORTBY.abstract",
|
|
@@ -8881,7 +8881,7 @@ const vi = [
|
|
|
8881
8881
|
]
|
|
8882
8882
|
},
|
|
8883
8883
|
{
|
|
8884
|
-
functionName:
|
|
8884
|
+
functionName: y.TAKE,
|
|
8885
8885
|
functionType: t.Lookup,
|
|
8886
8886
|
description: "formula.functionList.TAKE.description",
|
|
8887
8887
|
abstract: "formula.functionList.TAKE.abstract",
|
|
@@ -8910,7 +8910,7 @@ const vi = [
|
|
|
8910
8910
|
]
|
|
8911
8911
|
},
|
|
8912
8912
|
{
|
|
8913
|
-
functionName:
|
|
8913
|
+
functionName: y.TOCOL,
|
|
8914
8914
|
functionType: t.Lookup,
|
|
8915
8915
|
description: "formula.functionList.TOCOL.description",
|
|
8916
8916
|
abstract: "formula.functionList.TOCOL.abstract",
|
|
@@ -8939,7 +8939,7 @@ const vi = [
|
|
|
8939
8939
|
]
|
|
8940
8940
|
},
|
|
8941
8941
|
{
|
|
8942
|
-
functionName:
|
|
8942
|
+
functionName: y.TOROW,
|
|
8943
8943
|
functionType: t.Lookup,
|
|
8944
8944
|
description: "formula.functionList.TOROW.description",
|
|
8945
8945
|
abstract: "formula.functionList.TOROW.abstract",
|
|
@@ -8968,7 +8968,7 @@ const vi = [
|
|
|
8968
8968
|
]
|
|
8969
8969
|
},
|
|
8970
8970
|
{
|
|
8971
|
-
functionName:
|
|
8971
|
+
functionName: y.TRANSPOSE,
|
|
8972
8972
|
functionType: t.Lookup,
|
|
8973
8973
|
description: "formula.functionList.TRANSPOSE.description",
|
|
8974
8974
|
abstract: "formula.functionList.TRANSPOSE.abstract",
|
|
@@ -8983,7 +8983,7 @@ const vi = [
|
|
|
8983
8983
|
]
|
|
8984
8984
|
},
|
|
8985
8985
|
{
|
|
8986
|
-
functionName:
|
|
8986
|
+
functionName: y.UNIQUE,
|
|
8987
8987
|
functionType: t.Lookup,
|
|
8988
8988
|
description: "formula.functionList.UNIQUE.description",
|
|
8989
8989
|
abstract: "formula.functionList.UNIQUE.abstract",
|
|
@@ -9012,7 +9012,7 @@ const vi = [
|
|
|
9012
9012
|
]
|
|
9013
9013
|
},
|
|
9014
9014
|
{
|
|
9015
|
-
functionName:
|
|
9015
|
+
functionName: y.VLOOKUP,
|
|
9016
9016
|
functionType: t.Lookup,
|
|
9017
9017
|
description: "formula.functionList.VLOOKUP.description",
|
|
9018
9018
|
abstract: "formula.functionList.VLOOKUP.abstract",
|
|
@@ -9048,7 +9048,7 @@ const vi = [
|
|
|
9048
9048
|
]
|
|
9049
9049
|
},
|
|
9050
9050
|
{
|
|
9051
|
-
functionName:
|
|
9051
|
+
functionName: y.VSTACK,
|
|
9052
9052
|
functionType: t.Lookup,
|
|
9053
9053
|
description: "formula.functionList.VSTACK.description",
|
|
9054
9054
|
abstract: "formula.functionList.VSTACK.abstract",
|
|
@@ -9070,7 +9070,7 @@ const vi = [
|
|
|
9070
9070
|
]
|
|
9071
9071
|
},
|
|
9072
9072
|
{
|
|
9073
|
-
functionName:
|
|
9073
|
+
functionName: y.WRAPCOLS,
|
|
9074
9074
|
functionType: t.Lookup,
|
|
9075
9075
|
description: "formula.functionList.WRAPCOLS.description",
|
|
9076
9076
|
abstract: "formula.functionList.WRAPCOLS.abstract",
|
|
@@ -9099,7 +9099,7 @@ const vi = [
|
|
|
9099
9099
|
]
|
|
9100
9100
|
},
|
|
9101
9101
|
{
|
|
9102
|
-
functionName:
|
|
9102
|
+
functionName: y.WRAPROWS,
|
|
9103
9103
|
functionType: t.Lookup,
|
|
9104
9104
|
description: "formula.functionList.WRAPROWS.description",
|
|
9105
9105
|
abstract: "formula.functionList.WRAPROWS.abstract",
|
|
@@ -9128,7 +9128,7 @@ const vi = [
|
|
|
9128
9128
|
]
|
|
9129
9129
|
},
|
|
9130
9130
|
{
|
|
9131
|
-
functionName:
|
|
9131
|
+
functionName: y.XLOOKUP,
|
|
9132
9132
|
functionType: t.Lookup,
|
|
9133
9133
|
description: "formula.functionList.XLOOKUP.description",
|
|
9134
9134
|
abstract: "formula.functionList.XLOOKUP.abstract",
|
|
@@ -9178,7 +9178,7 @@ const vi = [
|
|
|
9178
9178
|
]
|
|
9179
9179
|
},
|
|
9180
9180
|
{
|
|
9181
|
-
functionName:
|
|
9181
|
+
functionName: y.XMATCH,
|
|
9182
9182
|
functionType: t.Lookup,
|
|
9183
9183
|
description: "formula.functionList.XMATCH.description",
|
|
9184
9184
|
abstract: "formula.functionList.XMATCH.abstract",
|
|
@@ -9213,7 +9213,7 @@ const vi = [
|
|
|
9213
9213
|
}
|
|
9214
9214
|
]
|
|
9215
9215
|
}
|
|
9216
|
-
],
|
|
9216
|
+
], $i = [
|
|
9217
9217
|
{
|
|
9218
9218
|
functionName: T.ABS,
|
|
9219
9219
|
functionType: t.Math,
|
|
@@ -10851,7 +10851,7 @@ const vi = [
|
|
|
10851
10851
|
}
|
|
10852
10852
|
]
|
|
10853
10853
|
}
|
|
10854
|
-
],
|
|
10854
|
+
], ji = [
|
|
10855
10855
|
{
|
|
10856
10856
|
functionName: l.AVEDEV,
|
|
10857
10857
|
functionType: t.Statistical,
|
|
@@ -13793,7 +13793,7 @@ const vi = [
|
|
|
13793
13793
|
}
|
|
13794
13794
|
]
|
|
13795
13795
|
}
|
|
13796
|
-
],
|
|
13796
|
+
], zi = [
|
|
13797
13797
|
{
|
|
13798
13798
|
functionName: D.ASC,
|
|
13799
13799
|
functionType: t.Text,
|
|
@@ -14985,9 +14985,9 @@ const vi = [
|
|
|
14985
14985
|
}
|
|
14986
14986
|
]
|
|
14987
14987
|
}
|
|
14988
|
-
],
|
|
14988
|
+
], Zi = [], Ji = [
|
|
14989
14989
|
{
|
|
14990
|
-
functionName:
|
|
14990
|
+
functionName: ft.ENCODEURL,
|
|
14991
14991
|
functionType: t.Web,
|
|
14992
14992
|
description: "formula.functionList.ENCODEURL.description",
|
|
14993
14993
|
abstract: "formula.functionList.ENCODEURL.abstract",
|
|
@@ -15002,7 +15002,7 @@ const vi = [
|
|
|
15002
15002
|
]
|
|
15003
15003
|
},
|
|
15004
15004
|
{
|
|
15005
|
-
functionName:
|
|
15005
|
+
functionName: ft.FILTERXML,
|
|
15006
15006
|
functionType: t.Web,
|
|
15007
15007
|
description: "formula.functionList.FILTERXML.description",
|
|
15008
15008
|
abstract: "formula.functionList.FILTERXML.abstract",
|
|
@@ -15024,7 +15024,7 @@ const vi = [
|
|
|
15024
15024
|
]
|
|
15025
15025
|
},
|
|
15026
15026
|
{
|
|
15027
|
-
functionName:
|
|
15027
|
+
functionName: ft.WEBSERVICE,
|
|
15028
15028
|
functionType: t.Web,
|
|
15029
15029
|
description: "formula.functionList.WEBSERVICE.description",
|
|
15030
15030
|
abstract: "formula.functionList.WEBSERVICE.abstract",
|
|
@@ -15045,36 +15045,36 @@ const vi = [
|
|
|
15045
15045
|
}
|
|
15046
15046
|
]
|
|
15047
15047
|
}
|
|
15048
|
-
],
|
|
15048
|
+
], er = [
|
|
15049
|
+
...Wi,
|
|
15049
15050
|
...wi,
|
|
15050
|
-
...Yi,
|
|
15051
|
-
...ki,
|
|
15052
15051
|
...$i,
|
|
15053
|
-
...Qi,
|
|
15054
|
-
...Hi,
|
|
15055
15052
|
...ji,
|
|
15053
|
+
...ki,
|
|
15054
|
+
...Yi,
|
|
15055
|
+
...zi,
|
|
15056
|
+
...Qi,
|
|
15056
15057
|
...Ki,
|
|
15057
|
-
...Wi,
|
|
15058
15058
|
...Xi,
|
|
15059
|
+
...Hi,
|
|
15059
15060
|
...Gi,
|
|
15061
|
+
...Ji,
|
|
15060
15062
|
...Vi,
|
|
15061
|
-
...Zi
|
|
15062
|
-
...vi,
|
|
15063
|
-
...zi
|
|
15063
|
+
...Zi
|
|
15064
15064
|
];
|
|
15065
|
-
function
|
|
15065
|
+
function tr(n, e) {
|
|
15066
15066
|
let a = "";
|
|
15067
15067
|
return n.aliasFunctionName ? (a = e.t(n.aliasFunctionName), a === n.aliasFunctionName && (a = n.functionName)) : a = n.functionName, a;
|
|
15068
15068
|
}
|
|
15069
|
-
var
|
|
15070
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15069
|
+
var ar = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, ir = (n, e, a, i) => {
|
|
15070
|
+
for (var r = i > 1 ? void 0 : i ? nr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15071
15071
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15072
|
-
return i && r &&
|
|
15073
|
-
},
|
|
15074
|
-
const
|
|
15075
|
-
let
|
|
15072
|
+
return i && r && ar(e, a, r), r;
|
|
15073
|
+
}, Lt = (n, e) => (a, i) => e(a, i, n);
|
|
15074
|
+
const Ut = Mt("formula.description-service");
|
|
15075
|
+
let Ct = class {
|
|
15076
15076
|
constructor(n, e, a) {
|
|
15077
|
-
|
|
15077
|
+
X(this, "_descriptions", []);
|
|
15078
15078
|
this._functionService = n, this._localeService = e, this._configService = a, this._initialize();
|
|
15079
15079
|
}
|
|
15080
15080
|
dispose() {
|
|
@@ -15111,7 +15111,7 @@ let St = class {
|
|
|
15111
15111
|
}), e;
|
|
15112
15112
|
}
|
|
15113
15113
|
registerDescriptions(n) {
|
|
15114
|
-
return this._descriptions = this._descriptions.concat(n), this._registerDescriptions(),
|
|
15114
|
+
return this._descriptions = this._descriptions.concat(n), this._registerDescriptions(), se(() => {
|
|
15115
15115
|
const e = n.map((a) => a.functionName);
|
|
15116
15116
|
this.unregisterDescriptions(e);
|
|
15117
15117
|
});
|
|
@@ -15130,7 +15130,7 @@ let St = class {
|
|
|
15130
15130
|
if (e.length === 0)
|
|
15131
15131
|
return !1;
|
|
15132
15132
|
const a = e[0].description;
|
|
15133
|
-
return !
|
|
15133
|
+
return !En(a);
|
|
15134
15134
|
}
|
|
15135
15135
|
_initialize() {
|
|
15136
15136
|
this._localeService.localeChanged$.subscribe(() => {
|
|
@@ -15140,7 +15140,6 @@ let St = class {
|
|
|
15140
15140
|
_initDescription() {
|
|
15141
15141
|
var i;
|
|
15142
15142
|
const n = [
|
|
15143
|
-
...En,
|
|
15144
15143
|
...In,
|
|
15145
15144
|
...Nn,
|
|
15146
15145
|
...Rn,
|
|
@@ -15153,15 +15152,16 @@ let St = class {
|
|
|
15153
15152
|
...Mn,
|
|
15154
15153
|
...xn,
|
|
15155
15154
|
..._n,
|
|
15156
|
-
...qn,
|
|
15157
15155
|
...yn,
|
|
15158
|
-
...
|
|
15159
|
-
|
|
15156
|
+
...qn,
|
|
15157
|
+
...gn,
|
|
15158
|
+
...hn
|
|
15159
|
+
].map((r) => r[1]), e = er.filter((r) => n.includes(r.functionName)), a = this._configService.getConfig(ot);
|
|
15160
15160
|
this._descriptions = e.concat((i = a == null ? void 0 : a.description) != null ? i : []);
|
|
15161
15161
|
}
|
|
15162
15162
|
_registerDescriptions() {
|
|
15163
15163
|
const n = this._localeService, e = this._descriptions.map((a) => ({
|
|
15164
|
-
functionName:
|
|
15164
|
+
functionName: tr(a, n),
|
|
15165
15165
|
functionType: a.functionType,
|
|
15166
15166
|
description: n.t(a.description),
|
|
15167
15167
|
abstract: n.t(a.abstract),
|
|
@@ -15176,17 +15176,17 @@ let St = class {
|
|
|
15176
15176
|
this._functionService.registerDescriptions(...e);
|
|
15177
15177
|
}
|
|
15178
15178
|
};
|
|
15179
|
-
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
],
|
|
15184
|
-
var
|
|
15185
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15179
|
+
Ct = ir([
|
|
15180
|
+
Lt(0, ht),
|
|
15181
|
+
Lt(1, W(Ot)),
|
|
15182
|
+
Lt(2, _e)
|
|
15183
|
+
], Ct);
|
|
15184
|
+
var rr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ur = (n, e, a, i) => {
|
|
15185
|
+
for (var r = i > 1 ? void 0 : i ? or(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15186
15186
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15187
|
-
return i && r &&
|
|
15187
|
+
return i && r && rr(e, a, r), r;
|
|
15188
15188
|
}, Fe = (n, e) => (a, i) => e(a, i, n);
|
|
15189
|
-
function
|
|
15189
|
+
function ua(n, e, a, i) {
|
|
15190
15190
|
const r = n.sequenceNodesBuilder(e);
|
|
15191
15191
|
if (r == null)
|
|
15192
15192
|
return e;
|
|
@@ -15195,9 +15195,9 @@ function oa(n, e, a, i) {
|
|
|
15195
15195
|
const f = r[u];
|
|
15196
15196
|
if (typeof f == "string" || f.nodeType !== J.REFERENCE)
|
|
15197
15197
|
continue;
|
|
15198
|
-
const { token: s } = f, p =
|
|
15198
|
+
const { token: s } = f, p = pe(s), { sheetName: d, unitId: L } = p;
|
|
15199
15199
|
let E = p.range;
|
|
15200
|
-
E.startAbsoluteRefType ===
|
|
15200
|
+
E.startAbsoluteRefType === we.ALL && E.endAbsoluteRefType === we.ALL || (E = Et(E, a, i), o.push({
|
|
15201
15201
|
unitId: L,
|
|
15202
15202
|
sheetName: d,
|
|
15203
15203
|
range: E
|
|
@@ -15205,24 +15205,24 @@ function oa(n, e, a, i) {
|
|
|
15205
15205
|
}
|
|
15206
15206
|
return o.map((u) => `${u.unitId}!${u.sheetName}!${u.range.startRow}!${u.range.endRow}!${u.range.startColumn}!${u.range.endColumn}`).join("|");
|
|
15207
15207
|
}
|
|
15208
|
-
let
|
|
15208
|
+
let Dt = class extends te {
|
|
15209
15209
|
constructor(n, e, a, i) {
|
|
15210
15210
|
super(), this._refRangeService = n, this._lexerTreeBuilder = e, this._univerInstanceService = a, this._injector = i;
|
|
15211
15211
|
}
|
|
15212
15212
|
transformFormulaByEffectCommand(n, e, a, i) {
|
|
15213
15213
|
const r = this._lexerTreeBuilder.sequenceNodesBuilder(a), o = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET), u = o.getActiveSheet(), m = o.getUnitId(), f = u.getSheetId(), s = r == null ? void 0 : r.map((p) => {
|
|
15214
15214
|
if (typeof p == "object" && p.nodeType === J.REFERENCE) {
|
|
15215
|
-
const d =
|
|
15215
|
+
const d = pe(p.token), { range: L, unitId: E, sheetName: I } = d, S = this._univerInstanceService.getUnit(E || n), c = I ? S == null ? void 0 : S.getSheetBySheetName(I) : S == null ? void 0 : S.getSheetBySheetId(e);
|
|
15216
15216
|
if (!c)
|
|
15217
15217
|
throw new Error("Sheet not found");
|
|
15218
15218
|
const N = S.getUnitId(), R = c.getSheetId();
|
|
15219
15219
|
if (N !== m || R !== f)
|
|
15220
15220
|
return p;
|
|
15221
|
-
const P =
|
|
15221
|
+
const P = Gt(L, i);
|
|
15222
15222
|
let O = "";
|
|
15223
15223
|
if (P) {
|
|
15224
|
-
const M = P.startColumn - L.startColumn, F = P.startRow - L.startRow, U =
|
|
15225
|
-
E && I ? O =
|
|
15224
|
+
const M = P.startColumn - L.startColumn, F = P.startRow - L.startRow, U = Et(L, M, F);
|
|
15225
|
+
E && I ? O = Jt(E, I, U) : I ? O = ea(I, U) : O = ta(U);
|
|
15226
15226
|
} else
|
|
15227
15227
|
O = j.REF;
|
|
15228
15228
|
return {
|
|
@@ -15235,17 +15235,17 @@ let Ct = class extends te {
|
|
|
15235
15235
|
return s ? `=${Xe(s)}` : "";
|
|
15236
15236
|
}
|
|
15237
15237
|
registerFormula(n, e, a, i) {
|
|
15238
|
-
const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(a), u = new
|
|
15238
|
+
const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(a), u = new Ye(), m = (f) => {
|
|
15239
15239
|
const s = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET), p = s.getActiveSheet(), d = s.getUnitId(), L = p.getSheetId(), E = o == null ? void 0 : o.map((S) => {
|
|
15240
15240
|
if (typeof S == "object" && S.nodeType === J.REFERENCE) {
|
|
15241
15241
|
const c = r.get(S.token);
|
|
15242
15242
|
if (c.unitId !== d || c.subUnitId !== L)
|
|
15243
15243
|
return S;
|
|
15244
|
-
const N =
|
|
15244
|
+
const N = Gt(c.range, f);
|
|
15245
15245
|
let R = "";
|
|
15246
15246
|
if (N) {
|
|
15247
|
-
const P = N.startColumn - c.range.startColumn, O = N.startRow - c.range.startRow, M =
|
|
15248
|
-
c.unitId && c.sheetName ? R =
|
|
15247
|
+
const P = N.startColumn - c.range.startColumn, O = N.startRow - c.range.startRow, M = Et(c.range, P, O);
|
|
15248
|
+
c.unitId && c.sheetName ? R = Jt(c.unitId, c.sheetName, M) : c.sheetName ? R = ea(c.sheetName, M) : R = ta(M);
|
|
15249
15249
|
} else
|
|
15250
15250
|
R = j.REF;
|
|
15251
15251
|
return {
|
|
@@ -15259,7 +15259,7 @@ let Ct = class extends te {
|
|
|
15259
15259
|
};
|
|
15260
15260
|
return o == null || o.forEach((f) => {
|
|
15261
15261
|
if (typeof f == "object" && f.nodeType === J.REFERENCE) {
|
|
15262
|
-
const s =
|
|
15262
|
+
const s = pe(f.token), { range: p, unitId: d, sheetName: L } = s, E = this._univerInstanceService.getUnit(d || n), I = L ? E == null ? void 0 : E.getSheetBySheetName(L) : E == null ? void 0 : E.getSheetBySheetId(e);
|
|
15263
15263
|
if (!I)
|
|
15264
15264
|
return;
|
|
15265
15265
|
const S = E.getUnitId(), c = I.getSheetId(), N = {
|
|
@@ -15273,11 +15273,11 @@ let Ct = class extends te {
|
|
|
15273
15273
|
}), u;
|
|
15274
15274
|
}
|
|
15275
15275
|
_getFormulaDependcy(n, e, a, i) {
|
|
15276
|
-
const r =
|
|
15276
|
+
const r = be(a) ? this._lexerTreeBuilder.sequenceNodesBuilder(a) : null, o = [];
|
|
15277
15277
|
return r == null || r.forEach((u) => {
|
|
15278
15278
|
if (typeof u == "object" && u.nodeType === J.REFERENCE) {
|
|
15279
|
-
const m =
|
|
15280
|
-
if (f.startAbsoluteRefType ===
|
|
15279
|
+
const m = pe(u.token), { range: f, unitId: s, sheetName: p } = m;
|
|
15280
|
+
if (f.startAbsoluteRefType === we.ALL && f.endAbsoluteRefType === we.ALL)
|
|
15281
15281
|
return;
|
|
15282
15282
|
const d = this._univerInstanceService.getUnit(s || n), L = p ? d == null ? void 0 : d.getSheetBySheetName(p) : d == null ? void 0 : d.getSheetBySheetId(e);
|
|
15283
15283
|
if (!L)
|
|
@@ -15298,8 +15298,8 @@ let Ct = class extends te {
|
|
|
15298
15298
|
}
|
|
15299
15299
|
// eslint-disable-next-line max-lines-per-function
|
|
15300
15300
|
registerRangeFormula(n, e, a, i, r) {
|
|
15301
|
-
const o = new
|
|
15302
|
-
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E =
|
|
15301
|
+
const o = new Ye(), u = i.map((f) => this._getFormulaDependcy(n, e, f, a)), m = (f) => {
|
|
15302
|
+
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E = fn(this._injector, f);
|
|
15303
15303
|
for (const { unitId: I, subUnitId: S, ranges: c } of d)
|
|
15304
15304
|
if (I === E.unitId && S === E.subUnitId) {
|
|
15305
15305
|
const N = [], R = c[0].startRow, P = c[0].startColumn, O = R - s, M = P - p;
|
|
@@ -15317,19 +15317,19 @@ let Ct = class extends te {
|
|
|
15317
15317
|
);
|
|
15318
15318
|
}
|
|
15319
15319
|
if (L.length > 0) {
|
|
15320
|
-
const I =
|
|
15320
|
+
const I = De.splitIntoGrid([...L.flat()]), S = De.subtractMulti(a, I);
|
|
15321
15321
|
S.sort((O, M) => O.startRow - M.startRow || O.startColumn - M.startColumn);
|
|
15322
15322
|
const c = /* @__PURE__ */ new Map();
|
|
15323
15323
|
for (let O = 0; O < I.length; O++) {
|
|
15324
|
-
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h =
|
|
15324
|
+
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h = cn(M, f).sort((Q, oe) => Q.startRow - oe.startRow || Q.startColumn - oe.startColumn);
|
|
15325
15325
|
if (!h.length)
|
|
15326
15326
|
continue;
|
|
15327
|
-
const V = h[0].startRow, k = h[0].startColumn, b = V - s,
|
|
15327
|
+
const V = h[0].startRow, k = h[0].startColumn, b = V - s, Le = k - p, ae = [];
|
|
15328
15328
|
for (let Q = 0; Q < i.length; Q++) {
|
|
15329
|
-
const oe = i[Q], z =
|
|
15329
|
+
const oe = i[Q], z = be(oe), ye = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, x, g) : oe, ue = z ? this.transformFormulaByEffectCommand(n, e, ye, f) : ye, Pe = ua(this._lexerTreeBuilder, ue, -Le, -b);
|
|
15330
15330
|
ae.push({
|
|
15331
15331
|
newFormula: ue,
|
|
15332
|
-
orginFormula:
|
|
15332
|
+
orginFormula: Pe
|
|
15333
15333
|
});
|
|
15334
15334
|
}
|
|
15335
15335
|
const re = {
|
|
@@ -15339,13 +15339,13 @@ let Ct = class extends te {
|
|
|
15339
15339
|
};
|
|
15340
15340
|
c.has(re.key) ? c.get(re.key).push(re) : c.set(re.key, [re]);
|
|
15341
15341
|
}
|
|
15342
|
-
const N = i.map((O) =>
|
|
15342
|
+
const N = i.map((O) => ua(this._lexerTreeBuilder, O, 0, 0)).join("_");
|
|
15343
15343
|
if (S.length > 0) {
|
|
15344
15344
|
const O = S[0].startRow, M = S[0].startColumn, F = [];
|
|
15345
15345
|
for (let g = 0; g < i.length; g++) {
|
|
15346
15346
|
const x = i[g];
|
|
15347
15347
|
F.push({
|
|
15348
|
-
newFormula:
|
|
15348
|
+
newFormula: be(x) ? this._lexerTreeBuilder.moveFormulaRefOffset(x, M - p, O - s) : x,
|
|
15349
15349
|
orginFormula: x
|
|
15350
15350
|
});
|
|
15351
15351
|
}
|
|
@@ -15361,7 +15361,7 @@ let Ct = class extends te {
|
|
|
15361
15361
|
const M = P[O], F = c.get(M).sort((x, h) => x.ranges[0].startRow - h.ranges[0].startRow || x.ranges[0].startColumn - h.ranges[0].startColumn), U = [];
|
|
15362
15362
|
for (let x = 0; x < F[0].formulas.length; x++)
|
|
15363
15363
|
U.push(F[0].formulas[x].newFormula);
|
|
15364
|
-
const g =
|
|
15364
|
+
const g = De.mergeRanges(F.map((x) => x.ranges).flat());
|
|
15365
15365
|
g.sort((x, h) => x.startRow - h.startRow || x.startColumn - h.startColumn), R.push({
|
|
15366
15366
|
formulas: U,
|
|
15367
15367
|
ranges: g
|
|
@@ -15385,53 +15385,67 @@ let Ct = class extends te {
|
|
|
15385
15385
|
}), o;
|
|
15386
15386
|
}
|
|
15387
15387
|
};
|
|
15388
|
-
|
|
15389
|
-
Fe(0, W(
|
|
15390
|
-
Fe(1, W(
|
|
15388
|
+
Dt = ur([
|
|
15389
|
+
Fe(0, W(mn)),
|
|
15390
|
+
Fe(1, W(yt)),
|
|
15391
15391
|
Fe(2, xe),
|
|
15392
|
-
Fe(3, W(
|
|
15393
|
-
],
|
|
15394
|
-
var
|
|
15395
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15392
|
+
Fe(3, W(at))
|
|
15393
|
+
], Dt);
|
|
15394
|
+
var mr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, cr = (n, e, a, i) => {
|
|
15395
|
+
for (var r = i > 1 ? void 0 : i ? fr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15396
15396
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15397
|
-
return i && r &&
|
|
15398
|
-
},
|
|
15399
|
-
const
|
|
15400
|
-
let
|
|
15397
|
+
return i && r && mr(e, a, r), r;
|
|
15398
|
+
}, lr = (n, e) => (a, i) => e(a, i, n);
|
|
15399
|
+
const Ft = "sheets-formula.remote-register-function.service", va = Mt(Ft);
|
|
15400
|
+
let ke = class {
|
|
15401
15401
|
constructor(n) {
|
|
15402
15402
|
this._functionService = n;
|
|
15403
15403
|
}
|
|
15404
15404
|
async registerFunctions(n) {
|
|
15405
|
-
const e = n.map(([a, i]) =>
|
|
15405
|
+
const e = n.map(([a, i]) => sr(a, i));
|
|
15406
|
+
this._functionService.registerExecutors(...e);
|
|
15407
|
+
}
|
|
15408
|
+
async registerAsyncFunctions(n) {
|
|
15409
|
+
const e = n.map(([a, i]) => pr(a, i));
|
|
15406
15410
|
this._functionService.registerExecutors(...e);
|
|
15407
15411
|
}
|
|
15408
15412
|
async unregisterFunctions(n) {
|
|
15409
15413
|
this._functionService.unregisterDescriptions(...n);
|
|
15410
15414
|
}
|
|
15411
15415
|
};
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
],
|
|
15415
|
-
function
|
|
15416
|
-
const a = new
|
|
15416
|
+
ke = cr([
|
|
15417
|
+
lr(0, ht)
|
|
15418
|
+
], ke);
|
|
15419
|
+
function sr(n, e) {
|
|
15420
|
+
const a = new At(e), i = new Function(`return ${n}`)();
|
|
15421
|
+
return a.calculateCustom = i, a;
|
|
15422
|
+
}
|
|
15423
|
+
function pr(n, e) {
|
|
15424
|
+
const a = new xa(e), i = new Function(`return ${n}`)();
|
|
15417
15425
|
return a.calculateCustom = i, a;
|
|
15418
15426
|
}
|
|
15419
|
-
var
|
|
15420
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15427
|
+
var dr = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, Pr = (n, e, a, i) => {
|
|
15428
|
+
for (var r = i > 1 ? void 0 : i ? Lr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15421
15429
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15422
|
-
return i && r &&
|
|
15430
|
+
return i && r && dr(e, a, r), r;
|
|
15423
15431
|
}, Be = (n, e) => (a, i) => e(a, i, n);
|
|
15424
|
-
const
|
|
15432
|
+
const Tr = Mt(
|
|
15425
15433
|
"sheets-formula.register-function-service"
|
|
15426
15434
|
);
|
|
15427
|
-
let
|
|
15435
|
+
let bt = class extends te {
|
|
15428
15436
|
constructor(n, e, a, i) {
|
|
15429
15437
|
super(), this._localeService = n, this._descriptionService = e, this._functionService = a, this._remoteRegisterFunctionService = i;
|
|
15430
15438
|
}
|
|
15439
|
+
registerFunction(n) {
|
|
15440
|
+
return this._registerSingleFunction(n);
|
|
15441
|
+
}
|
|
15442
|
+
registerAsyncFunction(n) {
|
|
15443
|
+
return this._registerSingleFunction({ ...n, async: !0 });
|
|
15444
|
+
}
|
|
15431
15445
|
registerFunctions(n) {
|
|
15432
15446
|
const { locales: e, description: a, calculate: i } = n;
|
|
15433
15447
|
e && this._localeService.load(e);
|
|
15434
|
-
const r = new
|
|
15448
|
+
const r = new Ye();
|
|
15435
15449
|
if (a)
|
|
15436
15450
|
r.add(this._descriptionService.registerDescriptions(a));
|
|
15437
15451
|
else {
|
|
@@ -15446,31 +15460,49 @@ let Dt = class extends te {
|
|
|
15446
15460
|
}
|
|
15447
15461
|
return r.add(this._registerLocalExecutors(i)), this._remoteRegisterFunctionService && r.add(this._registerRemoteExecutors(i)), r;
|
|
15448
15462
|
}
|
|
15463
|
+
_registerSingleFunction(n) {
|
|
15464
|
+
const { name: e, func: a, description: i, locales: r, async: o = !1 } = n, u = new Ye();
|
|
15465
|
+
if (r && this._localeService.load(r), typeof i == "string") {
|
|
15466
|
+
const f = {
|
|
15467
|
+
functionName: e,
|
|
15468
|
+
functionType: t.User,
|
|
15469
|
+
description: i,
|
|
15470
|
+
abstract: i || "",
|
|
15471
|
+
functionParameter: []
|
|
15472
|
+
};
|
|
15473
|
+
u.add(this._descriptionService.registerDescriptions([f]));
|
|
15474
|
+
} else
|
|
15475
|
+
u.add(this._descriptionService.registerDescriptions([i]));
|
|
15476
|
+
const m = o ? new xa(e) : new At(e);
|
|
15477
|
+
return m.calculateCustom = a, this._functionService.registerExecutors(m), u.add(se(() => this._functionService.unregisterExecutors(e))), this._remoteRegisterFunctionService && (this._remoteRegisterFunctionService.registerAsyncFunctions([[a.toString(), e]]), u.add(
|
|
15478
|
+
se(() => this._remoteRegisterFunctionService.unregisterFunctions([e]))
|
|
15479
|
+
)), u;
|
|
15480
|
+
}
|
|
15449
15481
|
_registerLocalExecutors(n) {
|
|
15450
15482
|
const e = n.map(([i, r]) => r), a = n.map(([i, r]) => {
|
|
15451
|
-
const o = new
|
|
15483
|
+
const o = new At(r);
|
|
15452
15484
|
return o.calculateCustom = i, o;
|
|
15453
15485
|
});
|
|
15454
|
-
return this._functionService.registerExecutors(...a),
|
|
15486
|
+
return this._functionService.registerExecutors(...a), se(() => this._functionService.unregisterExecutors(...e));
|
|
15455
15487
|
}
|
|
15456
15488
|
_registerRemoteExecutors(n) {
|
|
15457
15489
|
const e = [], a = n.map(([i, r]) => (e.push(r), [i.toString(), r]));
|
|
15458
|
-
return this._remoteRegisterFunctionService.registerFunctions(a),
|
|
15490
|
+
return this._remoteRegisterFunctionService.registerFunctions(a), se(() => this._remoteRegisterFunctionService.unregisterFunctions(e));
|
|
15459
15491
|
}
|
|
15460
15492
|
};
|
|
15461
|
-
|
|
15462
|
-
Be(0, W(
|
|
15463
|
-
Be(1, W(
|
|
15464
|
-
Be(2,
|
|
15465
|
-
Be(3,
|
|
15466
|
-
],
|
|
15467
|
-
const
|
|
15468
|
-
var
|
|
15469
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15493
|
+
bt = Pr([
|
|
15494
|
+
Be(0, W(Ot)),
|
|
15495
|
+
Be(1, W(Ut)),
|
|
15496
|
+
Be(2, ht),
|
|
15497
|
+
Be(3, Wa(va))
|
|
15498
|
+
], bt);
|
|
15499
|
+
const Er = "SHEETS_FORMULA_PLUGIN";
|
|
15500
|
+
var Ir = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, Rr = (n, e, a, i) => {
|
|
15501
|
+
for (var r = i > 1 ? void 0 : i ? Nr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15470
15502
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15471
|
-
return i && r &&
|
|
15472
|
-
},
|
|
15473
|
-
let
|
|
15503
|
+
return i && r && Ir(e, a, r), r;
|
|
15504
|
+
}, Pt = (n, e) => (a, i) => e(a, i, n);
|
|
15505
|
+
let $e = class extends te {
|
|
15474
15506
|
constructor(n, e, a) {
|
|
15475
15507
|
super(), this._activeDirtyManagerService = n, this._univerInstanceService = e, this._formulaDataModel = a, this._initialize();
|
|
15476
15508
|
}
|
|
@@ -15482,15 +15514,15 @@ let ke = class extends te {
|
|
|
15482
15514
|
commandId: ie.id,
|
|
15483
15515
|
getDirtyData: (n) => {
|
|
15484
15516
|
const e = n.params;
|
|
15485
|
-
return e.trigger ===
|
|
15517
|
+
return e.trigger === _t.id ? {} : {
|
|
15486
15518
|
dirtyRanges: this._getSetRangeValuesMutationDirtyRange(e)
|
|
15487
15519
|
};
|
|
15488
15520
|
}
|
|
15489
15521
|
}), this._initialMove(), this._initialRowAndColumn(), this._initialSheet(), this._initialDefinedName();
|
|
15490
15522
|
}
|
|
15491
15523
|
_initialMove() {
|
|
15492
|
-
this._activeDirtyManagerService.register(
|
|
15493
|
-
commandId:
|
|
15524
|
+
this._activeDirtyManagerService.register(Ht.id, {
|
|
15525
|
+
commandId: Ht.id,
|
|
15494
15526
|
getDirtyData: (n) => {
|
|
15495
15527
|
const e = n.params;
|
|
15496
15528
|
return {
|
|
@@ -15503,8 +15535,8 @@ let ke = class extends te {
|
|
|
15503
15535
|
}
|
|
15504
15536
|
};
|
|
15505
15537
|
}
|
|
15506
|
-
}), this._activeDirtyManagerService.register(
|
|
15507
|
-
commandId:
|
|
15538
|
+
}), this._activeDirtyManagerService.register(Yt.id, {
|
|
15539
|
+
commandId: Yt.id,
|
|
15508
15540
|
getDirtyData: (n) => {
|
|
15509
15541
|
const e = n.params;
|
|
15510
15542
|
return {
|
|
@@ -15516,8 +15548,8 @@ let ke = class extends te {
|
|
|
15516
15548
|
}
|
|
15517
15549
|
};
|
|
15518
15550
|
}
|
|
15519
|
-
}), this._activeDirtyManagerService.register(
|
|
15520
|
-
commandId:
|
|
15551
|
+
}), this._activeDirtyManagerService.register(wt.id, {
|
|
15552
|
+
commandId: wt.id,
|
|
15521
15553
|
getDirtyData: (n) => {
|
|
15522
15554
|
const e = n.params;
|
|
15523
15555
|
return {
|
|
@@ -15545,8 +15577,8 @@ let ke = class extends te {
|
|
|
15545
15577
|
});
|
|
15546
15578
|
}
|
|
15547
15579
|
_initialRowAndColumn() {
|
|
15548
|
-
this._activeDirtyManagerService.register(
|
|
15549
|
-
commandId:
|
|
15580
|
+
this._activeDirtyManagerService.register(Wt.id, {
|
|
15581
|
+
commandId: Wt.id,
|
|
15550
15582
|
getDirtyData: (n) => {
|
|
15551
15583
|
const e = n.params;
|
|
15552
15584
|
return {
|
|
@@ -15558,8 +15590,8 @@ let ke = class extends te {
|
|
|
15558
15590
|
}
|
|
15559
15591
|
};
|
|
15560
15592
|
}
|
|
15561
|
-
}), this._activeDirtyManagerService.register(
|
|
15562
|
-
commandId:
|
|
15593
|
+
}), this._activeDirtyManagerService.register(Kt.id, {
|
|
15594
|
+
commandId: Kt.id,
|
|
15563
15595
|
getDirtyData: (n) => {
|
|
15564
15596
|
const e = n.params;
|
|
15565
15597
|
return {
|
|
@@ -15571,8 +15603,8 @@ let ke = class extends te {
|
|
|
15571
15603
|
}
|
|
15572
15604
|
};
|
|
15573
15605
|
}
|
|
15574
|
-
}), this._activeDirtyManagerService.register(
|
|
15575
|
-
commandId:
|
|
15606
|
+
}), this._activeDirtyManagerService.register(Qt.id, {
|
|
15607
|
+
commandId: Qt.id,
|
|
15576
15608
|
getDirtyData: (n) => {
|
|
15577
15609
|
const e = n.params;
|
|
15578
15610
|
return {
|
|
@@ -15583,8 +15615,8 @@ let ke = class extends te {
|
|
|
15583
15615
|
}
|
|
15584
15616
|
};
|
|
15585
15617
|
}
|
|
15586
|
-
}), this._activeDirtyManagerService.register(
|
|
15587
|
-
commandId:
|
|
15618
|
+
}), this._activeDirtyManagerService.register(kt.id, {
|
|
15619
|
+
commandId: kt.id,
|
|
15588
15620
|
getDirtyData: (n) => {
|
|
15589
15621
|
const e = n.params;
|
|
15590
15622
|
return {
|
|
@@ -15628,8 +15660,8 @@ let ke = class extends te {
|
|
|
15628
15660
|
const e = n.params;
|
|
15629
15661
|
return { dirtyDefinedNameMap: this._getDefinedNameMutation(e) };
|
|
15630
15662
|
}
|
|
15631
|
-
}), this._activeDirtyManagerService.register(
|
|
15632
|
-
commandId:
|
|
15663
|
+
}), this._activeDirtyManagerService.register(St.id, {
|
|
15664
|
+
commandId: St.id,
|
|
15633
15665
|
getDirtyData: (n) => {
|
|
15634
15666
|
const e = n.params;
|
|
15635
15667
|
return { dirtyDefinedNameMap: this._getDefinedNameMutation(e) };
|
|
@@ -15657,15 +15689,15 @@ let ke = class extends te {
|
|
|
15657
15689
|
return o.push(...this._getDirtyRangesByCellValue(e, a, r)), o.push(...this._getDirtyRangesForArrayFormula(e, a, r)), o;
|
|
15658
15690
|
}
|
|
15659
15691
|
_getDeleteRangeMutationDirtyRange(n) {
|
|
15660
|
-
const { subUnitId: e, unitId: a, range: i, shiftDimension: r } = n, o = [], u = this._univerInstanceService.getUniverSheetInstance(a), m = u == null ? void 0 : u.getSheetBySheetId(e), f = (m == null ? void 0 : m.getLastRowWithContent()) || 0, s = (m == null ? void 0 : m.getLastColumnWithContent()) || 0, p = new
|
|
15692
|
+
const { subUnitId: e, unitId: a, range: i, shiftDimension: r } = n, o = [], u = this._univerInstanceService.getUniverSheetInstance(a), m = u == null ? void 0 : u.getSheetBySheetId(e), f = (m == null ? void 0 : m.getLastRowWithContent()) || 0, s = (m == null ? void 0 : m.getLastColumnWithContent()) || 0, p = new w();
|
|
15661
15693
|
let d = null;
|
|
15662
15694
|
const { startRow: L, startColumn: E, endRow: I, endColumn: S } = i;
|
|
15663
|
-
r ===
|
|
15695
|
+
r === Bt.ROWS ? d = this._rangeToMatrix({
|
|
15664
15696
|
startRow: L,
|
|
15665
15697
|
startColumn: E,
|
|
15666
15698
|
endRow: f,
|
|
15667
15699
|
endColumn: S
|
|
15668
|
-
}) : r ===
|
|
15700
|
+
}) : r === Bt.COLUMNS && (d = this._rangeToMatrix({
|
|
15669
15701
|
startRow: L,
|
|
15670
15702
|
startColumn: E,
|
|
15671
15703
|
endRow: I,
|
|
@@ -15675,7 +15707,7 @@ let ke = class extends te {
|
|
|
15675
15707
|
return o.push(...this._getDirtyRangesByCellValue(a, e, c)), o.push(...this._getDirtyRangesForArrayFormula(a, e, c)), o;
|
|
15676
15708
|
}
|
|
15677
15709
|
_getRemoveRowOrColumnMutation(n, e = !0) {
|
|
15678
|
-
const { subUnitId: a, unitId: i, range: r } = n, o = [], u = this._univerInstanceService.getUniverSheetInstance(i), m = u == null ? void 0 : u.getSheetBySheetId(a), f = (m == null ? void 0 : m.getRowCount()) || 0, s = (m == null ? void 0 : m.getColumnCount()) || 0, p = new
|
|
15710
|
+
const { subUnitId: a, unitId: i, range: r } = n, o = [], u = this._univerInstanceService.getUniverSheetInstance(i), m = u == null ? void 0 : u.getSheetBySheetId(a), f = (m == null ? void 0 : m.getRowCount()) || 0, s = (m == null ? void 0 : m.getColumnCount()) || 0, p = new w();
|
|
15679
15711
|
let d = null;
|
|
15680
15712
|
const { startRow: L, endRow: E, startColumn: I, endColumn: S } = r;
|
|
15681
15713
|
e === !0 ? d = this._rangeToMatrix({
|
|
@@ -15701,7 +15733,7 @@ let ke = class extends te {
|
|
|
15701
15733
|
return e[i] == null && (e[i] = {}), e[i][a.id] = a.name, e;
|
|
15702
15734
|
}
|
|
15703
15735
|
_rangeToMatrix(n) {
|
|
15704
|
-
const e = new
|
|
15736
|
+
const e = new w(), { startRow: a, startColumn: i, endRow: r, endColumn: o } = n;
|
|
15705
15737
|
for (let u = a; u <= r; u++)
|
|
15706
15738
|
for (let m = i; m <= o; m++)
|
|
15707
15739
|
e.setValue(u, m, {});
|
|
@@ -15709,7 +15741,7 @@ let ke = class extends te {
|
|
|
15709
15741
|
}
|
|
15710
15742
|
_getDirtyRangesByCellValue(n, e, a) {
|
|
15711
15743
|
const i = [];
|
|
15712
|
-
return a == null || new
|
|
15744
|
+
return a == null || new w(a).getDiscreteRanges().forEach((u) => {
|
|
15713
15745
|
i.push({ unitId: n, sheetId: e, range: u });
|
|
15714
15746
|
}), i;
|
|
15715
15747
|
}
|
|
@@ -15722,9 +15754,9 @@ let ke = class extends te {
|
|
|
15722
15754
|
const i = [];
|
|
15723
15755
|
if (a == null)
|
|
15724
15756
|
return i;
|
|
15725
|
-
const r = new
|
|
15757
|
+
const r = new w(a), o = this._formulaDataModel.getArrayFormulaRange();
|
|
15726
15758
|
if ((u = o == null ? void 0 : o[n]) != null && u[e]) {
|
|
15727
|
-
const f = new
|
|
15759
|
+
const f = new w((m = o == null ? void 0 : o[n]) == null ? void 0 : m[e]);
|
|
15728
15760
|
r.forValue((s, p) => {
|
|
15729
15761
|
f.forValue((d, L, E) => {
|
|
15730
15762
|
if (E == null)
|
|
@@ -15746,17 +15778,17 @@ let ke = class extends te {
|
|
|
15746
15778
|
return i;
|
|
15747
15779
|
}
|
|
15748
15780
|
};
|
|
15749
|
-
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
],
|
|
15754
|
-
var
|
|
15755
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15781
|
+
$e = Rr([
|
|
15782
|
+
Pt(0, gt),
|
|
15783
|
+
Pt(1, xe),
|
|
15784
|
+
Pt(2, W(it))
|
|
15785
|
+
], $e);
|
|
15786
|
+
var Ar = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, Cr = (n, e, a, i) => {
|
|
15787
|
+
for (var r = i > 1 ? void 0 : i ? Sr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15756
15788
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15757
|
-
return i && r &&
|
|
15758
|
-
},
|
|
15759
|
-
let
|
|
15789
|
+
return i && r && Ar(e, a, r), r;
|
|
15790
|
+
}, Tt = (n, e) => (a, i) => e(a, i, n);
|
|
15791
|
+
let je = class extends te {
|
|
15760
15792
|
constructor(n, e, a) {
|
|
15761
15793
|
super(), this._commandService = n, this._sheetInterceptorService = e, this._formulaDataModel = a, this._initialize();
|
|
15762
15794
|
}
|
|
@@ -15778,9 +15810,9 @@ let $e = class extends te {
|
|
|
15778
15810
|
}
|
|
15779
15811
|
_initInterceptorCellContent() {
|
|
15780
15812
|
this.disposeWithMe(
|
|
15781
|
-
this._sheetInterceptorService.intercept(
|
|
15813
|
+
this._sheetInterceptorService.intercept(ln.CELL_CONTENT, {
|
|
15782
15814
|
priority: 100,
|
|
15783
|
-
effect:
|
|
15815
|
+
effect: Ka.Value,
|
|
15784
15816
|
handler: (n, e, a) => {
|
|
15785
15817
|
var s, p, d;
|
|
15786
15818
|
const { unitId: i, subUnitId: r, row: o, col: u } = e, m = this._formulaDataModel.getArrayFormulaCellData(), f = (d = (p = (s = m == null ? void 0 : m[i]) == null ? void 0 : s[r]) == null ? void 0 : p[o]) == null ? void 0 : d[u];
|
|
@@ -15788,10 +15820,10 @@ let $e = class extends te {
|
|
|
15788
15820
|
...n,
|
|
15789
15821
|
v: 0,
|
|
15790
15822
|
// Default value for empty cell
|
|
15791
|
-
t:
|
|
15792
|
-
}) : (n == null ? void 0 : n.t) ===
|
|
15823
|
+
t: vt.NUMBER
|
|
15824
|
+
}) : (n == null ? void 0 : n.t) === vt.NUMBER && typeof (n == null ? void 0 : n.v) == "number" ? a({
|
|
15793
15825
|
...n,
|
|
15794
|
-
v:
|
|
15826
|
+
v: Un(n.v)
|
|
15795
15827
|
}) : a({
|
|
15796
15828
|
...n,
|
|
15797
15829
|
v: f.v,
|
|
@@ -15802,34 +15834,34 @@ let $e = class extends te {
|
|
|
15802
15834
|
);
|
|
15803
15835
|
}
|
|
15804
15836
|
};
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
],
|
|
15810
|
-
var
|
|
15811
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15837
|
+
je = Cr([
|
|
15838
|
+
Tt(0, de),
|
|
15839
|
+
Tt(1, W(xt)),
|
|
15840
|
+
Tt(2, W(it))
|
|
15841
|
+
], je);
|
|
15842
|
+
var Dr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Or = (n, e, a, i) => {
|
|
15843
|
+
for (var r = i > 1 ? void 0 : i ? br(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15812
15844
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15813
|
-
return i && r &&
|
|
15845
|
+
return i && r && Dr(e, a, r), r;
|
|
15814
15846
|
}, ve = (n, e) => (a, i) => e(a, i, n);
|
|
15815
|
-
let
|
|
15847
|
+
let ze = class extends te {
|
|
15816
15848
|
constructor(e, a, i, r) {
|
|
15817
15849
|
super();
|
|
15818
|
-
|
|
15850
|
+
X(this, "_preUnitId", null);
|
|
15819
15851
|
this._descriptionService = e, this._definedNamesService = a, this._univerInstanceService = i, this._commandService = r, this._initialize();
|
|
15820
15852
|
}
|
|
15821
15853
|
_initialize() {
|
|
15822
15854
|
this._descriptionListener(), this._changeUnitListener(), this._changeSheetListener();
|
|
15823
15855
|
}
|
|
15824
15856
|
_descriptionListener() {
|
|
15825
|
-
|
|
15857
|
+
se(
|
|
15826
15858
|
this._definedNamesService.update$.subscribe(() => {
|
|
15827
15859
|
this._registerDescriptions();
|
|
15828
15860
|
})
|
|
15829
15861
|
);
|
|
15830
15862
|
}
|
|
15831
15863
|
_changeUnitListener() {
|
|
15832
|
-
|
|
15864
|
+
se(
|
|
15833
15865
|
this._univerInstanceService.getCurrentTypeOfUnit$(ee.UNIVER_SHEET).subscribe(() => {
|
|
15834
15866
|
this._unRegisterDescriptions(), this._registerDescriptions();
|
|
15835
15867
|
})
|
|
@@ -15839,12 +15871,12 @@ let je = class extends te {
|
|
|
15839
15871
|
this.disposeWithMe(
|
|
15840
15872
|
this._commandService.onCommandExecuted((e, a) => {
|
|
15841
15873
|
if (!(a != null && a.fromCollab)) {
|
|
15842
|
-
if (e.id ===
|
|
15874
|
+
if (e.id === sn.id)
|
|
15843
15875
|
this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
|
|
15844
15876
|
else if (e.id === Me.id) {
|
|
15845
15877
|
const i = e.params;
|
|
15846
15878
|
this._registerDescription(i);
|
|
15847
|
-
} else if (e.id ===
|
|
15879
|
+
} else if (e.id === St.id) {
|
|
15848
15880
|
const i = e.params;
|
|
15849
15881
|
this._unregisterDescription(i);
|
|
15850
15882
|
}
|
|
@@ -15857,7 +15889,7 @@ let je = class extends te {
|
|
|
15857
15889
|
if (a == null || i == null)
|
|
15858
15890
|
return;
|
|
15859
15891
|
const { name: r, comment: o, formulaOrRefString: u, localSheetId: m } = e;
|
|
15860
|
-
!this._descriptionService.hasDescription(r) && (m == null || m ===
|
|
15892
|
+
!this._descriptionService.hasDescription(r) && (m == null || m === mt || m === i) && this._descriptionService.registerDescriptions([{
|
|
15861
15893
|
functionName: r,
|
|
15862
15894
|
description: u + (o || ""),
|
|
15863
15895
|
abstract: u,
|
|
@@ -15901,7 +15933,7 @@ let je = class extends te {
|
|
|
15901
15933
|
const r = [];
|
|
15902
15934
|
this._preUnitId = e, Array.from(Object.values(i)).forEach((o) => {
|
|
15903
15935
|
const { name: u, comment: m, formulaOrRefString: f, localSheetId: s } = o;
|
|
15904
|
-
!this._descriptionService.hasDescription(u) && (s == null || s ===
|
|
15936
|
+
!this._descriptionService.hasDescription(u) && (s == null || s === mt || s === a) && r.push({
|
|
15905
15937
|
functionName: u,
|
|
15906
15938
|
description: f + (m || ""),
|
|
15907
15939
|
abstract: f,
|
|
@@ -15920,135 +15952,135 @@ let je = class extends te {
|
|
|
15920
15952
|
const r = [];
|
|
15921
15953
|
Array.from(Object.values(i)).forEach((o) => {
|
|
15922
15954
|
const { name: u, localSheetId: m } = o;
|
|
15923
|
-
m !==
|
|
15955
|
+
m !== mt && m !== a && r.push(u);
|
|
15924
15956
|
}), this._descriptionService.unregisterDescriptions(r);
|
|
15925
15957
|
}
|
|
15926
15958
|
};
|
|
15927
|
-
|
|
15928
|
-
ve(0,
|
|
15959
|
+
ze = Or([
|
|
15960
|
+
ve(0, Ut),
|
|
15929
15961
|
ve(1, qt),
|
|
15930
15962
|
ve(2, xe),
|
|
15931
|
-
ve(3,
|
|
15932
|
-
],
|
|
15933
|
-
var
|
|
15934
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15963
|
+
ve(3, de)
|
|
15964
|
+
], ze);
|
|
15965
|
+
var Mr = Object.defineProperty, xr = Object.getOwnPropertyDescriptor, _r = (n, e, a, i) => {
|
|
15966
|
+
for (var r = i > 1 ? void 0 : i ? xr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15935
15967
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15936
|
-
return i && r &&
|
|
15937
|
-
},
|
|
15938
|
-
let
|
|
15968
|
+
return i && r && Mr(e, a, r), r;
|
|
15969
|
+
}, yr = (n, e) => (a, i) => e(a, i, n);
|
|
15970
|
+
let Ze = class extends te {
|
|
15939
15971
|
constructor(n) {
|
|
15940
15972
|
super(), this._commandService = n, [
|
|
15941
|
-
|
|
15973
|
+
Gn,
|
|
15942
15974
|
Ge
|
|
15943
15975
|
].forEach((e) => this._commandService.registerCommand(e));
|
|
15944
15976
|
}
|
|
15945
15977
|
};
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
],
|
|
15949
|
-
var
|
|
15950
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15978
|
+
Ze = _r([
|
|
15979
|
+
yr(0, de)
|
|
15980
|
+
], Ze);
|
|
15981
|
+
var Va = Object.defineProperty, qr = Object.getOwnPropertyDescriptor, gr = (n, e, a) => e in n ? Va(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, Ga = (n, e, a, i) => {
|
|
15982
|
+
for (var r = i > 1 ? void 0 : i ? qr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15951
15983
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15952
|
-
return i && r &&
|
|
15953
|
-
},
|
|
15954
|
-
let
|
|
15955
|
-
constructor(n =
|
|
15984
|
+
return i && r && Va(e, a, r), r;
|
|
15985
|
+
}, Je = (n, e) => (a, i) => e(a, i, n), ut = (n, e, a) => gr(n, typeof e != "symbol" ? e + "" : e, a);
|
|
15986
|
+
let et = class extends sa {
|
|
15987
|
+
constructor(n = ra, e, a) {
|
|
15956
15988
|
super(), this._config = n, this._injector = e, this._configService = a;
|
|
15957
|
-
const { ...i } =
|
|
15989
|
+
const { ...i } = pa(
|
|
15958
15990
|
{},
|
|
15959
|
-
|
|
15991
|
+
ra,
|
|
15960
15992
|
this._config
|
|
15961
15993
|
);
|
|
15962
15994
|
this._configService.setConfig(qi, i);
|
|
15963
15995
|
}
|
|
15964
15996
|
onStarting() {
|
|
15965
|
-
this._injector.add([
|
|
15966
|
-
|
|
15967
|
-
|
|
15997
|
+
this._injector.add([ke]), this._injector.get(qa).registerChannel(
|
|
15998
|
+
Ft,
|
|
15999
|
+
vn(this._injector.get(ke))
|
|
15968
16000
|
);
|
|
15969
16001
|
}
|
|
15970
16002
|
};
|
|
15971
|
-
|
|
15972
|
-
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
],
|
|
15978
|
-
let
|
|
15979
|
-
constructor(n =
|
|
16003
|
+
ut(et, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
|
|
16004
|
+
ut(et, "type", ee.UNIVER_SHEET);
|
|
16005
|
+
et = Ga([
|
|
16006
|
+
la(_a),
|
|
16007
|
+
Je(1, W(at)),
|
|
16008
|
+
Je(2, _e)
|
|
16009
|
+
], et);
|
|
16010
|
+
let tt = class extends sa {
|
|
16011
|
+
constructor(n = ia, e, a) {
|
|
15980
16012
|
super(), this._config = n, this._injector = e, this._configService = a;
|
|
15981
|
-
const { ...i } =
|
|
16013
|
+
const { ...i } = pa(
|
|
15982
16014
|
{},
|
|
15983
|
-
|
|
16015
|
+
ia,
|
|
15984
16016
|
this._config
|
|
15985
16017
|
);
|
|
15986
|
-
this._configService.setConfig(
|
|
16018
|
+
this._configService.setConfig(ot, i);
|
|
15987
16019
|
}
|
|
15988
16020
|
onStarting() {
|
|
15989
16021
|
const n = this._injector, e = [
|
|
15990
|
-
[
|
|
15991
|
-
[
|
|
15992
|
-
[
|
|
15993
|
-
[
|
|
15994
|
-
[We],
|
|
15995
|
-
[$e],
|
|
15996
|
-
[be],
|
|
16022
|
+
[Tr, { useClass: bt }],
|
|
16023
|
+
[Ut, { useClass: Ct }],
|
|
16024
|
+
[Ze],
|
|
16025
|
+
[Dt],
|
|
15997
16026
|
[Ke],
|
|
15998
|
-
[ke],
|
|
15999
16027
|
[je],
|
|
16000
|
-
[
|
|
16028
|
+
[Oe],
|
|
16029
|
+
[Qe],
|
|
16030
|
+
[$e],
|
|
16031
|
+
[ze],
|
|
16032
|
+
[We]
|
|
16001
16033
|
];
|
|
16002
16034
|
if (this._config.notExecuteFormula) {
|
|
16003
16035
|
const a = n.get(qa);
|
|
16004
|
-
e.push([
|
|
16005
|
-
useFactory: () =>
|
|
16036
|
+
e.push([va, {
|
|
16037
|
+
useFactory: () => Vn(a.requestChannel(Ft))
|
|
16006
16038
|
}]);
|
|
16007
16039
|
}
|
|
16008
16040
|
e.forEach((a) => n.add(a));
|
|
16009
16041
|
}
|
|
16010
16042
|
onReady() {
|
|
16011
|
-
|
|
16012
|
-
[
|
|
16013
|
-
[ke],
|
|
16043
|
+
qe(this._injector, [
|
|
16044
|
+
[Ze],
|
|
16014
16045
|
[$e],
|
|
16015
|
-
[
|
|
16016
|
-
[
|
|
16017
|
-
|
|
16018
|
-
|
|
16046
|
+
[je],
|
|
16047
|
+
[Qe],
|
|
16048
|
+
[We]
|
|
16049
|
+
]), Vt() && qe(this._injector, [
|
|
16050
|
+
[Oe]
|
|
16019
16051
|
]);
|
|
16020
16052
|
}
|
|
16021
16053
|
onRendered() {
|
|
16022
|
-
|
|
16023
|
-
[
|
|
16024
|
-
]),
|
|
16025
|
-
[
|
|
16054
|
+
qe(this._injector, [
|
|
16055
|
+
[ze]
|
|
16056
|
+
]), Vt() || qe(this._injector, [
|
|
16057
|
+
[Oe]
|
|
16026
16058
|
]);
|
|
16027
16059
|
}
|
|
16028
16060
|
};
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
],
|
|
16061
|
+
ut(tt, "pluginName", Er);
|
|
16062
|
+
ut(tt, "type", ee.UNIVER_SHEET);
|
|
16063
|
+
tt = Ga([
|
|
16064
|
+
la(_a, pn),
|
|
16065
|
+
Je(1, W(at)),
|
|
16066
|
+
Je(2, _e)
|
|
16067
|
+
], tt);
|
|
16036
16068
|
export {
|
|
16037
16069
|
ne as CalculationMode,
|
|
16038
|
-
|
|
16039
|
-
|
|
16040
|
-
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16070
|
+
Ct as DescriptionService,
|
|
16071
|
+
Dt as FormulaRefRangeService,
|
|
16072
|
+
Ut as IDescriptionService,
|
|
16073
|
+
Tr as IRegisterFunctionService,
|
|
16074
|
+
va as IRemoteRegisterFunctionService,
|
|
16075
|
+
Gn as InsertFunctionCommand,
|
|
16044
16076
|
Ge as OtherFormulaMarkDirty,
|
|
16045
|
-
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16077
|
+
ot as PLUGIN_CONFIG_KEY_BASE,
|
|
16078
|
+
bt as RegisterFunctionService,
|
|
16079
|
+
Ke as RegisterOtherFormulaService,
|
|
16080
|
+
ke as RemoteRegisterFunctionService,
|
|
16081
|
+
Oe as TriggerCalculationController,
|
|
16082
|
+
et as UniverRemoteSheetsFormulaPlugin,
|
|
16083
|
+
tt as UniverSheetsFormulaPlugin,
|
|
16084
|
+
We as UpdateDefinedNameController,
|
|
16085
|
+
Qe as UpdateFormulaController
|
|
16054
16086
|
};
|