@univerjs/engine-formula 1.0.0-rc.0 → 1.0.0
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/{en-US-x6yRGjN6.js → en-US-DrAfIiBE.js} +0 -1
- package/lib/cjs/facade.js +6 -2
- package/lib/cjs/index.js +1195 -792
- package/lib/cjs/locale/ar-SA.js +0 -1
- package/lib/cjs/locale/ca-ES.js +0 -1
- package/lib/cjs/locale/de-DE.js +0 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +0 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +0 -1
- package/lib/cjs/locale/id-ID.js +0 -1
- package/lib/cjs/locale/it-IT.js +0 -1
- package/lib/cjs/locale/ja-JP.js +0 -1
- package/lib/cjs/locale/ko-KR.js +0 -1
- package/lib/cjs/locale/pl-PL.js +0 -1
- package/lib/cjs/locale/pt-BR.js +0 -1
- package/lib/cjs/locale/ru-RU.js +0 -1
- package/lib/cjs/locale/sk-SK.js +0 -1
- package/lib/cjs/locale/vi-VN.js +0 -1
- package/lib/cjs/locale/zh-CN.js +0 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/cjs/{zh-TW-vwS1qqtd.js → zh-TW-CvMudVQy.js} +0 -1
- package/lib/es/facade.js +6 -2
- package/lib/es/index.js +1194 -791
- package/lib/facade.js +6 -2
- package/lib/index.js +1194 -791
- package/lib/types/basics/common.d.ts +3 -1
- package/lib/types/basics/inverted-index-cache.d.ts +1 -0
- package/lib/types/basics/regex.d.ts +7 -7
- package/lib/types/basics/runtime.d.ts +11 -0
- package/lib/types/engine/ast-node/prefix-node.d.ts +4 -1
- package/lib/types/engine/ast-node/reference-node.d.ts +1 -1
- package/lib/types/engine/dependency/formula-dependency.d.ts +1 -1
- package/lib/types/engine/reference-object/table-reference-object.d.ts +1 -0
- package/lib/types/engine/utils/compare.d.ts +2 -1
- package/lib/types/engine/utils/object-compare.d.ts +1 -0
- package/lib/types/facade/f-formula.d.ts +4 -0
- package/lib/types/facade/f-univer.d.ts +9 -0
- package/lib/types/services/current-data.service.d.ts +1 -0
- package/lib/types/services/runtime.service.d.ts +3 -0
- package/lib/types/services/sheet-row-filtered.service.d.ts +5 -3
- package/lib/types/services/unit-reference-resolver.service.d.ts +3 -1
- package/lib/umd/index.js +4 -4
- package/package.json +6 -6
package/lib/facade.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FBase, FUniver } from "@univerjs/core/facade";
|
|
|
2
2
|
import { ICommandService, IConfigService, Inject, Injector } from "@univerjs/core";
|
|
3
3
|
import { ENGINE_FORMULA_CYCLE_REFERENCE_COUNT, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE, FormulaCalculationSessionService, IDefinedNamesService, IFunctionService, ISuperTableService, LexerTreeBuilder, SetCellFormulaDependencyCalculationMutation, SetCellFormulaDependencyCalculationResultMutation, SetFormulaCalculationNotificationMutation, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation, SetFormulaDependencyCalculationMutation, SetFormulaDependencyCalculationResultMutation, SetFormulaStringBatchCalculationMutation, SetFormulaStringBatchCalculationResultMutation, SetQueryFormulaDependencyAllMutation, SetQueryFormulaDependencyAllResultMutation, SetQueryFormulaDependencyMutation, SetQueryFormulaDependencyResultMutation, SetTriggerFormulaCalculationStartMutation } from "@univerjs/engine-formula";
|
|
4
4
|
|
|
5
|
-
//#region \0@oxc-project+runtime@0.
|
|
5
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateParam.js
|
|
6
6
|
function __decorateParam(paramIndex, decorator) {
|
|
7
7
|
return function(target, key) {
|
|
8
8
|
decorator(target, key, paramIndex);
|
|
@@ -10,7 +10,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region \0@oxc-project+runtime@0.
|
|
13
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
|
|
14
14
|
function __decorate(decorators, target, key, desc) {
|
|
15
15
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
16
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -151,6 +151,8 @@ let FFormula = class FFormula extends FBase {
|
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* Listens for formula results after every affected model has applied them.
|
|
154
|
+
* @param {(result: ISetFormulaCalculationResultMutation) => void} callback Receives each applied formula result asynchronously.
|
|
155
|
+
* @returns {IDisposable} A disposable that unsubscribes from future result notifications.
|
|
154
156
|
*/
|
|
155
157
|
calculationResultApplied(callback) {
|
|
156
158
|
const subscription = this._injector.get(FormulaCalculationSessionService).resultApplied$.subscribe((result) => {
|
|
@@ -164,6 +166,8 @@ let FFormula = class FFormula extends FBase {
|
|
|
164
166
|
}
|
|
165
167
|
/**
|
|
166
168
|
* Waits until the latest formula-calculation results have been applied.
|
|
169
|
+
* @param {number} [timeout] Maximum wait in milliseconds. Omit to wait without an overall timeout.
|
|
170
|
+
* @returns {Promise<void>} Resolves when the latest calculation results have been applied; rejects if the supplied timeout expires.
|
|
167
171
|
*/
|
|
168
172
|
onCalculationResultApplied(timeout) {
|
|
169
173
|
return this._injector.get(FormulaCalculationSessionService).waitForLatestApplied(timeout);
|