@univerjs/engine-formula 1.3.0 → 1.4.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-BYMYuEpp.js → en-US-9VDUEyCa.js} +15 -30
- package/lib/cjs/facade.js +4 -8
- package/lib/cjs/index.js +426 -57921
- package/lib/cjs/locale/ar-SA.js +16 -32
- package/lib/cjs/locale/ca-ES.js +16 -32
- package/lib/cjs/locale/de-DE.js +16 -32
- package/lib/cjs/locale/en-US.js +2 -3
- package/lib/cjs/locale/es-ES.js +16 -32
- package/lib/cjs/locale/fa-IR.js +2 -3
- package/lib/cjs/locale/fr-FR.js +16 -32
- package/lib/cjs/locale/id-ID.js +16 -32
- package/lib/cjs/locale/it-IT.js +16 -32
- package/lib/cjs/locale/ja-JP.js +16 -32
- package/lib/cjs/locale/ko-KR.js +16 -32
- package/lib/cjs/locale/pl-PL.js +16 -32
- package/lib/cjs/locale/pt-BR.js +16 -32
- package/lib/cjs/locale/ru-RU.js +16 -32
- package/lib/cjs/locale/sk-SK.js +16 -32
- package/lib/cjs/locale/vi-VN.js +16 -32
- package/lib/cjs/locale/zh-CN.js +16 -32
- package/lib/cjs/locale/zh-HK.js +2 -3
- package/lib/cjs/locale/zh-TW.js +2 -3
- package/lib/cjs/plugin-CDy-SbDF.js +58694 -0
- package/lib/cjs/worker.js +9 -0
- package/lib/cjs/{zh-TW-B5pYt-NJ.js → zh-TW-DGiZe-tu.js} +15 -30
- package/lib/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
- package/lib/es/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
- package/lib/es/facade.js +4 -8
- package/lib/es/index.js +204 -57670
- package/lib/es/locale/ar-SA.js +16 -32
- package/lib/es/locale/ca-ES.js +16 -32
- package/lib/es/locale/de-DE.js +16 -32
- package/lib/es/locale/en-US.js +2 -3
- package/lib/es/locale/es-ES.js +16 -32
- package/lib/es/locale/fa-IR.js +2 -3
- package/lib/es/locale/fr-FR.js +16 -32
- package/lib/es/locale/id-ID.js +16 -32
- package/lib/es/locale/it-IT.js +16 -32
- package/lib/es/locale/ja-JP.js +16 -32
- package/lib/es/locale/ko-KR.js +16 -32
- package/lib/es/locale/pl-PL.js +16 -32
- package/lib/es/locale/pt-BR.js +16 -32
- package/lib/es/locale/ru-RU.js +16 -32
- package/lib/es/locale/sk-SK.js +16 -32
- package/lib/es/locale/vi-VN.js +16 -32
- package/lib/es/locale/zh-CN.js +16 -32
- package/lib/es/locale/zh-HK.js +2 -3
- package/lib/es/locale/zh-TW.js +2 -3
- package/lib/es/plugin-BO47k05w.js +57341 -0
- package/lib/es/worker.js +3 -0
- package/lib/es/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
- package/lib/facade.js +4 -8
- package/lib/index.js +204 -57670
- package/lib/locale/ar-SA.js +16 -32
- package/lib/locale/ca-ES.js +16 -32
- package/lib/locale/de-DE.js +16 -32
- package/lib/locale/en-US.js +2 -3
- package/lib/locale/es-ES.js +16 -32
- package/lib/locale/fa-IR.js +2 -3
- package/lib/locale/fr-FR.js +16 -32
- package/lib/locale/id-ID.js +16 -32
- package/lib/locale/it-IT.js +16 -32
- package/lib/locale/ja-JP.js +16 -32
- package/lib/locale/ko-KR.js +16 -32
- package/lib/locale/pl-PL.js +16 -32
- package/lib/locale/pt-BR.js +16 -32
- package/lib/locale/ru-RU.js +16 -32
- package/lib/locale/sk-SK.js +16 -32
- package/lib/locale/vi-VN.js +16 -32
- package/lib/locale/zh-CN.js +16 -32
- package/lib/locale/zh-HK.js +2 -3
- package/lib/locale/zh-TW.js +2 -3
- package/lib/plugin-BO47k05w.js +57341 -0
- package/lib/types/basics/cache-lru.d.ts +0 -1
- package/lib/types/basics/common.d.ts +5 -1
- package/lib/types/basics/match-token.d.ts +1 -1
- package/lib/types/commands/mutations/set-super-table.mutation.d.ts +3 -2
- package/lib/types/engine/analysis/lexer-tree-builder.d.ts +1 -1
- package/lib/types/engine/analysis/lexer.d.ts +1 -1
- package/lib/types/engine/ast-node/function-node.d.ts +2 -1
- package/lib/types/engine/dependency/formula-dependency.d.ts +24 -3
- package/lib/types/engine/dependency/reference-context.d.ts +33 -0
- package/lib/types/engine/reference-object/column-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/row-reference-object.d.ts +1 -1
- package/lib/types/engine/utils/check-variant-error.d.ts +4 -4
- package/lib/types/engine/utils/numfmt-kit.d.ts +1 -1
- package/lib/types/engine/value-object/cube-value-object.d.ts +5 -2
- package/lib/types/engine/value-object/lambda-value-object.d.ts +2 -2
- package/lib/types/functions/array/function-map.d.ts +1 -1
- package/lib/types/functions/base-function.d.ts +5 -5
- package/lib/types/functions/compatibility/function-map.d.ts +2 -2
- package/lib/types/functions/database/function-map.d.ts +1 -1
- package/lib/types/functions/date/function-map.d.ts +1 -1
- package/lib/types/functions/engineering/function-map.d.ts +1 -1
- package/lib/types/functions/financial/function-map.d.ts +1 -1
- package/lib/types/functions/information/function-map.d.ts +1 -1
- package/lib/types/functions/information/isblank/index.d.ts +1 -1
- package/lib/types/functions/information/iserr/index.d.ts +1 -1
- package/lib/types/functions/information/iserror/index.d.ts +1 -1
- package/lib/types/functions/information/islogical/index.d.ts +1 -1
- package/lib/types/functions/information/isna/index.d.ts +1 -1
- package/lib/types/functions/information/isnontext/index.d.ts +1 -1
- package/lib/types/functions/information/isnumber/index.d.ts +1 -1
- package/lib/types/functions/information/istext/index.d.ts +1 -1
- package/lib/types/functions/logical/function-map.d.ts +1 -1
- package/lib/types/functions/logical/groupby/index.d.ts +1 -1
- package/lib/types/functions/logical/if/index.d.ts +1 -1
- package/lib/types/functions/logical/iferror/index.d.ts +1 -1
- package/lib/types/functions/logical/ifna/index.d.ts +1 -1
- package/lib/types/functions/logical/makearray/index.d.ts +1 -1
- package/lib/types/functions/lookup/choosecols/index.d.ts +1 -1
- package/lib/types/functions/lookup/chooserows/index.d.ts +1 -1
- package/lib/types/functions/lookup/column/index.d.ts +1 -1
- package/lib/types/functions/lookup/formulatext/index.d.ts +1 -1
- package/lib/types/functions/lookup/function-map.d.ts +1 -1
- package/lib/types/functions/lookup/getpivotdata/index.d.ts +7 -2
- package/lib/types/functions/lookup/hstack/index.d.ts +1 -1
- package/lib/types/functions/lookup/index/index.d.ts +1 -0
- package/lib/types/functions/lookup/indirect/index.d.ts +1 -1
- package/lib/types/functions/lookup/row/index.d.ts +1 -1
- package/lib/types/functions/lookup/sortby/index.d.ts +1 -1
- package/lib/types/functions/lookup/transpose/index.d.ts +1 -1
- package/lib/types/functions/lookup/vlookup/index.d.ts +1 -1
- package/lib/types/functions/lookup/vstack/index.d.ts +1 -1
- package/lib/types/functions/math/aggregate/index.d.ts +1 -1
- package/lib/types/functions/math/function-map.d.ts +1 -1
- package/lib/types/functions/math/randarray/index.d.ts +1 -1
- package/lib/types/functions/math/subtotal/index.d.ts +1 -1
- package/lib/types/functions/math/sumifs/index.d.ts +1 -1
- package/lib/types/functions/meta/cube/index.d.ts +4 -1
- package/lib/types/functions/meta/function-map.d.ts +1 -1
- package/lib/types/functions/statistical/function-map.d.ts +1 -1
- package/lib/types/functions/statistical/stdev-p/index.d.ts +1 -1
- package/lib/types/functions/statistical/stdev-s/index.d.ts +1 -1
- package/lib/types/functions/statistical/stdeva/index.d.ts +1 -1
- package/lib/types/functions/statistical/stdevpa/index.d.ts +1 -1
- package/lib/types/functions/statistical/var-p/index.d.ts +1 -1
- package/lib/types/functions/statistical/var-s/index.d.ts +1 -1
- package/lib/types/functions/statistical/vara/index.d.ts +1 -1
- package/lib/types/functions/statistical/varpa/index.d.ts +1 -1
- package/lib/types/functions/text/function-map.d.ts +1 -1
- package/lib/types/functions/text/textafter/index.d.ts +1 -1
- package/lib/types/functions/text/textbefore/index.d.ts +1 -1
- package/lib/types/functions/text/textsplit/index.d.ts +1 -1
- package/lib/types/functions/web/function-map.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/locale/en-US.d.ts +3005 -3005
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/active-dirty-manager.service.d.ts +3 -2
- package/lib/types/services/calculate-formula.service.d.ts +3 -3
- package/lib/types/services/current-data.service.d.ts +8 -6
- package/lib/types/services/defined-names.service.d.ts +1 -1
- package/lib/types/services/dependency-manager.service.d.ts +12 -2
- package/lib/types/services/external-reference-data-loader.service.d.ts +1 -1
- package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
- package/lib/types/services/formula/description.service.d.ts +1 -1
- package/lib/types/services/formula/register-function.service.d.ts +1 -1
- package/lib/types/services/formula-calculation-trigger.service.d.ts +1 -1
- package/lib/types/services/formula-changeset-calculation.service.d.ts +1 -1
- package/lib/types/services/function.service.d.ts +1 -1
- package/lib/types/services/hyperlink-engine-formula.service.d.ts +1 -1
- package/lib/types/services/other-formula-manager.service.d.ts +1 -1
- package/lib/types/services/runtime.service.d.ts +1 -1
- package/lib/types/services/sheet-row-filtered.service.d.ts +1 -1
- package/lib/types/services/super-table.service.d.ts +4 -4
- package/lib/types/services/unit-reference-resolver.service.d.ts +1 -1
- package/lib/types/worker.d.ts +16 -0
- package/lib/umd/index.js +4 -4
- package/lib/worker.js +3 -0
- package/lib/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
- package/package.json +13 -8
package/lib/types/plugin.d.ts
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IUniverEngineFormulaConfig } from './config/config';
|
|
17
16
|
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
17
|
+
import type { IUniverEngineFormulaConfig } from './config/config';
|
|
18
18
|
export declare class UniverFormulaEnginePlugin extends Plugin {
|
|
19
19
|
protected readonly _config: Partial<IUniverEngineFormulaConfig>;
|
|
20
20
|
protected _injector: Injector;
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICommandInfo, IExecutionOptions, IUnitRange, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IDirtyUnitDefinedNameMap, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetNameMap, IDirtyUnitSuperTableMap } from '../basics/common';
|
|
18
17
|
import { Disposable } from '@univerjs/core';
|
|
18
|
+
import type { IDirtyUnitDefinedNameMap, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetNameMap, IDirtyUnitSuperTableMap } from '../basics/common';
|
|
19
19
|
export interface IDirtyConversionManagerParams {
|
|
20
20
|
commandId: string;
|
|
21
21
|
shouldTrigger?: (command: ICommandInfo, options?: IExecutionOptions) => boolean;
|
|
22
22
|
getDirtyData: (command: ICommandInfo) => {
|
|
23
23
|
dirtyIterationUnits?: string[];
|
|
24
|
+
dirtyReferenceUnits?: string[];
|
|
24
25
|
forceCalculation?: boolean;
|
|
25
26
|
dirtyRanges?: IUnitRange[];
|
|
26
27
|
dirtyNameMap?: IDirtyUnitSheetNameMap;
|
|
@@ -52,4 +53,4 @@ export declare class ActiveDirtyManagerService extends Disposable implements IAc
|
|
|
52
53
|
register(commandId: string, dirtyConversion: IDirtyConversionManagerParams): void;
|
|
53
54
|
getDirtyConversionMap(): Map<string, IDirtyConversionManagerParams>;
|
|
54
55
|
}
|
|
55
|
-
export declare const IActiveDirtyManagerService: import("@
|
|
56
|
+
export declare const IActiveDirtyManagerService: import("@univerjs/core").IdentifierDecorator<IActiveDirtyManagerService>;
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ICellData, IUnitRange, IWorkbookCalculationSettings } from '@univerjs/core';
|
|
17
17
|
import type { Observable } from 'rxjs';
|
|
18
|
+
import { AsyncLock, Disposable, IConfigService } from '@univerjs/core';
|
|
19
|
+
import { Subject } from 'rxjs';
|
|
18
20
|
import type { IArrayFormulaRangeType, IFeatureDirtyRangeType, IFormulaDatasetConfig, IFormulaExecuteResultMap, IFormulaStringMap, IRuntimeUnitDataType, IUnitExcludedCell, IUnitRowData } from '../basics/common';
|
|
19
21
|
import type { IFormulaDependencyTreeFullJson, IFormulaDependencyTreeJson, IFormulaDependentsAndInRangeResults } from '../engine/dependency/dependency-tree';
|
|
20
22
|
import type { FunctionVariantType } from '../engine/reference-object/base-reference-object';
|
|
21
23
|
import type { IAllRuntimeData, IExecutionInProgressParams } from './runtime.service';
|
|
22
|
-
import { AsyncLock, Disposable, IConfigService } from '@univerjs/core';
|
|
23
|
-
import { Subject } from 'rxjs';
|
|
24
24
|
import { Lexer } from '../engine/analysis/lexer';
|
|
25
25
|
import { AstTreeBuilder } from '../engine/analysis/parser';
|
|
26
26
|
import { IFormulaDependencyGenerator } from '../engine/dependency/formula-dependency';
|
|
@@ -44,7 +44,7 @@ export interface ICalculateFormulaService {
|
|
|
44
44
|
getInRangeFormulas(unitRanges: IUnitRange[]): Promise<IFormulaDependencyTreeJson[]>;
|
|
45
45
|
getDependentsAndInRangeFormulas(unitRanges: IUnitRange[]): Promise<IFormulaDependentsAndInRangeResults>;
|
|
46
46
|
}
|
|
47
|
-
export declare const ICalculateFormulaService: import("@
|
|
47
|
+
export declare const ICalculateFormulaService: import("@univerjs/core").IdentifierDecorator<ICalculateFormulaService>;
|
|
48
48
|
export declare class CalculateFormulaService extends Disposable implements ICalculateFormulaService {
|
|
49
49
|
protected readonly _configService: IConfigService;
|
|
50
50
|
protected readonly _lexer: Lexer;
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IUnitRange, IWorkbookCalculationSettings, LocaleType, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IArrayFormulaRangeType, IDirtyUnitDefinedNameMap, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetNameMap, IDirtyUnitSuperTableMap, IFormulaData, IFormulaDatasetConfig, IFormulaExternalReferences, IFormulaUnitNameMap, IRuntimeUnitDataType, IUnitData, IUnitExcludedCell, IUnitRowData, IUnitSheetIdToNameMap, IUnitSheetNameMap, IUnitStylesData } from '../basics/common';
|
|
18
17
|
import { DateSystem, Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
18
|
+
import type { IArrayFormulaRangeType, IDirtyUnitDefinedNameMap, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetNameMap, IDirtyUnitSuperTableMap, IFormulaData, IFormulaDatasetConfig, IFormulaExternalReferences, IFormulaUnitNameMap, IRuntimeUnitDataType, IUnitData, IUnitExcludedCell, IUnitRowData, IUnitSheetIdToNameMap, IUnitSheetNameMap, IUnitStylesData } from '../basics/common';
|
|
19
19
|
import { FormulaDataModel } from '../models/formula-data.model';
|
|
20
20
|
import { ISheetRowFilteredService } from './sheet-row-filtered.service';
|
|
21
21
|
export interface IFormulaDirtyData {
|
|
22
|
+
dirtyReferenceUnits?: string[];
|
|
22
23
|
dirtyIterationUnits?: string[];
|
|
23
24
|
forceCalculation: boolean;
|
|
24
25
|
dirtyRanges: IUnitRange[];
|
|
@@ -65,11 +66,11 @@ export interface IFormulaCurrentConfigService {
|
|
|
65
66
|
getExecuteSubUnitId(): Nullable<string>;
|
|
66
67
|
setExecuteUnitId(unitId: string): void;
|
|
67
68
|
setExecuteSubUnitId(subUnitId: string): void;
|
|
68
|
-
getDirtyData(): IFormulaDirtyData;
|
|
69
|
+
getDirtyData(forFeatureCalculation?: boolean): IFormulaDirtyData;
|
|
69
70
|
getClearDependencyTreeCache(): IDirtyUnitSheetNameMap;
|
|
70
71
|
getLocale(): LocaleType;
|
|
71
72
|
getDateSystem(unitId?: string): DateSystem;
|
|
72
|
-
getSheetsInfo(): {
|
|
73
|
+
getSheetsInfo(unitId?: string): {
|
|
73
74
|
sheetOrder: string[];
|
|
74
75
|
sheetNameMap: {
|
|
75
76
|
[sheetId: string]: string;
|
|
@@ -88,6 +89,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
88
89
|
private readonly _localeService;
|
|
89
90
|
private readonly _formulaDataModel;
|
|
90
91
|
private readonly _sheetRowFilteredService;
|
|
92
|
+
private _dirtyReferenceUnits;
|
|
91
93
|
private _dirtyIterationUnits;
|
|
92
94
|
private _unitData;
|
|
93
95
|
private _unitStylesData;
|
|
@@ -139,7 +141,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
139
141
|
getClearDependencyTreeCache(): IDirtyUnitSheetNameMap;
|
|
140
142
|
getLocale(): LocaleType;
|
|
141
143
|
getDateSystem(unitId?: string | undefined): DateSystem;
|
|
142
|
-
getSheetsInfo(): {
|
|
144
|
+
getSheetsInfo(unitId?: string): {
|
|
143
145
|
sheetOrder: string[];
|
|
144
146
|
sheetNameMap: {
|
|
145
147
|
[sheetId: string]: string;
|
|
@@ -152,7 +154,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
152
154
|
getFilteredOutRows(unitId: string, sheetId: string, startRow: number, endRow: number): number[];
|
|
153
155
|
load(config: IFormulaDatasetConfig): void;
|
|
154
156
|
loadDataLite(rowData?: IUnitRowData): void;
|
|
155
|
-
getDirtyData(): IFormulaDirtyData;
|
|
157
|
+
getDirtyData(forFeatureCalculation?: boolean): IFormulaDirtyData;
|
|
156
158
|
loadDirtyRangesAndExcludedCell(dirtyRanges: IUnitRange[], excludedCell?: IUnitExcludedCell): void;
|
|
157
159
|
registerUnitData(unitData: IUnitData): void;
|
|
158
160
|
registerFormulaData(formulaData: IFormulaData): void;
|
|
@@ -166,4 +168,4 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
166
168
|
*/
|
|
167
169
|
private _applyUnitRowData;
|
|
168
170
|
}
|
|
169
|
-
export declare const IFormulaCurrentConfigService: import("@
|
|
171
|
+
export declare const IFormulaCurrentConfigService: import("@univerjs/core").IdentifierDecorator<IFormulaCurrentConfigService>;
|
|
@@ -94,4 +94,4 @@ export declare class DefinedNamesService extends Disposable implements IDefinedN
|
|
|
94
94
|
private _updateCache;
|
|
95
95
|
private _isDeepDefinedNameMapEmpty;
|
|
96
96
|
}
|
|
97
|
-
export declare const IDefinedNamesService: import("@
|
|
97
|
+
export declare const IDefinedNamesService: import("@univerjs/core").IdentifierDecorator<IDefinedNamesService>;
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IRange, IUnitRange, Nullable } from '@univerjs/core';
|
|
17
|
+
import { Disposable, ObjectMatrix, RTree } from '@univerjs/core';
|
|
17
18
|
import type { AstRootNode } from '../engine/ast-node';
|
|
18
19
|
import type { FormulaDependencyTree, IFormulaDependencyTree } from '../engine/dependency/dependency-tree';
|
|
19
|
-
import { Disposable, ObjectMatrix, RTree } from '@univerjs/core';
|
|
20
20
|
export interface IDependencyManagerService {
|
|
21
21
|
dispose(): void;
|
|
22
22
|
reset(): void;
|
|
@@ -37,6 +37,7 @@ export interface IDependencyManagerService {
|
|
|
37
37
|
removeFormulaDependencyByDefinedName(unitId: string, definedName: string): void;
|
|
38
38
|
addFormulaDependencyByDefinedName(tree: IFormulaDependencyTree, node: Nullable<AstRootNode>): void;
|
|
39
39
|
addDependencyRTreeCache(tree: IFormulaDependencyTree): void;
|
|
40
|
+
hasDependencyRTreeCache(treeId: number): boolean;
|
|
40
41
|
searchDependency(search: IUnitRange[], exceptTreeIds?: Set<number>): Set<number>;
|
|
41
42
|
getLastTreeId(): number;
|
|
42
43
|
getTreeById(treeId: number): Nullable<IFormulaDependencyTree>;
|
|
@@ -77,6 +78,12 @@ export declare class DependencyManagerBaseService extends Disposable implements
|
|
|
77
78
|
getFeatureFormulaDependency(unitId: string, sheetId: string, featureId: string): Nullable<number>;
|
|
78
79
|
getFormulaDependency(unitId: string, sheetId: string, row: number, column: number): Nullable<number>;
|
|
79
80
|
addDependencyRTreeCache(tree: IFormulaDependencyTree): void;
|
|
81
|
+
/**
|
|
82
|
+
* Whether this tree is currently present in the dependency index. A recalculation that
|
|
83
|
+
* reuses the ranges of an unchanged formula may skip the index write only while the entry
|
|
84
|
+
* it relies on still exists; a forced calculation resets the index and clears this state.
|
|
85
|
+
*/
|
|
86
|
+
hasDependencyRTreeCache(treeId: number): boolean;
|
|
80
87
|
getLastTreeId(): number;
|
|
81
88
|
protected _addAllTreeMap(tree: IFormulaDependencyTree): void;
|
|
82
89
|
protected _addDefinedName(unitId: string, definedName: string, treeId: number): void;
|
|
@@ -94,6 +101,8 @@ export declare class DependencyManagerBaseService extends Disposable implements
|
|
|
94
101
|
export declare class DependencyManagerService extends DependencyManagerBaseService implements IDependencyManagerService {
|
|
95
102
|
protected _allTreeMap: Map<number, Map<string, Map<string, IRange>>>;
|
|
96
103
|
protected _dependencyRTreeCache: RTree;
|
|
104
|
+
hasDependencyRTreeCache(treeId: number): boolean;
|
|
105
|
+
addDependencyRTreeCache(tree: IFormulaDependencyTree): void;
|
|
97
106
|
reset(): void;
|
|
98
107
|
addOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string, dependencyTree: IFormulaDependencyTree): void;
|
|
99
108
|
removeOtherFormulaDependency(unitId: string, sheetId: string, formulaIds: string[]): void;
|
|
@@ -105,6 +114,7 @@ export declare class DependencyManagerService extends DependencyManagerBaseServi
|
|
|
105
114
|
removeFormulaDependency(unitId: string, sheetId: string, row: number, column: number): void;
|
|
106
115
|
clearFormulaDependency(unitId: string, sheetId?: string): void;
|
|
107
116
|
private _removeDependencyRTreeCache;
|
|
117
|
+
private _removeDependencyRTreeCaches;
|
|
108
118
|
removeFormulaDependencyByDefinedName(unitId: string, definedName: string): void;
|
|
109
119
|
openKdTree(): void;
|
|
110
120
|
closeKdTree(): void;
|
|
@@ -125,4 +135,4 @@ export declare class DependencyManagerService extends DependencyManagerBaseServi
|
|
|
125
135
|
*/
|
|
126
136
|
private _buildReverseDependency;
|
|
127
137
|
}
|
|
128
|
-
export declare const IDependencyManagerService: import("@
|
|
138
|
+
export declare const IDependencyManagerService: import("@univerjs/core").IdentifierDecorator<IDependencyManagerService>;
|
|
@@ -35,7 +35,7 @@ export interface IFormulaExternalReferenceDataLoader {
|
|
|
35
35
|
range: IRange;
|
|
36
36
|
}): Promise<ErrorType | boolean | void>;
|
|
37
37
|
}
|
|
38
|
-
export declare const IFormulaExternalReferenceDataLoader: import("@
|
|
38
|
+
export declare const IFormulaExternalReferenceDataLoader: import("@univerjs/core").IdentifierDecorator<IFormulaExternalReferenceDataLoader>;
|
|
39
39
|
export declare class NoopFormulaExternalReferenceDataLoader implements IFormulaExternalReferenceDataLoader {
|
|
40
40
|
load(): Promise<void>;
|
|
41
41
|
}
|
|
@@ -55,4 +55,4 @@ export declare class FeatureCalculationManagerService extends Disposable impleme
|
|
|
55
55
|
register(unitId: string, subUnitId: string, featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
|
|
56
56
|
getReferenceExecutorMap(): Map<string, Map<string, Map<string, IFeatureCalculationManagerParam>>>;
|
|
57
57
|
}
|
|
58
|
-
export declare const IFeatureCalculationManagerService: import("@
|
|
58
|
+
export declare const IFeatureCalculationManagerService: import("@univerjs/core").IdentifierDecorator<IFeatureCalculationManagerService>;
|
|
@@ -68,7 +68,7 @@ export interface IDescriptionService {
|
|
|
68
68
|
*/
|
|
69
69
|
isFormulaDefinedName(name: string): boolean;
|
|
70
70
|
}
|
|
71
|
-
export declare const IDescriptionService: import("@
|
|
71
|
+
export declare const IDescriptionService: import("@univerjs/core").IdentifierDecorator<IDescriptionService>;
|
|
72
72
|
export declare class DescriptionService extends Disposable implements IDescriptionService {
|
|
73
73
|
private readonly _functionService;
|
|
74
74
|
private readonly _localeService;
|
|
@@ -79,7 +79,7 @@ export interface IRegisterFunctionService {
|
|
|
79
79
|
*/
|
|
80
80
|
registerAsyncFunction(params: ISingleFunctionRegisterParams): IDisposable;
|
|
81
81
|
}
|
|
82
|
-
export declare const IRegisterFunctionService: import("@
|
|
82
|
+
export declare const IRegisterFunctionService: import("@univerjs/core").IdentifierDecorator<IRegisterFunctionService>;
|
|
83
83
|
export interface ISingleFunctionRegisterParams {
|
|
84
84
|
/**
|
|
85
85
|
* function name
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IFormulaDirtyData } from './current-data.service';
|
|
17
16
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
17
|
+
import type { IFormulaDirtyData } from './current-data.service';
|
|
18
18
|
import { IActiveDirtyManagerService } from './active-dirty-manager.service';
|
|
19
19
|
/**
|
|
20
20
|
* Converts commands registered in ActiveDirtyManagerService into one formula
|
|
@@ -31,4 +31,4 @@ export interface IFormulaChangesetCalculationService {
|
|
|
31
31
|
/** Release temporary replay state so later local edits use the normal calculation path. */
|
|
32
32
|
end(unitId: string): void;
|
|
33
33
|
}
|
|
34
|
-
export declare const IFormulaChangesetCalculationService: import("@
|
|
34
|
+
export declare const IFormulaChangesetCalculationService: import("@univerjs/core").IdentifierDecorator<IFormulaChangesetCalculationService>;
|
|
@@ -44,7 +44,7 @@ export interface IFunctionService {
|
|
|
44
44
|
clearDescriptions(): void;
|
|
45
45
|
deleteFormulaAstCacheKey(...functionToken: IFunctionNames[]): void;
|
|
46
46
|
}
|
|
47
|
-
export declare const IFunctionService: import("@
|
|
47
|
+
export declare const IFunctionService: import("@univerjs/core").IdentifierDecorator<IFunctionService>;
|
|
48
48
|
export declare class FunctionService extends Disposable implements IFunctionService {
|
|
49
49
|
private _functionExecutors;
|
|
50
50
|
private _functionDescriptions;
|
|
@@ -26,4 +26,4 @@ export declare class HyperlinkEngineFormulaService extends Disposable implements
|
|
|
26
26
|
constructor(_univerInstanceService: IUniverInstanceService);
|
|
27
27
|
generateCellValue(url: string, label: string): ICellData;
|
|
28
28
|
}
|
|
29
|
-
export declare const IHyperlinkEngineFormulaService: import("@
|
|
29
|
+
export declare const IHyperlinkEngineFormulaService: import("@univerjs/core").IdentifierDecorator<IHyperlinkEngineFormulaService>;
|
|
@@ -51,4 +51,4 @@ export declare class OtherFormulaManagerService extends Disposable implements IO
|
|
|
51
51
|
batchRemove(formulaData: IDirtyUnitOtherFormulaMap): void;
|
|
52
52
|
getOtherFormulaData(): IOtherFormulaData;
|
|
53
53
|
}
|
|
54
|
-
export declare const IOtherFormulaManagerService: import("@
|
|
54
|
+
export declare const IOtherFormulaManagerService: import("@univerjs/core").IdentifierDecorator<IOtherFormulaManagerService>;
|
|
@@ -276,4 +276,4 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
276
276
|
private _checkIfArrayFormulaExceeded;
|
|
277
277
|
private _isInDirtyRange;
|
|
278
278
|
}
|
|
279
|
-
export declare const IFormulaRuntimeService: import("@
|
|
279
|
+
export declare const IFormulaRuntimeService: import("@univerjs/core").IdentifierDecorator<IFormulaRuntimeService>;
|
|
@@ -29,5 +29,5 @@ export declare class SheetRowFilteredService extends Disposable implements IShee
|
|
|
29
29
|
getRowFiltered(unitId: string, subUnitId: string, row: number): boolean;
|
|
30
30
|
dispose(): void;
|
|
31
31
|
}
|
|
32
|
-
export declare const ISheetRowFilteredService: import("@
|
|
32
|
+
export declare const ISheetRowFilteredService: import("@univerjs/core").IdentifierDecorator<ISheetRowFilteredService>;
|
|
33
33
|
export {};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Nullable } from '@univerjs/core';
|
|
17
17
|
import type { Observable } from 'rxjs';
|
|
18
|
-
import type { ISuperTable } from '../basics/common';
|
|
19
18
|
import { Disposable } from '@univerjs/core';
|
|
19
|
+
import type { ISuperTable, ISuperTableData } from '../basics/common';
|
|
20
20
|
import { TableOptionType } from '../basics/common';
|
|
21
21
|
export interface ISuperTableOptionParam {
|
|
22
22
|
tableOption: string;
|
|
@@ -25,7 +25,7 @@ export interface ISuperTableOptionParam {
|
|
|
25
25
|
export interface ISuperTableService {
|
|
26
26
|
getTableMap(unitId: string): Nullable<Map<string, ISuperTable>>;
|
|
27
27
|
getTableOptionMap(): Map<string, TableOptionType>;
|
|
28
|
-
registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
|
|
28
|
+
registerTable(unitId: string, tableName: string, reference: ISuperTable | ISuperTableData): void;
|
|
29
29
|
registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
|
|
30
30
|
remove(unitId: string, tableName: string): void;
|
|
31
31
|
update$: Observable<unknown>;
|
|
@@ -42,10 +42,10 @@ export declare class SuperTableService extends Disposable implements ISuperTable
|
|
|
42
42
|
remove(unitId: string, tableName: string): void;
|
|
43
43
|
getTableMap(unitId: string): Map<string, ISuperTable> | undefined;
|
|
44
44
|
getTableOptionMap(): Map<string, TableOptionType>;
|
|
45
|
-
registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
|
|
45
|
+
registerTable(unitId: string, tableName: string, reference: ISuperTable | ISuperTableData): void;
|
|
46
46
|
registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
|
|
47
47
|
getTable(unitId: string, tableName: string): Nullable<ISuperTable>;
|
|
48
48
|
hasTable(unitId: string, tableName: string): boolean;
|
|
49
49
|
private _update;
|
|
50
50
|
}
|
|
51
|
-
export declare const ISuperTableService: import("@
|
|
51
|
+
export declare const ISuperTableService: import("@univerjs/core").IdentifierDecorator<ISuperTableService>;
|
|
@@ -37,7 +37,7 @@ export interface IFormulaUnitReferenceResolution {
|
|
|
37
37
|
export interface IFormulaUnitReferenceResolver {
|
|
38
38
|
resolve(input: IFormulaUnitReferenceResolveInput): IFormulaUnitReferenceResolution | ErrorType;
|
|
39
39
|
}
|
|
40
|
-
export declare const IFormulaUnitReferenceResolver: import("@
|
|
40
|
+
export declare const IFormulaUnitReferenceResolver: import("@univerjs/core").IdentifierDecorator<IFormulaUnitReferenceResolver>;
|
|
41
41
|
export declare function normalizeFormulaUnitName(name: string): string;
|
|
42
42
|
export declare class FormulaUnitReferenceResolver implements IFormulaUnitReferenceResolver {
|
|
43
43
|
protected readonly _currentConfigService: IFormulaCurrentConfigService;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export { UniverFormulaEnginePlugin } from './plugin';
|