@univerjs/engine-formula 0.2.4-alpha.0 → 0.2.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 +36 -35
- package/lib/types/controller/formula.controller.d.ts +2 -1
- package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +8 -7
- package/lib/types/engine/ast-node/function-node.d.ts +1 -1
- package/lib/types/engine/ast-node/prefix-node.d.ts +2 -1
- package/lib/types/engine/ast-node/reference-node.d.ts +1 -1
- package/lib/types/engine/ast-node/suffix-node.d.ts +1 -1
- package/lib/types/engine/utils/prefixHandler.d.ts +2 -1
- package/lib/types/functions/__tests__/create-function-test-bed.d.ts +8 -7
- package/lib/types/models/__tests__/create-command-test-bed.d.ts +8 -7
- package/lib/types/plugin.d.ts +2 -1
- package/lib/types/services/active-dirty-manager.service.d.ts +1 -1
- package/lib/types/services/current-data.service.d.ts +1 -1
- package/lib/types/services/defined-names.service.d.ts +1 -1
- package/lib/types/services/dependency-manager.service.d.ts +1 -1
- package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
- package/lib/types/services/function.service.d.ts +3 -2
- package/lib/types/services/other-formula-manager.service.d.ts +1 -1
- package/lib/types/services/runtime.service.d.ts +1 -1
- package/lib/types/services/super-table.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -6
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var Fi = Object.defineProperty;
|
|
2
2
|
var ki = (n, s, e) => s in n ? Fi(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
3
3
|
var d = (n, s, e) => ki(n, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
-
import { ObjectMatrix as ne, LRUMap as Ti, hashAlgorithm as $i, Tools as Ye, AbsoluteRefType as Re, RANGE_TYPE as Ne, Disposable as ue, moveRangeByOffset as zs, isValidRange as ji, isRealNum as Xt, DEFAULT_EMPTY_DOCUMENT_VALUE as Ii, isNullCell as pr, CellValueType as qe, BooleanNumber as Yi, isFormulaString as Dt, isFormulaId as Ut,
|
|
4
|
+
import { ObjectMatrix as ne, LRUMap as Ti, hashAlgorithm as $i, Tools as Ye, AbsoluteRefType as Re, RANGE_TYPE as Ne, Disposable as ue, moveRangeByOffset as zs, isValidRange as ji, isRealNum as Xt, DEFAULT_EMPTY_DOCUMENT_VALUE as Ii, isNullCell as pr, CellValueType as qe, BooleanNumber as Yi, isFormulaString as Dt, isFormulaId as Ut, UniverInstanceType as Qt, IUniverInstanceService as Dn, CommandType as xe, toDisposable as Hi, sortRules as Qi, OnLifecycle as tt, LifecycleStages as rt, requestImmediateMacroTask as zi, IConfigService as Wi, ICommandService as Pt, Plugin as Gi, Rectangle as as } from "@univerjs/core";
|
|
5
|
+
import { Inject as ce, createIdentifier as nt, Injector as Zt, Optional as Xi } from "@wendellhu/redi";
|
|
5
6
|
import { Subject as Vt } from "rxjs";
|
|
6
7
|
import { DataSyncPrimaryController as Ki } from "@univerjs/rpc";
|
|
7
8
|
function qi(n, s, e, t, r) {
|
|
@@ -63,10 +64,10 @@ function ta(n) {
|
|
|
63
64
|
return !0;
|
|
64
65
|
return !1;
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function Mf(n) {
|
|
67
68
|
return n[0] === "'" && n[n.length - 1] === "'" ? n.substring(1, n.length - 1) : n;
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function vf(n) {
|
|
70
71
|
return _r(n) && n !== Q.CLOSE_BRACES && n !== Q.CLOSE_BRACKET && n !== Q.SINGLE_QUOTATION && n !== Q.DOUBLE_QUOTATION || n === " ";
|
|
71
72
|
}
|
|
72
73
|
function ra(n) {
|
|
@@ -239,7 +240,7 @@ function Er(n) {
|
|
|
239
240
|
let t = e.indexOf("$") > -1;
|
|
240
241
|
return Ye.isStringNumber(e) && s && !t && (s = !1, t = !0), s && t ? Re.ALL : s ? Re.COLUMN : t ? Re.ROW : Re.NONE;
|
|
241
242
|
}
|
|
242
|
-
function
|
|
243
|
+
function Ff(n) {
|
|
243
244
|
const s = n.split("!");
|
|
244
245
|
s.length > 1 && (n = s[s.length - 1]);
|
|
245
246
|
const e = n.split(":");
|
|
@@ -345,7 +346,7 @@ function dn(n) {
|
|
|
345
346
|
const { range: s } = et(n);
|
|
346
347
|
return !(s.endColumn >= 16384);
|
|
347
348
|
}
|
|
348
|
-
function
|
|
349
|
+
function kf(n, s) {
|
|
349
350
|
const e = (n == null ? void 0 : n.split(",")) || [];
|
|
350
351
|
return n === "" || e.length === 0 ? [] : da(n) ? e.map((i) => {
|
|
351
352
|
const a = et(i);
|
|
@@ -2417,7 +2418,7 @@ const kt = /* @__PURE__ */ Ba(Ma), va = [
|
|
|
2417
2418
|
unknown: 11
|
|
2418
2419
|
/* Custom */
|
|
2419
2420
|
};
|
|
2420
|
-
function
|
|
2421
|
+
function Tf(n, s, e) {
|
|
2421
2422
|
var u, c;
|
|
2422
2423
|
if (n == null || s == null)
|
|
2423
2424
|
return s;
|
|
@@ -5214,7 +5215,7 @@ class P extends ue {
|
|
|
5214
5215
|
return this.unitId == null || this.subUnitId == null ? h.create(f.REF) : (t.setDefaultUnitId(this.unitId), t.setDefaultSheetId(this.subUnitId), t.setUnitData(e.getUnitData()), t.setRuntimeData(e.getRuntimeData()), t.setArrayFormulaCellData(e.getArrayFormulaCellData()), t.setRuntimeArrayFormulaCellData(e.getRuntimeArrayFormulaCellData()), t);
|
|
5215
5216
|
}
|
|
5216
5217
|
}
|
|
5217
|
-
class
|
|
5218
|
+
class $f extends P {
|
|
5218
5219
|
isCustom() {
|
|
5219
5220
|
return !0;
|
|
5220
5221
|
}
|
|
@@ -9097,7 +9098,7 @@ class $c extends ue {
|
|
|
9097
9098
|
this._update$.next(null);
|
|
9098
9099
|
}
|
|
9099
9100
|
}
|
|
9100
|
-
const Gr =
|
|
9101
|
+
const Gr = nt("univer.formula.defined-names.service");
|
|
9101
9102
|
var jc = Object.defineProperty, Ic = Object.getOwnPropertyDescriptor, Yc = (n, s, e, t) => {
|
|
9102
9103
|
for (var r = t > 1 ? void 0 : t ? Ic(s, e) : s, i = n.length - 1, a; i >= 0; i--)
|
|
9103
9104
|
(a = n[i]) && (r = (t ? a(s, e, r) : a(r)) || r);
|
|
@@ -9291,7 +9292,7 @@ let _n = class extends ue {
|
|
|
9291
9292
|
_n = Yc([
|
|
9292
9293
|
Hc(0, Dn)
|
|
9293
9294
|
], _n);
|
|
9294
|
-
const ht =
|
|
9295
|
+
const ht = nt(
|
|
9295
9296
|
"univer.formula.current-data.service"
|
|
9296
9297
|
);
|
|
9297
9298
|
var Qc = Object.defineProperty, zc = Object.getOwnPropertyDescriptor, Wc = (n, s, e, t) => {
|
|
@@ -9651,7 +9652,7 @@ let En = class extends ue {
|
|
|
9651
9652
|
En = Kc([
|
|
9652
9653
|
qc(0, ht)
|
|
9653
9654
|
], En);
|
|
9654
|
-
const He =
|
|
9655
|
+
const He = nt("univer.formula.runtime.service");
|
|
9655
9656
|
var q = /* @__PURE__ */ ((n) => (n.REFERENCE = "ReferenceNode", n.VALUE = "ValueNode", n.OPERATOR = "OperatorNode", n.FUNCTION = "FunctionNode", n.LAMBDA = "LambdaNode", n.LAMBDA_PARAMETER = "LambdaNodeParameter", n.ERROR = "ErrorNode", n.BASE = "Base", n.ROOT = "Root", n.UNION = "UnionNode", n.PREFIX = "PrefixNode", n.SUFFIX = "SuffixNode", n.NULL = "NullNode", n))(q || {});
|
|
9656
9657
|
const Qe = /* @__PURE__ */ new Map([
|
|
9657
9658
|
["ReferenceNode", 7],
|
|
@@ -9866,7 +9867,7 @@ class Nc extends ue {
|
|
|
9866
9867
|
}
|
|
9867
9868
|
}
|
|
9868
9869
|
}
|
|
9869
|
-
const mt =
|
|
9870
|
+
const mt = nt("univer.formula.function.service");
|
|
9870
9871
|
var Zc = Object.defineProperty, Jc = Object.getOwnPropertyDescriptor, el = (n, s, e, t) => {
|
|
9871
9872
|
for (var r = t > 1 ? void 0 : t ? Jc(s, e) : s, i = n.length - 1, a; i >= 0; i--)
|
|
9872
9873
|
(a = n[i]) && (r = (t ? a(s, e, r) : a(r)) || r);
|
|
@@ -10457,7 +10458,7 @@ class yl extends ue {
|
|
|
10457
10458
|
this._tableOptionMap.set(e, t);
|
|
10458
10459
|
}
|
|
10459
10460
|
}
|
|
10460
|
-
const Tn =
|
|
10461
|
+
const Tn = nt("univer.formula.super-table.service");
|
|
10461
10462
|
class Dl extends rr {
|
|
10462
10463
|
constructor(s, e, t, r) {
|
|
10463
10464
|
super(s), this._tableData = e, this._columnDataString = t;
|
|
@@ -10925,7 +10926,7 @@ class $l extends ue {
|
|
|
10925
10926
|
return this._referenceExecutorMap;
|
|
10926
10927
|
}
|
|
10927
10928
|
}
|
|
10928
|
-
const Xr =
|
|
10929
|
+
const Xr = nt(
|
|
10929
10930
|
"univer.formula.feature-calculation-manager.service"
|
|
10930
10931
|
);
|
|
10931
10932
|
class jl extends ue {
|
|
@@ -11001,7 +11002,7 @@ class jl extends ue {
|
|
|
11001
11002
|
return this._otherFormulaData;
|
|
11002
11003
|
}
|
|
11003
11004
|
}
|
|
11004
|
-
const $n =
|
|
11005
|
+
const $n = nt(
|
|
11005
11006
|
"univer.formula.other-formula-manager.service"
|
|
11006
11007
|
);
|
|
11007
11008
|
class an extends ue {
|
|
@@ -11286,7 +11287,7 @@ class Il extends ue {
|
|
|
11286
11287
|
return ((o = (a = this._formulaData[e]) == null ? void 0 : a[t]) == null ? void 0 : o.getValue(r, i)) != null;
|
|
11287
11288
|
}
|
|
11288
11289
|
}
|
|
11289
|
-
const Kr =
|
|
11290
|
+
const Kr = nt(
|
|
11290
11291
|
"univer.formula.dependency-manager.service"
|
|
11291
11292
|
);
|
|
11292
11293
|
var Yl = Object.defineProperty, Hl = Object.getOwnPropertyDescriptor, Ql = (n, s, e, t) => {
|
|
@@ -11597,7 +11598,7 @@ let zt = class extends ue {
|
|
|
11597
11598
|
}
|
|
11598
11599
|
};
|
|
11599
11600
|
zt = Ql([
|
|
11600
|
-
rt
|
|
11601
|
+
tt(rt.Rendered, zt),
|
|
11601
11602
|
it(0, ht),
|
|
11602
11603
|
it(1, He),
|
|
11603
11604
|
it(2, $n),
|
|
@@ -11735,7 +11736,7 @@ let Wt = class extends ue {
|
|
|
11735
11736
|
}
|
|
11736
11737
|
};
|
|
11737
11738
|
Wt = Xl([
|
|
11738
|
-
rt
|
|
11739
|
+
tt(rt.Rendered, Wt),
|
|
11739
11740
|
pt(0, Wi),
|
|
11740
11741
|
pt(1, ce(Mt)),
|
|
11741
11742
|
pt(2, ht),
|
|
@@ -11864,7 +11865,7 @@ let Cr = class extends ue {
|
|
|
11864
11865
|
}
|
|
11865
11866
|
};
|
|
11866
11867
|
Cr = Zl([
|
|
11867
|
-
rt
|
|
11868
|
+
tt(rt.Ready, Cr),
|
|
11868
11869
|
gr(0, Pt),
|
|
11869
11870
|
gr(1, ce(Wt)),
|
|
11870
11871
|
gr(2, Dn),
|
|
@@ -11972,10 +11973,10 @@ let Gt = class extends ue {
|
|
|
11972
11973
|
}
|
|
11973
11974
|
};
|
|
11974
11975
|
Gt = sf([
|
|
11975
|
-
rt
|
|
11976
|
+
tt(rt.Ready, Gt),
|
|
11976
11977
|
on(1, Pt),
|
|
11977
11978
|
on(2, mt),
|
|
11978
|
-
on(3,
|
|
11979
|
+
on(3, Xi(Ki))
|
|
11979
11980
|
], Gt);
|
|
11980
11981
|
var af = Object.defineProperty, of = Object.getOwnPropertyDescriptor, uf = (n, s, e, t) => {
|
|
11981
11982
|
for (var r = t > 1 ? void 0 : t ? of(s, e) : s, i = n.length - 1, a; i >= 0; i--)
|
|
@@ -12017,7 +12018,7 @@ let yr = class extends ue {
|
|
|
12017
12018
|
}
|
|
12018
12019
|
};
|
|
12019
12020
|
yr = uf([
|
|
12020
|
-
rt
|
|
12021
|
+
tt(rt.Ready, yr),
|
|
12021
12022
|
Is(0, Pt),
|
|
12022
12023
|
Is(1, Gr)
|
|
12023
12024
|
], yr);
|
|
@@ -12054,7 +12055,7 @@ let Dr = class extends ue {
|
|
|
12054
12055
|
}
|
|
12055
12056
|
};
|
|
12056
12057
|
Dr = ff([
|
|
12057
|
-
rt
|
|
12058
|
+
tt(rt.Ready, Dr),
|
|
12058
12059
|
Ys(0, Pt),
|
|
12059
12060
|
Ys(1, Xr)
|
|
12060
12061
|
], Dr);
|
|
@@ -12093,7 +12094,7 @@ let br = class extends ue {
|
|
|
12093
12094
|
}
|
|
12094
12095
|
};
|
|
12095
12096
|
br = df([
|
|
12096
|
-
rt
|
|
12097
|
+
tt(rt.Ready, br),
|
|
12097
12098
|
un(0, Pt),
|
|
12098
12099
|
un(1, $n),
|
|
12099
12100
|
un(2, Kr)
|
|
@@ -12137,7 +12138,7 @@ let Sr = class extends ue {
|
|
|
12137
12138
|
}
|
|
12138
12139
|
};
|
|
12139
12140
|
Sr = Rf([
|
|
12140
|
-
rt
|
|
12141
|
+
tt(rt.Ready, Sr),
|
|
12141
12142
|
Hs(0, Pt),
|
|
12142
12143
|
Hs(1, Tn)
|
|
12143
12144
|
], Sr);
|
|
@@ -12165,7 +12166,7 @@ class _f extends ue {
|
|
|
12165
12166
|
return this._dirtyConversionMap;
|
|
12166
12167
|
}
|
|
12167
12168
|
}
|
|
12168
|
-
const Ef =
|
|
12169
|
+
const Ef = nt(
|
|
12169
12170
|
"univer.formula.active-dirty-manager.service"
|
|
12170
12171
|
);
|
|
12171
12172
|
var Cf = Object.defineProperty, yf = Object.getOwnPropertyDescriptor, Df = (n, s, e, t) => {
|
|
@@ -12222,7 +12223,7 @@ let Ar = class extends ue {
|
|
|
12222
12223
|
}
|
|
12223
12224
|
};
|
|
12224
12225
|
Ar = Df([
|
|
12225
|
-
rt
|
|
12226
|
+
tt(rt.Ready, Ar),
|
|
12226
12227
|
cn(0, Pt),
|
|
12227
12228
|
cn(1, Xr),
|
|
12228
12229
|
cn(1, Kr)
|
|
@@ -12234,7 +12235,7 @@ var bf = Object.defineProperty, Sf = Object.getOwnPropertyDescriptor, Af = (n, s
|
|
|
12234
12235
|
}, Pf = (n, s) => (e, t) => s(e, t, n);
|
|
12235
12236
|
const Lf = "base-formula-engine";
|
|
12236
12237
|
var ln;
|
|
12237
|
-
let Qs = (ln = class extends
|
|
12238
|
+
let Qs = (ln = class extends Gi {
|
|
12238
12239
|
constructor(n, s) {
|
|
12239
12240
|
super(), this._config = n, this._injector = s;
|
|
12240
12241
|
}
|
|
@@ -12305,7 +12306,7 @@ function xf(n, s) {
|
|
|
12305
12306
|
const e = n.sequenceNodesBuilder(s);
|
|
12306
12307
|
return !(!e || e.every((t) => typeof t == "string" || t.nodeType !== we.REFERENCE));
|
|
12307
12308
|
}
|
|
12308
|
-
function
|
|
12309
|
+
function jf(n, s, e, t, r, i) {
|
|
12309
12310
|
if (!xf(n, s))
|
|
12310
12311
|
return s;
|
|
12311
12312
|
const a = n.sequenceNodesBuilder(s), o = (p, _) => ({ startRow: p, endRow: p, startColumn: _, endColumn: _ }), u = o(e, t), c = as.getRelativeRange(o(r, i), u), l = Ye.deepClone(a), m = Array.isArray(l) ? l.map((p) => {
|
|
@@ -12330,7 +12331,7 @@ export {
|
|
|
12330
12331
|
bt as BooleanValue,
|
|
12331
12332
|
$ as BooleanValueObject,
|
|
12332
12333
|
Wt as CalculateFormulaService,
|
|
12333
|
-
|
|
12334
|
+
$f as CustomFunction,
|
|
12334
12335
|
$c as DefinedNamesService,
|
|
12335
12336
|
Jt as ERROR_TYPE_SET,
|
|
12336
12337
|
f as ErrorType,
|
|
@@ -12411,10 +12412,10 @@ export {
|
|
|
12411
12412
|
Vc as functionUniver,
|
|
12412
12413
|
Uc as functionWeb,
|
|
12413
12414
|
mn as generateStringWithSequence,
|
|
12414
|
-
|
|
12415
|
+
Ff as getAbsoluteRefTypeWitString,
|
|
12415
12416
|
Er as getAbsoluteRefTypeWithSingleString,
|
|
12416
|
-
|
|
12417
|
-
|
|
12417
|
+
kf as getRangeWithRefsString,
|
|
12418
|
+
Tf as handleNumfmtInCell,
|
|
12418
12419
|
ta as includeFormulaLexerToken,
|
|
12419
12420
|
Tc as initSheetFormulaData,
|
|
12420
12421
|
_r as isFormulaLexerToken,
|
|
@@ -12423,9 +12424,9 @@ export {
|
|
|
12423
12424
|
ca as isReferenceString,
|
|
12424
12425
|
dn as isReferenceStringWithEffectiveColumn,
|
|
12425
12426
|
da as isReferenceStrings,
|
|
12426
|
-
|
|
12427
|
+
vf as matchRefDrawToken,
|
|
12427
12428
|
Q as matchToken,
|
|
12428
|
-
|
|
12429
|
+
Mf as normalizeSheetName,
|
|
12429
12430
|
se as operatorToken,
|
|
12430
12431
|
we as sequenceNodeType,
|
|
12431
12432
|
lt as serializeRange,
|
|
@@ -12435,5 +12436,5 @@ export {
|
|
|
12435
12436
|
Jr as singleReferenceToGrid,
|
|
12436
12437
|
Cs as strip,
|
|
12437
12438
|
Va as stripErrorMargin,
|
|
12438
|
-
|
|
12439
|
+
jf as transformFormula
|
|
12439
12440
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable, ICommandService
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { Ctor } from '@wendellhu/redi';
|
|
2
3
|
import { DataSyncPrimaryController } from '@univerjs/rpc';
|
|
3
4
|
import { IFunctionNames } from '../basics/function';
|
|
4
5
|
import { BaseFunction } from '../functions/base-function';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
|
+
import { Dependency } from '@wendellhu/redi';
|
|
2
3
|
import { ISheetData } from '../../../basics/common';
|
|
3
4
|
|
|
4
5
|
export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
5
6
|
univer: Univer;
|
|
6
7
|
get: {
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
12
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
13
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
13
14
|
};
|
|
14
15
|
sheet: Workbook;
|
|
15
16
|
unitId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injector } from '@
|
|
1
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
2
|
import { AstNodePromiseType } from '../../basics/common';
|
|
3
3
|
import { BaseFunction } from '../../functions/base-function';
|
|
4
4
|
import { IFormulaCurrentConfigService } from '../../services/current-data.service';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable } from '@univerjs/core';
|
|
2
|
+
import { IAccessor, Injector } from '@wendellhu/redi';
|
|
2
3
|
import { BaseFunction } from '../../functions/base-function';
|
|
3
4
|
import { IFunctionService } from '../../services/function.service';
|
|
4
5
|
import { LexerNode } from '../analysis/lexer-node';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAccessor, Injector } from '@
|
|
1
|
+
import { IAccessor, Injector } from '@wendellhu/redi';
|
|
2
2
|
import { IFormulaRuntimeService } from '../../services/runtime.service';
|
|
3
3
|
import { ISuperTableService } from '../../services/super-table.service';
|
|
4
4
|
import { LexerNode } from '../analysis/lexer-node';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAccessor, Injector } from '@
|
|
1
|
+
import { IAccessor, Injector } from '@wendellhu/redi';
|
|
2
2
|
import { BaseFunction } from '../../functions/base-function';
|
|
3
3
|
import { IFunctionService } from '../../services/function.service';
|
|
4
4
|
import { LexerNode } from '../analysis/lexer-node';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Injector
|
|
1
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
|
+
import { Nullable } from '@univerjs/core';
|
|
2
3
|
import { IFunctionService } from '../../services/function.service';
|
|
3
4
|
import { PrefixNode } from '../ast-node/prefix-node';
|
|
4
5
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorkbookData, Workbook, Univer } from '@univerjs/core';
|
|
2
|
+
import { Dependency } from '@wendellhu/redi';
|
|
2
3
|
import { ISheetData } from '../../basics/common';
|
|
3
4
|
import { FunctionVariantType } from '../../engine/reference-object/base-reference-object';
|
|
4
5
|
|
|
5
6
|
export declare function createFunctionTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
6
7
|
univer: Univer;
|
|
7
8
|
get: {
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
12
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
13
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
14
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
14
15
|
};
|
|
15
16
|
sheet: Workbook;
|
|
16
17
|
unitId: string;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
+
import { Dependency } from '@wendellhu/redi';
|
|
2
3
|
|
|
3
4
|
export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
4
5
|
univer: Univer;
|
|
5
6
|
get: {
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
11
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
12
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
12
13
|
};
|
|
13
14
|
sheet: import('@univerjs/core').Workbook;
|
|
14
15
|
};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -32,4 +32,4 @@ export declare class ActiveDirtyManagerService extends Disposable implements IAc
|
|
|
32
32
|
register(commandId: string, dirtyConversion: IDirtyConversionManagerParams): void;
|
|
33
33
|
getDirtyConversionMap(): Map<string, IDirtyConversionManagerParams>;
|
|
34
34
|
}
|
|
35
|
-
export declare const IActiveDirtyManagerService: import('@
|
|
35
|
+
export declare const IActiveDirtyManagerService: import('@wendellhu/redi').IdentifierDecorator<ActiveDirtyManagerService>;
|
|
@@ -72,4 +72,4 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
72
72
|
private _mergeNameMap;
|
|
73
73
|
private _loadSheetData;
|
|
74
74
|
}
|
|
75
|
-
export declare const IFormulaCurrentConfigService: import('@
|
|
75
|
+
export declare const IFormulaCurrentConfigService: import('@wendellhu/redi').IdentifierDecorator<FormulaCurrentConfigService>;
|
|
@@ -60,4 +60,4 @@ export declare class DefinedNamesService extends Disposable implements IDefinedN
|
|
|
60
60
|
hasDefinedName(unitId: string): boolean;
|
|
61
61
|
private _update;
|
|
62
62
|
}
|
|
63
|
-
export declare const IDefinedNamesService: import('@
|
|
63
|
+
export declare const IDefinedNamesService: import('@wendellhu/redi').IdentifierDecorator<DefinedNamesService>;
|
|
@@ -77,4 +77,4 @@ export declare class DependencyManagerService extends Disposable implements IDep
|
|
|
77
77
|
clearFormulaDependency(unitId: string, sheetId: string): void;
|
|
78
78
|
hasFormulaDependency(unitId: string, sheetId: string, row: number, column: number): boolean;
|
|
79
79
|
}
|
|
80
|
-
export declare const IDependencyManagerService: import('@
|
|
80
|
+
export declare const IDependencyManagerService: import('@wendellhu/redi').IdentifierDecorator<DependencyManagerService>;
|
|
@@ -34,4 +34,4 @@ export declare class FeatureCalculationManagerService extends Disposable impleme
|
|
|
34
34
|
register(featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
|
|
35
35
|
getReferenceExecutorMap(): Map<string, IFeatureCalculationManagerParam>;
|
|
36
36
|
}
|
|
37
|
-
export declare const IFeatureCalculationManagerService: import('@
|
|
37
|
+
export declare const IFeatureCalculationManagerService: import('@wendellhu/redi').IdentifierDecorator<FeatureCalculationManagerService>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable, Disposable } from '@univerjs/core';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
3
|
import { IFunctionInfo, IFunctionNames } from '../basics/function';
|
|
3
4
|
import { BaseFunction } from '../functions/base-function';
|
|
4
5
|
|
|
@@ -42,4 +43,4 @@ export declare class FunctionService extends Disposable implements IFunctionServ
|
|
|
42
43
|
hasDescription(functionToken: IFunctionNames): boolean;
|
|
43
44
|
unregisterDescriptions(...functionTokens: IFunctionNames[]): void;
|
|
44
45
|
}
|
|
45
|
-
export declare const IFunctionService: import('@
|
|
46
|
+
export declare const IFunctionService: import('@wendellhu/redi').IdentifierDecorator<FunctionService>;
|
|
@@ -36,4 +36,4 @@ export declare class OtherFormulaManagerService extends Disposable implements IO
|
|
|
36
36
|
batchRemove(formulaData: IDirtyUnitOtherFormulaMap): void;
|
|
37
37
|
getOtherFormulaData(): IOtherFormulaData;
|
|
38
38
|
}
|
|
39
|
-
export declare const IOtherFormulaManagerService: import('@
|
|
39
|
+
export declare const IOtherFormulaManagerService: import('@wendellhu/redi').IdentifierDecorator<OtherFormulaManagerService>;
|
|
@@ -179,4 +179,4 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
179
179
|
private _checkIfArrayFormulaExceeded;
|
|
180
180
|
private _isInDirtyRange;
|
|
181
181
|
}
|
|
182
|
-
export declare const IFormulaRuntimeService: import('@
|
|
182
|
+
export declare const IFormulaRuntimeService: import('@wendellhu/redi').IdentifierDecorator<FormulaRuntimeService>;
|
|
@@ -22,4 +22,4 @@ export declare class SuperTableService extends Disposable implements ISuperTable
|
|
|
22
22
|
registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
|
|
23
23
|
registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
|
|
24
24
|
}
|
|
25
|
-
export declare const ISuperTableService: import('@
|
|
25
|
+
export declare const ISuperTableService: import('@wendellhu/redi').IdentifierDecorator<ISuperTableService>;
|