@univerjs/sheets-formula 0.4.1 → 0.4.2-nightly.202410301606
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/es/facade.js +35 -0
- package/lib/es/index.js +353 -13138
- package/lib/register-function.service-BUOInIag.mjs +12842 -0
- package/lib/types/controllers/trigger-calculation.controller.d.ts +11 -16
- package/lib/types/facade/f-univer.d.ts +16 -0
- package/lib/types/facade/index.d.ts +0 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/formula-ref-range.service.d.ts +11 -3
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +14 -19
- package/LICENSE +0 -176
- package/lib/cjs/index.js +0 -1
package/lib/es/facade.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
3
|
+
import { FUniver, debounce } from "@univerjs/core";
|
|
4
|
+
import { SetFormulaCalculationStartMutation } from "@univerjs/engine-formula";
|
|
5
|
+
import { e as IRegisterFunctionService, f as RegisterFunctionService } from "../register-function.service-BUOInIag.mjs";
|
|
6
|
+
const _FUniverSheetsFormulaMixin = class _FUniverSheetsFormulaMixin extends FUniver {
|
|
7
|
+
/**
|
|
8
|
+
* Initialize the FUniver instance.
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
_initialize() {
|
|
13
|
+
this._debouncedFormulaCalculation = debounce(() => {
|
|
14
|
+
this._commandService.executeCommand(
|
|
15
|
+
SetFormulaCalculationStartMutation.id,
|
|
16
|
+
{
|
|
17
|
+
commands: [],
|
|
18
|
+
forceCalculation: !0
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
onlyLocal: !0
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}, 10);
|
|
25
|
+
}
|
|
26
|
+
registerFunction(config) {
|
|
27
|
+
let registerFunctionService = this._injector.get(IRegisterFunctionService);
|
|
28
|
+
registerFunctionService || (this._injector.add([IRegisterFunctionService, { useClass: RegisterFunctionService }]), registerFunctionService = this._injector.get(IRegisterFunctionService));
|
|
29
|
+
const functionsDisposable = registerFunctionService.registerFunctions(config);
|
|
30
|
+
return this._debouncedFormulaCalculation(), functionsDisposable;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__name(_FUniverSheetsFormulaMixin, "FUniverSheetsFormulaMixin");
|
|
34
|
+
let FUniverSheetsFormulaMixin = _FUniverSheetsFormulaMixin;
|
|
35
|
+
FUniver.extend(FUniverSheetsFormulaMixin);
|