@univerjs/sheets-formula 0.24.0 → 0.25.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/facade.js +4 -55
- package/lib/cjs/index.js +4040 -3694
- package/lib/cjs/locale/ar-SA.js +10538 -0
- package/lib/cjs/locale/ca-ES.js +10307 -6
- package/lib/cjs/locale/de-DE.js +10538 -0
- package/lib/cjs/locale/en-US.js +10532 -6
- package/lib/cjs/locale/es-ES.js +10307 -6
- package/lib/cjs/locale/fa-IR.js +10817 -6
- package/lib/cjs/locale/fr-FR.js +10783 -6
- package/lib/cjs/locale/id-ID.js +10538 -0
- package/lib/cjs/locale/it-IT.js +10538 -0
- package/lib/cjs/locale/ja-JP.js +10306 -6
- package/lib/cjs/locale/ko-KR.js +10306 -6
- package/lib/cjs/locale/pl-PL.js +10538 -0
- package/lib/cjs/locale/pt-BR.js +10538 -0
- package/lib/cjs/locale/ru-RU.js +10340 -6
- package/lib/cjs/locale/sk-SK.js +10306 -6
- package/lib/cjs/locale/vi-VN.js +10307 -6
- package/lib/cjs/locale/zh-CN.js +10307 -6
- package/lib/cjs/locale/zh-HK.js +10538 -0
- package/lib/cjs/locale/zh-TW.js +10307 -6
- package/lib/es/facade.js +6 -57
- package/lib/es/index.js +4036 -3697
- package/lib/es/locale/ar-SA.js +10537 -0
- package/lib/es/locale/ca-ES.js +10307 -6
- package/lib/es/locale/de-DE.js +10537 -0
- package/lib/es/locale/en-US.js +10532 -6
- package/lib/es/locale/es-ES.js +10307 -6
- package/lib/es/locale/fa-IR.js +10817 -6
- package/lib/es/locale/fr-FR.js +10783 -6
- package/lib/es/locale/id-ID.js +10537 -0
- package/lib/es/locale/it-IT.js +10537 -0
- package/lib/es/locale/ja-JP.js +10306 -6
- package/lib/es/locale/ko-KR.js +10306 -6
- package/lib/es/locale/pl-PL.js +10537 -0
- package/lib/es/locale/pt-BR.js +10537 -0
- package/lib/es/locale/ru-RU.js +10340 -6
- package/lib/es/locale/sk-SK.js +10306 -6
- package/lib/es/locale/vi-VN.js +10307 -6
- package/lib/es/locale/zh-CN.js +10307 -6
- package/lib/es/locale/zh-HK.js +10537 -0
- package/lib/es/locale/zh-TW.js +10307 -6
- package/lib/facade.js +6 -57
- package/lib/index.js +4036 -3697
- package/lib/locale/ar-SA.js +10537 -0
- package/lib/locale/ca-ES.js +10307 -6
- package/lib/locale/de-DE.js +10537 -0
- package/lib/locale/en-US.js +10532 -6
- package/lib/locale/es-ES.js +10307 -6
- package/lib/locale/fa-IR.js +10817 -6
- package/lib/locale/fr-FR.js +10783 -6
- package/lib/locale/id-ID.js +10537 -0
- package/lib/locale/it-IT.js +10537 -0
- package/lib/locale/ja-JP.js +10306 -6
- package/lib/locale/ko-KR.js +10306 -6
- package/lib/locale/pl-PL.js +10537 -0
- package/lib/locale/pt-BR.js +10537 -0
- package/lib/locale/ru-RU.js +10340 -6
- package/lib/locale/sk-SK.js +10306 -6
- package/lib/locale/vi-VN.js +10307 -6
- package/lib/locale/zh-CN.js +10307 -6
- package/lib/locale/zh-HK.js +10537 -0
- package/lib/locale/zh-TW.js +10307 -6
- package/lib/types/controllers/active-dirty.controller.d.ts +1 -0
- package/lib/types/controllers/formula-calculation-session.controller.d.ts +24 -0
- package/lib/types/controllers/trigger-calculation.controller.d.ts +1 -1
- package/lib/types/controllers/utils/ref-range-formula.d.ts +7 -1
- package/lib/types/facade/f-formula.d.ts +20 -19
- package/lib/types/facade/f-range.d.ts +3 -3
- package/lib/types/index.d.ts +3 -0
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +10450 -7
- package/lib/types/locale/function-list/array/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/array/en-US.d.ts +58 -0
- package/lib/types/locale/function-list/array/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/array/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/array/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/array/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/array/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/array/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/array/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/array/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/array/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/array/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +838 -0
- package/lib/types/locale/function-list/compatibility/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/cube/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/cube/en-US.d.ts +144 -0
- package/lib/types/locale/function-list/cube/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/cube/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/cube/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/cube/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/cube/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/cube/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/cube/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/cube/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/cube/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/cube/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/database/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/database/en-US.d.ts +282 -0
- package/lib/types/locale/function-list/database/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/database/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/database/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/database/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/database/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/database/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/database/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/database/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/database/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/database/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/date/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/date/en-US.d.ts +490 -0
- package/lib/types/locale/function-list/date/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/date/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/date/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/date/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/date/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/date/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/date/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/date/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/date/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/date/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/en-US.d.ts +940 -0
- package/lib/types/locale/function-list/engineering/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/engineering/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/financial/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/financial/en-US.d.ts +1608 -0
- package/lib/types/locale/function-list/financial/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/financial/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/financial/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/financial/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/financial/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/financial/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/financial/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/financial/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/financial/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/financial/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/information/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/information/en-US.d.ts +386 -0
- package/lib/types/locale/function-list/information/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/information/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/information/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/information/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/information/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/information/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/information/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/information/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/information/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/information/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/logical/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/logical/en-US.d.ts +390 -0
- package/lib/types/locale/function-list/logical/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/logical/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/logical/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/logical/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/logical/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/logical/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/logical/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/logical/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/en-US.d.ts +820 -0
- package/lib/types/locale/function-list/lookup/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/math/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/math/en-US.d.ts +1410 -0
- package/lib/types/locale/function-list/math/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/math/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/math/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/math/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/math/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/math/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/math/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/math/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/math/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/math/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/en-US.d.ts +2308 -0
- package/lib/types/locale/function-list/statistical/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/statistical/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/text/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/text/en-US.d.ts +988 -0
- package/lib/types/locale/function-list/text/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/text/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/text/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/text/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/text/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/text/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/text/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/text/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/text/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/text/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/univer/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/univer/en-US.d.ts +17 -0
- package/lib/types/locale/function-list/univer/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/univer/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/univer/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/univer/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/univer/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/univer/ru-RU.d.ts +17 -0
- package/lib/types/locale/function-list/univer/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/univer/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/univer/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/univer/zh-TW.d.ts +18 -0
- package/lib/types/locale/function-list/web/ca-ES.d.ts +18 -0
- package/lib/types/locale/function-list/web/en-US.d.ts +68 -0
- package/lib/types/locale/function-list/web/es-ES.d.ts +18 -0
- package/lib/types/locale/function-list/web/fa-IR.d.ts +18 -0
- package/lib/types/locale/function-list/web/fr-FR.d.ts +18 -0
- package/lib/types/locale/function-list/web/ja-JP.d.ts +18 -0
- package/lib/types/locale/function-list/web/ko-KR.d.ts +18 -0
- package/lib/types/locale/function-list/web/ru-RU.d.ts +18 -0
- package/lib/types/locale/function-list/web/sk-SK.d.ts +18 -0
- package/lib/types/locale/function-list/web/vi-VN.d.ts +18 -0
- package/lib/types/locale/function-list/web/zh-CN.d.ts +18 -0
- package/lib/types/locale/function-list/web/zh-TW.d.ts +18 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/services/formula-calculation-session.service.d.ts +48 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +44 -0
- package/lib/umd/locale/ca-ES.js +39 -1
- package/lib/umd/locale/de-DE.js +44 -0
- package/lib/umd/locale/en-US.js +44 -1
- package/lib/umd/locale/es-ES.js +39 -1
- package/lib/umd/locale/fa-IR.js +44 -1
- package/lib/umd/locale/fr-FR.js +44 -1
- package/lib/umd/locale/id-ID.js +44 -0
- package/lib/umd/locale/it-IT.js +44 -0
- package/lib/umd/locale/ja-JP.js +43 -1
- package/lib/umd/locale/ko-KR.js +37 -1
- package/lib/umd/locale/pl-PL.js +44 -0
- package/lib/umd/locale/pt-BR.js +44 -0
- package/lib/umd/locale/ru-RU.js +31 -1
- package/lib/umd/locale/sk-SK.js +39 -1
- package/lib/umd/locale/vi-VN.js +43 -1
- package/lib/umd/locale/zh-CN.js +44 -1
- package/lib/umd/locale/zh-HK.js +44 -0
- package/lib/umd/locale/zh-TW.js +44 -1
- package/package.json +9 -9
|
@@ -27,6 +27,7 @@ export declare class ActiveDirtyController extends Disposable {
|
|
|
27
27
|
private _initialHideRow;
|
|
28
28
|
private _initialSheet;
|
|
29
29
|
private _initialDefinedName;
|
|
30
|
+
private _initialSuperTable;
|
|
30
31
|
private _getDefinedNameMutation;
|
|
31
32
|
private _getSetRangeValuesMutationDirtyRange;
|
|
32
33
|
private _getMoveRangeMutationDirtyRange;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
17
|
+
import { FormulaCalculationSessionService } from '../services/formula-calculation-session.service';
|
|
18
|
+
export declare class FormulaCalculationSessionController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _sessionService;
|
|
21
|
+
constructor(_commandService: ICommandService, _sessionService: FormulaCalculationSessionService);
|
|
22
|
+
private _initialize;
|
|
23
|
+
private _hasFormulaResultToApply;
|
|
24
|
+
}
|
|
@@ -62,7 +62,7 @@ export declare class TriggerCalculationController extends Disposable {
|
|
|
62
62
|
* @param dirtyRanges
|
|
63
63
|
*/
|
|
64
64
|
private _mergeDirtyRanges;
|
|
65
|
-
private
|
|
65
|
+
private _mergeDirtyUnitStringMap;
|
|
66
66
|
private _mergeDirtyUnitFeatureOrOtherFormulaMap;
|
|
67
67
|
private _initialExecuteFormulaProcessListener;
|
|
68
68
|
private _resetExecutingDirtyData;
|
|
@@ -30,7 +30,10 @@ export declare enum FormulaReferenceMoveType {
|
|
|
30
30
|
SetName = 11,
|
|
31
31
|
RemoveSheet = 12,
|
|
32
32
|
SetDefinedName = 13,// update defined name
|
|
33
|
-
RemoveDefinedName = 14
|
|
33
|
+
RemoveDefinedName = 14,// remove defined name
|
|
34
|
+
SetSuperTableName = 15,// update super table name
|
|
35
|
+
RemoveSuperTableName = 16,// remove super table name
|
|
36
|
+
RemoveSuperTableColumn = 17
|
|
34
37
|
}
|
|
35
38
|
export interface IFormulaReferenceMoveParam {
|
|
36
39
|
type: FormulaReferenceMoveType;
|
|
@@ -51,6 +54,9 @@ export interface IFormulaReferenceMoveParam {
|
|
|
51
54
|
* new defined name
|
|
52
55
|
*/
|
|
53
56
|
definedName?: string;
|
|
57
|
+
oldTableName?: string;
|
|
58
|
+
tableName?: string;
|
|
59
|
+
tableColumnNames?: string[];
|
|
54
60
|
/**
|
|
55
61
|
* The filtered rows contained in the range, used for remove rows operation, etc.
|
|
56
62
|
*/
|
|
@@ -50,7 +50,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
50
50
|
*
|
|
51
51
|
* // Use the function in a cell
|
|
52
52
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
53
|
-
* const fWorksheet = fWorkbook.
|
|
53
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
54
|
+
* if (!fWorksheet) return;
|
|
54
55
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
55
56
|
* cellA1.setValue('World');
|
|
56
57
|
* const cellA2 = fWorksheet.getRange('A2');
|
|
@@ -75,7 +76,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
75
76
|
*
|
|
76
77
|
* // Use the function in a cell
|
|
77
78
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
78
|
-
* const fWorksheet = fWorkbook.
|
|
79
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
80
|
+
* if (!fWorksheet) return;
|
|
79
81
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
80
82
|
* cellA1.setValue(100);
|
|
81
83
|
* const cellA2 = fWorksheet.getRange('A2');
|
|
@@ -115,7 +117,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
115
117
|
*
|
|
116
118
|
* // Use the function in a cell
|
|
117
119
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
118
|
-
* const fWorksheet = fWorkbook.
|
|
120
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
121
|
+
* if (!fWorksheet) return;
|
|
119
122
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
120
123
|
* cellA1.setValue(1);
|
|
121
124
|
* const cellA2 = fWorksheet.getRange('A2');
|
|
@@ -170,7 +173,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
170
173
|
*
|
|
171
174
|
* // Use the function in a cell
|
|
172
175
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
173
|
-
* const fWorksheet = fWorkbook.
|
|
176
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
177
|
+
* if (!fWorksheet) return;
|
|
174
178
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
175
179
|
* cellA1.setValue('World');
|
|
176
180
|
* const cellA2 = fWorksheet.getRange('A2');
|
|
@@ -208,7 +212,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
208
212
|
*
|
|
209
213
|
* // Use the function in a cell
|
|
210
214
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
211
|
-
* const fWorksheet = fWorkbook.
|
|
215
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
216
|
+
* if (!fWorksheet) return;
|
|
212
217
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
213
218
|
* cellA1.setValue({ f: '=RANDOM_DELAYED()' });
|
|
214
219
|
*
|
|
@@ -258,7 +263,8 @@ export interface IFFormulaSheetsMixin {
|
|
|
258
263
|
*
|
|
259
264
|
* // Use the function in a cell
|
|
260
265
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
261
|
-
* const fWorksheet = fWorkbook.
|
|
266
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
267
|
+
* if (!fWorksheet) return;
|
|
262
268
|
* const cellA1 = fWorksheet.getRange('A1');
|
|
263
269
|
* cellA1.setValue({ f: '=FETCH_USER_SCORE(42)' });
|
|
264
270
|
*
|
|
@@ -296,17 +302,13 @@ export interface IFFormulaSheetsMixin {
|
|
|
296
302
|
/**
|
|
297
303
|
* Waits for formula-calculation results to be applied.
|
|
298
304
|
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
* 2. No calculation actually starts within 500 ms — the method assumes there is
|
|
303
|
-
* nothing to wait for and resolves automatically.
|
|
304
|
-
* 3. A global 30 s timeout triggers, in which case the promise rejects.
|
|
305
|
-
*
|
|
306
|
-
* The API internally listens to both “calculation in progress” events and
|
|
307
|
-
* “calculation result applied” events, ensuring it behaves correctly whether
|
|
308
|
-
* formulas are recalculated or skipped due to cache/state.
|
|
305
|
+
* The API follows the latest formula-calculation session. If a running
|
|
306
|
+
* calculation is stopped and immediately restarted, the promise waits for
|
|
307
|
+
* the restarted session to apply its results.
|
|
309
308
|
*
|
|
309
|
+
* @param {number} [timeout] Optional timeout in milliseconds. If omitted,
|
|
310
|
+
* the promise waits until calculation results are applied or no calculation
|
|
311
|
+
* occurs within the start-detection window.
|
|
310
312
|
* @returns {Promise<void>} A promise that resolves when calculation results are applied
|
|
311
313
|
* or when no calculation occurs within the start-detection window.
|
|
312
314
|
*
|
|
@@ -321,7 +323,7 @@ export interface IFFormulaSheetsMixin {
|
|
|
321
323
|
* console.log("Updated value:", value);
|
|
322
324
|
* ```
|
|
323
325
|
*/
|
|
324
|
-
onCalculationResultApplied(): Promise<void>;
|
|
326
|
+
onCalculationResultApplied(timeout?: number): Promise<void>;
|
|
325
327
|
}
|
|
326
328
|
export declare class FFormulaSheetsMixin extends FFormula implements IFFormulaSheetsMixin {
|
|
327
329
|
/**
|
|
@@ -339,8 +341,7 @@ export declare class FFormulaSheetsMixin extends FFormula implements IFFormulaSh
|
|
|
339
341
|
registerAsyncFunction(name: string, func: IRegisterAsyncFunction): IDisposable;
|
|
340
342
|
registerAsyncFunction(name: string, func: IRegisterAsyncFunction, description: string): IDisposable;
|
|
341
343
|
calculationResultApplied(callback: (result: ISetFormulaCalculationResultMutation) => void): IDisposable;
|
|
342
|
-
|
|
343
|
-
onCalculationResultApplied(): Promise<void>;
|
|
344
|
+
onCalculationResultApplied(timeout?: number): Promise<void>;
|
|
344
345
|
}
|
|
345
346
|
declare module '@univerjs/engine-formula/facade' {
|
|
346
347
|
interface FFormula extends IFFormulaSheetsMixin {
|
|
@@ -24,9 +24,9 @@ export interface IFRangeEngineFormulaMixin {
|
|
|
24
24
|
* @returns {ISheetFormulaError[]} Array of formula errors in the range
|
|
25
25
|
* @example
|
|
26
26
|
* ```typescript
|
|
27
|
-
* const
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* const fWorksheet = univerAPI.getActiveWorkbook().getSheetByName('Sheet1');
|
|
28
|
+
* if (!fWorksheet) return;
|
|
29
|
+
* const range = fWorksheet.getRange('A1:B10');
|
|
30
30
|
* const errors = range.getFormulaError();
|
|
31
31
|
* console.log('Formula errors in range:', errors);
|
|
32
32
|
* ```
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { QuickSumCommand } from './commands/commands/quick-sum.command';
|
|
|
18
18
|
export { CalculationMode, PLUGIN_CONFIG_KEY_BASE } from './config/config';
|
|
19
19
|
export type { IUniverSheetsFormulaBaseConfig, IUniverSheetsFormulaRemoteConfig } from './config/config';
|
|
20
20
|
export { FormulaAutoFillController } from './controllers/formula-auto-fill.controller';
|
|
21
|
+
export { FormulaCalculationSessionController } from './controllers/formula-calculation-session.controller';
|
|
21
22
|
export { ImageFormulaCellInterceptorController } from './controllers/image-formula-cell-interceptor.controller';
|
|
22
23
|
export { TriggerCalculationController } from './controllers/trigger-calculation.controller';
|
|
23
24
|
export { UpdateDefinedNameController } from './controllers/update-defined-name.controller';
|
|
@@ -25,6 +26,8 @@ export { UpdateFormulaController } from './controllers/update-formula.controller
|
|
|
25
26
|
export { UniverRemoteSheetsFormulaPlugin, UniverSheetsFormulaPlugin } from './plugin';
|
|
26
27
|
export { DescriptionService, IDescriptionService } from './services/description.service';
|
|
27
28
|
export type { ISearchItem, ISearchItemWithType } from './services/description.service';
|
|
29
|
+
export { FormulaCalculationSessionService } from './services/formula-calculation-session.service';
|
|
30
|
+
export type { IFormulaCalculationSessionState } from './services/formula-calculation-session.service';
|
|
28
31
|
export { FormulaRefRangeService } from './services/formula-ref-range.service';
|
|
29
32
|
export type { IRegisterAsyncFunction, IRegisterFunction, ISingleFunctionRegisterParams } from './services/register-function.service';
|
|
30
33
|
export type { IRegisterFunctionParams, IUnregisterFunctionParams } from './services/register-function.service';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|