@univerjs/engine-formula 0.6.0-alpha.0 → 0.6.0-experimental.20250212-dbe9830
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 +40 -20
- package/lib/es/index.js +3100 -3032
- package/lib/types/basics/cache-lru.d.ts +1 -1
- package/lib/types/basics/complex.d.ts +1 -1
- package/lib/types/basics/engineering.d.ts +1 -1
- package/lib/types/basics/error-type.d.ts +1 -1
- package/lib/types/basics/math.d.ts +1 -1
- package/lib/types/basics/object-class-type.d.ts +1 -1
- package/lib/types/basics/regex.d.ts +1 -1
- package/lib/types/basics/token-type.d.ts +1 -1
- package/lib/types/basics/token.d.ts +1 -1
- package/lib/types/controller/computing-status.controller.d.ts +14 -0
- package/lib/types/engine/ast-node/index.d.ts +1 -1
- package/lib/types/engine/ast-node/node-type.d.ts +1 -1
- package/lib/types/engine/dependency/range-block-util.d.ts +1 -1
- package/lib/types/engine/reference-object/base-reference-object.d.ts +1 -1
- package/lib/types/engine/utils/char-kit.d.ts +1 -1
- package/lib/types/engine/utils/math-kit.d.ts +1 -1
- package/lib/types/engine/utils/regexp-check.d.ts +1 -1
- package/lib/types/facade/f-formula.d.ts +13 -0
- package/lib/types/facade/index.d.ts +1 -1
- package/lib/types/functions/array/function-names.d.ts +1 -1
- package/lib/types/functions/compatibility/function-names.d.ts +1 -1
- package/lib/types/functions/cube/function-map.d.ts +1 -1
- package/lib/types/functions/cube/function-names.d.ts +1 -1
- package/lib/types/functions/database/function-names.d.ts +1 -1
- package/lib/types/functions/date/function-names.d.ts +1 -1
- package/lib/types/functions/engineering/function-names.d.ts +1 -1
- package/lib/types/functions/financial/function-names.d.ts +1 -1
- package/lib/types/functions/information/function-names.d.ts +1 -1
- package/lib/types/functions/logical/bycol/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/logical/byrow/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/logical/function-names.d.ts +1 -1
- package/lib/types/functions/logical/makearray/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/logical/map/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/logical/reduce/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/logical/scan/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/lookup/function-names.d.ts +1 -1
- package/lib/types/functions/lookup/index/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/lookup/indirect/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/math/function-names.d.ts +1 -1
- package/lib/types/functions/meta/function-names.d.ts +1 -1
- package/lib/types/functions/statistical/function-names.d.ts +1 -1
- package/lib/types/functions/text/arraytotext/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/asc/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/bahttext/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/char/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/clean/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/code/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/dbcs/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/dollar/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/exact/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/find/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/findb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/fixed/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/function-names.d.ts +1 -1
- package/lib/types/functions/text/left/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/leftb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/len/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/lenb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/lower/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/mid/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/midb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/numbervalue/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/proper/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/regexextract/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/regexmatch/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/regexreplace/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/replace/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/replaceb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/rept/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/right/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/rightb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/search/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/searchb/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/substitute/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/t/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/text/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/textafter/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/textbefore/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/textjoin/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/textsplit/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/trim/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/unichar/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/unicode/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/upper/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/value/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/text/valuetotext/__test__/index.spec.d.ts +1 -1
- package/lib/types/functions/univer/function-map.d.ts +1 -1
- package/lib/types/functions/univer/function-names.d.ts +1 -1
- package/lib/types/functions/web/function-names.d.ts +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/services/global-computing-status.service.d.ts +13 -0
- package/lib/types/services/runtime.service.d.ts +2 -7
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +6 -5
- package/LICENSE +0 -176
- /package/lib/types/engine/utils/{prefixHandler.d.ts → prefix-handler.d.ts} +0 -0
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@univerjs/core"),a=require("@univerjs/engine-formula");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@univerjs/core"),a=require("@univerjs/engine-formula"),u=require("rxjs");var m=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=(o,e,t,r)=>{for(var i=r>1?void 0:r?d(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(i=(r?l(e,t,i):l(i))||i);return r&&i&&m(e,t,i),i},c=(o,e)=>(t,r)=>e(t,r,o);exports.FFormula=class extends n.FBase{constructor(e,t,r,i){super(),this._commandService=e,this._injector=t,this._lexerTreeBuilder=r,this._configService=i,this._initialize()}_initialize(){}get lexerTreeBuilder(){return this._lexerTreeBuilder}moveFormulaRefOffset(e,t,r,i){return this._lexerTreeBuilder.moveFormulaRefOffset(e,t,r,i)}sequenceNodesBuilder(e){return this._lexerTreeBuilder.sequenceNodesBuilder(e)||[]}executeCalculation(){this._commandService.executeCommand(a.SetFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})}stopCalculation(){this._commandService.executeCommand(a.SetFormulaCalculationStopMutation.id,{})}calculationStart(e){return this._commandService.onCommandExecuted(t=>{if(t.id===a.SetFormulaCalculationStartMutation.id){const r=t.params;e(r.forceCalculation)}})}calculationEnd(e){return this._commandService.onCommandExecuted(t=>{if(t.id!==a.SetFormulaCalculationNotificationMutation.id)return;const r=t.params;r.functionsExecutedState!==void 0&&e(r.functionsExecutedState)})}whenComputingCompleteAsync(e){const t=this._injector.get(a.GlobalComputingStatusService);return t.computingStatus?Promise.resolve(!0):u.firstValueFrom(u.race(t.computingStatus$.pipe(u.filter(r=>r)),u.timer(e!=null?e:3e4).pipe(u.map(()=>!1))))}onCalculationEnd(){return new Promise((e,t)=>{const r=setTimeout(()=>{t(new Error("Calculation end timeout"))},3e4),i=this.calculationEnd(()=>{clearTimeout(r),i.dispose(),e()})})}calculationProcessing(e){return this._commandService.onCommandExecuted(t=>{if(t.id!==a.SetFormulaCalculationNotificationMutation.id)return;const r=t.params;r.stageInfo!==void 0&&e(r.stageInfo)})}setMaxIteration(e){this._configService.setConfig(a.ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,e)}};exports.FFormula=f([c(0,n.Inject(n.ICommandService)),c(1,n.Inject(n.Injector)),c(2,n.Inject(a.LexerTreeBuilder)),c(3,n.IConfigService)],exports.FFormula);class _ extends n.FUniver{getFormula(){return this._injector.createInstance(exports.FFormula)}}n.FUniver.extend(_);
|