@univerjs/sheets-formula 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +673 -623
- package/lib/types/controllers/active-dirty.controller.d.ts +2 -0
- package/lib/types/controllers/update-formula.controller.d.ts +1 -1
- package/lib/types/facade/f-formula.d.ts +17 -17
- package/lib/types/services/register-other-formula.service.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/es/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { SetRangeValuesCommand as
|
|
6
|
-
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as se, serializeRangeToRefString as nt, ErrorType as j, IDefinedNamesService as yt, LexerTreeBuilder as qt, generateStringWithSequence as
|
|
7
|
-
import { Subject as
|
|
8
|
-
import { IRPCChannelService as
|
|
9
|
-
const
|
|
1
|
+
var Ha = Object.defineProperty;
|
|
2
|
+
var wa = (a, e, n) => e in a ? Ha(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
|
|
3
|
+
var X = (a, e, n) => wa(a, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { CommandType as fa, ICommandService as pe, ObjectMatrix as W, Tools as Ae, Rectangle as be, isFormulaString as Oe, isFormulaId as ca, cellToRange as la, Direction as He, getIntersectRange as Ge, RANGE_TYPE as w, IUniverInstanceService as _e, Inject as Y, Disposable as te, UniverInstanceType as ee, LifecycleService as Ya, ILogService as Xa, IConfigService as ye, LocaleService as Ot, Injector as at, createIdentifier as Mt, toDisposable as ne, moveRangeByOffset as Et, DisposableCollection as we, AbsoluteRefType as Ye, Optional as Wa, InterceptorEffectEnum as Ka, CellValueType as Bt, isRealNum as ka, DependentOn as sa, Plugin as da, merge as pa, touchDependencies as ge, isNodeEnv as vt } from "@univerjs/core";
|
|
5
|
+
import { SetRangeValuesCommand as Qa, SetRangeValuesMutation as ie, handleMoveCols as La, EffectRefRangId as G, runRefRangeMutations as H, handleMoveRows as Pa, handleMoveRange as Ta, handleInsertRangeMoveRight as Ea, handleInsertRangeMoveDown as Ia, handleDeleteRangeMoveUp as Na, handleDeleteRangeMoveLeft as Ra, handleIRemoveCol as Aa, handleIRemoveRow as Sa, handleInsertCol as Ca, handleInsertRow as Da, RemoveDefinedNameCommand as ba, SetDefinedNameCommand as Oa, RemoveSheetCommand as $a, SetWorksheetNameCommand as ja, DeleteRangeMoveLeftCommand as za, DeleteRangeMoveUpCommand as Za, RemoveColCommand as Ja, RemoveRowCommand as en, InsertRangeMoveDownCommand as tn, InsertRangeMoveRightCommand as an, InsertColCommand as nn, InsertRowCommand as rn, MoveColsCommand as on, MoveRowsCommand as un, MoveRangeCommand as mn, SheetInterceptorService as xt, SetStyleCommand as _t, SetBorderCommand as Ma, ClearSelectionFormatCommand as xa, RemoveSheetMutation as It, InsertSheetMutation as Nt, RefRangeService as fn, handleDefaultRangeChangeWithEffectRefCommands as Vt, getSeparateEffectedRangesOnCommand as cn, handleCommonDefaultRangeChangeWithEffectRefCommands as ln, MoveRangeMutation as Gt, MoveRowsMutation as Ht, MoveColsMutation as wt, ReorderRangeMutation as Yt, RemoveRowMutation as Xt, RemoveColMutation as Wt, InsertColMutation as Kt, InsertRowMutation as kt, SetRowHiddenMutation as Qt, SetRowVisibleMutation as $t, INTERCEPTOR_POINT as sn, SetWorksheetActiveOperation as dn, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as mt, UniverSheetsPlugin as pn } from "@univerjs/sheets";
|
|
6
|
+
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as se, serializeRangeToRefString as nt, ErrorType as j, IDefinedNamesService as yt, LexerTreeBuilder as qt, generateStringWithSequence as Xe, SetDefinedNameMutation as xe, IActiveDirtyManagerService as gt, SetFormulaCalculationResultMutation as Ln, RemoveOtherFormulaMutation as Pn, SetOtherFormulaMutation as Tn, FormulaDataModel as it, SetFormulaCalculationStartMutation as Ee, SetFormulaCalculationStopMutation as jt, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as zt, SetFormulaCalculationNotificationMutation as En, FormulaExecuteStageType as he, FormulaExecutedStateType as Se, IFormulaCurrentConfigService as In, Lexer as Nn, AstTreeBuilder as Rn, Interpreter as An, generateExecuteAstNodeData as Sn, getObjectValue as Cn, SetFormulaDataMutation as Ue, SetArrayFormulaDataMutation as Rt, initSheetFormulaData as Zt, FunctionType as t, FUNCTION_NAMES_ARRAY as Jt, 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 L, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as D, FUNCTION_NAMES_WEB as ft, IFunctionService as ht, isReferenceStrings as Dn, functionArray as bn, functionCompatibility as On, functionCube as Mn, functionDatabase as xn, functionDate as _n, functionEngineering as yn, functionFinancial as qn, functionInformation as gn, functionLogical as hn, functionLookup as Un, functionMath as Fn, functionMeta as Bn, functionStatistical as vn, functionText as Vn, functionUniver as Gn, functionWeb as Hn, serializeRangeWithSpreadsheet as ea, serializeRangeWithSheet as ta, serializeRange as aa, CustomFunction as At, AsyncCustomFunction as _a, RemoveDefinedNameMutation as St, stripErrorMargin as wn, UniverFormulaEnginePlugin as ya } from "@univerjs/engine-formula";
|
|
7
|
+
import { Subject as na, BehaviorSubject as qa, bufferWhen as Yn, filter as ia, map as Xn } from "rxjs";
|
|
8
|
+
import { IRPCChannelService as ga, fromModule as Wn, toModule as Kn } from "@univerjs/rpc";
|
|
9
|
+
const kn = {
|
|
10
10
|
id: "formula.command.insert-function",
|
|
11
|
-
type:
|
|
11
|
+
type: fa.COMMAND,
|
|
12
12
|
handler: async (a, e) => {
|
|
13
|
-
const { list: n, listOfRangeHasNumber: i } = e, r = a.get(
|
|
13
|
+
const { list: n, listOfRangeHasNumber: i } = e, r = a.get(pe), o = new W();
|
|
14
14
|
n.forEach((m) => {
|
|
15
|
-
const { range: f, primary: s, formula:
|
|
15
|
+
const { range: f, primary: s, formula: d } = m, { row: T, column: P } = s, E = Ae.generateRandomId(6);
|
|
16
16
|
o.setValue(T, P, {
|
|
17
|
-
f:
|
|
17
|
+
f: d,
|
|
18
18
|
si: E
|
|
19
19
|
});
|
|
20
20
|
const { startRow: I, startColumn: S, endRow: c, endColumn: N } = f;
|
|
21
21
|
for (let R = I; R <= c; R++)
|
|
22
|
-
for (let
|
|
23
|
-
(R !== T ||
|
|
22
|
+
for (let p = S; p <= N; p++)
|
|
23
|
+
(R !== T || p !== P) && o.setValue(R, p, {
|
|
24
24
|
si: E
|
|
25
25
|
});
|
|
26
26
|
}), i && i.length > 0 && i.forEach((m) => {
|
|
@@ -32,16 +32,16 @@ const Wn = {
|
|
|
32
32
|
const u = {
|
|
33
33
|
value: o.getData()
|
|
34
34
|
};
|
|
35
|
-
return r.executeCommand(
|
|
35
|
+
return r.executeCommand(Qa.id, u);
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
type:
|
|
37
|
+
}, De = {
|
|
38
|
+
type: fa.MUTATION,
|
|
39
39
|
id: "sheet.mutation.data-validation-formula-mark-dirty",
|
|
40
40
|
handler() {
|
|
41
41
|
return !0;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function Qn(a, e, n) {
|
|
45
45
|
var i;
|
|
46
46
|
return a == null || a[e] == null || ((i = a[e]) == null ? void 0 : i[n]) == null;
|
|
47
47
|
}
|
|
@@ -60,38 +60,38 @@ function ct(a, e, n) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
var q = /* @__PURE__ */ ((a) => (a[a.MoveRange = 0] = "MoveRange", a[a.MoveRows = 1] = "MoveRows", a[a.MoveCols = 2] = "MoveCols", a[a.InsertRow = 3] = "InsertRow", a[a.InsertColumn = 4] = "InsertColumn", a[a.RemoveRow = 5] = "RemoveRow", a[a.RemoveColumn = 6] = "RemoveColumn", a[a.DeleteMoveLeft = 7] = "DeleteMoveLeft", a[a.DeleteMoveUp = 8] = "DeleteMoveUp", a[a.InsertMoveDown = 9] = "InsertMoveDown", a[a.InsertMoveRight = 10] = "InsertMoveRight", a[a.SetName = 11] = "SetName", a[a.RemoveSheet = 12] = "RemoveSheet", a[a.SetDefinedName = 13] = "SetDefinedName", a[a.RemoveDefinedName = 14] = "RemoveDefinedName", a))(q || {});
|
|
63
|
-
const
|
|
63
|
+
const $n = [
|
|
64
64
|
11,
|
|
65
65
|
12,
|
|
66
66
|
13,
|
|
67
67
|
14
|
|
68
68
|
/* RemoveDefinedName */
|
|
69
69
|
];
|
|
70
|
-
function
|
|
70
|
+
function jn(a, e, n) {
|
|
71
71
|
const { type: i } = n;
|
|
72
|
-
return
|
|
72
|
+
return $n.includes(i) ? zn(a, e) : Zn(a, e, n);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function zn(a, e) {
|
|
75
75
|
const n = [], i = [];
|
|
76
76
|
return Object.keys(e).forEach((r) => {
|
|
77
77
|
const o = e[r], u = a[r];
|
|
78
78
|
if (o == null || u == null)
|
|
79
79
|
return !0;
|
|
80
80
|
Object.keys(o).forEach((m) => {
|
|
81
|
-
const f = new W(o[m] || {}), s = new W(u[m] || {}),
|
|
81
|
+
const f = new W(o[m] || {}), s = new W(u[m] || {}), d = new W(), T = new W();
|
|
82
82
|
if (f.forValue((c, N, R) => {
|
|
83
83
|
if (R == null)
|
|
84
84
|
return !0;
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
}),
|
|
85
|
+
const p = rt(R);
|
|
86
|
+
p !== null && (d.setValue(c, N, p), T.setValue(c, N, s.getValue(c, N)));
|
|
87
|
+
}), d.getSizeOf() === 0)
|
|
88
88
|
return;
|
|
89
89
|
const P = {
|
|
90
90
|
subUnitId: m,
|
|
91
91
|
unitId: r,
|
|
92
|
-
cellValue:
|
|
92
|
+
cellValue: d.getMatrix()
|
|
93
93
|
}, E = {
|
|
94
|
-
id:
|
|
94
|
+
id: ie.id,
|
|
95
95
|
params: P
|
|
96
96
|
};
|
|
97
97
|
i.push(E);
|
|
@@ -100,7 +100,7 @@ function $n(a, e) {
|
|
|
100
100
|
unitId: r,
|
|
101
101
|
cellValue: T.getMatrix()
|
|
102
102
|
}, S = {
|
|
103
|
-
id:
|
|
103
|
+
id: ie.id,
|
|
104
104
|
params: I
|
|
105
105
|
};
|
|
106
106
|
n.push(S);
|
|
@@ -110,9 +110,9 @@ function $n(a, e) {
|
|
|
110
110
|
redos: i
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const { redoFormulaData: i, undoFormulaData: r } =
|
|
115
|
-
if (
|
|
113
|
+
function Zn(a, e, n) {
|
|
114
|
+
const { redoFormulaData: i, undoFormulaData: r } = Jn(a, e, n);
|
|
115
|
+
if (Ae.diffValue(i, r))
|
|
116
116
|
return {
|
|
117
117
|
undos: [],
|
|
118
118
|
redos: []
|
|
@@ -125,11 +125,11 @@ function jn(a, e, n) {
|
|
|
125
125
|
subUnitId: f,
|
|
126
126
|
unitId: m,
|
|
127
127
|
cellValue: i[m][f]
|
|
128
|
-
},
|
|
129
|
-
id:
|
|
128
|
+
}, d = {
|
|
129
|
+
id: ie.id,
|
|
130
130
|
params: s
|
|
131
131
|
};
|
|
132
|
-
o.push(
|
|
132
|
+
o.push(d);
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
}), Object.keys(r).forEach((m) => {
|
|
@@ -139,11 +139,11 @@ function jn(a, e, n) {
|
|
|
139
139
|
subUnitId: f,
|
|
140
140
|
unitId: m,
|
|
141
141
|
cellValue: r[m][f]
|
|
142
|
-
},
|
|
143
|
-
id:
|
|
142
|
+
}, d = {
|
|
143
|
+
id: ie.id,
|
|
144
144
|
params: s
|
|
145
145
|
};
|
|
146
|
-
u.push(
|
|
146
|
+
u.push(d);
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
149
|
}), {
|
|
@@ -151,10 +151,10 @@ function jn(a, e, n) {
|
|
|
151
151
|
redos: o
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
const i = {}, r = {}, { type: o, unitId: u, sheetId: m, range: f, from: s, to:
|
|
154
|
+
function Jn(a, e, n) {
|
|
155
|
+
const i = {}, r = {}, { type: o, unitId: u, sheetId: m, range: f, from: s, to: d } = n;
|
|
156
156
|
return (/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(e)])).forEach((P) => {
|
|
157
|
-
if (
|
|
157
|
+
if (Qn(a, P, m))
|
|
158
158
|
return;
|
|
159
159
|
(/* @__PURE__ */ new Set([
|
|
160
160
|
...Object.keys(a[P] || {}),
|
|
@@ -162,9 +162,9 @@ function zn(a, e, n) {
|
|
|
162
162
|
])).forEach((I) => {
|
|
163
163
|
var F, U;
|
|
164
164
|
const S = (F = a[P]) == null ? void 0 : F[I], c = (U = e[P]) == null ? void 0 : U[I], N = new W(S || {}), R = new W(c || {});
|
|
165
|
-
let
|
|
166
|
-
P !== u || I !== m ?
|
|
167
|
-
const O =
|
|
165
|
+
let p = [];
|
|
166
|
+
P !== u || I !== m ? p = ti(R) : p = ei(N, o, s, d, f);
|
|
167
|
+
const O = Li(p, N, R), M = Pi(p, N);
|
|
168
168
|
i[P] || (i[P] = {}), r[P] || (r[P] = {}), i[P][I] = {
|
|
169
169
|
...i[P][I],
|
|
170
170
|
...O
|
|
@@ -178,80 +178,80 @@ function zn(a, e, n) {
|
|
|
178
178
|
undoFormulaData: r
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ei(a, e, n, i, r) {
|
|
182
182
|
const o = [];
|
|
183
183
|
return a.forValue((u, m, f) => {
|
|
184
|
-
if (f == null || !
|
|
185
|
-
const s =
|
|
186
|
-
let
|
|
184
|
+
if (f == null || !ha(f)) return !0;
|
|
185
|
+
const s = la(u, m);
|
|
186
|
+
let d = null, T = !1;
|
|
187
187
|
if ([
|
|
188
188
|
0,
|
|
189
189
|
1,
|
|
190
190
|
2
|
|
191
191
|
/* MoveCols */
|
|
192
192
|
].includes(e))
|
|
193
|
-
|
|
193
|
+
d = ai(e, n, i, s);
|
|
194
194
|
else if (r != null) {
|
|
195
|
-
const P =
|
|
196
|
-
|
|
195
|
+
const P = ni(e, r, s);
|
|
196
|
+
d = P.newCell, T = P.isReverse;
|
|
197
197
|
}
|
|
198
|
-
T ? o.unshift({ oldCell: s, newCell:
|
|
198
|
+
T ? o.unshift({ oldCell: s, newCell: d }) : o.push({ oldCell: s, newCell: d });
|
|
199
199
|
}), o;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function ti(a) {
|
|
202
202
|
const e = [];
|
|
203
203
|
return a.forValue((n, i, r) => {
|
|
204
|
-
if (r == null || !
|
|
205
|
-
const o =
|
|
204
|
+
if (r == null || !ha(r)) return !0;
|
|
205
|
+
const o = la(n, i);
|
|
206
206
|
e.push({ oldCell: o, newCell: o });
|
|
207
207
|
}), e;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function ai(a, e, n, i) {
|
|
210
210
|
if (e == null || n == null)
|
|
211
211
|
return null;
|
|
212
212
|
switch (a) {
|
|
213
213
|
case 0:
|
|
214
|
-
return
|
|
214
|
+
return ii(e, n, i);
|
|
215
215
|
case 1:
|
|
216
|
-
return
|
|
216
|
+
return ri(e, n, i);
|
|
217
217
|
case 2:
|
|
218
|
-
return
|
|
218
|
+
return oi(e, n, i);
|
|
219
219
|
default:
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ni(a, e, n) {
|
|
224
224
|
let i = null, r = !1;
|
|
225
225
|
switch (a) {
|
|
226
226
|
case 3:
|
|
227
|
-
i =
|
|
227
|
+
i = ui(e, n), r = !0;
|
|
228
228
|
break;
|
|
229
229
|
case 4:
|
|
230
|
-
i =
|
|
230
|
+
i = mi(e, n), r = !0;
|
|
231
231
|
break;
|
|
232
232
|
case 5:
|
|
233
|
-
i =
|
|
233
|
+
i = fi(e, n);
|
|
234
234
|
break;
|
|
235
235
|
case 6:
|
|
236
|
-
i =
|
|
236
|
+
i = ci(e, n);
|
|
237
237
|
break;
|
|
238
238
|
case 7:
|
|
239
|
-
i =
|
|
239
|
+
i = li(e, n);
|
|
240
240
|
break;
|
|
241
241
|
case 8:
|
|
242
|
-
i =
|
|
242
|
+
i = si(e, n);
|
|
243
243
|
break;
|
|
244
244
|
case 9:
|
|
245
|
-
i =
|
|
245
|
+
i = di(e, n), r = !0;
|
|
246
246
|
break;
|
|
247
247
|
case 10:
|
|
248
|
-
i =
|
|
248
|
+
i = pi(e, n), r = !0;
|
|
249
249
|
break;
|
|
250
250
|
}
|
|
251
251
|
return { newCell: i, isReverse: r };
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
const i =
|
|
253
|
+
function ii(a, e, n) {
|
|
254
|
+
const i = Ta(
|
|
255
255
|
{
|
|
256
256
|
id: G.MoveRangeCommandId,
|
|
257
257
|
params: { toRange: e, fromRange: a }
|
|
@@ -260,8 +260,8 @@ function ai(a, e, n) {
|
|
|
260
260
|
);
|
|
261
261
|
return H(i, n);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const i =
|
|
263
|
+
function ri(a, e, n) {
|
|
264
|
+
const i = Pa(
|
|
265
265
|
{
|
|
266
266
|
id: G.MoveRowsCommandId,
|
|
267
267
|
params: { toRange: e, fromRange: a }
|
|
@@ -270,8 +270,8 @@ function ni(a, e, n) {
|
|
|
270
270
|
);
|
|
271
271
|
return H(i, n);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const i =
|
|
273
|
+
function oi(a, e, n) {
|
|
274
|
+
const i = La(
|
|
275
275
|
{
|
|
276
276
|
id: G.MoveColsCommandId,
|
|
277
277
|
params: { toRange: e, fromRange: a }
|
|
@@ -280,8 +280,8 @@ function ii(a, e, n) {
|
|
|
280
280
|
);
|
|
281
281
|
return H(i, n);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const n =
|
|
283
|
+
function ui(a, e) {
|
|
284
|
+
const n = Da(
|
|
285
285
|
{
|
|
286
286
|
id: G.InsertRowCommandId,
|
|
287
287
|
params: { range: a, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
@@ -290,8 +290,8 @@ function ri(a, e) {
|
|
|
290
290
|
);
|
|
291
291
|
return H(n, e);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
const n =
|
|
293
|
+
function mi(a, e) {
|
|
294
|
+
const n = Ca(
|
|
295
295
|
{
|
|
296
296
|
id: G.InsertColCommandId,
|
|
297
297
|
params: { range: a, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
@@ -300,8 +300,8 @@ function oi(a, e) {
|
|
|
300
300
|
);
|
|
301
301
|
return H(n, e);
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
const n =
|
|
303
|
+
function fi(a, e) {
|
|
304
|
+
const n = Sa(
|
|
305
305
|
{
|
|
306
306
|
id: G.RemoveRowCommandId,
|
|
307
307
|
params: { range: a }
|
|
@@ -310,8 +310,8 @@ function ui(a, e) {
|
|
|
310
310
|
);
|
|
311
311
|
return H(n, e);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
const n =
|
|
313
|
+
function ci(a, e) {
|
|
314
|
+
const n = Aa(
|
|
315
315
|
{
|
|
316
316
|
id: G.RemoveColCommandId,
|
|
317
317
|
params: { range: a }
|
|
@@ -320,8 +320,8 @@ function mi(a, e) {
|
|
|
320
320
|
);
|
|
321
321
|
return H(n, e);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
const n =
|
|
323
|
+
function li(a, e) {
|
|
324
|
+
const n = Ra(
|
|
325
325
|
{
|
|
326
326
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
327
327
|
params: { range: a }
|
|
@@ -330,8 +330,8 @@ function fi(a, e) {
|
|
|
330
330
|
);
|
|
331
331
|
return H(n, e);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
const n =
|
|
333
|
+
function si(a, e) {
|
|
334
|
+
const n = Na(
|
|
335
335
|
{
|
|
336
336
|
id: G.DeleteRangeMoveUpCommandId,
|
|
337
337
|
params: { range: a }
|
|
@@ -340,8 +340,8 @@ function ci(a, e) {
|
|
|
340
340
|
);
|
|
341
341
|
return H(n, e);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
const n =
|
|
343
|
+
function di(a, e) {
|
|
344
|
+
const n = Ia(
|
|
345
345
|
{
|
|
346
346
|
id: G.InsertRangeMoveDownCommandId,
|
|
347
347
|
params: { range: a }
|
|
@@ -350,8 +350,8 @@ function li(a, e) {
|
|
|
350
350
|
);
|
|
351
351
|
return H(n, e);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const n =
|
|
353
|
+
function pi(a, e) {
|
|
354
|
+
const n = Ea(
|
|
355
355
|
{
|
|
356
356
|
id: G.InsertRangeMoveRightCommandId,
|
|
357
357
|
params: { range: a }
|
|
@@ -360,23 +360,23 @@ function si(a, e) {
|
|
|
360
360
|
);
|
|
361
361
|
return H(n, e);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Li(a, e, n) {
|
|
364
364
|
const i = new W({});
|
|
365
365
|
return a.forEach((r) => {
|
|
366
|
-
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = n.getValue(m, f) || e.getValue(m, f),
|
|
366
|
+
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = n.getValue(m, f) || e.getValue(m, f), d = rt(s);
|
|
367
367
|
if (i.setValue(m, f, { f: null, si: null }), u) {
|
|
368
368
|
const { startRow: T, startColumn: P } = u;
|
|
369
|
-
i.setValue(T, P,
|
|
369
|
+
i.setValue(T, P, d);
|
|
370
370
|
}
|
|
371
371
|
}), i.getMatrix();
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Pi(a, e) {
|
|
374
374
|
const n = new W({});
|
|
375
375
|
return a.reverse().forEach((i) => {
|
|
376
376
|
const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: m } = r, f = e.getValue(u, m), s = rt(f);
|
|
377
377
|
if (o) {
|
|
378
|
-
const { startRow:
|
|
379
|
-
n.setValue(
|
|
378
|
+
const { startRow: d, startColumn: T } = o;
|
|
379
|
+
n.setValue(d, T, { f: null, si: null });
|
|
380
380
|
}
|
|
381
381
|
n.setValue(u, m, s);
|
|
382
382
|
}), n.getMatrix();
|
|
@@ -384,7 +384,7 @@ function di(a, e) {
|
|
|
384
384
|
function rt(a) {
|
|
385
385
|
if (a == null)
|
|
386
386
|
return;
|
|
387
|
-
const { f: e, si: n, x: i = 0, y: r = 0 } = a, o =
|
|
387
|
+
const { f: e, si: n, x: i = 0, y: r = 0 } = a, o = Oe(e), u = ca(n);
|
|
388
388
|
if (!o && !u)
|
|
389
389
|
return {
|
|
390
390
|
f: null,
|
|
@@ -393,18 +393,18 @@ function rt(a) {
|
|
|
393
393
|
const m = {};
|
|
394
394
|
return u && (m.si = n), o && i === 0 && r === 0 && (m.f = e), m.f === void 0 && (m.f = null), m.si === void 0 && (m.si = null), m;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Ti(a) {
|
|
397
397
|
const e = new W({});
|
|
398
398
|
return new W(a).forValue((i, r, o) => {
|
|
399
399
|
const u = rt(o);
|
|
400
400
|
u && e.setValue(i, r, u);
|
|
401
401
|
}), e.getMatrix();
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
const e = (a == null ? void 0 : a.f) || "", n = (a == null ? void 0 : a.si) || "", i =
|
|
403
|
+
function ha(a) {
|
|
404
|
+
const e = (a == null ? void 0 : a.f) || "", n = (a == null ? void 0 : a.si) || "", i = Oe(e), r = ca(n);
|
|
405
405
|
return !!(i || r);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Ua(a, e, n, i, r, o) {
|
|
408
408
|
if ((r == null || r.length === 0) && (o == null || o.length === 0)) {
|
|
409
409
|
if (a === n && e === i)
|
|
410
410
|
return !0;
|
|
@@ -412,7 +412,7 @@ function ga(a, e, n, i, r, o) {
|
|
|
412
412
|
return !0;
|
|
413
413
|
return !1;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Fa(a, e, n = 0, i = 0) {
|
|
416
416
|
const r = [];
|
|
417
417
|
for (let o = 0, u = a.length; o < u; o++) {
|
|
418
418
|
const m = a[o];
|
|
@@ -420,7 +420,7 @@ function ha(a, e, n = 0, i = 0) {
|
|
|
420
420
|
r.push(m);
|
|
421
421
|
continue;
|
|
422
422
|
}
|
|
423
|
-
const { token: f } = m, s = se(f), { range:
|
|
423
|
+
const { token: f } = m, s = se(f), { range: d, sheetName: T, unitId: P } = s, E = be.moveOffset(d, n, i);
|
|
424
424
|
r.push({
|
|
425
425
|
...m,
|
|
426
426
|
token: nt({
|
|
@@ -432,16 +432,16 @@ function ha(a, e, n = 0, i = 0) {
|
|
|
432
432
|
}
|
|
433
433
|
return r;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Ba(a, e, n, i) {
|
|
436
436
|
const { type: r, unitId: o, sheetId: u, range: m, from: f, to: s } = e, {
|
|
437
|
-
range:
|
|
437
|
+
range: d,
|
|
438
438
|
sheetId: T,
|
|
439
439
|
unitId: P,
|
|
440
440
|
sheetName: E,
|
|
441
441
|
refOffsetX: I,
|
|
442
442
|
refOffsetY: S
|
|
443
443
|
} = a;
|
|
444
|
-
if (!
|
|
444
|
+
if (!Ua(
|
|
445
445
|
o,
|
|
446
446
|
u,
|
|
447
447
|
n,
|
|
@@ -450,176 +450,176 @@ function Ua(a, e, n, i) {
|
|
|
450
450
|
T
|
|
451
451
|
))
|
|
452
452
|
return;
|
|
453
|
-
const c =
|
|
453
|
+
const c = be.moveOffset(d, I, S);
|
|
454
454
|
let N = null;
|
|
455
455
|
if (r === q.MoveRange) {
|
|
456
456
|
if (f == null || s == null)
|
|
457
457
|
return;
|
|
458
|
-
const R = st(c, f),
|
|
459
|
-
if (
|
|
458
|
+
const R = st(c, f), p = Ge(c, f);
|
|
459
|
+
if (p == null || R !== 4)
|
|
460
460
|
return;
|
|
461
|
-
const O =
|
|
461
|
+
const O = Ta(
|
|
462
462
|
{ id: G.MoveRangeCommandId, params: { toRange: s, fromRange: f } },
|
|
463
|
-
|
|
464
|
-
), M = H(O,
|
|
463
|
+
p
|
|
464
|
+
), M = H(O, p);
|
|
465
465
|
if (M == null)
|
|
466
466
|
return j.REF;
|
|
467
|
-
N = lt(R, M, f, s, c,
|
|
467
|
+
N = lt(R, M, f, s, c, p);
|
|
468
468
|
} else if (r === q.MoveRows) {
|
|
469
469
|
if (f == null || s == null)
|
|
470
470
|
return;
|
|
471
471
|
const R = st(c, f);
|
|
472
|
-
let
|
|
473
|
-
if (
|
|
472
|
+
let p = Ge(c, f);
|
|
473
|
+
if (p == null && (f.endRow < c.startRow && s.endRow < c.startRow || f.startRow > c.endRow && s.startRow > c.endRow))
|
|
474
474
|
return;
|
|
475
|
-
|
|
475
|
+
p == null && (p = {
|
|
476
476
|
startRow: c.startRow,
|
|
477
477
|
endRow: c.endRow,
|
|
478
478
|
startColumn: c.startColumn,
|
|
479
479
|
endColumn: c.endColumn,
|
|
480
|
-
rangeType:
|
|
480
|
+
rangeType: w.NORMAL
|
|
481
481
|
});
|
|
482
|
-
const O =
|
|
482
|
+
const O = Pa(
|
|
483
483
|
{ id: G.MoveRowsCommandId, params: { toRange: s, fromRange: f } },
|
|
484
|
-
|
|
485
|
-
), M = H(O,
|
|
484
|
+
p
|
|
485
|
+
), M = H(O, p);
|
|
486
486
|
if (M == null)
|
|
487
487
|
return j.REF;
|
|
488
|
-
N = lt(R, M, f, s, c,
|
|
488
|
+
N = lt(R, M, f, s, c, p);
|
|
489
489
|
} else if (r === q.MoveCols) {
|
|
490
490
|
if (f == null || s == null)
|
|
491
491
|
return;
|
|
492
492
|
const R = st(c, f);
|
|
493
|
-
let
|
|
494
|
-
if (
|
|
493
|
+
let p = Ge(c, f);
|
|
494
|
+
if (p == null && (f.endColumn < c.startColumn && s.endColumn < c.startColumn || f.startColumn > c.endColumn && s.startColumn > c.endColumn))
|
|
495
495
|
return;
|
|
496
|
-
|
|
496
|
+
p == null && (p = {
|
|
497
497
|
startRow: c.startRow,
|
|
498
498
|
endRow: c.endRow,
|
|
499
499
|
startColumn: c.startColumn,
|
|
500
500
|
endColumn: c.endColumn,
|
|
501
|
-
rangeType:
|
|
501
|
+
rangeType: w.NORMAL
|
|
502
502
|
});
|
|
503
|
-
const O =
|
|
503
|
+
const O = La(
|
|
504
504
|
{ id: G.MoveColsCommandId, params: { toRange: s, fromRange: f } },
|
|
505
|
-
|
|
506
|
-
), M = H(O,
|
|
505
|
+
p
|
|
506
|
+
), M = H(O, p);
|
|
507
507
|
if (M == null)
|
|
508
508
|
return j.REF;
|
|
509
|
-
N = lt(R, M, f, s, c,
|
|
509
|
+
N = lt(R, M, f, s, c, p);
|
|
510
510
|
}
|
|
511
511
|
if (m != null) {
|
|
512
512
|
if (r === q.InsertRow) {
|
|
513
|
-
const R =
|
|
513
|
+
const R = Da(
|
|
514
514
|
{
|
|
515
515
|
id: G.InsertRowCommandId,
|
|
516
516
|
params: { range: m, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
517
517
|
},
|
|
518
518
|
c
|
|
519
|
-
),
|
|
520
|
-
if (
|
|
519
|
+
), p = H(R, c);
|
|
520
|
+
if (p == null)
|
|
521
521
|
return;
|
|
522
522
|
N = {
|
|
523
523
|
...c,
|
|
524
|
-
...
|
|
524
|
+
...p
|
|
525
525
|
};
|
|
526
526
|
} else if (r === q.InsertColumn) {
|
|
527
|
-
const R =
|
|
527
|
+
const R = Ca(
|
|
528
528
|
{
|
|
529
529
|
id: G.InsertColCommandId,
|
|
530
530
|
params: { range: m, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
531
531
|
},
|
|
532
532
|
c
|
|
533
|
-
),
|
|
534
|
-
if (
|
|
533
|
+
), p = H(R, c);
|
|
534
|
+
if (p == null)
|
|
535
535
|
return;
|
|
536
536
|
N = {
|
|
537
537
|
...c,
|
|
538
|
-
...
|
|
538
|
+
...p
|
|
539
539
|
};
|
|
540
540
|
} else if (r === q.RemoveRow) {
|
|
541
|
-
const R =
|
|
541
|
+
const R = Sa(
|
|
542
542
|
{
|
|
543
543
|
id: G.RemoveRowCommandId,
|
|
544
544
|
params: { range: m }
|
|
545
545
|
},
|
|
546
546
|
c
|
|
547
|
-
),
|
|
548
|
-
if (
|
|
547
|
+
), p = H(R, c);
|
|
548
|
+
if (p == null)
|
|
549
549
|
return j.REF;
|
|
550
550
|
N = {
|
|
551
551
|
...c,
|
|
552
|
-
...
|
|
552
|
+
...p
|
|
553
553
|
};
|
|
554
554
|
} else if (r === q.RemoveColumn) {
|
|
555
|
-
const R =
|
|
555
|
+
const R = Aa(
|
|
556
556
|
{
|
|
557
557
|
id: G.RemoveColCommandId,
|
|
558
558
|
params: { range: m }
|
|
559
559
|
},
|
|
560
560
|
c
|
|
561
|
-
),
|
|
562
|
-
if (
|
|
561
|
+
), p = H(R, c);
|
|
562
|
+
if (p == null)
|
|
563
563
|
return j.REF;
|
|
564
564
|
N = {
|
|
565
565
|
...c,
|
|
566
|
-
...
|
|
566
|
+
...p
|
|
567
567
|
};
|
|
568
568
|
} else if (r === q.DeleteMoveLeft) {
|
|
569
|
-
const R =
|
|
569
|
+
const R = Ra(
|
|
570
570
|
{
|
|
571
571
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
572
572
|
params: { range: m }
|
|
573
573
|
},
|
|
574
574
|
c
|
|
575
|
-
),
|
|
576
|
-
if (
|
|
575
|
+
), p = H(R, c);
|
|
576
|
+
if (p == null)
|
|
577
577
|
return j.REF;
|
|
578
578
|
N = {
|
|
579
579
|
...c,
|
|
580
|
-
...
|
|
580
|
+
...p
|
|
581
581
|
};
|
|
582
582
|
} else if (r === q.DeleteMoveUp) {
|
|
583
|
-
const R =
|
|
583
|
+
const R = Na(
|
|
584
584
|
{
|
|
585
585
|
id: G.DeleteRangeMoveUpCommandId,
|
|
586
586
|
params: { range: m }
|
|
587
587
|
},
|
|
588
588
|
c
|
|
589
|
-
),
|
|
590
|
-
if (
|
|
589
|
+
), p = H(R, c);
|
|
590
|
+
if (p == null)
|
|
591
591
|
return j.REF;
|
|
592
592
|
N = {
|
|
593
593
|
...c,
|
|
594
|
-
...
|
|
594
|
+
...p
|
|
595
595
|
};
|
|
596
596
|
} else if (r === q.InsertMoveDown) {
|
|
597
|
-
const R =
|
|
597
|
+
const R = Ia(
|
|
598
598
|
{
|
|
599
599
|
id: G.InsertRangeMoveDownCommandId,
|
|
600
600
|
params: { range: m }
|
|
601
601
|
},
|
|
602
602
|
c
|
|
603
|
-
),
|
|
604
|
-
if (
|
|
603
|
+
), p = H(R, c);
|
|
604
|
+
if (p == null)
|
|
605
605
|
return;
|
|
606
606
|
N = {
|
|
607
607
|
...c,
|
|
608
|
-
...
|
|
608
|
+
...p
|
|
609
609
|
};
|
|
610
610
|
} else if (r === q.InsertMoveRight) {
|
|
611
|
-
const R =
|
|
611
|
+
const R = Ea(
|
|
612
612
|
{
|
|
613
613
|
id: G.InsertRangeMoveRightCommandId,
|
|
614
614
|
params: { range: m }
|
|
615
615
|
},
|
|
616
616
|
c
|
|
617
|
-
),
|
|
618
|
-
if (
|
|
617
|
+
), p = H(R, c);
|
|
618
|
+
if (p == null)
|
|
619
619
|
return;
|
|
620
620
|
N = {
|
|
621
621
|
...c,
|
|
622
|
-
...
|
|
622
|
+
...p
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
625
|
}
|
|
@@ -631,29 +631,29 @@ function Ua(a, e, n, i) {
|
|
|
631
631
|
});
|
|
632
632
|
}
|
|
633
633
|
function lt(a, e, n, i, r, o) {
|
|
634
|
-
const { startRow: u, endRow: m, startColumn: f, endColumn: s, rangeType:
|
|
634
|
+
const { startRow: u, endRow: m, startColumn: f, endColumn: s, rangeType: d } = Ce(e), {
|
|
635
635
|
startRow: T,
|
|
636
636
|
startColumn: P,
|
|
637
637
|
endRow: E,
|
|
638
638
|
endColumn: I,
|
|
639
|
-
rangeType: S =
|
|
640
|
-
} =
|
|
639
|
+
rangeType: S = w.NORMAL
|
|
640
|
+
} = Ce(n), { startRow: c, startColumn: N, endRow: R, endColumn: p } = Ce(i), {
|
|
641
641
|
startRow: O,
|
|
642
642
|
endRow: M,
|
|
643
643
|
startColumn: F,
|
|
644
644
|
endColumn: U
|
|
645
|
-
} =
|
|
645
|
+
} = Ce(o), {
|
|
646
646
|
startRow: g,
|
|
647
647
|
endRow: x,
|
|
648
648
|
startColumn: h,
|
|
649
649
|
endColumn: V,
|
|
650
|
-
rangeType: Q =
|
|
651
|
-
} =
|
|
650
|
+
rangeType: Q = w.NORMAL
|
|
651
|
+
} = Ce(r), b = { ...r };
|
|
652
652
|
function Le() {
|
|
653
|
-
return
|
|
653
|
+
return d === w.COLUMN && Q === w.COLUMN ? !0 : f >= h && s <= V;
|
|
654
654
|
}
|
|
655
655
|
function ae() {
|
|
656
|
-
return
|
|
656
|
+
return d === w.ROW && Q === w.ROW ? !0 : u >= g && m <= x;
|
|
657
657
|
}
|
|
658
658
|
if (a === 0)
|
|
659
659
|
if (Le())
|
|
@@ -695,86 +695,86 @@ function lt(a, e, n, i, r, o) {
|
|
|
695
695
|
return;
|
|
696
696
|
else
|
|
697
697
|
return;
|
|
698
|
-
else a === 4 ? (b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s) : P <= h && I >= V || S ===
|
|
698
|
+
else a === 4 ? (b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s) : P <= h && I >= V || S === w.ROW && Q === w.ROW ? n.endRow < g ? (c >= g && (b.startRow -= E - T + 1), c >= x && (b.endRow -= E - T + 1)) : n.startRow > x ? (R <= x && (b.endRow += E - T + 1), R <= g && (b.startRow += E - T + 1)) : n.startRow >= g && n.endRow <= x && (c <= g ? b.startRow += E - T + 1 : c >= x && (b.endRow -= E - T + 1)) : T <= g && E >= x || S === w.COLUMN && Q === w.COLUMN ? n.endColumn < h ? (N >= h && (b.startColumn -= I - P + 1), N >= V && (b.endColumn -= I - P + 1)) : n.startColumn > V ? (p <= V && (b.endColumn += I - P + 1), p <= h && (b.startColumn += I - P + 1)) : n.startColumn >= h && n.endColumn <= V && (N <= h ? b.startColumn += I - P + 1 : N >= V && (b.endColumn -= I - P + 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);
|
|
699
699
|
return b;
|
|
700
700
|
}
|
|
701
701
|
function st(a, e) {
|
|
702
|
-
const n =
|
|
703
|
-
function
|
|
704
|
-
return a.rangeType ===
|
|
702
|
+
const n = Ne(a.startRow), i = Re(a.endRow), r = Ne(a.startColumn), o = Re(a.endColumn), u = Ne(e.startRow), m = Re(e.endRow), f = Ne(e.startColumn), s = Re(e.endColumn);
|
|
703
|
+
function d() {
|
|
704
|
+
return a.rangeType === w.COLUMN && e.rangeType === w.COLUMN ? !0 : n >= u && i <= m;
|
|
705
705
|
}
|
|
706
706
|
function T() {
|
|
707
|
-
return a.rangeType ===
|
|
707
|
+
return a.rangeType === w.ROW && e.rangeType === w.ROW ? !0 : r >= f && o <= s;
|
|
708
708
|
}
|
|
709
709
|
function P() {
|
|
710
|
-
return a.rangeType ===
|
|
710
|
+
return a.rangeType === w.ALL && e.rangeType === w.ALL;
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return d() && T() || P() ? 4 : T() && n >= u && n <= m && i > m ? 0 : T() && i >= u && i <= m && n < u ? 1 : d() && r >= f && r <= s && o > s ? 2 : d() && o >= f && o <= s && r < f ? 3 : null;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Ne(a) {
|
|
715
715
|
return isNaN(a) ? -1 / 0 : a;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function Re(a) {
|
|
718
718
|
return isNaN(a) ? 1 / 0 : a;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Ce(a) {
|
|
721
721
|
const { startRow: e, endRow: n, startColumn: i, endColumn: r } = a;
|
|
722
722
|
return {
|
|
723
723
|
...a,
|
|
724
|
-
startRow:
|
|
725
|
-
endRow:
|
|
726
|
-
startColumn:
|
|
727
|
-
endColumn:
|
|
724
|
+
startRow: Ne(e),
|
|
725
|
+
endRow: Re(n),
|
|
726
|
+
startColumn: Ne(i),
|
|
727
|
+
endColumn: Re(r)
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function va(a, e) {
|
|
731
731
|
const { id: n } = e;
|
|
732
732
|
let i = null;
|
|
733
733
|
switch (n) {
|
|
734
|
+
case mn.id:
|
|
735
|
+
i = Ei(e, a);
|
|
736
|
+
break;
|
|
737
|
+
case un.id:
|
|
738
|
+
i = Ii(e, a);
|
|
739
|
+
break;
|
|
734
740
|
case on.id:
|
|
735
|
-
i =
|
|
741
|
+
i = Ni(e, a);
|
|
736
742
|
break;
|
|
737
743
|
case rn.id:
|
|
738
|
-
i =
|
|
744
|
+
i = Ri(e);
|
|
739
745
|
break;
|
|
740
746
|
case nn.id:
|
|
741
|
-
i =
|
|
747
|
+
i = Ai(e);
|
|
742
748
|
break;
|
|
743
749
|
case an.id:
|
|
744
|
-
i =
|
|
750
|
+
i = Si(e, a);
|
|
745
751
|
break;
|
|
746
752
|
case tn.id:
|
|
747
|
-
i =
|
|
753
|
+
i = Ci(e, a);
|
|
748
754
|
break;
|
|
749
755
|
case en.id:
|
|
750
|
-
i =
|
|
756
|
+
i = Di(e, a);
|
|
751
757
|
break;
|
|
752
758
|
case Ja.id:
|
|
753
|
-
i =
|
|
759
|
+
i = bi(e, a);
|
|
754
760
|
break;
|
|
755
761
|
case Za.id:
|
|
756
|
-
i =
|
|
762
|
+
i = Oi(e, a);
|
|
757
763
|
break;
|
|
758
764
|
case za.id:
|
|
759
|
-
i =
|
|
765
|
+
i = Mi(e, a);
|
|
760
766
|
break;
|
|
761
767
|
case ja.id:
|
|
762
|
-
i =
|
|
768
|
+
i = xi(e, a);
|
|
763
769
|
break;
|
|
764
770
|
case $a.id:
|
|
765
|
-
i =
|
|
766
|
-
break;
|
|
767
|
-
case Qa.id:
|
|
768
|
-
i = Oi(e, a);
|
|
769
|
-
break;
|
|
770
|
-
case ka.id:
|
|
771
|
-
i = Mi(e, a);
|
|
771
|
+
i = _i(e, a);
|
|
772
772
|
break;
|
|
773
|
-
case
|
|
774
|
-
i =
|
|
773
|
+
case Oa.id:
|
|
774
|
+
i = yi(e, a);
|
|
775
775
|
break;
|
|
776
|
-
case
|
|
777
|
-
i =
|
|
776
|
+
case ba.id:
|
|
777
|
+
i = qi(e, a);
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
780
|
return i;
|
|
@@ -787,7 +787,7 @@ function Z(a) {
|
|
|
787
787
|
sheetId: n
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Ei(a, e) {
|
|
791
791
|
const { params: n } = a;
|
|
792
792
|
if (!n) return null;
|
|
793
793
|
const { fromRange: i, toRange: r } = n;
|
|
@@ -801,7 +801,7 @@ function Pi(a, e) {
|
|
|
801
801
|
sheetId: u
|
|
802
802
|
};
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function Ii(a, e) {
|
|
805
805
|
const { params: n } = a;
|
|
806
806
|
if (!n) return null;
|
|
807
807
|
const {
|
|
@@ -809,28 +809,28 @@ function Ti(a, e) {
|
|
|
809
809
|
toRange: { startRow: o, endRow: u }
|
|
810
810
|
} = n, m = e.getUnitId(), f = e.getActiveSheet();
|
|
811
811
|
if (!f) return null;
|
|
812
|
-
const s = f.getSheetId(),
|
|
812
|
+
const s = f.getSheetId(), d = {
|
|
813
813
|
startRow: i,
|
|
814
814
|
startColumn: 0,
|
|
815
815
|
endRow: r,
|
|
816
816
|
endColumn: f.getColumnCount() - 1,
|
|
817
|
-
rangeType:
|
|
817
|
+
rangeType: w.ROW
|
|
818
818
|
}, T = {
|
|
819
819
|
startRow: o,
|
|
820
820
|
startColumn: 0,
|
|
821
821
|
endRow: u,
|
|
822
822
|
endColumn: f.getColumnCount() - 1,
|
|
823
|
-
rangeType:
|
|
823
|
+
rangeType: w.ROW
|
|
824
824
|
};
|
|
825
825
|
return {
|
|
826
826
|
type: q.MoveRows,
|
|
827
|
-
from:
|
|
827
|
+
from: d,
|
|
828
828
|
to: T,
|
|
829
829
|
unitId: m,
|
|
830
830
|
sheetId: s
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Ni(a, e) {
|
|
834
834
|
const { params: n } = a;
|
|
835
835
|
if (!n) return null;
|
|
836
836
|
const {
|
|
@@ -838,28 +838,28 @@ function Ei(a, e) {
|
|
|
838
838
|
toRange: { startColumn: o, endColumn: u }
|
|
839
839
|
} = n, m = e.getUnitId(), f = e.getActiveSheet();
|
|
840
840
|
if (!f) return null;
|
|
841
|
-
const s = f.getSheetId(),
|
|
841
|
+
const s = f.getSheetId(), d = {
|
|
842
842
|
startRow: 0,
|
|
843
843
|
startColumn: i,
|
|
844
844
|
endRow: f.getRowCount() - 1,
|
|
845
845
|
endColumn: r,
|
|
846
|
-
rangeType:
|
|
846
|
+
rangeType: w.COLUMN
|
|
847
847
|
}, T = {
|
|
848
848
|
startRow: 0,
|
|
849
849
|
startColumn: o,
|
|
850
850
|
endRow: f.getRowCount() - 1,
|
|
851
851
|
endColumn: u,
|
|
852
|
-
rangeType:
|
|
852
|
+
rangeType: w.COLUMN
|
|
853
853
|
};
|
|
854
854
|
return {
|
|
855
855
|
type: q.MoveCols,
|
|
856
|
-
from:
|
|
856
|
+
from: d,
|
|
857
857
|
to: T,
|
|
858
858
|
unitId: m,
|
|
859
859
|
sheetId: s
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Ri(a) {
|
|
863
863
|
const { params: e } = a;
|
|
864
864
|
if (!e) return null;
|
|
865
865
|
const { range: n, unitId: i, subUnitId: r } = e;
|
|
@@ -870,7 +870,7 @@ function Ii(a) {
|
|
|
870
870
|
sheetId: r
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Ai(a) {
|
|
874
874
|
const { params: e } = a;
|
|
875
875
|
if (!e) return null;
|
|
876
876
|
const { range: n, unitId: i, subUnitId: r } = e;
|
|
@@ -881,7 +881,7 @@ function Ni(a) {
|
|
|
881
881
|
sheetId: r
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Si(a, e) {
|
|
885
885
|
const { params: n } = a;
|
|
886
886
|
if (!n) return null;
|
|
887
887
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -892,7 +892,7 @@ function Ri(a, e) {
|
|
|
892
892
|
sheetId: o
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Ci(a, e) {
|
|
896
896
|
const { params: n } = a;
|
|
897
897
|
if (!n) return null;
|
|
898
898
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -903,7 +903,7 @@ function Ai(a, e) {
|
|
|
903
903
|
sheetId: o
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Di(a, e) {
|
|
907
907
|
const { params: n } = a;
|
|
908
908
|
if (!n) return null;
|
|
909
909
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -914,7 +914,7 @@ function Si(a, e) {
|
|
|
914
914
|
sheetId: o
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function bi(a, e) {
|
|
918
918
|
const { params: n } = a;
|
|
919
919
|
if (!n) return null;
|
|
920
920
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -925,7 +925,7 @@ function Ci(a, e) {
|
|
|
925
925
|
sheetId: o
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Oi(a, e) {
|
|
929
929
|
const { params: n } = a;
|
|
930
930
|
if (!n) return null;
|
|
931
931
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -936,7 +936,7 @@ function Di(a, e) {
|
|
|
936
936
|
sheetId: o
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Mi(a, e) {
|
|
940
940
|
const { params: n } = a;
|
|
941
941
|
if (!n) return null;
|
|
942
942
|
const { range: i } = n, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -947,7 +947,7 @@ function bi(a, e) {
|
|
|
947
947
|
sheetId: o
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function xi(a, e) {
|
|
951
951
|
const { params: n } = a;
|
|
952
952
|
if (!n) return null;
|
|
953
953
|
const { unitId: i, subUnitId: r, name: o } = n, { unitId: u, sheetId: m } = Z(e);
|
|
@@ -958,7 +958,7 @@ function Oi(a, e) {
|
|
|
958
958
|
sheetName: o
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function _i(a, e) {
|
|
962
962
|
const { params: n } = a;
|
|
963
963
|
if (!n) return null;
|
|
964
964
|
const { unitId: i, subUnitId: r } = n, { unitId: o, sheetId: u } = Z(e);
|
|
@@ -968,7 +968,7 @@ function Mi(a, e) {
|
|
|
968
968
|
sheetId: r || u
|
|
969
969
|
};
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function yi(a, e) {
|
|
972
972
|
const { params: n } = a;
|
|
973
973
|
if (!n) return null;
|
|
974
974
|
const { unitId: i, name: r, id: o } = n, { sheetId: u } = Z(e);
|
|
@@ -980,7 +980,7 @@ function xi(a, e) {
|
|
|
980
980
|
definedNameId: o
|
|
981
981
|
};
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function qi(a, e) {
|
|
984
984
|
const { params: n } = a;
|
|
985
985
|
if (!n) return null;
|
|
986
986
|
const { unitId: i, name: r, id: o } = n, { sheetId: u } = Z(e);
|
|
@@ -992,11 +992,11 @@ function _i(a, e) {
|
|
|
992
992
|
definedNameId: o
|
|
993
993
|
};
|
|
994
994
|
}
|
|
995
|
-
var
|
|
996
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
995
|
+
var gi = Object.getOwnPropertyDescriptor, hi = (a, e, n, i) => {
|
|
996
|
+
for (var r = i > 1 ? void 0 : i ? gi(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
997
997
|
(u = a[o]) && (r = u(r) || r);
|
|
998
998
|
return r;
|
|
999
|
-
},
|
|
999
|
+
}, Fe = (a, e) => (n, i) => e(n, i, a);
|
|
1000
1000
|
let We = class extends te {
|
|
1001
1001
|
constructor(a, e, n, i) {
|
|
1002
1002
|
super(), this._definedNamesService = a, this._univerInstanceService = e, this._sheetInterceptorService = n, this._lexerTreeBuilder = i, this._initialize();
|
|
@@ -1008,7 +1008,7 @@ let We = class extends te {
|
|
|
1008
1008
|
this.disposeWithMe(
|
|
1009
1009
|
this._sheetInterceptorService.interceptCommand({
|
|
1010
1010
|
getMutations: (a) => {
|
|
1011
|
-
if (a.id ===
|
|
1011
|
+
if (a.id === Oa.id || a.id === ba.id)
|
|
1012
1012
|
return {
|
|
1013
1013
|
redos: [],
|
|
1014
1014
|
undos: []
|
|
@@ -1019,7 +1019,7 @@ let We = class extends te {
|
|
|
1019
1019
|
redos: [],
|
|
1020
1020
|
undos: []
|
|
1021
1021
|
};
|
|
1022
|
-
const n =
|
|
1022
|
+
const n = va(e, a);
|
|
1023
1023
|
return n ? this._getUpdateDefinedNameMutations(e, n) : {
|
|
1024
1024
|
redos: [],
|
|
1025
1025
|
undos: []
|
|
@@ -1039,16 +1039,16 @@ let We = class extends te {
|
|
|
1039
1039
|
const u = [], m = [];
|
|
1040
1040
|
return Object.values(o).forEach((f) => {
|
|
1041
1041
|
var c;
|
|
1042
|
-
const { formulaOrRefString: s } = f,
|
|
1043
|
-
if (
|
|
1042
|
+
const { formulaOrRefString: s } = f, d = this._lexerTreeBuilder.sequenceNodesBuilder(s);
|
|
1043
|
+
if (d == null)
|
|
1044
1044
|
return !0;
|
|
1045
1045
|
let T = !1;
|
|
1046
1046
|
const P = [];
|
|
1047
|
-
for (let N = 0, R =
|
|
1048
|
-
const
|
|
1049
|
-
if (typeof
|
|
1047
|
+
for (let N = 0, R = d.length; N < R; N++) {
|
|
1048
|
+
const p = d[N];
|
|
1049
|
+
if (typeof p == "string" || p.nodeType !== J.REFERENCE)
|
|
1050
1050
|
continue;
|
|
1051
|
-
const { token: O } =
|
|
1051
|
+
const { token: O } = p, M = se(O), { range: F, sheetName: U, unitId: g } = M, x = ((c = a.getSheetBySheetName(U)) == null ? void 0 : c.getSheetId()) || "", h = {
|
|
1052
1052
|
range: F,
|
|
1053
1053
|
sheetId: x,
|
|
1054
1054
|
unitId: g,
|
|
@@ -1072,21 +1072,21 @@ let We = class extends te {
|
|
|
1072
1072
|
unitId: g
|
|
1073
1073
|
});
|
|
1074
1074
|
} else
|
|
1075
|
-
V =
|
|
1075
|
+
V = Ba(
|
|
1076
1076
|
h,
|
|
1077
1077
|
e,
|
|
1078
1078
|
i,
|
|
1079
1079
|
r
|
|
1080
1080
|
);
|
|
1081
|
-
V != null && (
|
|
1082
|
-
...
|
|
1081
|
+
V != null && (d[N] = {
|
|
1082
|
+
...p,
|
|
1083
1083
|
token: V
|
|
1084
1084
|
}, T = !0, P.push(N));
|
|
1085
1085
|
}
|
|
1086
1086
|
if (!T)
|
|
1087
1087
|
return !0;
|
|
1088
|
-
const E =
|
|
1089
|
-
id:
|
|
1088
|
+
const E = Xe(Fa(d, P)), I = {
|
|
1089
|
+
id: xe.id,
|
|
1090
1090
|
params: {
|
|
1091
1091
|
unitId: i,
|
|
1092
1092
|
...f,
|
|
@@ -1095,7 +1095,7 @@ let We = class extends te {
|
|
|
1095
1095
|
};
|
|
1096
1096
|
u.push(I);
|
|
1097
1097
|
const S = {
|
|
1098
|
-
id:
|
|
1098
|
+
id: xe.id,
|
|
1099
1099
|
params: {
|
|
1100
1100
|
unitId: i,
|
|
1101
1101
|
...f
|
|
@@ -1113,27 +1113,27 @@ let We = class extends te {
|
|
|
1113
1113
|
return ((o = this._definedNamesService.getWorksheetByRef(e, i)) == null ? void 0 : o.getSheetId()) === n ? j.REF : null;
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
|
-
We =
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1116
|
+
We = hi([
|
|
1117
|
+
Fe(0, yt),
|
|
1118
|
+
Fe(1, _e),
|
|
1119
|
+
Fe(2, Y(xt)),
|
|
1120
|
+
Fe(3, Y(qt))
|
|
1121
1121
|
], We);
|
|
1122
|
-
var
|
|
1123
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1122
|
+
var Ie = /* @__PURE__ */ ((a) => (a[a.NOT_REGISTER = 1] = "NOT_REGISTER", a[a.SUCCESS = 2] = "SUCCESS", a[a.WAIT = 3] = "WAIT", a[a.ERROR = 4] = "ERROR", a))(Ie || {}), Ui = Object.getOwnPropertyDescriptor, Fi = (a, e, n, i) => {
|
|
1123
|
+
for (var r = i > 1 ? void 0 : i ? Ui(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
1124
1124
|
(u = a[o]) && (r = u(r) || r);
|
|
1125
1125
|
return r;
|
|
1126
|
-
},
|
|
1126
|
+
}, dt = (a, e) => (n, i) => e(n, i, a);
|
|
1127
1127
|
let Ke = class extends te {
|
|
1128
1128
|
constructor(e, n, i) {
|
|
1129
1129
|
super();
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1130
|
+
X(this, "_formulaCacheMap", /* @__PURE__ */ new Map());
|
|
1131
|
+
X(this, "_formulaChangeWithRange$", new na());
|
|
1132
|
+
X(this, "formulaChangeWithRange$", this._formulaChangeWithRange$.asObservable());
|
|
1133
1133
|
// FIXME: this design could be improved.
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1134
|
+
X(this, "_formulaResult$", new na());
|
|
1135
|
+
X(this, "formulaResult$", this._formulaResult$.asObservable());
|
|
1136
|
+
X(this, "calculateStarted$", new qa(!1));
|
|
1137
1137
|
this._commandService = e, this._activeDirtyManagerService = n, this._lifecycleService = i, this._initFormulaRegister(), this._initFormulaCalculationResultChange();
|
|
1138
1138
|
}
|
|
1139
1139
|
dispose() {
|
|
@@ -1146,13 +1146,13 @@ let Ke = class extends te {
|
|
|
1146
1146
|
return r || (r = /* @__PURE__ */ new Map(), i.set(n, r)), r;
|
|
1147
1147
|
}
|
|
1148
1148
|
_createFormulaId(e, n) {
|
|
1149
|
-
return `formula.${e}_${n}_${
|
|
1149
|
+
return `formula.${e}_${n}_${Ae.generateRandomId(8)}`;
|
|
1150
1150
|
}
|
|
1151
1151
|
_initFormulaRegister() {
|
|
1152
1152
|
this._activeDirtyManagerService.register(
|
|
1153
|
-
|
|
1153
|
+
De.id,
|
|
1154
1154
|
{
|
|
1155
|
-
commandId:
|
|
1155
|
+
commandId: De.id,
|
|
1156
1156
|
getDirtyData(n) {
|
|
1157
1157
|
return {
|
|
1158
1158
|
dirtyUnitOtherFormulaMap: n.params
|
|
@@ -1174,40 +1174,40 @@ let Ke = class extends te {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
1176
|
};
|
|
1177
|
-
this._commandService.executeCommand(
|
|
1177
|
+
this._commandService.executeCommand(Tn.id, s).then(() => {
|
|
1178
1178
|
this._commandService.executeCommand(
|
|
1179
|
-
|
|
1179
|
+
De.id,
|
|
1180
1180
|
{ [i]: { [r]: { [u]: !0 } } }
|
|
1181
1181
|
);
|
|
1182
1182
|
});
|
|
1183
1183
|
};
|
|
1184
1184
|
this.disposeWithMe(
|
|
1185
|
-
this._formulaChangeWithRange$.pipe(
|
|
1185
|
+
this._formulaChangeWithRange$.pipe(Yn(() => this.calculateStarted$.pipe(ia((n) => n)))).subscribe((n) => n.forEach(e))
|
|
1186
1186
|
), this.disposeWithMe(
|
|
1187
|
-
this._formulaChangeWithRange$.pipe(
|
|
1187
|
+
this._formulaChangeWithRange$.pipe(ia(() => this.calculateStarted$.getValue())).subscribe(e)
|
|
1188
1188
|
);
|
|
1189
1189
|
}
|
|
1190
1190
|
_initFormulaCalculationResultChange() {
|
|
1191
1191
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
1192
|
-
if (e.id ===
|
|
1192
|
+
if (e.id === Ln.id) {
|
|
1193
1193
|
const n = e.params, { unitOtherData: i } = n, r = {};
|
|
1194
1194
|
for (const o in i) {
|
|
1195
1195
|
const u = i[o], m = {};
|
|
1196
1196
|
r[o] = m;
|
|
1197
1197
|
for (const f in u) {
|
|
1198
|
-
const s = this._ensureCacheMap(o, f),
|
|
1198
|
+
const s = this._ensureCacheMap(o, f), d = u[f], T = [];
|
|
1199
1199
|
m[f] = T;
|
|
1200
|
-
for (const P in
|
|
1201
|
-
const E =
|
|
1200
|
+
for (const P in d) {
|
|
1201
|
+
const E = d[P];
|
|
1202
1202
|
if (s.has(P)) {
|
|
1203
1203
|
const I = s.get(P);
|
|
1204
1204
|
if (!I)
|
|
1205
1205
|
continue;
|
|
1206
1206
|
I.result || (I.result = {});
|
|
1207
1207
|
const S = new W(E), c = new W(I.result);
|
|
1208
|
-
S.forValue((N, R,
|
|
1209
|
-
c.setValue(N, R,
|
|
1210
|
-
}), I.status =
|
|
1208
|
+
S.forValue((N, R, p) => {
|
|
1209
|
+
c.setValue(N, R, p);
|
|
1210
|
+
}), I.status = Ie.SUCCESS, I.callbacks.forEach((N) => {
|
|
1211
1211
|
N(E);
|
|
1212
1212
|
}), I.callbacks.clear(), T.push(I);
|
|
1213
1213
|
}
|
|
@@ -1222,7 +1222,7 @@ let Ke = class extends te {
|
|
|
1222
1222
|
const u = this._createFormulaId(e, n);
|
|
1223
1223
|
return this._ensureCacheMap(e, n).set(u, {
|
|
1224
1224
|
result: void 0,
|
|
1225
|
-
status:
|
|
1225
|
+
status: Ie.WAIT,
|
|
1226
1226
|
formulaId: u,
|
|
1227
1227
|
callbacks: /* @__PURE__ */ new Set(),
|
|
1228
1228
|
extra: o
|
|
@@ -1240,13 +1240,13 @@ let Ke = class extends te {
|
|
|
1240
1240
|
subUnitId: n,
|
|
1241
1241
|
formulaIdList: i
|
|
1242
1242
|
};
|
|
1243
|
-
this._commandService.executeCommand(
|
|
1243
|
+
this._commandService.executeCommand(Pn.id, r);
|
|
1244
1244
|
const o = this._ensureCacheMap(e, n);
|
|
1245
1245
|
i.forEach((u) => o.delete(u));
|
|
1246
1246
|
}
|
|
1247
1247
|
getFormulaValue(e, n, i) {
|
|
1248
1248
|
const r = this._ensureCacheMap(e, n), o = r.get(i);
|
|
1249
|
-
return o ? o.status ===
|
|
1249
|
+
return o ? o.status === Ie.SUCCESS || o.status === Ie.ERROR ? Promise.resolve(o) : new Promise((u) => {
|
|
1250
1250
|
o.callbacks.add(() => {
|
|
1251
1251
|
u(r.get(i));
|
|
1252
1252
|
});
|
|
@@ -1255,26 +1255,33 @@ let Ke = class extends te {
|
|
|
1255
1255
|
getFormulaValueSync(e, n, i) {
|
|
1256
1256
|
return this._ensureCacheMap(e, n).get(i);
|
|
1257
1257
|
}
|
|
1258
|
+
markFormulaDirty(e, n, i) {
|
|
1259
|
+
const r = this.getFormulaValueSync(e, n, i);
|
|
1260
|
+
r && (r.status = Ie.WAIT, this._commandService.executeCommand(
|
|
1261
|
+
De.id,
|
|
1262
|
+
{ [e]: { [n]: { [i]: !0 } } }
|
|
1263
|
+
));
|
|
1264
|
+
}
|
|
1258
1265
|
};
|
|
1259
|
-
Ke =
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1266
|
+
Ke = Fi([
|
|
1267
|
+
dt(0, pe),
|
|
1268
|
+
dt(1, gt),
|
|
1269
|
+
dt(2, Y(Ya))
|
|
1263
1270
|
], Ke);
|
|
1264
1271
|
const ot = "sheets-formula.base.config";
|
|
1265
|
-
var
|
|
1266
|
-
const
|
|
1267
|
-
var
|
|
1268
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1272
|
+
var de = /* @__PURE__ */ ((a) => (a[a.FORCED = 0] = "FORCED", a[a.WHEN_EMPTY = 1] = "WHEN_EMPTY", a[a.NO_CALCULATION = 2] = "NO_CALCULATION", a))(de || {});
|
|
1273
|
+
const ra = {}, Bi = "sheets-formula.remote.config", oa = {};
|
|
1274
|
+
var vi = Object.getOwnPropertyDescriptor, Vi = (a, e, n, i) => {
|
|
1275
|
+
for (var r = i > 1 ? void 0 : i ? vi(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
1269
1276
|
(u = a[o]) && (r = u(r) || r);
|
|
1270
1277
|
return r;
|
|
1271
|
-
},
|
|
1272
|
-
const
|
|
1273
|
-
let
|
|
1278
|
+
}, le = (a, e) => (n, i) => e(n, i, a);
|
|
1279
|
+
const ua = { done: 0, count: 0 }, pt = { onlyLocal: !0 };
|
|
1280
|
+
let Me = class extends te {
|
|
1274
1281
|
constructor(e, n, i, r, o, u, m) {
|
|
1275
1282
|
super();
|
|
1276
|
-
|
|
1277
|
-
|
|
1283
|
+
X(this, "_waitingCommandQueue", []);
|
|
1284
|
+
X(this, "_executingDirtyData", {
|
|
1278
1285
|
forceCalculation: !1,
|
|
1279
1286
|
dirtyRanges: [],
|
|
1280
1287
|
dirtyNameMap: {},
|
|
@@ -1283,18 +1290,18 @@ let Oe = class extends te {
|
|
|
1283
1290
|
dirtyUnitOtherFormulaMap: {},
|
|
1284
1291
|
clearDependencyTreeCache: {}
|
|
1285
1292
|
});
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1293
|
+
X(this, "_setTimeoutKey", -1);
|
|
1294
|
+
X(this, "_startExecutionTime", 0);
|
|
1295
|
+
X(this, "_totalCalculationTaskCount", 0);
|
|
1296
|
+
X(this, "_doneCalculationTaskCount", 0);
|
|
1297
|
+
X(this, "_executionInProgressParams", null);
|
|
1298
|
+
X(this, "_restartCalculation", !1);
|
|
1292
1299
|
/**
|
|
1293
1300
|
* The mark of forced calculation. If a new mutation triggers dirty area calculation during the forced calculation process, forced calculation is still required.
|
|
1294
1301
|
*/
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1302
|
+
X(this, "_forceCalculating", !1);
|
|
1303
|
+
X(this, "_progress$", new qa(ua));
|
|
1304
|
+
X(this, "progress$", this._progress$.asObservable());
|
|
1298
1305
|
this._commandService = e, this._activeDirtyManagerService = n, this._logService = i, this._configService = r, this._formulaDataModel = o, this._localeService = u, this._registerOtherFormulaService = m, this._commandExecutedListener(), this._initialExecuteFormulaProcessListener(), this._initialExecuteFormula();
|
|
1299
1306
|
}
|
|
1300
1307
|
_emitProgress(e) {
|
|
@@ -1322,25 +1329,32 @@ let Oe = class extends te {
|
|
|
1322
1329
|
this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._emitProgress();
|
|
1323
1330
|
}
|
|
1324
1331
|
dispose() {
|
|
1325
|
-
super.dispose(), this._progress$.next(
|
|
1332
|
+
super.dispose(), this._progress$.next(ua), this._progress$.complete(), clearTimeout(this._setTimeoutKey);
|
|
1326
1333
|
}
|
|
1327
1334
|
_getCalculationMode() {
|
|
1328
1335
|
var n;
|
|
1329
1336
|
const e = this._configService.getConfig(ot);
|
|
1330
|
-
return (n = e == null ? void 0 : e.initialFormulaComputing) != null ? n :
|
|
1337
|
+
return (n = e == null ? void 0 : e.initialFormulaComputing) != null ? n : de.WHEN_EMPTY;
|
|
1331
1338
|
}
|
|
1332
1339
|
_commandExecutedListener() {
|
|
1333
1340
|
this.disposeWithMe(
|
|
1341
|
+
this._commandService.beforeCommandExecuted((e) => {
|
|
1342
|
+
if (e.id === Ee.id) {
|
|
1343
|
+
const n = e.params;
|
|
1344
|
+
n.rowData = this._formulaDataModel.getHiddenRowsFiltered();
|
|
1345
|
+
}
|
|
1346
|
+
})
|
|
1347
|
+
), this.disposeWithMe(
|
|
1334
1348
|
this._commandService.onCommandExecuted((e, n) => {
|
|
1335
1349
|
if (this._activeDirtyManagerService.get(e.id)) {
|
|
1336
|
-
if (e.id ===
|
|
1350
|
+
if (e.id === ie.id) {
|
|
1337
1351
|
const i = e.params;
|
|
1338
|
-
if (n && n.onlyLocal === !0 || i.trigger === _t.id || i.trigger ===
|
|
1352
|
+
if (n && n.onlyLocal === !0 || i.trigger === _t.id || i.trigger === Ma.id || i.trigger === xa.id)
|
|
1339
1353
|
return;
|
|
1340
1354
|
}
|
|
1341
1355
|
this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
|
|
1342
1356
|
const i = this._generateDirty(this._waitingCommandQueue);
|
|
1343
|
-
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(
|
|
1357
|
+
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(Ee.id, { ...this._executingDirtyData }, pt) : (this._restartCalculation = !0, this._commandService.executeCommand(jt.id, {})), this._waitingCommandQueue = [];
|
|
1344
1358
|
}, 100);
|
|
1345
1359
|
}
|
|
1346
1360
|
})
|
|
@@ -1352,7 +1366,7 @@ let Oe = class extends te {
|
|
|
1352
1366
|
const s = this._activeDirtyManagerService.get(f.id);
|
|
1353
1367
|
if (s == null)
|
|
1354
1368
|
continue;
|
|
1355
|
-
const
|
|
1369
|
+
const d = s.getDirtyData(f), { dirtyRanges: T, dirtyNameMap: P, dirtyDefinedNameMap: E, dirtyUnitFeatureMap: I, dirtyUnitOtherFormulaMap: S, clearDependencyTreeCache: c } = d;
|
|
1356
1370
|
T != null && this._mergeDirtyRanges(n, T), P != null && this._mergeDirtyNameMap(i, P), E != null && this._mergeDirtyNameMap(r, E), I != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(o, I), S != null && this._mergeDirtyUnitFeatureOrOtherFormulaMap(u, S), c != null && this._mergeDirtyNameMap(m, c);
|
|
1357
1371
|
}
|
|
1358
1372
|
return {
|
|
@@ -1363,7 +1377,7 @@ let Oe = class extends te {
|
|
|
1363
1377
|
dirtyUnitOtherFormulaMap: u,
|
|
1364
1378
|
forceCalculation: !1,
|
|
1365
1379
|
clearDependencyTreeCache: m,
|
|
1366
|
-
maxIteration: this._configService.getConfig(
|
|
1380
|
+
maxIteration: this._configService.getConfig(zt)
|
|
1367
1381
|
// numfmtItemMap,
|
|
1368
1382
|
};
|
|
1369
1383
|
}
|
|
@@ -1392,8 +1406,8 @@ let Oe = class extends te {
|
|
|
1392
1406
|
let r = !1;
|
|
1393
1407
|
for (const o of e)
|
|
1394
1408
|
if (i.unitId === o.unitId && i.sheetId === o.sheetId) {
|
|
1395
|
-
const { startRow: u, startColumn: m, endRow: f, endColumn: s } = i.range, { startRow:
|
|
1396
|
-
if (u ===
|
|
1409
|
+
const { startRow: u, startColumn: m, endRow: f, endColumn: s } = i.range, { startRow: d, startColumn: T, endRow: P, endColumn: E } = o.range;
|
|
1410
|
+
if (u === d && m === T && f === P && s === E) {
|
|
1397
1411
|
r = !0;
|
|
1398
1412
|
break;
|
|
1399
1413
|
}
|
|
@@ -1424,32 +1438,32 @@ let Oe = class extends te {
|
|
|
1424
1438
|
this.disposeWithMe(
|
|
1425
1439
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
1426
1440
|
this._commandService.onCommandExecuted((i) => {
|
|
1427
|
-
if (i.id ===
|
|
1441
|
+
if (i.id === Ee.id) {
|
|
1428
1442
|
const { forceCalculation: o = !1 } = i.params;
|
|
1429
1443
|
o && (this._forceCalculating = !0);
|
|
1430
|
-
} else i.id ===
|
|
1431
|
-
if (i.id !==
|
|
1444
|
+
} else i.id === jt.id && this.clearProgress();
|
|
1445
|
+
if (i.id !== En.id)
|
|
1432
1446
|
return;
|
|
1433
1447
|
const r = i.params;
|
|
1434
1448
|
if (r.stageInfo != null) {
|
|
1435
1449
|
const {
|
|
1436
1450
|
stage: o
|
|
1437
1451
|
} = r.stageInfo;
|
|
1438
|
-
if (o ===
|
|
1452
|
+
if (o === he.START)
|
|
1439
1453
|
n === 0 && (this._startExecutionTime = performance.now()), n++, e !== null && (clearTimeout(e), e = null), e = setTimeout(() => {
|
|
1440
1454
|
e = null, this._startProgress();
|
|
1441
1455
|
}, 1e3);
|
|
1442
|
-
else if (o ===
|
|
1456
|
+
else if (o === he.CURRENTLY_CALCULATING) {
|
|
1443
1457
|
if (this._executionInProgressParams = r.stageInfo, e === null) {
|
|
1444
1458
|
const u = this._localeService.t("formula.progress.calculating");
|
|
1445
1459
|
this._calculateProgress(u);
|
|
1446
1460
|
}
|
|
1447
|
-
} else if (o ===
|
|
1461
|
+
} else if (o === he.START_DEPENDENCY_ARRAY_FORMULA) {
|
|
1448
1462
|
if (this._executionInProgressParams = r.stageInfo, e === null) {
|
|
1449
1463
|
const u = this._localeService.t("formula.progress.array-analysis");
|
|
1450
1464
|
this._calculateProgress(u);
|
|
1451
1465
|
}
|
|
1452
|
-
} else if (o ===
|
|
1466
|
+
} else if (o === he.CURRENTLY_CALCULATING_ARRAY_FORMULA && (this._executionInProgressParams = r.stageInfo, e === null)) {
|
|
1453
1467
|
const u = this._localeService.t("formula.progress.array-calculation");
|
|
1454
1468
|
this._calculateProgress(u);
|
|
1455
1469
|
}
|
|
@@ -1457,25 +1471,25 @@ let Oe = class extends te {
|
|
|
1457
1471
|
const o = r.functionsExecutedState;
|
|
1458
1472
|
let u = "";
|
|
1459
1473
|
switch (n--, o) {
|
|
1460
|
-
case
|
|
1474
|
+
case Se.NOT_EXECUTED:
|
|
1461
1475
|
u = "No tasks are being executed anymore", this._resetExecutingDirtyData();
|
|
1462
1476
|
break;
|
|
1463
|
-
case
|
|
1477
|
+
case Se.STOP_EXECUTION:
|
|
1464
1478
|
u = "The execution of the formula has been stopped", n = 0;
|
|
1465
1479
|
break;
|
|
1466
|
-
case
|
|
1480
|
+
case Se.SUCCESS:
|
|
1467
1481
|
u = "Formula calculation succeeded", (n === 0 || n === -1) && (u += `. Total time consumed: ${performance.now() - this._startExecutionTime} ms`), this._resetExecutingDirtyData();
|
|
1468
1482
|
break;
|
|
1469
|
-
case
|
|
1483
|
+
case Se.INITIAL:
|
|
1470
1484
|
u = "Waiting for calculation", this._resetExecutingDirtyData();
|
|
1471
1485
|
break;
|
|
1472
1486
|
}
|
|
1473
|
-
(n === 0 || n === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), n = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o ===
|
|
1474
|
-
|
|
1487
|
+
(n === 0 || n === -1) && (e ? (clearTimeout(e), e = null, this.clearProgress()) : this._completeProgress(), n = 0, this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._forceCalculating = !1), o === Se.STOP_EXECUTION && this._restartCalculation ? (this._restartCalculation = !1, this._commandService.executeCommand(
|
|
1488
|
+
Ee.id,
|
|
1475
1489
|
{
|
|
1476
1490
|
...this._executingDirtyData
|
|
1477
1491
|
},
|
|
1478
|
-
|
|
1492
|
+
pt
|
|
1479
1493
|
)) : this._executionInProgressParams = null, this._logService.debug("[TriggerCalculationController]", u);
|
|
1480
1494
|
}
|
|
1481
1495
|
})
|
|
@@ -1494,10 +1508,10 @@ let Oe = class extends te {
|
|
|
1494
1508
|
}
|
|
1495
1509
|
_initialExecuteFormula() {
|
|
1496
1510
|
const e = this._getCalculationMode(), n = this._getDirtyDataByCalculationMode(e);
|
|
1497
|
-
this._commandService.executeCommand(
|
|
1511
|
+
this._commandService.executeCommand(Ee.id, n, pt), this._registerOtherFormulaService.calculateStarted$.next(!0);
|
|
1498
1512
|
}
|
|
1499
1513
|
_getDirtyDataByCalculationMode(e) {
|
|
1500
|
-
const n = e ===
|
|
1514
|
+
const n = e === de.FORCED, i = e === de.WHEN_EMPTY ? this._formulaDataModel.getFormulaDirtyRanges() : [];
|
|
1501
1515
|
return {
|
|
1502
1516
|
forceCalculation: n,
|
|
1503
1517
|
dirtyRanges: i,
|
|
@@ -1506,21 +1520,21 @@ let Oe = class extends te {
|
|
|
1506
1520
|
dirtyUnitFeatureMap: {},
|
|
1507
1521
|
dirtyUnitOtherFormulaMap: {},
|
|
1508
1522
|
clearDependencyTreeCache: {},
|
|
1509
|
-
maxIteration: this._configService.getConfig(
|
|
1523
|
+
maxIteration: this._configService.getConfig(zt)
|
|
1510
1524
|
};
|
|
1511
1525
|
}
|
|
1512
1526
|
};
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
],
|
|
1522
|
-
function
|
|
1523
|
-
const r = a.get(
|
|
1527
|
+
Me = Vi([
|
|
1528
|
+
le(0, pe),
|
|
1529
|
+
le(1, gt),
|
|
1530
|
+
le(2, Xa),
|
|
1531
|
+
le(3, ye),
|
|
1532
|
+
le(4, Y(it)),
|
|
1533
|
+
le(5, Y(Ot)),
|
|
1534
|
+
le(6, Y(Ke))
|
|
1535
|
+
], Me);
|
|
1536
|
+
function Fr(a, e, n, i) {
|
|
1537
|
+
const r = a.get(In), o = a.get(Nn), u = a.get(Rn), m = a.get(An);
|
|
1524
1538
|
r.load({
|
|
1525
1539
|
formulaData: {},
|
|
1526
1540
|
arrayFormulaCellData: {},
|
|
@@ -1536,14 +1550,14 @@ function hr(a, e, n, i) {
|
|
|
1536
1550
|
},
|
|
1537
1551
|
dirtyUnitOtherFormulaMap: {}
|
|
1538
1552
|
});
|
|
1539
|
-
const f = o.treeBuilder(e), s = u.parse(f),
|
|
1540
|
-
return
|
|
1553
|
+
const f = o.treeBuilder(e), s = u.parse(f), d = m.execute(Sn(s));
|
|
1554
|
+
return Cn(d);
|
|
1541
1555
|
}
|
|
1542
|
-
var
|
|
1543
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1556
|
+
var Gi = Object.getOwnPropertyDescriptor, Hi = (a, e, n, i) => {
|
|
1557
|
+
for (var r = i > 1 ? void 0 : i ? Gi(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
1544
1558
|
(u = a[o]) && (r = u(r) || r);
|
|
1545
1559
|
return r;
|
|
1546
|
-
},
|
|
1560
|
+
}, me = (a, e) => (n, i) => e(n, i, a);
|
|
1547
1561
|
let ke = class extends te {
|
|
1548
1562
|
constructor(a, e, n, i, r, o, u, m) {
|
|
1549
1563
|
super(), this._univerInstanceService = a, this._commandService = e, this._lexerTreeBuilder = n, this._formulaDataModel = i, this._sheetInterceptorService = r, this._definedNamesService = o, this._configService = u, this._injector = m, this._commandExecutedListener();
|
|
@@ -1561,14 +1575,14 @@ let ke = class extends te {
|
|
|
1561
1575
|
})
|
|
1562
1576
|
), this.disposeWithMe(
|
|
1563
1577
|
this._commandService.beforeCommandExecuted((a, e) => {
|
|
1564
|
-
if (a.id ===
|
|
1578
|
+
if (a.id === ie.id) {
|
|
1565
1579
|
const n = a.params;
|
|
1566
|
-
if (e && e.onlyLocal === !0 || n.trigger === _t.id || n.trigger ===
|
|
1580
|
+
if (e && e.onlyLocal === !0 || n.trigger === _t.id || n.trigger === Ma.id || n.trigger === xa.id)
|
|
1567
1581
|
return;
|
|
1568
1582
|
this._handleSetRangeValuesMutation(n);
|
|
1569
1583
|
}
|
|
1570
1584
|
})
|
|
1571
|
-
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((a) => this._handleWorkbookAdded(a))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(
|
|
1585
|
+
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((a) => this._handleWorkbookAdded(a))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(Xn((a) => a.getUnitId())).subscribe((a) => this._handleWorkbookDisposed(a)));
|
|
1572
1586
|
}
|
|
1573
1587
|
_handleSetRangeValuesMutation(a) {
|
|
1574
1588
|
const { subUnitId: e, unitId: n, cellValue: i } = a;
|
|
@@ -1580,18 +1594,18 @@ let ke = class extends te {
|
|
|
1580
1594
|
}
|
|
1581
1595
|
};
|
|
1582
1596
|
this._commandService.executeCommand(
|
|
1583
|
-
|
|
1597
|
+
ie.id,
|
|
1584
1598
|
{
|
|
1585
1599
|
unitId: n,
|
|
1586
1600
|
subUnitId: e,
|
|
1587
|
-
cellValue:
|
|
1601
|
+
cellValue: Ti(r)
|
|
1588
1602
|
},
|
|
1589
1603
|
{
|
|
1590
1604
|
onlyLocal: !0,
|
|
1591
1605
|
fromFormula: !0
|
|
1592
1606
|
}
|
|
1593
1607
|
), this._formulaDataModel.updateArrayFormulaCellData(n, e, i), this._formulaDataModel.updateArrayFormulaRange(n, e, i), this._commandService.executeCommand(
|
|
1594
|
-
|
|
1608
|
+
Ue.id,
|
|
1595
1609
|
{
|
|
1596
1610
|
formulaData: o
|
|
1597
1611
|
},
|
|
@@ -1614,7 +1628,7 @@ let ke = class extends te {
|
|
|
1614
1628
|
_handleWorkbookDisposed(a, e) {
|
|
1615
1629
|
const n = this._formulaDataModel.getFormulaData(), i = ct(n, a, e), r = this._formulaDataModel.getArrayFormulaRange(), o = ct(r, a, e), u = this._formulaDataModel.getArrayFormulaCellData(), m = ct(u, a, e);
|
|
1616
1630
|
i && this._commandService.executeCommand(
|
|
1617
|
-
|
|
1631
|
+
Ue.id,
|
|
1618
1632
|
{
|
|
1619
1633
|
formulaData: i
|
|
1620
1634
|
},
|
|
@@ -1633,9 +1647,9 @@ let ke = class extends te {
|
|
|
1633
1647
|
);
|
|
1634
1648
|
}
|
|
1635
1649
|
_handleInsertSheetMutation(a) {
|
|
1636
|
-
const { sheet: e, unitId: n } = a, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new W(o), m =
|
|
1650
|
+
const { sheet: e, unitId: n } = a, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new W(o), m = Zt(i, n, r, u);
|
|
1637
1651
|
this._commandService.executeCommand(
|
|
1638
|
-
|
|
1652
|
+
Ue.id,
|
|
1639
1653
|
{
|
|
1640
1654
|
formulaData: m
|
|
1641
1655
|
},
|
|
@@ -1649,14 +1663,14 @@ let ke = class extends te {
|
|
|
1649
1663
|
const e = {}, n = a.getUnitId(), i = { [n]: {} };
|
|
1650
1664
|
a.getSheets().forEach((s) => {
|
|
1651
1665
|
var E;
|
|
1652
|
-
const
|
|
1666
|
+
const d = s.getCellMatrix(), T = s.getSheetId(), P = Zt(e, n, T, d);
|
|
1653
1667
|
i[n][T] = (E = P[n]) == null ? void 0 : E[T];
|
|
1654
|
-
}), this._commandService.executeCommand(
|
|
1655
|
-
const o = this._configService.getConfig(ot), u = (f = o == null ? void 0 : o.initialFormulaComputing) != null ? f :
|
|
1656
|
-
this._commandService.executeCommand(
|
|
1668
|
+
}), this._commandService.executeCommand(Ue.id, { formulaData: i }, { onlyLocal: !0 });
|
|
1669
|
+
const o = this._configService.getConfig(ot), u = (f = o == null ? void 0 : o.initialFormulaComputing) != null ? f : de.WHEN_EMPTY, m = this._getDirtyDataByCalculationMode(u);
|
|
1670
|
+
this._commandService.executeCommand(Ee.id, m, { onlyLocal: !0 });
|
|
1657
1671
|
}
|
|
1658
|
-
|
|
1659
|
-
const e = a ===
|
|
1672
|
+
_getDirtyDataByCalculationMode(a) {
|
|
1673
|
+
const e = a === de.FORCED, n = a === de.WHEN_EMPTY ? this._formulaDataModel.getFormulaDirtyRanges() : [];
|
|
1660
1674
|
return {
|
|
1661
1675
|
forceCalculation: e,
|
|
1662
1676
|
dirtyRanges: n,
|
|
@@ -1674,13 +1688,13 @@ let ke = class extends te {
|
|
|
1674
1688
|
undos: [],
|
|
1675
1689
|
redos: []
|
|
1676
1690
|
};
|
|
1677
|
-
const n =
|
|
1691
|
+
const n = va(e, a);
|
|
1678
1692
|
if (n) {
|
|
1679
1693
|
const { unitSheetNameMap: i } = this._formulaDataModel.getCalculateData(), r = this._formulaDataModel.getFormulaData(), { newFormulaData: o } = this._getFormulaReferenceMoveInfo(
|
|
1680
1694
|
r,
|
|
1681
1695
|
i,
|
|
1682
1696
|
n
|
|
1683
|
-
), { undos: u, redos: m } =
|
|
1697
|
+
), { undos: u, redos: m } = jn(r, o, n);
|
|
1684
1698
|
return {
|
|
1685
1699
|
undos: u,
|
|
1686
1700
|
redos: m
|
|
@@ -1693,7 +1707,7 @@ let ke = class extends te {
|
|
|
1693
1707
|
}
|
|
1694
1708
|
// eslint-disable-next-line max-lines-per-function
|
|
1695
1709
|
_getFormulaReferenceMoveInfo(a, e, n) {
|
|
1696
|
-
if (!
|
|
1710
|
+
if (!Ae.isDefine(a)) return { newFormulaData: {}, oldFormulaData: {} };
|
|
1697
1711
|
const i = Object.keys(a);
|
|
1698
1712
|
if (i.length === 0) return { newFormulaData: {}, oldFormulaData: {} };
|
|
1699
1713
|
const r = {}, o = {};
|
|
@@ -1702,19 +1716,19 @@ let ke = class extends te {
|
|
|
1702
1716
|
if (m == null)
|
|
1703
1717
|
continue;
|
|
1704
1718
|
const f = Object.keys(m);
|
|
1705
|
-
|
|
1719
|
+
Ae.isDefine(r[u]) || (r[u] = {}), Ae.isDefine(o[u]) || (o[u] = {});
|
|
1706
1720
|
for (const s of f) {
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1721
|
+
const d = new W(m[s] || {}), T = new W();
|
|
1722
|
+
d.forValue((P, E, I) => {
|
|
1709
1723
|
var U;
|
|
1710
1724
|
if (!I) return !0;
|
|
1711
|
-
const { f: S, x: c, y: N, si: R } = I,
|
|
1712
|
-
if (
|
|
1725
|
+
const { f: S, x: c, y: N, si: R } = I, p = this._lexerTreeBuilder.sequenceNodesBuilder(S);
|
|
1726
|
+
if (p == null)
|
|
1713
1727
|
return !0;
|
|
1714
1728
|
let O = !1;
|
|
1715
1729
|
const M = [];
|
|
1716
|
-
for (let g = 0, x =
|
|
1717
|
-
const h =
|
|
1730
|
+
for (let g = 0, x = p.length; g < x; g++) {
|
|
1731
|
+
const h = p[g];
|
|
1718
1732
|
if (typeof h == "string")
|
|
1719
1733
|
continue;
|
|
1720
1734
|
const { token: V, nodeType: Q } = h, { type: b } = n;
|
|
@@ -1722,18 +1736,18 @@ let ke = class extends te {
|
|
|
1722
1736
|
const { definedNameId: Pe, definedName: Te } = n;
|
|
1723
1737
|
if (Pe === void 0 || Te === void 0)
|
|
1724
1738
|
continue;
|
|
1725
|
-
const
|
|
1726
|
-
if (
|
|
1739
|
+
const fe = this._definedNamesService.getValueById(u, Pe);
|
|
1740
|
+
if (fe == null || fe.name !== V)
|
|
1727
1741
|
continue;
|
|
1728
|
-
|
|
1742
|
+
p[g] = {
|
|
1729
1743
|
...h,
|
|
1730
1744
|
token: b === q.SetDefinedName ? Te : j.REF
|
|
1731
1745
|
}, O = !0, M.push(g);
|
|
1732
1746
|
continue;
|
|
1733
1747
|
} else if (Q !== J.REFERENCE)
|
|
1734
1748
|
continue;
|
|
1735
|
-
const Le = se(V), { range: ae, sheetName:
|
|
1736
|
-
if (!
|
|
1749
|
+
const Le = se(V), { range: ae, sheetName: re, unitId: k } = Le, oe = k == null || k.length === 0 ? u : k, z = ((U = e == null ? void 0 : e[oe]) == null ? void 0 : U[re]) || "";
|
|
1750
|
+
if (!Ua(
|
|
1737
1751
|
n.unitId,
|
|
1738
1752
|
n.sheetId,
|
|
1739
1753
|
u,
|
|
@@ -1742,53 +1756,53 @@ let ke = class extends te {
|
|
|
1742
1756
|
z
|
|
1743
1757
|
))
|
|
1744
1758
|
continue;
|
|
1745
|
-
const
|
|
1759
|
+
const qe = {
|
|
1746
1760
|
range: ae,
|
|
1747
1761
|
sheetId: z,
|
|
1748
1762
|
unitId: k,
|
|
1749
|
-
sheetName:
|
|
1763
|
+
sheetName: re,
|
|
1750
1764
|
refOffsetX: c || 0,
|
|
1751
1765
|
refOffsetY: N || 0
|
|
1752
1766
|
};
|
|
1753
|
-
let
|
|
1767
|
+
let ue = null;
|
|
1754
1768
|
if (b === q.SetName) {
|
|
1755
1769
|
const {
|
|
1756
1770
|
unitId: Pe,
|
|
1757
1771
|
sheetId: Te,
|
|
1758
|
-
sheetName:
|
|
1772
|
+
sheetName: fe
|
|
1759
1773
|
} = n;
|
|
1760
|
-
if (
|
|
1774
|
+
if (fe == null || z == null || z.length === 0 || Te !== z)
|
|
1761
1775
|
continue;
|
|
1762
|
-
|
|
1776
|
+
ue = nt({
|
|
1763
1777
|
range: ae,
|
|
1764
|
-
sheetName:
|
|
1778
|
+
sheetName: fe,
|
|
1765
1779
|
unitId: k
|
|
1766
1780
|
});
|
|
1767
1781
|
} else if (b === q.RemoveSheet) {
|
|
1768
1782
|
const {
|
|
1769
1783
|
unitId: Pe,
|
|
1770
1784
|
sheetId: Te,
|
|
1771
|
-
sheetName:
|
|
1785
|
+
sheetName: fe
|
|
1772
1786
|
} = n;
|
|
1773
1787
|
if (z == null || z.length === 0 || Te !== z)
|
|
1774
1788
|
continue;
|
|
1775
|
-
|
|
1776
|
-
} else b !== q.SetDefinedName && (
|
|
1777
|
-
|
|
1789
|
+
ue = j.REF;
|
|
1790
|
+
} else b !== q.SetDefinedName && (ue = Ba(
|
|
1791
|
+
qe,
|
|
1778
1792
|
n,
|
|
1779
1793
|
u,
|
|
1780
1794
|
s
|
|
1781
1795
|
));
|
|
1782
|
-
|
|
1796
|
+
ue != null && (p[g] = {
|
|
1783
1797
|
...h,
|
|
1784
|
-
token:
|
|
1798
|
+
token: ue
|
|
1785
1799
|
}, O = !0, M.push(g));
|
|
1786
1800
|
}
|
|
1787
1801
|
if (!O)
|
|
1788
1802
|
return !0;
|
|
1789
|
-
const F =
|
|
1803
|
+
const F = Fa(p, M, c, N);
|
|
1790
1804
|
T.setValue(P, E, {
|
|
1791
|
-
f: `=${
|
|
1805
|
+
f: `=${Xe(F)}`
|
|
1792
1806
|
});
|
|
1793
1807
|
}), o[u] && (o[u][s] = T.getData());
|
|
1794
1808
|
}
|
|
@@ -1796,19 +1810,19 @@ let ke = class extends te {
|
|
|
1796
1810
|
return { newFormulaData: o };
|
|
1797
1811
|
}
|
|
1798
1812
|
};
|
|
1799
|
-
ke =
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1813
|
+
ke = Hi([
|
|
1814
|
+
me(0, _e),
|
|
1815
|
+
me(1, pe),
|
|
1816
|
+
me(2, Y(qt)),
|
|
1817
|
+
me(3, Y(it)),
|
|
1818
|
+
me(4, Y(xt)),
|
|
1819
|
+
me(5, yt),
|
|
1820
|
+
me(6, ye),
|
|
1821
|
+
me(7, Y(at))
|
|
1808
1822
|
], ke);
|
|
1809
|
-
const
|
|
1823
|
+
const wi = [
|
|
1810
1824
|
{
|
|
1811
|
-
functionName:
|
|
1825
|
+
functionName: Jt.ARRAY_CONSTRAIN,
|
|
1812
1826
|
functionType: t.Array,
|
|
1813
1827
|
description: "formula.functionList.ARRAY_CONSTRAIN.description",
|
|
1814
1828
|
abstract: "formula.functionList.ARRAY_CONSTRAIN.abstract",
|
|
@@ -1837,7 +1851,7 @@ const Gi = [
|
|
|
1837
1851
|
]
|
|
1838
1852
|
},
|
|
1839
1853
|
{
|
|
1840
|
-
functionName:
|
|
1854
|
+
functionName: Jt.FLATTEN,
|
|
1841
1855
|
functionType: t.Array,
|
|
1842
1856
|
description: "formula.functionList.FLATTEN.description",
|
|
1843
1857
|
abstract: "formula.functionList.FLATTEN.abstract",
|
|
@@ -1858,7 +1872,7 @@ const Gi = [
|
|
|
1858
1872
|
}
|
|
1859
1873
|
]
|
|
1860
1874
|
}
|
|
1861
|
-
],
|
|
1875
|
+
], Yi = [
|
|
1862
1876
|
{
|
|
1863
1877
|
functionName: _.BETADIST,
|
|
1864
1878
|
functionType: t.Compatibility,
|
|
@@ -2912,9 +2926,9 @@ const Gi = [
|
|
|
2912
2926
|
}
|
|
2913
2927
|
]
|
|
2914
2928
|
}
|
|
2915
|
-
],
|
|
2929
|
+
], Xi = [
|
|
2916
2930
|
{
|
|
2917
|
-
functionName:
|
|
2931
|
+
functionName: ce.CUBEKPIMEMBER,
|
|
2918
2932
|
functionType: t.Cube,
|
|
2919
2933
|
description: "formula.functionList.CUBEKPIMEMBER.description",
|
|
2920
2934
|
abstract: "formula.functionList.CUBEKPIMEMBER.abstract",
|
|
@@ -2936,7 +2950,7 @@ const Gi = [
|
|
|
2936
2950
|
]
|
|
2937
2951
|
},
|
|
2938
2952
|
{
|
|
2939
|
-
functionName:
|
|
2953
|
+
functionName: ce.CUBEMEMBER,
|
|
2940
2954
|
functionType: t.Cube,
|
|
2941
2955
|
description: "formula.functionList.CUBEMEMBER.description",
|
|
2942
2956
|
abstract: "formula.functionList.CUBEMEMBER.abstract",
|
|
@@ -2958,7 +2972,7 @@ const Gi = [
|
|
|
2958
2972
|
]
|
|
2959
2973
|
},
|
|
2960
2974
|
{
|
|
2961
|
-
functionName:
|
|
2975
|
+
functionName: ce.CUBEMEMBERPROPERTY,
|
|
2962
2976
|
functionType: t.Cube,
|
|
2963
2977
|
description: "formula.functionList.CUBEMEMBERPROPERTY.description",
|
|
2964
2978
|
abstract: "formula.functionList.CUBEMEMBERPROPERTY.abstract",
|
|
@@ -2980,7 +2994,7 @@ const Gi = [
|
|
|
2980
2994
|
]
|
|
2981
2995
|
},
|
|
2982
2996
|
{
|
|
2983
|
-
functionName:
|
|
2997
|
+
functionName: ce.CUBERANKEDMEMBER,
|
|
2984
2998
|
functionType: t.Cube,
|
|
2985
2999
|
description: "formula.functionList.CUBERANKEDMEMBER.description",
|
|
2986
3000
|
abstract: "formula.functionList.CUBERANKEDMEMBER.abstract",
|
|
@@ -3002,7 +3016,7 @@ const Gi = [
|
|
|
3002
3016
|
]
|
|
3003
3017
|
},
|
|
3004
3018
|
{
|
|
3005
|
-
functionName:
|
|
3019
|
+
functionName: ce.CUBESET,
|
|
3006
3020
|
functionType: t.Cube,
|
|
3007
3021
|
description: "formula.functionList.CUBESET.description",
|
|
3008
3022
|
abstract: "formula.functionList.CUBESET.abstract",
|
|
@@ -3024,7 +3038,7 @@ const Gi = [
|
|
|
3024
3038
|
]
|
|
3025
3039
|
},
|
|
3026
3040
|
{
|
|
3027
|
-
functionName:
|
|
3041
|
+
functionName: ce.CUBESETCOUNT,
|
|
3028
3042
|
functionType: t.Cube,
|
|
3029
3043
|
description: "formula.functionList.CUBESETCOUNT.description",
|
|
3030
3044
|
abstract: "formula.functionList.CUBESETCOUNT.abstract",
|
|
@@ -3046,7 +3060,7 @@ const Gi = [
|
|
|
3046
3060
|
]
|
|
3047
3061
|
},
|
|
3048
3062
|
{
|
|
3049
|
-
functionName:
|
|
3063
|
+
functionName: ce.CUBEVALUE,
|
|
3050
3064
|
functionType: t.Cube,
|
|
3051
3065
|
description: "formula.functionList.CUBEVALUE.description",
|
|
3052
3066
|
abstract: "formula.functionList.CUBEVALUE.abstract",
|
|
@@ -3067,7 +3081,7 @@ const Gi = [
|
|
|
3067
3081
|
}
|
|
3068
3082
|
]
|
|
3069
3083
|
}
|
|
3070
|
-
],
|
|
3084
|
+
], Wi = [
|
|
3071
3085
|
{
|
|
3072
3086
|
functionName: $.DAVERAGE,
|
|
3073
3087
|
functionType: t.Database,
|
|
@@ -3416,7 +3430,7 @@ const Gi = [
|
|
|
3416
3430
|
}
|
|
3417
3431
|
]
|
|
3418
3432
|
}
|
|
3419
|
-
],
|
|
3433
|
+
], Ki = [
|
|
3420
3434
|
{
|
|
3421
3435
|
functionName: B.DATE,
|
|
3422
3436
|
functionType: t.Date,
|
|
@@ -3988,7 +4002,7 @@ const Gi = [
|
|
|
3988
4002
|
}
|
|
3989
4003
|
]
|
|
3990
4004
|
}
|
|
3991
|
-
],
|
|
4005
|
+
], ki = [
|
|
3992
4006
|
{
|
|
3993
4007
|
functionName: A.BESSELI,
|
|
3994
4008
|
functionType: t.Engineering,
|
|
@@ -5061,7 +5075,7 @@ const Gi = [
|
|
|
5061
5075
|
}
|
|
5062
5076
|
]
|
|
5063
5077
|
}
|
|
5064
|
-
],
|
|
5078
|
+
], Qi = [
|
|
5065
5079
|
{
|
|
5066
5080
|
functionName: C.ACCRINT,
|
|
5067
5081
|
functionType: t.Financial,
|
|
@@ -7322,7 +7336,7 @@ const Gi = [
|
|
|
7322
7336
|
}
|
|
7323
7337
|
]
|
|
7324
7338
|
}
|
|
7325
|
-
],
|
|
7339
|
+
], $i = [
|
|
7326
7340
|
{
|
|
7327
7341
|
functionName: v.CELL,
|
|
7328
7342
|
functionType: t.Information,
|
|
@@ -7731,7 +7745,7 @@ const Gi = [
|
|
|
7731
7745
|
}
|
|
7732
7746
|
]
|
|
7733
7747
|
}
|
|
7734
|
-
],
|
|
7748
|
+
], ji = [
|
|
7735
7749
|
{
|
|
7736
7750
|
functionName: K.AND,
|
|
7737
7751
|
functionType: t.Logical,
|
|
@@ -8205,7 +8219,7 @@ const Gi = [
|
|
|
8205
8219
|
}
|
|
8206
8220
|
]
|
|
8207
8221
|
}
|
|
8208
|
-
],
|
|
8222
|
+
], zi = [
|
|
8209
8223
|
{
|
|
8210
8224
|
functionName: y.ADDRESS,
|
|
8211
8225
|
functionType: t.Lookup,
|
|
@@ -9237,7 +9251,7 @@ const Gi = [
|
|
|
9237
9251
|
}
|
|
9238
9252
|
]
|
|
9239
9253
|
}
|
|
9240
|
-
],
|
|
9254
|
+
], Zi = [
|
|
9241
9255
|
{
|
|
9242
9256
|
functionName: L.ABS,
|
|
9243
9257
|
functionType: t.Math,
|
|
@@ -10875,7 +10889,7 @@ const Gi = [
|
|
|
10875
10889
|
}
|
|
10876
10890
|
]
|
|
10877
10891
|
}
|
|
10878
|
-
],
|
|
10892
|
+
], Ji = [
|
|
10879
10893
|
{
|
|
10880
10894
|
functionName: l.AVEDEV,
|
|
10881
10895
|
functionType: t.Statistical,
|
|
@@ -13817,7 +13831,7 @@ const Gi = [
|
|
|
13817
13831
|
}
|
|
13818
13832
|
]
|
|
13819
13833
|
}
|
|
13820
|
-
],
|
|
13834
|
+
], er = [
|
|
13821
13835
|
{
|
|
13822
13836
|
functionName: D.ASC,
|
|
13823
13837
|
functionType: t.Text,
|
|
@@ -15031,7 +15045,7 @@ const Gi = [
|
|
|
15031
15045
|
}
|
|
15032
15046
|
]
|
|
15033
15047
|
}
|
|
15034
|
-
],
|
|
15048
|
+
], tr = [], ar = [
|
|
15035
15049
|
{
|
|
15036
15050
|
functionName: ft.ENCODEURL,
|
|
15037
15051
|
functionType: t.Web,
|
|
@@ -15091,36 +15105,36 @@ const Gi = [
|
|
|
15091
15105
|
}
|
|
15092
15106
|
]
|
|
15093
15107
|
}
|
|
15094
|
-
],
|
|
15108
|
+
], nr = [
|
|
15109
|
+
...Qi,
|
|
15095
15110
|
...Ki,
|
|
15096
|
-
...
|
|
15097
|
-
...
|
|
15111
|
+
...Zi,
|
|
15112
|
+
...Ji,
|
|
15098
15113
|
...zi,
|
|
15114
|
+
...Wi,
|
|
15115
|
+
...er,
|
|
15116
|
+
...ji,
|
|
15099
15117
|
...$i,
|
|
15100
|
-
...Xi,
|
|
15101
|
-
...Zi,
|
|
15102
|
-
...Qi,
|
|
15103
15118
|
...ki,
|
|
15104
|
-
...
|
|
15119
|
+
...Xi,
|
|
15105
15120
|
...Yi,
|
|
15106
|
-
...
|
|
15107
|
-
...
|
|
15108
|
-
...
|
|
15109
|
-
...Ji
|
|
15121
|
+
...ar,
|
|
15122
|
+
...wi,
|
|
15123
|
+
...tr
|
|
15110
15124
|
];
|
|
15111
|
-
function
|
|
15125
|
+
function ir(a, e) {
|
|
15112
15126
|
let n = "";
|
|
15113
15127
|
return a.aliasFunctionName ? (n = e.t(a.aliasFunctionName), n === a.aliasFunctionName && (n = a.functionName)) : n = a.functionName, n;
|
|
15114
15128
|
}
|
|
15115
|
-
var
|
|
15116
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15129
|
+
var rr = Object.getOwnPropertyDescriptor, or = (a, e, n, i) => {
|
|
15130
|
+
for (var r = i > 1 ? void 0 : i ? rr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15117
15131
|
(u = a[o]) && (r = u(r) || r);
|
|
15118
15132
|
return r;
|
|
15119
15133
|
}, Lt = (a, e) => (n, i) => e(n, i, a);
|
|
15120
15134
|
const Ut = Mt("formula.description-service");
|
|
15121
15135
|
let Ct = class {
|
|
15122
15136
|
constructor(a, e, n) {
|
|
15123
|
-
|
|
15137
|
+
X(this, "_descriptions", []);
|
|
15124
15138
|
this._functionService = a, this._localeService = e, this._configService = n, this._initialize();
|
|
15125
15139
|
}
|
|
15126
15140
|
dispose() {
|
|
@@ -15157,7 +15171,7 @@ let Ct = class {
|
|
|
15157
15171
|
}), e;
|
|
15158
15172
|
}
|
|
15159
15173
|
registerDescriptions(a) {
|
|
15160
|
-
return this._descriptions = this._descriptions.concat(a), this._registerDescriptions(),
|
|
15174
|
+
return this._descriptions = this._descriptions.concat(a), this._registerDescriptions(), ne(() => {
|
|
15161
15175
|
const e = a.map((n) => n.functionName);
|
|
15162
15176
|
this.unregisterDescriptions(e);
|
|
15163
15177
|
});
|
|
@@ -15176,7 +15190,7 @@ let Ct = class {
|
|
|
15176
15190
|
if (e.length === 0)
|
|
15177
15191
|
return !1;
|
|
15178
15192
|
const n = e[0].description;
|
|
15179
|
-
return !
|
|
15193
|
+
return !Dn(n);
|
|
15180
15194
|
}
|
|
15181
15195
|
_initialize() {
|
|
15182
15196
|
this._localeService.localeChanged$.subscribe(() => {
|
|
@@ -15186,8 +15200,6 @@ let Ct = class {
|
|
|
15186
15200
|
_initDescription() {
|
|
15187
15201
|
var i;
|
|
15188
15202
|
const a = [
|
|
15189
|
-
...Cn,
|
|
15190
|
-
...Dn,
|
|
15191
15203
|
...bn,
|
|
15192
15204
|
...On,
|
|
15193
15205
|
...Mn,
|
|
@@ -15201,13 +15213,15 @@ let Ct = class {
|
|
|
15201
15213
|
...Fn,
|
|
15202
15214
|
...Bn,
|
|
15203
15215
|
...vn,
|
|
15204
|
-
...Vn
|
|
15205
|
-
|
|
15216
|
+
...Vn,
|
|
15217
|
+
...Gn,
|
|
15218
|
+
...Hn
|
|
15219
|
+
].map((r) => r[1]), e = nr.filter((r) => a.includes(r.functionName)), n = this._configService.getConfig(ot);
|
|
15206
15220
|
this._descriptions = e.concat((i = n == null ? void 0 : n.description) != null ? i : []);
|
|
15207
15221
|
}
|
|
15208
15222
|
_registerDescriptions() {
|
|
15209
15223
|
const a = this._localeService, e = this._descriptions.map((n) => ({
|
|
15210
|
-
functionName:
|
|
15224
|
+
functionName: ir(n, a),
|
|
15211
15225
|
functionType: n.functionType,
|
|
15212
15226
|
description: a.t(n.description),
|
|
15213
15227
|
abstract: a.t(n.abstract),
|
|
@@ -15222,17 +15236,17 @@ let Ct = class {
|
|
|
15222
15236
|
this._functionService.registerDescriptions(...e);
|
|
15223
15237
|
}
|
|
15224
15238
|
};
|
|
15225
|
-
Ct =
|
|
15239
|
+
Ct = or([
|
|
15226
15240
|
Lt(0, ht),
|
|
15227
|
-
Lt(1,
|
|
15228
|
-
Lt(2,
|
|
15241
|
+
Lt(1, Y(Ot)),
|
|
15242
|
+
Lt(2, ye)
|
|
15229
15243
|
], Ct);
|
|
15230
|
-
var
|
|
15231
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15244
|
+
var ur = Object.getOwnPropertyDescriptor, mr = (a, e, n, i) => {
|
|
15245
|
+
for (var r = i > 1 ? void 0 : i ? ur(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15232
15246
|
(u = a[o]) && (r = u(r) || r);
|
|
15233
15247
|
return r;
|
|
15234
|
-
},
|
|
15235
|
-
function
|
|
15248
|
+
}, Be = (a, e) => (n, i) => e(n, i, a);
|
|
15249
|
+
function ma(a, e, n, i) {
|
|
15236
15250
|
const r = a.sequenceNodesBuilder(e);
|
|
15237
15251
|
if (r == null)
|
|
15238
15252
|
return e;
|
|
@@ -15241,9 +15255,9 @@ function oa(a, e, n, i) {
|
|
|
15241
15255
|
const f = r[u];
|
|
15242
15256
|
if (typeof f == "string" || f.nodeType !== J.REFERENCE)
|
|
15243
15257
|
continue;
|
|
15244
|
-
const { token: s } = f,
|
|
15245
|
-
let E =
|
|
15246
|
-
E.startAbsoluteRefType ===
|
|
15258
|
+
const { token: s } = f, d = se(s), { sheetName: T, unitId: P } = d;
|
|
15259
|
+
let E = d.range;
|
|
15260
|
+
E.startAbsoluteRefType === Ye.ALL && E.endAbsoluteRefType === Ye.ALL || (E = Et(E, n, i), o.push({
|
|
15247
15261
|
unitId: P,
|
|
15248
15262
|
sheetName: T,
|
|
15249
15263
|
range: E
|
|
@@ -15256,33 +15270,33 @@ let Dt = class extends te {
|
|
|
15256
15270
|
super(), this._refRangeService = a, this._lexerTreeBuilder = e, this._univerInstanceService = n, this._injector = i;
|
|
15257
15271
|
}
|
|
15258
15272
|
transformFormulaByEffectCommand(a, e, n, i) {
|
|
15259
|
-
const r = this._lexerTreeBuilder.sequenceNodesBuilder(n), o = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET), u = o.getActiveSheet(), m = o.getUnitId(), f = u.getSheetId(), s = r == null ? void 0 : r.map((
|
|
15260
|
-
if (typeof
|
|
15261
|
-
const T = se(
|
|
15273
|
+
const r = this._lexerTreeBuilder.sequenceNodesBuilder(n), o = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET), u = o.getActiveSheet(), m = o.getUnitId(), f = u.getSheetId(), s = r == null ? void 0 : r.map((d) => {
|
|
15274
|
+
if (typeof d == "object" && d.nodeType === J.REFERENCE) {
|
|
15275
|
+
const T = se(d.token), { range: P, unitId: E, sheetName: I } = T, S = this._univerInstanceService.getUnit(E || a), c = I ? S == null ? void 0 : S.getSheetBySheetName(I) : S == null ? void 0 : S.getSheetBySheetId(e);
|
|
15262
15276
|
if (!c)
|
|
15263
15277
|
throw new Error("Sheet not found");
|
|
15264
15278
|
const N = S.getUnitId(), R = c.getSheetId();
|
|
15265
15279
|
if (N !== m || R !== f)
|
|
15266
|
-
return
|
|
15267
|
-
const
|
|
15280
|
+
return d;
|
|
15281
|
+
const p = Vt(P, i);
|
|
15268
15282
|
let O = "";
|
|
15269
|
-
if (
|
|
15270
|
-
const M =
|
|
15271
|
-
E && I ? O =
|
|
15283
|
+
if (p) {
|
|
15284
|
+
const M = p.startColumn - P.startColumn, F = p.startRow - P.startRow, U = Et(P, M, F);
|
|
15285
|
+
E && I ? O = ea(E, I, U) : I ? O = ta(I, U) : O = aa(U);
|
|
15272
15286
|
} else
|
|
15273
15287
|
O = j.REF;
|
|
15274
15288
|
return {
|
|
15275
|
-
...
|
|
15289
|
+
...d,
|
|
15276
15290
|
token: O
|
|
15277
15291
|
};
|
|
15278
15292
|
} else
|
|
15279
|
-
return
|
|
15293
|
+
return d;
|
|
15280
15294
|
});
|
|
15281
|
-
return s ? `=${
|
|
15295
|
+
return s ? `=${Xe(s)}` : "";
|
|
15282
15296
|
}
|
|
15283
15297
|
registerFormula(a, e, n, i) {
|
|
15284
|
-
const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(n), u = new
|
|
15285
|
-
const s = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET),
|
|
15298
|
+
const r = /* @__PURE__ */ new Map(), o = this._lexerTreeBuilder.sequenceNodesBuilder(n), u = new we(), m = (f) => {
|
|
15299
|
+
const s = this._univerInstanceService.getCurrentUnitForType(ee.UNIVER_SHEET), d = s.getActiveSheet(), T = s.getUnitId(), P = d.getSheetId(), E = o == null ? void 0 : o.map((S) => {
|
|
15286
15300
|
if (typeof S == "object" && S.nodeType === J.REFERENCE) {
|
|
15287
15301
|
const c = r.get(S.token);
|
|
15288
15302
|
if (c.unitId !== T || c.subUnitId !== P)
|
|
@@ -15290,8 +15304,8 @@ let Dt = class extends te {
|
|
|
15290
15304
|
const N = Vt(c.range, f);
|
|
15291
15305
|
let R = "";
|
|
15292
15306
|
if (N) {
|
|
15293
|
-
const
|
|
15294
|
-
c.unitId && c.sheetName ? R =
|
|
15307
|
+
const p = N.startColumn - c.range.startColumn, O = N.startRow - c.range.startRow, M = Et(c.range, p, O);
|
|
15308
|
+
c.unitId && c.sheetName ? R = ea(c.unitId, c.sheetName, M) : c.sheetName ? R = ta(c.sheetName, M) : R = aa(M);
|
|
15295
15309
|
} else
|
|
15296
15310
|
R = j.REF;
|
|
15297
15311
|
return {
|
|
@@ -15300,35 +15314,35 @@ let Dt = class extends te {
|
|
|
15300
15314
|
};
|
|
15301
15315
|
} else
|
|
15302
15316
|
return S;
|
|
15303
|
-
}), I = E &&
|
|
15317
|
+
}), I = E && Xe(E);
|
|
15304
15318
|
return i(`=${I}`);
|
|
15305
15319
|
};
|
|
15306
15320
|
return o == null || o.forEach((f) => {
|
|
15307
15321
|
if (typeof f == "object" && f.nodeType === J.REFERENCE) {
|
|
15308
|
-
const s = se(f.token), { range:
|
|
15322
|
+
const s = se(f.token), { range: d, unitId: T, sheetName: P } = s, E = this._univerInstanceService.getUnit(T || a), I = P ? E == null ? void 0 : E.getSheetBySheetName(P) : E == null ? void 0 : E.getSheetBySheetId(e);
|
|
15309
15323
|
if (!I)
|
|
15310
15324
|
return;
|
|
15311
15325
|
const S = E.getUnitId(), c = I.getSheetId(), N = {
|
|
15312
15326
|
unitId: S,
|
|
15313
15327
|
subUnitId: c,
|
|
15314
|
-
range:
|
|
15328
|
+
range: d,
|
|
15315
15329
|
sheetName: P
|
|
15316
15330
|
};
|
|
15317
|
-
r.set(f.token, N), u.add(this._refRangeService.registerRefRange(
|
|
15331
|
+
r.set(f.token, N), u.add(this._refRangeService.registerRefRange(d, m, S, c));
|
|
15318
15332
|
}
|
|
15319
15333
|
}), u;
|
|
15320
15334
|
}
|
|
15321
15335
|
_getFormulaDependcy(a, e, n, i) {
|
|
15322
|
-
const r =
|
|
15336
|
+
const r = Oe(n) ? this._lexerTreeBuilder.sequenceNodesBuilder(n) : null, o = [];
|
|
15323
15337
|
return r == null || r.forEach((u) => {
|
|
15324
15338
|
if (typeof u == "object" && u.nodeType === J.REFERENCE) {
|
|
15325
|
-
const m = se(u.token), { range: f, unitId: s, sheetName:
|
|
15326
|
-
if (f.startAbsoluteRefType ===
|
|
15339
|
+
const m = se(u.token), { range: f, unitId: s, sheetName: d } = m;
|
|
15340
|
+
if (f.startAbsoluteRefType === Ye.ALL && f.endAbsoluteRefType === Ye.ALL)
|
|
15327
15341
|
return;
|
|
15328
|
-
const T = this._univerInstanceService.getUnit(s || a), P =
|
|
15342
|
+
const T = this._univerInstanceService.getUnit(s || a), P = d ? T == null ? void 0 : T.getSheetBySheetName(d) : T == null ? void 0 : T.getSheetBySheetId(e);
|
|
15329
15343
|
if (!P)
|
|
15330
15344
|
return;
|
|
15331
|
-
const E = T.getUnitId(), I = P.getSheetId(), S = i[0].startRow, c = i[0].startColumn, N = f.startRow, R = f.startColumn,
|
|
15345
|
+
const E = T.getUnitId(), I = P.getSheetId(), S = i[0].startRow, c = i[0].startColumn, N = f.startRow, R = f.startColumn, p = i.map((O) => ({
|
|
15332
15346
|
startRow: O.startRow - S + N,
|
|
15333
15347
|
endRow: O.endRow - S + N,
|
|
15334
15348
|
startColumn: O.startColumn - c + R,
|
|
@@ -15337,20 +15351,20 @@ let Dt = class extends te {
|
|
|
15337
15351
|
o.push({
|
|
15338
15352
|
unitId: E,
|
|
15339
15353
|
subUnitId: I,
|
|
15340
|
-
ranges:
|
|
15354
|
+
ranges: p
|
|
15341
15355
|
});
|
|
15342
15356
|
}
|
|
15343
15357
|
}), o;
|
|
15344
15358
|
}
|
|
15345
15359
|
// eslint-disable-next-line max-lines-per-function
|
|
15346
15360
|
registerRangeFormula(a, e, n, i, r) {
|
|
15347
|
-
const o = new
|
|
15348
|
-
const s = n[0].startRow,
|
|
15361
|
+
const o = new we(), u = i.map((f) => this._getFormulaDependcy(a, e, f, n)), m = (f) => {
|
|
15362
|
+
const s = n[0].startRow, d = n[0].startColumn, T = [{ unitId: a, subUnitId: e, ranges: n }, ...u.flat()], P = [], E = cn(this._injector, f);
|
|
15349
15363
|
for (const { unitId: I, subUnitId: S, ranges: c } of T)
|
|
15350
15364
|
if (I === E.unitId && S === E.subUnitId) {
|
|
15351
|
-
const N = [], R = c[0].startRow,
|
|
15365
|
+
const N = [], R = c[0].startRow, p = c[0].startColumn, O = R - s, M = p - d;
|
|
15352
15366
|
for (const F of E.ranges) {
|
|
15353
|
-
const U = c.map((g) =>
|
|
15367
|
+
const U = c.map((g) => Ge(F, g)).filter(Boolean);
|
|
15354
15368
|
U.length > 0 && N.push(...U);
|
|
15355
15369
|
}
|
|
15356
15370
|
N.length > 0 && P.push(
|
|
@@ -15363,35 +15377,35 @@ let Dt = class extends te {
|
|
|
15363
15377
|
);
|
|
15364
15378
|
}
|
|
15365
15379
|
if (P.length > 0) {
|
|
15366
|
-
const I =
|
|
15380
|
+
const I = be.splitIntoGrid([...P.flat()]), S = be.subtractMulti(n, I);
|
|
15367
15381
|
S.sort((O, M) => O.startRow - M.startRow || O.startColumn - M.startColumn);
|
|
15368
15382
|
const c = /* @__PURE__ */ new Map();
|
|
15369
15383
|
for (let O = 0; O < I.length; O++) {
|
|
15370
|
-
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U -
|
|
15384
|
+
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - d, h = ln(M, f).sort((k, oe) => k.startRow - oe.startRow || k.startColumn - oe.startColumn);
|
|
15371
15385
|
if (!h.length)
|
|
15372
15386
|
continue;
|
|
15373
|
-
const V = h[0].startRow, Q = h[0].startColumn, b = V - s, Le = Q -
|
|
15387
|
+
const V = h[0].startRow, Q = h[0].startColumn, b = V - s, Le = Q - d, ae = [];
|
|
15374
15388
|
for (let k = 0; k < i.length; k++) {
|
|
15375
|
-
const
|
|
15389
|
+
const oe = i[k], z = Oe(oe), qe = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, x, g) : oe, ue = z ? this.transformFormulaByEffectCommand(a, e, qe, f) : qe, Pe = ma(this._lexerTreeBuilder, ue, -Le, -b);
|
|
15376
15390
|
ae.push({
|
|
15377
|
-
newFormula:
|
|
15391
|
+
newFormula: ue,
|
|
15378
15392
|
orginFormula: Pe
|
|
15379
15393
|
});
|
|
15380
15394
|
}
|
|
15381
|
-
const
|
|
15395
|
+
const re = {
|
|
15382
15396
|
formulas: ae,
|
|
15383
15397
|
ranges: h,
|
|
15384
15398
|
key: ae.map((k) => k.orginFormula).join("_")
|
|
15385
15399
|
};
|
|
15386
|
-
c.has(
|
|
15400
|
+
c.has(re.key) ? c.get(re.key).push(re) : c.set(re.key, [re]);
|
|
15387
15401
|
}
|
|
15388
|
-
const N = i.map((O) =>
|
|
15402
|
+
const N = i.map((O) => ma(this._lexerTreeBuilder, O, 0, 0)).join("_");
|
|
15389
15403
|
if (S.length > 0) {
|
|
15390
15404
|
const O = S[0].startRow, M = S[0].startColumn, F = [];
|
|
15391
15405
|
for (let g = 0; g < i.length; g++) {
|
|
15392
15406
|
const x = i[g];
|
|
15393
15407
|
F.push({
|
|
15394
|
-
newFormula:
|
|
15408
|
+
newFormula: Oe(x) ? this._lexerTreeBuilder.moveFormulaRefOffset(x, M - d, O - s) : x,
|
|
15395
15409
|
orginFormula: x
|
|
15396
15410
|
});
|
|
15397
15411
|
}
|
|
@@ -15402,12 +15416,12 @@ let Dt = class extends te {
|
|
|
15402
15416
|
};
|
|
15403
15417
|
c.has(U.key) ? c.get(U.key).push(U) : c.set(U.key, [U]);
|
|
15404
15418
|
}
|
|
15405
|
-
const R = [],
|
|
15406
|
-
for (let O =
|
|
15407
|
-
const M =
|
|
15419
|
+
const R = [], p = Array.from(c.keys());
|
|
15420
|
+
for (let O = p.length - 1; O >= 0; O--) {
|
|
15421
|
+
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 = [];
|
|
15408
15422
|
for (let x = 0; x < F[0].formulas.length; x++)
|
|
15409
15423
|
U.push(F[0].formulas[x].newFormula);
|
|
15410
|
-
const g =
|
|
15424
|
+
const g = be.mergeRanges(F.map((x) => x.ranges).flat());
|
|
15411
15425
|
g.sort((x, h) => x.startRow - h.startRow || x.startColumn - h.startColumn), R.push({
|
|
15412
15426
|
formulas: U,
|
|
15413
15427
|
ranges: g
|
|
@@ -15423,59 +15437,59 @@ let Dt = class extends te {
|
|
|
15423
15437
|
return n.forEach((f) => {
|
|
15424
15438
|
const s = this._refRangeService.registerRefRange(f, m, a, e);
|
|
15425
15439
|
o.add(s);
|
|
15426
|
-
}), [...u.flat()].forEach(({ unitId: f, subUnitId: s, ranges:
|
|
15427
|
-
|
|
15440
|
+
}), [...u.flat()].forEach(({ unitId: f, subUnitId: s, ranges: d }) => {
|
|
15441
|
+
d.forEach((T) => {
|
|
15428
15442
|
const P = this._refRangeService.registerRefRange(T, m, f, s);
|
|
15429
15443
|
o.add(P);
|
|
15430
15444
|
});
|
|
15431
15445
|
}), o;
|
|
15432
15446
|
}
|
|
15433
15447
|
};
|
|
15434
|
-
Dt =
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15448
|
+
Dt = mr([
|
|
15449
|
+
Be(0, Y(fn)),
|
|
15450
|
+
Be(1, Y(qt)),
|
|
15451
|
+
Be(2, _e),
|
|
15452
|
+
Be(3, Y(at))
|
|
15439
15453
|
], Dt);
|
|
15440
|
-
var
|
|
15441
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15454
|
+
var fr = Object.getOwnPropertyDescriptor, cr = (a, e, n, i) => {
|
|
15455
|
+
for (var r = i > 1 ? void 0 : i ? fr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15442
15456
|
(u = a[o]) && (r = u(r) || r);
|
|
15443
15457
|
return r;
|
|
15444
|
-
},
|
|
15445
|
-
const Ft = "sheets-formula.remote-register-function.service",
|
|
15458
|
+
}, lr = (a, e) => (n, i) => e(n, i, a);
|
|
15459
|
+
const Ft = "sheets-formula.remote-register-function.service", Va = Mt(Ft);
|
|
15446
15460
|
let Qe = class {
|
|
15447
15461
|
constructor(a) {
|
|
15448
15462
|
this._functionService = a;
|
|
15449
15463
|
}
|
|
15450
15464
|
async registerFunctions(a) {
|
|
15451
|
-
const e = a.map(([n, i]) =>
|
|
15465
|
+
const e = a.map(([n, i]) => sr(n, i));
|
|
15452
15466
|
this._functionService.registerExecutors(...e);
|
|
15453
15467
|
}
|
|
15454
15468
|
async registerAsyncFunctions(a) {
|
|
15455
|
-
const e = a.map(([n, i]) =>
|
|
15469
|
+
const e = a.map(([n, i]) => dr(n, i));
|
|
15456
15470
|
this._functionService.registerExecutors(...e);
|
|
15457
15471
|
}
|
|
15458
15472
|
async unregisterFunctions(a) {
|
|
15459
|
-
this._functionService.unregisterDescriptions(...a);
|
|
15473
|
+
this._functionService.unregisterExecutors(...a), this._functionService.unregisterDescriptions(...a), this._functionService.deleteFormulaAstCacheKey(...a);
|
|
15460
15474
|
}
|
|
15461
15475
|
};
|
|
15462
|
-
Qe =
|
|
15463
|
-
|
|
15476
|
+
Qe = cr([
|
|
15477
|
+
lr(0, ht)
|
|
15464
15478
|
], Qe);
|
|
15465
|
-
function
|
|
15479
|
+
function sr(a, e) {
|
|
15466
15480
|
const n = new At(e), i = new Function(`return ${a}`)();
|
|
15467
15481
|
return n.calculateCustom = i, n;
|
|
15468
15482
|
}
|
|
15469
|
-
function
|
|
15470
|
-
const n = new
|
|
15483
|
+
function dr(a, e) {
|
|
15484
|
+
const n = new _a(e), i = new Function(`return ${a}`)();
|
|
15471
15485
|
return n.calculateCustom = i, n;
|
|
15472
15486
|
}
|
|
15473
|
-
var
|
|
15474
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15487
|
+
var pr = Object.getOwnPropertyDescriptor, Lr = (a, e, n, i) => {
|
|
15488
|
+
for (var r = i > 1 ? void 0 : i ? pr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15475
15489
|
(u = a[o]) && (r = u(r) || r);
|
|
15476
15490
|
return r;
|
|
15477
|
-
},
|
|
15478
|
-
const
|
|
15491
|
+
}, ve = (a, e) => (n, i) => e(n, i, a);
|
|
15492
|
+
const Pr = Mt(
|
|
15479
15493
|
"sheets-formula.register-function-service"
|
|
15480
15494
|
);
|
|
15481
15495
|
let bt = class extends te {
|
|
@@ -15491,7 +15505,7 @@ let bt = class extends te {
|
|
|
15491
15505
|
registerFunctions(a) {
|
|
15492
15506
|
const { locales: e, description: n, calculate: i } = a;
|
|
15493
15507
|
e && this._localeService.load(e);
|
|
15494
|
-
const r = new
|
|
15508
|
+
const r = new we();
|
|
15495
15509
|
if (n)
|
|
15496
15510
|
r.add(this._descriptionService.registerDescriptions(n));
|
|
15497
15511
|
else {
|
|
@@ -15507,7 +15521,7 @@ let bt = class extends te {
|
|
|
15507
15521
|
return r.add(this._registerLocalExecutors(i)), this._remoteRegisterFunctionService && r.add(this._registerRemoteExecutors(i)), r;
|
|
15508
15522
|
}
|
|
15509
15523
|
_registerSingleFunction(a) {
|
|
15510
|
-
const { name: e, func: n, description: i, locales: r, async: o = !1 } = a, u = new
|
|
15524
|
+
const { name: e, func: n, description: i, locales: r, async: o = !1 } = a, u = new we();
|
|
15511
15525
|
if (r && this._localeService.load(r), typeof i == "string") {
|
|
15512
15526
|
const f = {
|
|
15513
15527
|
functionName: e,
|
|
@@ -15519,9 +15533,9 @@ let bt = class extends te {
|
|
|
15519
15533
|
u.add(this._descriptionService.registerDescriptions([f]));
|
|
15520
15534
|
} else
|
|
15521
15535
|
u.add(this._descriptionService.registerDescriptions([i]));
|
|
15522
|
-
const m = o ? new
|
|
15523
|
-
return m.calculateCustom = n, this._functionService.registerExecutors(m), u.add(
|
|
15524
|
-
|
|
15536
|
+
const m = o ? new _a(e) : new At(e);
|
|
15537
|
+
return m.calculateCustom = n, this._functionService.registerExecutors(m), u.add(ne(() => this._functionService.unregisterExecutors(e))), u.add(ne(() => this._functionService.unregisterDescriptions(e))), u.add(ne(() => this._functionService.deleteFormulaAstCacheKey(e))), this._remoteRegisterFunctionService && (this._remoteRegisterFunctionService.registerAsyncFunctions([[n.toString(), e]]), u.add(
|
|
15538
|
+
ne(() => this._remoteRegisterFunctionService.unregisterFunctions([e]))
|
|
15525
15539
|
)), u;
|
|
15526
15540
|
}
|
|
15527
15541
|
_registerLocalExecutors(a) {
|
|
@@ -15529,22 +15543,22 @@ let bt = class extends te {
|
|
|
15529
15543
|
const o = new At(r);
|
|
15530
15544
|
return o.calculateCustom = i, o;
|
|
15531
15545
|
});
|
|
15532
|
-
return this._functionService.registerExecutors(...n),
|
|
15546
|
+
return this._functionService.registerExecutors(...n), ne(() => this._functionService.unregisterExecutors(...e));
|
|
15533
15547
|
}
|
|
15534
15548
|
_registerRemoteExecutors(a) {
|
|
15535
15549
|
const e = [], n = a.map(([i, r]) => (e.push(r), [i.toString(), r]));
|
|
15536
|
-
return this._remoteRegisterFunctionService.registerFunctions(n),
|
|
15550
|
+
return this._remoteRegisterFunctionService.registerFunctions(n), ne(() => this._remoteRegisterFunctionService.unregisterFunctions(e));
|
|
15537
15551
|
}
|
|
15538
15552
|
};
|
|
15539
|
-
bt =
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15553
|
+
bt = Lr([
|
|
15554
|
+
ve(0, Y(Ot)),
|
|
15555
|
+
ve(1, Y(Ut)),
|
|
15556
|
+
ve(2, ht),
|
|
15557
|
+
ve(3, Wa(Va))
|
|
15544
15558
|
], bt);
|
|
15545
|
-
const
|
|
15546
|
-
var
|
|
15547
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15559
|
+
const Tr = "SHEETS_FORMULA_PLUGIN";
|
|
15560
|
+
var Er = Object.getOwnPropertyDescriptor, Ir = (a, e, n, i) => {
|
|
15561
|
+
for (var r = i > 1 ? void 0 : i ? Er(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15548
15562
|
(u = a[o]) && (r = u(r) || r);
|
|
15549
15563
|
return r;
|
|
15550
15564
|
}, Pt = (a, e) => (n, i) => e(n, i, a);
|
|
@@ -15556,15 +15570,15 @@ let $e = class extends te {
|
|
|
15556
15570
|
this._initialConversion();
|
|
15557
15571
|
}
|
|
15558
15572
|
_initialConversion() {
|
|
15559
|
-
this._activeDirtyManagerService.register(
|
|
15560
|
-
commandId:
|
|
15573
|
+
this._activeDirtyManagerService.register(ie.id, {
|
|
15574
|
+
commandId: ie.id,
|
|
15561
15575
|
getDirtyData: (a) => {
|
|
15562
15576
|
const e = a.params;
|
|
15563
15577
|
return e.trigger === _t.id ? {} : {
|
|
15564
15578
|
dirtyRanges: this._getSetRangeValuesMutationDirtyRange(e)
|
|
15565
15579
|
};
|
|
15566
15580
|
}
|
|
15567
|
-
}), this._initialMove(), this._initialRowAndColumn(), this._initialSheet(), this._initialDefinedName();
|
|
15581
|
+
}), this._initialMove(), this._initialRowAndColumn(), this._initialHideRow(), this._initialSheet(), this._initialDefinedName();
|
|
15568
15582
|
}
|
|
15569
15583
|
_initialMove() {
|
|
15570
15584
|
this._activeDirtyManagerService.register(Gt.id, {
|
|
@@ -15594,8 +15608,8 @@ let $e = class extends te {
|
|
|
15594
15608
|
}
|
|
15595
15609
|
};
|
|
15596
15610
|
}
|
|
15597
|
-
}), this._activeDirtyManagerService.register(
|
|
15598
|
-
commandId:
|
|
15611
|
+
}), this._activeDirtyManagerService.register(wt.id, {
|
|
15612
|
+
commandId: wt.id,
|
|
15599
15613
|
getDirtyData: (a) => {
|
|
15600
15614
|
const e = a.params;
|
|
15601
15615
|
return {
|
|
@@ -15607,8 +15621,8 @@ let $e = class extends te {
|
|
|
15607
15621
|
}
|
|
15608
15622
|
};
|
|
15609
15623
|
}
|
|
15610
|
-
}), this._activeDirtyManagerService.register(
|
|
15611
|
-
commandId:
|
|
15624
|
+
}), this._activeDirtyManagerService.register(Yt.id, {
|
|
15625
|
+
commandId: Yt.id,
|
|
15612
15626
|
getDirtyData: (a) => {
|
|
15613
15627
|
const e = a.params;
|
|
15614
15628
|
return {
|
|
@@ -15623,8 +15637,8 @@ let $e = class extends te {
|
|
|
15623
15637
|
});
|
|
15624
15638
|
}
|
|
15625
15639
|
_initialRowAndColumn() {
|
|
15626
|
-
this._activeDirtyManagerService.register(
|
|
15627
|
-
commandId:
|
|
15640
|
+
this._activeDirtyManagerService.register(Xt.id, {
|
|
15641
|
+
commandId: Xt.id,
|
|
15628
15642
|
getDirtyData: (a) => {
|
|
15629
15643
|
const e = a.params;
|
|
15630
15644
|
return {
|
|
@@ -15675,6 +15689,35 @@ let $e = class extends te {
|
|
|
15675
15689
|
}
|
|
15676
15690
|
});
|
|
15677
15691
|
}
|
|
15692
|
+
_initialHideRow() {
|
|
15693
|
+
this._activeDirtyManagerService.register(Qt.id, {
|
|
15694
|
+
commandId: Qt.id,
|
|
15695
|
+
getDirtyData: (a) => {
|
|
15696
|
+
const e = a.params;
|
|
15697
|
+
return {
|
|
15698
|
+
dirtyRanges: this._getHideRowMutation(e),
|
|
15699
|
+
clearDependencyTreeCache: {
|
|
15700
|
+
[e.unitId]: {
|
|
15701
|
+
[e.subUnitId]: "1"
|
|
15702
|
+
}
|
|
15703
|
+
}
|
|
15704
|
+
};
|
|
15705
|
+
}
|
|
15706
|
+
}), this._activeDirtyManagerService.register($t.id, {
|
|
15707
|
+
commandId: $t.id,
|
|
15708
|
+
getDirtyData: (a) => {
|
|
15709
|
+
const e = a.params;
|
|
15710
|
+
return {
|
|
15711
|
+
dirtyRanges: this._getHideRowMutation(e),
|
|
15712
|
+
clearDependencyTreeCache: {
|
|
15713
|
+
[e.unitId]: {
|
|
15714
|
+
[e.subUnitId]: "1"
|
|
15715
|
+
}
|
|
15716
|
+
}
|
|
15717
|
+
};
|
|
15718
|
+
}
|
|
15719
|
+
});
|
|
15720
|
+
}
|
|
15678
15721
|
_initialSheet() {
|
|
15679
15722
|
this._activeDirtyManagerService.register(It.id, {
|
|
15680
15723
|
commandId: It.id,
|
|
@@ -15700,8 +15743,8 @@ let $e = class extends te {
|
|
|
15700
15743
|
});
|
|
15701
15744
|
}
|
|
15702
15745
|
_initialDefinedName() {
|
|
15703
|
-
this._activeDirtyManagerService.register(
|
|
15704
|
-
commandId:
|
|
15746
|
+
this._activeDirtyManagerService.register(xe.id, {
|
|
15747
|
+
commandId: xe.id,
|
|
15705
15748
|
getDirtyData: (a) => {
|
|
15706
15749
|
const e = a.params;
|
|
15707
15750
|
return { dirtyDefinedNameMap: this._getDefinedNameMutation(e) };
|
|
@@ -15736,22 +15779,29 @@ let $e = class extends te {
|
|
|
15736
15779
|
}
|
|
15737
15780
|
_getRemoveRowOrColumnMutation(a, e = !0) {
|
|
15738
15781
|
const { subUnitId: n, unitId: i, range: r } = a, o = [], u = this._univerInstanceService.getUniverSheetInstance(i), m = u == null ? void 0 : u.getSheetBySheetId(n), f = (m == null ? void 0 : m.getRowCount()) || 0, s = (m == null ? void 0 : m.getColumnCount()) || 0;
|
|
15739
|
-
let
|
|
15782
|
+
let d = null;
|
|
15740
15783
|
const { startRow: T, endRow: P, startColumn: E, endColumn: I } = r;
|
|
15741
|
-
e === !0 ?
|
|
15784
|
+
e === !0 ? d = this._rangeToMatrix({
|
|
15742
15785
|
startRow: T,
|
|
15743
15786
|
startColumn: 0,
|
|
15744
15787
|
endRow: P,
|
|
15745
15788
|
endColumn: s - 1
|
|
15746
|
-
}) :
|
|
15789
|
+
}) : d = this._rangeToMatrix({
|
|
15747
15790
|
startRow: 0,
|
|
15748
15791
|
startColumn: E,
|
|
15749
15792
|
endRow: f,
|
|
15750
15793
|
endColumn: I
|
|
15751
15794
|
});
|
|
15752
|
-
const S =
|
|
15795
|
+
const S = d.getData();
|
|
15753
15796
|
return o.push(...this._getDirtyRangesByCellValue(i, n, S)), o.push(...this._getDirtyRangesForArrayFormula(i, n, S)), o;
|
|
15754
15797
|
}
|
|
15798
|
+
_getHideRowMutation(a) {
|
|
15799
|
+
const { subUnitId: e, unitId: n, ranges: i } = a, r = [];
|
|
15800
|
+
return i.forEach((o) => {
|
|
15801
|
+
const u = this._rangeToMatrix(o).getMatrix();
|
|
15802
|
+
r.push(...this._getDirtyRangesByCellValue(n, e, u));
|
|
15803
|
+
}), r;
|
|
15804
|
+
}
|
|
15755
15805
|
_getRemoveSheetMutation(a) {
|
|
15756
15806
|
const e = {}, { subUnitId: n, unitId: i, subUnitName: r } = a;
|
|
15757
15807
|
return e[i] == null && (e[i] = {}), e[i][n] = r, e;
|
|
@@ -15785,12 +15835,12 @@ let $e = class extends te {
|
|
|
15785
15835
|
const r = new W(n), o = this._formulaDataModel.getArrayFormulaRange();
|
|
15786
15836
|
if ((u = o == null ? void 0 : o[a]) != null && u[e]) {
|
|
15787
15837
|
const f = new W((m = o == null ? void 0 : o[a]) == null ? void 0 : m[e]);
|
|
15788
|
-
r.forValue((s,
|
|
15838
|
+
r.forValue((s, d) => {
|
|
15789
15839
|
f.forValue((T, P, E) => {
|
|
15790
15840
|
if (E == null)
|
|
15791
15841
|
return !0;
|
|
15792
15842
|
const { startRow: I, startColumn: S, endRow: c, endColumn: N } = E;
|
|
15793
|
-
s >= I && s <= c &&
|
|
15843
|
+
s >= I && s <= c && d >= S && d <= N && i.push({
|
|
15794
15844
|
unitId: a,
|
|
15795
15845
|
sheetId: e,
|
|
15796
15846
|
range: {
|
|
@@ -15806,13 +15856,13 @@ let $e = class extends te {
|
|
|
15806
15856
|
return i;
|
|
15807
15857
|
}
|
|
15808
15858
|
};
|
|
15809
|
-
$e =
|
|
15859
|
+
$e = Ir([
|
|
15810
15860
|
Pt(0, gt),
|
|
15811
|
-
Pt(1,
|
|
15812
|
-
Pt(2,
|
|
15861
|
+
Pt(1, _e),
|
|
15862
|
+
Pt(2, Y(it))
|
|
15813
15863
|
], $e);
|
|
15814
|
-
var
|
|
15815
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15864
|
+
var Nr = Object.getOwnPropertyDescriptor, Rr = (a, e, n, i) => {
|
|
15865
|
+
for (var r = i > 1 ? void 0 : i ? Nr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15816
15866
|
(u = a[o]) && (r = u(r) || r);
|
|
15817
15867
|
return r;
|
|
15818
15868
|
}, Tt = (a, e) => (n, i) => e(n, i, a);
|
|
@@ -15838,20 +15888,20 @@ let je = class extends te {
|
|
|
15838
15888
|
}
|
|
15839
15889
|
_initInterceptorCellContent() {
|
|
15840
15890
|
this.disposeWithMe(
|
|
15841
|
-
this._sheetInterceptorService.intercept(
|
|
15891
|
+
this._sheetInterceptorService.intercept(sn.CELL_CONTENT, {
|
|
15842
15892
|
priority: 100,
|
|
15843
|
-
effect:
|
|
15893
|
+
effect: Ka.Value,
|
|
15844
15894
|
handler: (a, e, n) => {
|
|
15845
|
-
var s,
|
|
15846
|
-
const { unitId: i, subUnitId: r, row: o, col: u } = e, m = this._formulaDataModel.getArrayFormulaCellData(), f = (T = (
|
|
15895
|
+
var s, d, T;
|
|
15896
|
+
const { unitId: i, subUnitId: r, row: o, col: u } = e, m = this._formulaDataModel.getArrayFormulaCellData(), f = (T = (d = (s = m == null ? void 0 : m[i]) == null ? void 0 : s[r]) == null ? void 0 : d[o]) == null ? void 0 : T[u];
|
|
15847
15897
|
return f == null ? n(a) : f.v == null && f.t == null ? n({
|
|
15848
15898
|
...a,
|
|
15849
15899
|
v: 0,
|
|
15850
15900
|
// Default value for empty cell
|
|
15851
15901
|
t: Bt.NUMBER
|
|
15852
|
-
}) : (a == null ? void 0 : a.t) === Bt.NUMBER && a.v !== void 0 && a.v !== null &&
|
|
15902
|
+
}) : (a == null ? void 0 : a.t) === Bt.NUMBER && a.v !== void 0 && a.v !== null && ka(a.v) ? n({
|
|
15853
15903
|
...a,
|
|
15854
|
-
v:
|
|
15904
|
+
v: wn(Number(a.v))
|
|
15855
15905
|
}) : n({
|
|
15856
15906
|
...a,
|
|
15857
15907
|
v: f.v,
|
|
@@ -15862,34 +15912,34 @@ let je = class extends te {
|
|
|
15862
15912
|
);
|
|
15863
15913
|
}
|
|
15864
15914
|
};
|
|
15865
|
-
je =
|
|
15866
|
-
Tt(0,
|
|
15867
|
-
Tt(1,
|
|
15868
|
-
Tt(2,
|
|
15915
|
+
je = Rr([
|
|
15916
|
+
Tt(0, pe),
|
|
15917
|
+
Tt(1, Y(xt)),
|
|
15918
|
+
Tt(2, Y(it))
|
|
15869
15919
|
], je);
|
|
15870
|
-
var
|
|
15871
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15920
|
+
var Ar = Object.getOwnPropertyDescriptor, Sr = (a, e, n, i) => {
|
|
15921
|
+
for (var r = i > 1 ? void 0 : i ? Ar(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15872
15922
|
(u = a[o]) && (r = u(r) || r);
|
|
15873
15923
|
return r;
|
|
15874
|
-
},
|
|
15924
|
+
}, Ve = (a, e) => (n, i) => e(n, i, a);
|
|
15875
15925
|
let ze = class extends te {
|
|
15876
15926
|
constructor(e, n, i, r) {
|
|
15877
15927
|
super();
|
|
15878
|
-
|
|
15928
|
+
X(this, "_preUnitId", null);
|
|
15879
15929
|
this._descriptionService = e, this._definedNamesService = n, this._univerInstanceService = i, this._commandService = r, this._initialize();
|
|
15880
15930
|
}
|
|
15881
15931
|
_initialize() {
|
|
15882
15932
|
this._descriptionListener(), this._changeUnitListener(), this._changeSheetListener();
|
|
15883
15933
|
}
|
|
15884
15934
|
_descriptionListener() {
|
|
15885
|
-
|
|
15935
|
+
ne(
|
|
15886
15936
|
this._definedNamesService.update$.subscribe(() => {
|
|
15887
15937
|
this._registerDescriptions();
|
|
15888
15938
|
})
|
|
15889
15939
|
);
|
|
15890
15940
|
}
|
|
15891
15941
|
_changeUnitListener() {
|
|
15892
|
-
|
|
15942
|
+
ne(
|
|
15893
15943
|
this._univerInstanceService.getCurrentTypeOfUnit$(ee.UNIVER_SHEET).subscribe(() => {
|
|
15894
15944
|
this._unRegisterDescriptions(), this._registerDescriptions();
|
|
15895
15945
|
})
|
|
@@ -15899,9 +15949,9 @@ let ze = class extends te {
|
|
|
15899
15949
|
this.disposeWithMe(
|
|
15900
15950
|
this._commandService.onCommandExecuted((e, n) => {
|
|
15901
15951
|
if (!(n != null && n.fromCollab)) {
|
|
15902
|
-
if (e.id ===
|
|
15952
|
+
if (e.id === dn.id)
|
|
15903
15953
|
this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
|
|
15904
|
-
else if (e.id ===
|
|
15954
|
+
else if (e.id === xe.id) {
|
|
15905
15955
|
const i = e.params;
|
|
15906
15956
|
this._registerDescription(i);
|
|
15907
15957
|
} else if (e.id === St.id) {
|
|
@@ -15984,132 +16034,132 @@ let ze = class extends te {
|
|
|
15984
16034
|
}), this._descriptionService.unregisterDescriptions(r);
|
|
15985
16035
|
}
|
|
15986
16036
|
};
|
|
15987
|
-
ze =
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
|
|
16037
|
+
ze = Sr([
|
|
16038
|
+
Ve(0, Ut),
|
|
16039
|
+
Ve(1, yt),
|
|
16040
|
+
Ve(2, _e),
|
|
16041
|
+
Ve(3, pe)
|
|
15992
16042
|
], ze);
|
|
15993
|
-
var
|
|
15994
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
16043
|
+
var Cr = Object.getOwnPropertyDescriptor, Dr = (a, e, n, i) => {
|
|
16044
|
+
for (var r = i > 1 ? void 0 : i ? Cr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
15995
16045
|
(u = a[o]) && (r = u(r) || r);
|
|
15996
16046
|
return r;
|
|
15997
|
-
},
|
|
16047
|
+
}, br = (a, e) => (n, i) => e(n, i, a);
|
|
15998
16048
|
let Ze = class extends te {
|
|
15999
16049
|
constructor(a) {
|
|
16000
16050
|
super(), this._commandService = a, [
|
|
16001
|
-
|
|
16002
|
-
|
|
16051
|
+
kn,
|
|
16052
|
+
De
|
|
16003
16053
|
].forEach((e) => this._commandService.registerCommand(e));
|
|
16004
16054
|
}
|
|
16005
16055
|
};
|
|
16006
|
-
Ze =
|
|
16007
|
-
|
|
16056
|
+
Ze = Dr([
|
|
16057
|
+
br(0, pe)
|
|
16008
16058
|
], Ze);
|
|
16009
|
-
var
|
|
16010
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
16059
|
+
var Or = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, xr = (a, e, n) => e in a ? Or(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n, Ga = (a, e, n, i) => {
|
|
16060
|
+
for (var r = i > 1 ? void 0 : i ? Mr(e, n) : e, o = a.length - 1, u; o >= 0; o--)
|
|
16011
16061
|
(u = a[o]) && (r = u(r) || r);
|
|
16012
16062
|
return r;
|
|
16013
|
-
}, Je = (a, e) => (n, i) => e(n, i, a), ut = (a, e, n) =>
|
|
16014
|
-
let et = class extends
|
|
16015
|
-
constructor(a =
|
|
16063
|
+
}, Je = (a, e) => (n, i) => e(n, i, a), ut = (a, e, n) => xr(a, typeof e != "symbol" ? e + "" : e, n);
|
|
16064
|
+
let et = class extends da {
|
|
16065
|
+
constructor(a = oa, e, n) {
|
|
16016
16066
|
super(), this._config = a, this._injector = e, this._configService = n;
|
|
16017
|
-
const { ...i } =
|
|
16067
|
+
const { ...i } = pa(
|
|
16018
16068
|
{},
|
|
16019
|
-
|
|
16069
|
+
oa,
|
|
16020
16070
|
this._config
|
|
16021
16071
|
);
|
|
16022
|
-
this._configService.setConfig(
|
|
16072
|
+
this._configService.setConfig(Bi, i);
|
|
16023
16073
|
}
|
|
16024
16074
|
onStarting() {
|
|
16025
|
-
this._injector.add([Qe]), this._injector.get(
|
|
16075
|
+
this._injector.add([Qe]), this._injector.get(ga).registerChannel(
|
|
16026
16076
|
Ft,
|
|
16027
|
-
|
|
16077
|
+
Wn(this._injector.get(Qe))
|
|
16028
16078
|
);
|
|
16029
16079
|
}
|
|
16030
16080
|
};
|
|
16031
16081
|
ut(et, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
|
|
16032
16082
|
ut(et, "type", ee.UNIVER_SHEET);
|
|
16033
|
-
et =
|
|
16034
|
-
|
|
16035
|
-
Je(1,
|
|
16036
|
-
Je(2,
|
|
16083
|
+
et = Ga([
|
|
16084
|
+
sa(ya),
|
|
16085
|
+
Je(1, Y(at)),
|
|
16086
|
+
Je(2, ye)
|
|
16037
16087
|
], et);
|
|
16038
|
-
let tt = class extends
|
|
16039
|
-
constructor(a =
|
|
16088
|
+
let tt = class extends da {
|
|
16089
|
+
constructor(a = ra, e, n) {
|
|
16040
16090
|
super(), this._config = a, this._injector = e, this._configService = n;
|
|
16041
|
-
const { ...i } =
|
|
16091
|
+
const { ...i } = pa(
|
|
16042
16092
|
{},
|
|
16043
|
-
|
|
16093
|
+
ra,
|
|
16044
16094
|
this._config
|
|
16045
16095
|
);
|
|
16046
16096
|
this._configService.setConfig(ot, i, { merge: !0 });
|
|
16047
16097
|
}
|
|
16048
16098
|
onStarting() {
|
|
16049
16099
|
const a = this._injector, e = [
|
|
16050
|
-
[
|
|
16100
|
+
[Pr, { useClass: bt }],
|
|
16051
16101
|
[Ut, { useClass: Ct }],
|
|
16052
16102
|
[Ze],
|
|
16053
16103
|
[Dt],
|
|
16054
16104
|
[Ke],
|
|
16055
16105
|
[je],
|
|
16056
|
-
[
|
|
16106
|
+
[Me],
|
|
16057
16107
|
[ke],
|
|
16058
16108
|
[$e],
|
|
16059
16109
|
[ze],
|
|
16060
16110
|
[We]
|
|
16061
16111
|
];
|
|
16062
16112
|
if (this._config.notExecuteFormula) {
|
|
16063
|
-
const n = a.get(
|
|
16064
|
-
e.push([
|
|
16065
|
-
useFactory: () =>
|
|
16113
|
+
const n = a.get(ga);
|
|
16114
|
+
e.push([Va, {
|
|
16115
|
+
useFactory: () => Kn(n.requestChannel(Ft))
|
|
16066
16116
|
}]);
|
|
16067
16117
|
}
|
|
16068
16118
|
e.forEach((n) => a.add(n));
|
|
16069
16119
|
}
|
|
16070
16120
|
onReady() {
|
|
16071
|
-
|
|
16121
|
+
ge(this._injector, [
|
|
16072
16122
|
[Ze],
|
|
16073
16123
|
[$e],
|
|
16074
16124
|
[je],
|
|
16075
16125
|
[ke],
|
|
16076
16126
|
[We]
|
|
16077
|
-
]), vt() &&
|
|
16078
|
-
[
|
|
16127
|
+
]), vt() && ge(this._injector, [
|
|
16128
|
+
[Me]
|
|
16079
16129
|
]);
|
|
16080
16130
|
}
|
|
16081
16131
|
onRendered() {
|
|
16082
|
-
|
|
16132
|
+
ge(this._injector, [
|
|
16083
16133
|
[ze]
|
|
16084
|
-
]), vt() ||
|
|
16085
|
-
[
|
|
16134
|
+
]), vt() || ge(this._injector, [
|
|
16135
|
+
[Me]
|
|
16086
16136
|
]);
|
|
16087
16137
|
}
|
|
16088
16138
|
};
|
|
16089
|
-
ut(tt, "pluginName",
|
|
16139
|
+
ut(tt, "pluginName", Tr);
|
|
16090
16140
|
ut(tt, "type", ee.UNIVER_SHEET);
|
|
16091
|
-
tt =
|
|
16092
|
-
|
|
16093
|
-
Je(1,
|
|
16094
|
-
Je(2,
|
|
16141
|
+
tt = Ga([
|
|
16142
|
+
sa(ya, pn),
|
|
16143
|
+
Je(1, Y(at)),
|
|
16144
|
+
Je(2, ye)
|
|
16095
16145
|
], tt);
|
|
16096
16146
|
export {
|
|
16097
|
-
|
|
16147
|
+
de as CalculationMode,
|
|
16098
16148
|
Ct as DescriptionService,
|
|
16099
16149
|
Dt as FormulaRefRangeService,
|
|
16100
16150
|
Ut as IDescriptionService,
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16151
|
+
Pr as IRegisterFunctionService,
|
|
16152
|
+
Va as IRemoteRegisterFunctionService,
|
|
16153
|
+
kn as InsertFunctionCommand,
|
|
16154
|
+
De as OtherFormulaMarkDirty,
|
|
16105
16155
|
ot as PLUGIN_CONFIG_KEY_BASE,
|
|
16106
16156
|
bt as RegisterFunctionService,
|
|
16107
16157
|
Ke as RegisterOtherFormulaService,
|
|
16108
16158
|
Qe as RemoteRegisterFunctionService,
|
|
16109
|
-
|
|
16159
|
+
Me as TriggerCalculationController,
|
|
16110
16160
|
et as UniverRemoteSheetsFormulaPlugin,
|
|
16111
16161
|
tt as UniverSheetsFormulaPlugin,
|
|
16112
16162
|
We as UpdateDefinedNameController,
|
|
16113
16163
|
ke as UpdateFormulaController,
|
|
16114
|
-
|
|
16164
|
+
Fr as calculateFormula
|
|
16115
16165
|
};
|