@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.
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "Analyzing",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "در حال تحلیل",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "Analyse en cours",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "Анализ",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "Đang phân tích",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "分析中",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const locale = {
2
2
  formula: {
3
3
  progress: {
4
4
  analyzing: "分析中",
@@ -10,5 +10,5 @@ const a = {
10
10
  }
11
11
  };
12
12
  export {
13
- a as default
13
+ locale as default
14
14
  };
@@ -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
- * @private
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
- * @private
25
+ * @ignore
20
26
  */
21
27
  _initialize(): void;
22
28
  registerFunction(config: IRegisterFunctionParams): IDisposable;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(i,u){typeof exports=="object"&&typeof module<"u"?u(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"],u):(i=typeof globalThis<"u"?globalThis:i||self,u(i.UniverCore,i.UniverEngineFormula,i.UniverSheetsFormula,i.UniverEngineFormulaFacade))})(this,function(i,u,t,l){"use strict";class d extends i.FUniver{_initialize(){this._debouncedFormulaCalculation=i.debounce(()=>{this._commandService.executeCommand(u.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}registerFunction(r){let c=this._injector.get(t.IRegisterFunctionService);c||(this._injector.add([t.IRegisterFunctionService,{useClass:t.RegisterFunctionService}]),c=this._injector.get(t.IRegisterFunctionService));const e=c.registerFunctions(r);return this._debouncedFormulaCalculation(),e}}i.FUniver.extend(d);class f extends l.FFormula{_initialize(){this._debouncedFormulaCalculation=i.debounce(()=>{this._commandService.executeCommand(u.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}setInitialFormulaComputing(r){const e=this._injector.get(i.LifecycleService).stage,n=this._injector.get(i.ILogService),s=this._injector.get(i.IConfigService);e>i.LifecycleStages.Starting&&n.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 o=s.getConfig(t.PLUGIN_CONFIG_KEY_BASE);o&&(o.initialFormulaComputing=r)}registerFunction(r,c,e){var a;let n=this._injector.get(t.IRegisterFunctionService);n||(this._injector.add([t.IRegisterFunctionService,{useClass:t.RegisterFunctionService}]),n=this._injector.get(t.IRegisterFunctionService));const s={name:r,func:c,description:typeof e=="string"?e:(a=e==null?void 0:e.description)!=null?a:"",locales:typeof e=="object"?e.locales:void 0},o=n.registerFunction(s);return this._debouncedFormulaCalculation(),o}registerAsyncFunction(r,c,e){var a;let n=this._injector.get(t.IRegisterFunctionService);n||(this._injector.add([t.IRegisterFunctionService,{useClass:t.RegisterFunctionService}]),n=this._injector.get(t.IRegisterFunctionService));const s={name:r,func:c,description:typeof e=="string"?e:(a=e==null?void 0:e.description)!=null?a:"",locales:typeof e=="object"?e.locales:void 0},o=n.registerAsyncFunction(s);return this._debouncedFormulaCalculation(),o}}l.FFormula.extend(f)});
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)});