@univerjs/engine-formula 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/es/facade.js +21 -19
- package/lib/es/index.js +3715 -3677
- package/lib/types/basics/is-null-cell.d.ts +7 -0
- package/lib/types/engine/ast-node/function-node.d.ts +7 -0
- package/lib/types/engine/value-object/primitive-object.d.ts +1 -0
- package/lib/types/facade/f-formula.d.ts +2 -1
- package/lib/types/functions/base-function.d.ts +2 -2
- package/lib/types/functions/custom-function.d.ts +3 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +5 -23
package/lib/es/facade.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Inject as u, ICommandService as
|
|
1
|
+
import { Inject as u, ICommandService as _, Injector as f, FBase as C, IConfigService as v, FUniver as d } from "@univerjs/core";
|
|
2
2
|
import { SetFormulaCalculationStartMutation as l, SetFormulaCalculationStopMutation as p, SetFormulaCalculationNotificationMutation as m, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as S } from "@univerjs/engine-formula";
|
|
3
|
-
var E = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (t, e,
|
|
4
|
-
for (var
|
|
5
|
-
(r = t[
|
|
6
|
-
return a &&
|
|
7
|
-
}, c = (t, e) => (
|
|
8
|
-
let s = class extends
|
|
9
|
-
constructor(t, e,
|
|
10
|
-
super(), this._commandService = t, this._injector = e, this._configService =
|
|
3
|
+
var E = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (t, e, i, a) => {
|
|
4
|
+
for (var n = a > 1 ? void 0 : a ? x(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
5
|
+
(r = t[o]) && (n = (a ? r(e, i, n) : r(n)) || n);
|
|
6
|
+
return a && n && E(e, i, n), n;
|
|
7
|
+
}, c = (t, e) => (i, a) => e(i, a, t);
|
|
8
|
+
let s = class extends C {
|
|
9
|
+
constructor(t, e, i) {
|
|
10
|
+
super(), this._commandService = t, this._injector = e, this._configService = i, this._initialize();
|
|
11
|
+
}
|
|
12
|
+
_initialize() {
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Start the calculation of the formula.
|
|
@@ -27,8 +29,8 @@ let s = class extends _ {
|
|
|
27
29
|
calculationStart(t) {
|
|
28
30
|
return this._commandService.onCommandExecuted((e) => {
|
|
29
31
|
if (e.id === l.id) {
|
|
30
|
-
const
|
|
31
|
-
t(
|
|
32
|
+
const i = e.params;
|
|
33
|
+
t(i.forceCalculation);
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
36
|
}
|
|
@@ -39,16 +41,16 @@ let s = class extends _ {
|
|
|
39
41
|
return this._commandService.onCommandExecuted((e) => {
|
|
40
42
|
if (e.id !== m.id)
|
|
41
43
|
return;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
+
const i = e.params;
|
|
45
|
+
i.functionsExecutedState !== void 0 && t(i.functionsExecutedState);
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
onCalculationEnd() {
|
|
47
49
|
return new Promise((t, e) => {
|
|
48
|
-
const
|
|
50
|
+
const i = setTimeout(() => {
|
|
49
51
|
e(new Error("Calculation end timeout"));
|
|
50
52
|
}, 3e4), a = this.calculationEnd(() => {
|
|
51
|
-
clearTimeout(
|
|
53
|
+
clearTimeout(i), a.dispose(), t();
|
|
52
54
|
});
|
|
53
55
|
});
|
|
54
56
|
}
|
|
@@ -59,8 +61,8 @@ let s = class extends _ {
|
|
|
59
61
|
return this._commandService.onCommandExecuted((e) => {
|
|
60
62
|
if (e.id !== m.id)
|
|
61
63
|
return;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
+
const i = e.params;
|
|
65
|
+
i.stageInfo !== void 0 && t(i.stageInfo);
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
@@ -79,8 +81,8 @@ let s = class extends _ {
|
|
|
79
81
|
}
|
|
80
82
|
};
|
|
81
83
|
s = h([
|
|
82
|
-
c(0, u(
|
|
83
|
-
c(1, u(
|
|
84
|
+
c(0, u(_)),
|
|
85
|
+
c(1, u(f)),
|
|
84
86
|
c(2, v)
|
|
85
87
|
], s);
|
|
86
88
|
class F extends d {
|