@univerjs/sheets-formula 0.4.2 → 0.5.0-alpha.0
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 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/facade.js +40 -0
- package/lib/es/index.js +3738 -3363
- package/lib/es/locale/en-US.js +14 -0
- package/lib/es/locale/fa-IR.js +14 -0
- package/lib/es/locale/ru-RU.js +14 -0
- package/lib/es/locale/vi-VN.js +14 -0
- package/lib/es/locale/zh-CN.js +14 -0
- package/lib/es/locale/zh-TW.js +14 -0
- package/lib/types/controllers/config.schema.d.ts +18 -0
- package/lib/types/controllers/trigger-calculation.controller.d.ts +18 -3
- package/lib/types/controllers/update-formula.controller.d.ts +4 -2
- package/lib/types/facade/f-formula.d.ts +14 -0
- package/lib/types/facade/f-univer.d.ts +16 -0
- package/lib/types/{controllers/utils/__tests__/utils.spec.d.ts → facade/index.d.ts} +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +27 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/services/formula-common.d.ts +3 -3
- package/lib/types/services/register-other-formula.service.d.ts +24 -1
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +36 -18
- package/lib/types/controllers/utils/utils.d.ts +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={formula:{progress:{analyzing:"Analyzing",calculating:"Calculating","array-analysis":"Array Analysis","array-calculation":"Array Calculation",done:"Done"}}};module.exports=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={formula:{progress:{analyzing:"در حال تحلیل",calculating:"در حال محاسبه","array-analysis":"تحلیل آرایه","array-calculation":"محاسبه آرایه",done:"تمام"}}};module.exports=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={formula:{progress:{analyzing:"Анализ",calculating:"Вычисление","array-analysis":"Анализ массива","array-calculation":"Вычисление массива",done:"Готово"}}};module.exports=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n={formula:{progress:{analyzing:"Đang phân tích",calculating:"Đang tính toán","array-analysis":"Phân tích mảng","array-calculation":"Tính toán mảng",done:"Hoàn tất"}}};module.exports=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={formula:{progress:{analyzing:"分析中",calculating:"计算中","array-analysis":"数组分析","array-calculation":"数组计算",done:"完成"}}};module.exports=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a={formula:{progress:{analyzing:"分析中",calculating:"計算中","array-analysis":"陣列分析","array-calculation":"陣列計算",done:"完成"}}};module.exports=a;
|
package/lib/es/facade.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FUniver as o, debounce as u, LifecycleService as f, ILogService as g, IConfigService as m, LifecycleStages as d } from "@univerjs/core";
|
|
2
|
+
import { SetFormulaCalculationStartMutation as S, FFormula as r } from "@univerjs/engine-formula";
|
|
3
|
+
import { IRegisterFunctionService as n, RegisterFunctionService as h, PLUGIN_CONFIG_KEY_BASE as F } from "@univerjs/sheets-formula";
|
|
4
|
+
class v extends o {
|
|
5
|
+
/**
|
|
6
|
+
* Initialize the FUniver instance.
|
|
7
|
+
*
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
_initialize() {
|
|
11
|
+
this._debouncedFormulaCalculation = u(() => {
|
|
12
|
+
this._commandService.executeCommand(
|
|
13
|
+
S.id,
|
|
14
|
+
{
|
|
15
|
+
commands: [],
|
|
16
|
+
forceCalculation: !0
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
onlyLocal: !0
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}, 10);
|
|
23
|
+
}
|
|
24
|
+
registerFunction(i) {
|
|
25
|
+
let e = this._injector.get(n);
|
|
26
|
+
e || (this._injector.add([n, { useClass: h }]), e = this._injector.get(n));
|
|
27
|
+
const t = e.registerFunctions(i);
|
|
28
|
+
return this._debouncedFormulaCalculation(), t;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
o.extend(v);
|
|
32
|
+
class _ extends r {
|
|
33
|
+
setInitialFormulaComputing(i) {
|
|
34
|
+
const t = this._injector.get(f).stage, l = this._injector.get(g), s = this._injector.get(m);
|
|
35
|
+
t > d.Starting && l.warn("[FFormula]", "CalculationMode is called after the Starting lifecycle and will take effect the next time the Univer Sheet is constructed. If you want it to take effect when the Univer Sheet is initialized this time, consider calling it before the Ready lifecycle or using configuration.");
|
|
36
|
+
const c = s.getConfig(F);
|
|
37
|
+
c && (c.initialFormulaComputing = i);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
r.extend(_);
|