@univerjs/sheets-formula 0.5.4 → 0.5.5-experimental.20250123-34738ff
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 +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +54 -48
- package/lib/es/index.js +3108 -3043
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/ru-RU.js +2 -2
- package/lib/es/locale/vi-VN.js +2 -2
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/types/facade/f-formula.d.ts +4 -1
- package/lib/types/facade/f-univer.d.ts +7 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +8 -8
- package/LICENSE +0 -176
- package/lib/types/controllers/utils/__tests__/offset-formula-data.spec.d.ts +0 -16
- package/lib/types/controllers/utils/__tests__/ref-range-formula.spec.d.ts +0 -16
- package/lib/types/controllers/utils/__tests__/ref-range-move.spec.d.ts +0 -16
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -2,6 +2,9 @@ import { IDisposable, ILocales } from '@univerjs/core';
|
|
|
2
2
|
import { IFunctionInfo } from '@univerjs/engine-formula';
|
|
3
3
|
import { CalculationMode, IRegisterAsyncFunction, IRegisterFunction } from '@univerjs/sheets-formula';
|
|
4
4
|
import { FFormula } from '@univerjs/engine-formula/facade';
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
5
8
|
export interface IFFormulaSheetsMixin {
|
|
6
9
|
/**
|
|
7
10
|
* Update the calculation mode of the formula.
|
|
@@ -181,7 +184,7 @@ export declare class FFormulaSheetsMixin extends FFormula implements IFFormulaSh
|
|
|
181
184
|
private _debouncedFormulaCalculation;
|
|
182
185
|
/**
|
|
183
186
|
* Initialize the FUniver instance.
|
|
184
|
-
* @
|
|
187
|
+
* @ignore
|
|
185
188
|
*/
|
|
186
189
|
_initialize(): void;
|
|
187
190
|
setInitialFormulaComputing(calculationMode: CalculationMode): void;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IDisposable, FUniver } from '@univerjs/core';
|
|
2
2
|
import { IRegisterFunctionParams } from '@univerjs/sheets-formula';
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
3
6
|
export interface IFUniverSheetsFormulaMixin {
|
|
4
7
|
/**
|
|
5
8
|
* Register a function to the spreadsheet.
|
|
@@ -9,6 +12,9 @@ export interface IFUniverSheetsFormulaMixin {
|
|
|
9
12
|
*/
|
|
10
13
|
registerFunction(config: IRegisterFunctionParams): IDisposable;
|
|
11
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @ignore
|
|
17
|
+
*/
|
|
12
18
|
export declare class FUniverSheetsFormulaMixin extends FUniver implements IFUniverSheetsFormulaMixin {
|
|
13
19
|
/**
|
|
14
20
|
* RegisterFunction may be executed multiple times, triggering multiple formula forced refreshes.
|
|
@@ -16,7 +22,7 @@ export declare class FUniverSheetsFormulaMixin extends FUniver implements IFUniv
|
|
|
16
22
|
private _debouncedFormulaCalculation;
|
|
17
23
|
/**
|
|
18
24
|
* Initialize the FUniver instance.
|
|
19
|
-
* @
|
|
25
|
+
* @ignore
|
|
20
26
|
*/
|
|
21
27
|
_initialize(): void;
|
|
22
28
|
registerFunction(config: IRegisterFunctionParams): IDisposable;
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(require("@univerjs/core"),require("@univerjs/engine-formula"),require("@univerjs/sheets-formula"),require("@univerjs/engine-formula/facade")):typeof define=="function"&&define.amd?define(["@univerjs/core","@univerjs/engine-formula","@univerjs/sheets-formula","@univerjs/engine-formula/facade"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverCore,global.UniverEngineFormula,global.UniverSheetsFormula,global.UniverEngineFormulaFacade))})(this,function(core,engineFormula,sheetsFormula,facade){"use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});const _FUniverSheetsFormulaMixin=class _FUniverSheetsFormulaMixin extends core.FUniver{_initialize(){this._debouncedFormulaCalculation=core.debounce(()=>{this._commandService.executeCommand(engineFormula.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}registerFunction(config){let registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService);registerFunctionService||(this._injector.add([sheetsFormula.IRegisterFunctionService,{useClass:sheetsFormula.RegisterFunctionService}]),registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService));const functionsDisposable=registerFunctionService.registerFunctions(config);return this._debouncedFormulaCalculation(),functionsDisposable}};__name(_FUniverSheetsFormulaMixin,"FUniverSheetsFormulaMixin");let FUniverSheetsFormulaMixin=_FUniverSheetsFormulaMixin;core.FUniver.extend(FUniverSheetsFormulaMixin);const _FFormulaSheetsMixin=class _FFormulaSheetsMixin extends facade.FFormula{_initialize(){this._debouncedFormulaCalculation=core.debounce(()=>{this._commandService.executeCommand(engineFormula.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}setInitialFormulaComputing(calculationMode){const lifecycleStage=this._injector.get(core.LifecycleService).stage,logService=this._injector.get(core.ILogService),configService=this._injector.get(core.IConfigService);lifecycleStage>core.LifecycleStages.Starting&&logService.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.");const config=configService.getConfig(sheetsFormula.PLUGIN_CONFIG_KEY_BASE);config&&(config.initialFormulaComputing=calculationMode)}registerFunction(name,func,options){var _a;let registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService);registerFunctionService||(this._injector.add([sheetsFormula.IRegisterFunctionService,{useClass:sheetsFormula.RegisterFunctionService}]),registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService));const params={name,func,description:typeof options=="string"?options:(_a=options==null?void 0:options.description)!=null?_a:"",locales:typeof options=="object"?options.locales:void 0},functionsDisposable=registerFunctionService.registerFunction(params);return this._debouncedFormulaCalculation(),functionsDisposable}registerAsyncFunction(name,func,options){var _a;let registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService);registerFunctionService||(this._injector.add([sheetsFormula.IRegisterFunctionService,{useClass:sheetsFormula.RegisterFunctionService}]),registerFunctionService=this._injector.get(sheetsFormula.IRegisterFunctionService));const params={name,func,description:typeof options=="string"?options:(_a=options==null?void 0:options.description)!=null?_a:"",locales:typeof options=="object"?options.locales:void 0},functionsDisposable=registerFunctionService.registerAsyncFunction(params);return this._debouncedFormulaCalculation(),functionsDisposable}};__name(_FFormulaSheetsMixin,"FFormulaSheetsMixin");let FFormulaSheetsMixin=_FFormulaSheetsMixin;facade.FFormula.extend(FFormulaSheetsMixin)});
|