@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
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const core=require("@univerjs/core"),engineFormula=require("@univerjs/engine-formula");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"),_a;exports.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);exports.FFormula=__decorateClass([__decorateParam(0,core.Inject(core.ICommandService)),__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.Inject(engineFormula.LexerTreeBuilder)),__decorateParam(3,core.IConfigService)],exports.FFormula);const _FUniverEngineFormulaMixin=class _FUniverEngineFormulaMixin extends core.FUniver{getFormula(){return this._injector.createInstance(exports.FFormula)}};__name(_FUniverEngineFormulaMixin,"FUniverEngineFormulaMixin");let FUniverEngineFormulaMixin=_FUniverEngineFormulaMixin;core.FUniver.extend(FUniverEngineFormulaMixin);
|