@univerjs/engine-formula 0.5.4 → 0.5.5-experimental.20250122-3362a4a
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 +57 -50
- package/lib/es/index.js +25073 -23679
- package/lib/types/facade/f-formula.d.ts +4 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +4 -4
- package/LICENSE +0 -176
|
@@ -2,6 +2,7 @@ import { IDisposable, FBase, ICommandService, IConfigService, Injector } from '@
|
|
|
2
2
|
import { FormulaExecutedStateType, IExecutionInProgressParams, ISequenceNode, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
3
|
/**
|
|
4
4
|
* This interface class provides methods to modify the behavior of the operation formula.
|
|
5
|
+
* @hideconstructor
|
|
5
6
|
*/
|
|
6
7
|
export declare class FFormula extends FBase {
|
|
7
8
|
protected readonly _commandService: ICommandService;
|
|
@@ -9,6 +10,9 @@ export declare class FFormula extends FBase {
|
|
|
9
10
|
private _lexerTreeBuilder;
|
|
10
11
|
protected readonly _configService: IConfigService;
|
|
11
12
|
constructor(_commandService: ICommandService, _injector: Injector, _lexerTreeBuilder: LexerTreeBuilder, _configService: IConfigService);
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
12
16
|
_initialize(): void;
|
|
13
17
|
/**
|
|
14
18
|
* The tree builder for formula string.
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("@univerjs/engine-formula")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-formula"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverEngineFormulaFacade={},global.UniverCore,global.UniverEngineFormula))})(this,function(exports2,core,engineFormula){"use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var _a;var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");exports2.FFormula=(_a=class extends core.FBase{constructor(_commandService,_injector,_lexerTreeBuilder,_configService){super(),this._commandService=_commandService,this._injector=_injector,this._lexerTreeBuilder=_lexerTreeBuilder,this._configService=_configService,this._initialize()}_initialize(){}get lexerTreeBuilder(){return this._lexerTreeBuilder}moveFormulaRefOffset(formulaString,refOffsetX,refOffsetY,ignoreAbsolute){return this._lexerTreeBuilder.moveFormulaRefOffset(formulaString,refOffsetX,refOffsetY,ignoreAbsolute)}sequenceNodesBuilder(formulaString){return this._lexerTreeBuilder.sequenceNodesBuilder(formulaString)||[]}executeCalculation(){this._commandService.executeCommand(engineFormula.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})}stopCalculation(){this._commandService.executeCommand(engineFormula.SetFormulaCalculationStopMutation.id,{})}calculationStart(callback){return this._commandService.onCommandExecuted(command=>{if(command.id===engineFormula.SetFormulaCalculationStartMutation.id){const params=command.params;callback(params.forceCalculation)}})}calculationEnd(callback){return this._commandService.onCommandExecuted(command=>{if(command.id!==engineFormula.SetFormulaCalculationNotificationMutation.id)return;const params=command.params;params.functionsExecutedState!==void 0&&callback(params.functionsExecutedState)})}onCalculationEnd(){return new Promise((resolve,reject)=>{const timer=setTimeout(()=>{reject(new Error("Calculation end timeout"))},3e4),disposable=this.calculationEnd(()=>{clearTimeout(timer),disposable.dispose(),resolve()})})}calculationProcessing(callback){return this._commandService.onCommandExecuted(command=>{if(command.id!==engineFormula.SetFormulaCalculationNotificationMutation.id)return;const params=command.params;params.stageInfo!==void 0&&callback(params.stageInfo)})}setMaxIteration(maxIteration){this._configService.setConfig(engineFormula.ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,maxIteration)}},__name(_a,"FFormula"),_a),exports2.FFormula=__decorateClass([__decorateParam(0,core.Inject(core.ICommandService)),__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.Inject(engineFormula.LexerTreeBuilder)),__decorateParam(3,core.IConfigService)],exports2.FFormula);const _FUniverEngineFormulaMixin=class _FUniverEngineFormulaMixin extends core.FUniver{getFormula(){return this._injector.createInstance(exports2.FFormula)}};__name(_FUniverEngineFormulaMixin,"FUniverEngineFormulaMixin");let FUniverEngineFormulaMixin=_FUniverEngineFormulaMixin;core.FUniver.extend(FUniverEngineFormulaMixin),Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|