@univerjs/engine-formula 1.3.1 → 1.5.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/README.md +23 -5
- 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 +435 -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-BLJLwyCu.js +59607 -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 +205 -57671
- 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-USnMdaGa.js +58260 -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 +205 -57671
- 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-USnMdaGa.js +58260 -0
- package/lib/types/basics/cache-lru.d.ts +0 -1
- package/lib/types/basics/common.d.ts +5 -1
- package/lib/types/basics/complex.d.ts +10 -4
- package/lib/types/basics/date.d.ts +6 -1
- package/lib/types/basics/function.d.ts +2 -1
- package/lib/types/basics/inverted-index-cache.d.ts +2 -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/controllers/calculate.controller.d.ts +0 -2
- package/lib/types/engine/analysis/lexer-tree-builder.d.ts +2 -4
- package/lib/types/engine/analysis/lexer.d.ts +6 -2
- package/lib/types/engine/analysis/parser.d.ts +3 -1
- package/lib/types/engine/ast-node/function-node.d.ts +2 -1
- package/lib/types/engine/ast-node/reference-node.d.ts +1 -4
- package/lib/types/engine/ast-node/union-node.d.ts +1 -3
- 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/base-reference-object.d.ts +5 -3
- 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/generate-ast-node.d.ts +0 -2
- package/lib/types/engine/utils/numfmt-kit.d.ts +1 -1
- package/lib/types/engine/utils/three-dimensional-reference.d.ts +21 -0
- package/lib/types/engine/value-object/array-value-object.d.ts +4 -0
- 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 +4 -3
- package/lib/types/locale/en-US.d.ts +3005 -3005
- package/lib/types/models/formula-data-snapshot.d.ts +24 -0
- package/lib/types/models/formula-data.model.d.ts +9 -1
- 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 +14 -4
- package/lib/types/services/current-data.service.d.ts +20 -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/formula-calculation-session.service.d.ts +2 -1
- package/lib/types/services/formula/register-function.service.d.ts +1 -1
- package/lib/types/services/formula-cache.service.d.ts +47 -0
- 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/formula-result.service.d.ts +29 -0
- package/lib/types/services/function.service.d.ts +4 -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 +16 -4
- 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
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Dget } from './dget';
|
|
17
17
|
import { FUNCTION_NAMES_DATABASE } from './function-names';
|
|
18
|
-
export declare const functionDatabase: (
|
|
18
|
+
export declare const functionDatabase: (typeof Dget | FUNCTION_NAMES_DATABASE)[][];
|
|
@@ -17,4 +17,4 @@ import { DateFunction } from './date';
|
|
|
17
17
|
import { FUNCTION_NAMES_DATE } from './function-names';
|
|
18
18
|
import { NetworkdaysIntl } from './networkdays-intl';
|
|
19
19
|
import { WorkdayIntl } from './workday-intl';
|
|
20
|
-
export declare const functionDate: ((
|
|
20
|
+
export declare const functionDate: ((typeof DateFunction | FUNCTION_NAMES_DATE)[] | (typeof NetworkdaysIntl | FUNCTION_NAMES_DATE)[] | (typeof WorkdayIntl | FUNCTION_NAMES_DATE)[])[];
|
|
@@ -17,4 +17,4 @@ import { Complex } from './complex';
|
|
|
17
17
|
import { FUNCTION_NAMES_ENGINEERING } from './function-names';
|
|
18
18
|
import { Improduct } from './improduct';
|
|
19
19
|
import { Imsum } from './imsum';
|
|
20
|
-
export declare const functionEngineering: ((
|
|
20
|
+
export declare const functionEngineering: ((typeof Complex | FUNCTION_NAMES_ENGINEERING)[] | (typeof Improduct | FUNCTION_NAMES_ENGINEERING)[] | (typeof Imsum | FUNCTION_NAMES_ENGINEERING)[])[];
|
|
@@ -21,4 +21,4 @@ import { Oddfyield } from './oddfyield';
|
|
|
21
21
|
import { Oddlprice } from './oddlprice';
|
|
22
22
|
import { Oddlyield } from './oddlyield';
|
|
23
23
|
import { Price } from './price';
|
|
24
|
-
export declare const functionFinancial: ((
|
|
24
|
+
export declare const functionFinancial: ((typeof Accrint | FUNCTION_NAMES_FINANCIAL)[] | (typeof Npv | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddfprice | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddfyield | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddlprice | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddlyield | FUNCTION_NAMES_FINANCIAL)[] | (typeof Price | FUNCTION_NAMES_FINANCIAL)[])[];
|
|
@@ -17,4 +17,4 @@ import { Cell } from './cell';
|
|
|
17
17
|
import { FUNCTION_NAMES_INFORMATION } from './function-names';
|
|
18
18
|
import { Isbetween } from './isbetween';
|
|
19
19
|
import { Isblank } from './isblank';
|
|
20
|
-
export declare const functionInformation: ((
|
|
20
|
+
export declare const functionInformation: ((typeof Cell | FUNCTION_NAMES_INFORMATION)[] | (typeof Isbetween | FUNCTION_NAMES_INFORMATION)[] | (typeof Isblank | FUNCTION_NAMES_INFORMATION)[])[];
|
|
@@ -20,5 +20,5 @@ export declare class Isblank extends BaseFunction {
|
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
22
|
needsReferenceObject: boolean;
|
|
23
|
-
calculate(value: FunctionVariantType): import("../../..").BaseValueObject
|
|
23
|
+
calculate(value: FunctionVariantType): ArrayValueObject | import("../../..").BaseValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Iserr extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Iserror extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Islogical extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Isna extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Isnontext extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Isnumber extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Istext extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(value: BaseValueObject):
|
|
23
|
+
calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
|
|
24
24
|
}
|
|
@@ -19,4 +19,4 @@ import { Groupby } from './groupby';
|
|
|
19
19
|
import { If } from './if';
|
|
20
20
|
import { Ifna } from './ifna';
|
|
21
21
|
import { Makearray } from './makearray';
|
|
22
|
-
export declare const functionLogical: ((
|
|
22
|
+
export declare const functionLogical: ((typeof And | FUNCTION_NAMES_LOGICAL)[] | (typeof Groupby | FUNCTION_NAMES_LOGICAL)[] | (typeof If | FUNCTION_NAMES_LOGICAL)[] | (typeof Ifna | FUNCTION_NAMES_LOGICAL)[] | (typeof Makearray | FUNCTION_NAMES_LOGICAL)[])[];
|
|
@@ -23,7 +23,7 @@ export declare class Groupby extends BaseFunction {
|
|
|
23
23
|
maxParams: number;
|
|
24
24
|
needsReferenceObject: boolean;
|
|
25
25
|
needsAstChildren: boolean;
|
|
26
|
-
calculateAst(children: BaseAstNode[], getVariant: (node: BaseAstNode) => FunctionVariantType | null):
|
|
26
|
+
calculateAst(children: BaseAstNode[], getVariant: (node: BaseAstNode) => FunctionVariantType | null): ArrayValueObject | ErrorValueObject;
|
|
27
27
|
private _arrayInput;
|
|
28
28
|
private _aggregators;
|
|
29
29
|
private _normalizedFunctionName;
|
|
@@ -19,7 +19,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class If extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject):
|
|
22
|
+
calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
private _handleSingleObject;
|
|
24
24
|
private _coerceSelectedValue;
|
|
25
25
|
private _coerceLogicalTest;
|
|
@@ -21,6 +21,6 @@ export declare class Iferror extends BaseFunction {
|
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
23
|
needsReferenceObject: boolean;
|
|
24
|
-
calculate(value: FunctionVariantType, valueIfError: FunctionVariantType):
|
|
24
|
+
calculate(value: FunctionVariantType, valueIfError: FunctionVariantType): ArrayValueObject | BaseValueObject;
|
|
25
25
|
private _toValueObject;
|
|
26
26
|
}
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Ifna extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(value: BaseValueObject, valueIfNa: BaseValueObject):
|
|
22
|
+
calculate(value: BaseValueObject, valueIfNa: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -20,6 +20,6 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Makearray extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(...variants: BaseValueObject[]):
|
|
23
|
+
calculate(...variants: BaseValueObject[]): AsyncArrayObject | ErrorValueObject;
|
|
24
24
|
isAsync(): boolean;
|
|
25
25
|
}
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Choosecols extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(array: BaseValueObject, ...variants: BaseValueObject[]):
|
|
22
|
+
calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Chooserows extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(array: BaseValueObject, ...variants: BaseValueObject[]):
|
|
22
|
+
calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Column extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(reference?: BaseValueObject):
|
|
22
|
+
calculate(reference?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -22,5 +22,5 @@ export declare class Formulatext extends BaseFunction {
|
|
|
22
22
|
maxParams: number;
|
|
23
23
|
needsReferenceObject: boolean;
|
|
24
24
|
needsFormulaDataModel: boolean;
|
|
25
|
-
calculate(reference: FunctionVariantType):
|
|
25
|
+
calculate(reference: FunctionVariantType): ArrayValueObject | BaseValueObject;
|
|
26
26
|
}
|
|
@@ -22,4 +22,4 @@ import { Indirect } from './indirect';
|
|
|
22
22
|
import { Lookup } from './lookup';
|
|
23
23
|
import { Match } from './match';
|
|
24
24
|
import { Offset } from './offset';
|
|
25
|
-
export declare const functionLookup: ((
|
|
25
|
+
export declare const functionLookup: ((typeof Anchorarray | FUNCTION_NAMES_LOOKUP)[] | (typeof Choose | FUNCTION_NAMES_LOOKUP)[] | (typeof Hstack | FUNCTION_NAMES_LOOKUP)[] | (typeof Index | FUNCTION_NAMES_LOOKUP)[] | (typeof Indirect | FUNCTION_NAMES_LOOKUP)[] | (typeof Lookup | FUNCTION_NAMES_LOOKUP)[] | (typeof Match | FUNCTION_NAMES_LOOKUP)[] | (typeof Offset | FUNCTION_NAMES_LOOKUP)[])[];
|
|
@@ -13,8 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
17
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
18
|
+
import { BaseFunction } from '../../base-function';
|
|
19
|
+
export declare class Getpivotdata extends BaseFunction {
|
|
18
20
|
minParams: number;
|
|
19
21
|
maxParams: number;
|
|
22
|
+
needsReferenceObject: boolean;
|
|
23
|
+
calculate(...variants: FunctionVariantType[]): BaseValueObject;
|
|
24
|
+
private _textArgument;
|
|
20
25
|
}
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Hstack extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(...variants: BaseValueObject[]):
|
|
22
|
+
calculate(...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -30,6 +30,7 @@ export declare class Index extends BaseFunction {
|
|
|
30
30
|
needsReferenceObject: boolean;
|
|
31
31
|
calculate(reference: FunctionVariantType, rowNum: FunctionVariantType, columnNum?: FunctionVariantType, areaNum?: FunctionVariantType): BaseValueObject | BaseReferenceObject;
|
|
32
32
|
private _handleSingleObject;
|
|
33
|
+
private _getReferenceArea;
|
|
33
34
|
private _getReferenceCounts;
|
|
34
35
|
private _calculateReferenceObject;
|
|
35
36
|
private _calculateArrayObject;
|
|
@@ -21,7 +21,7 @@ export declare class Indirect extends BaseFunction {
|
|
|
21
21
|
maxParams: number;
|
|
22
22
|
needsUnitReferenceResolver: boolean;
|
|
23
23
|
isAddress(): boolean;
|
|
24
|
-
calculate(refText: BaseValueObject, a1?: BaseValueObject):
|
|
24
|
+
calculate(refText: BaseValueObject, a1?: BaseValueObject): BaseReferenceObject | BaseValueObject;
|
|
25
25
|
private _handleSingleObject;
|
|
26
26
|
private _setDefault;
|
|
27
27
|
/**
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Row extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(reference?: BaseValueObject):
|
|
22
|
+
calculate(reference?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -20,7 +20,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Sortby extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(array: BaseValueObject, ...variants: BaseValueObject[]):
|
|
23
|
+
calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ArrayValueObject | ErrorValueObject;
|
|
24
24
|
private _getVariantsError;
|
|
25
25
|
private _getResultArray;
|
|
26
26
|
private _getByArraysAndSortOrders;
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Transpose extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(array: BaseValueObject):
|
|
22
|
+
calculate(array: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -19,7 +19,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Vlookup extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(lookupValue: BaseValueObject, tableArray: BaseValueObject, colIndexNum: BaseValueObject, rangeLookup?: BaseValueObject):
|
|
22
|
+
calculate(lookupValue: BaseValueObject, tableArray: BaseValueObject, colIndexNum: BaseValueObject, rangeLookup?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
private _handleArrayColIndexNum;
|
|
24
24
|
private _handleNonArrayColIndexNum;
|
|
25
25
|
private _handleTableArray;
|
|
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Vstack extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(...variants: BaseValueObject[]):
|
|
22
|
+
calculate(...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
|
|
23
23
|
}
|
|
@@ -23,7 +23,7 @@ export declare class Aggregate extends BaseFunction {
|
|
|
23
23
|
needsReferenceObject: boolean;
|
|
24
24
|
needsFilteredOutRows: boolean;
|
|
25
25
|
needsFormulaDataModel: boolean;
|
|
26
|
-
calculate(functionNum: FunctionVariantType, options: FunctionVariantType, ...refs: FunctionVariantType[]):
|
|
26
|
+
calculate(functionNum: FunctionVariantType, options: FunctionVariantType, ...refs: FunctionVariantType[]): ArrayValueObject | BaseValueObject;
|
|
27
27
|
private _handleSingleObject;
|
|
28
28
|
private _getAggregateOptions;
|
|
29
29
|
private _handleLargeSmallPercentileQuartile;
|
|
@@ -17,4 +17,4 @@ import { FUNCTION_NAMES_MATH } from './function-names';
|
|
|
17
17
|
import { Product } from './product';
|
|
18
18
|
import { Randarray } from './randarray';
|
|
19
19
|
import { Sumifs } from './sumifs';
|
|
20
|
-
export declare const functionMath: ((
|
|
20
|
+
export declare const functionMath: ((typeof Product | FUNCTION_NAMES_MATH)[] | (typeof Randarray | FUNCTION_NAMES_MATH)[] | (typeof Sumifs | FUNCTION_NAMES_MATH)[])[];
|
|
@@ -20,7 +20,7 @@ export declare class Randarray extends BaseFunction {
|
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
22
|
needsSheetRowColumnCount: boolean;
|
|
23
|
-
calculate(rows?: BaseValueObject, columns?: BaseValueObject, min?: BaseValueObject, max?: BaseValueObject, wholeNumber?: BaseValueObject):
|
|
23
|
+
calculate(rows?: BaseValueObject, columns?: BaseValueObject, min?: BaseValueObject, max?: BaseValueObject, wholeNumber?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
24
24
|
private _calculateResult;
|
|
25
25
|
private _calculateSingleCell;
|
|
26
26
|
private _handleError;
|
|
@@ -23,7 +23,7 @@ export declare class Subtotal extends BaseFunction {
|
|
|
23
23
|
needsReferenceObject: boolean;
|
|
24
24
|
needsFilteredOutRows: boolean;
|
|
25
25
|
needsFormulaDataModel: boolean;
|
|
26
|
-
calculate(functionNum: FunctionVariantType, ...refs: FunctionVariantType[]):
|
|
26
|
+
calculate(functionNum: FunctionVariantType, ...refs: FunctionVariantType[]): ArrayValueObject | BaseValueObject;
|
|
27
27
|
private _handleSingleObject;
|
|
28
28
|
private _handleMultiAreaRefs;
|
|
29
29
|
private _getMultiAreaInfo;
|
|
@@ -20,5 +20,5 @@ export declare class Sumifs extends BaseFunction {
|
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
22
|
needsReferenceObject: boolean;
|
|
23
|
-
calculate(sumRange: FunctionVariantType, ...variants: FunctionVariantType[]): import("../../..").BaseValueObject
|
|
23
|
+
calculate(sumRange: FunctionVariantType, ...variants: FunctionVariantType[]): ArrayValueObject | import("../../..").BaseValueObject;
|
|
24
24
|
}
|
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
17
|
+
import type { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
16
18
|
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
19
|
import { BaseFunction } from '../../base-function';
|
|
18
20
|
export declare class Cube extends BaseFunction {
|
|
21
|
+
needsReferenceObject: boolean;
|
|
19
22
|
minParams: number;
|
|
20
23
|
maxParams: number;
|
|
21
|
-
calculate(...variants:
|
|
24
|
+
calculate(...variants: FunctionVariantType[]): ArrayValueObject | BaseValueObject;
|
|
22
25
|
}
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { FUNCTION_NAMES_STATISTICAL } from './function-names';
|
|
17
17
|
import { StdevP } from './stdev-p';
|
|
18
|
-
export declare const functionStatistical: (
|
|
18
|
+
export declare const functionStatistical: (typeof StdevP | FUNCTION_NAMES_STATISTICAL)[][];
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class StdevP extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class StdevS extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class Stdeva extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class Stdevpa extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class VarP extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class VarS extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class Vara extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,5 +18,5 @@ import { BaseFunction } from '../../base-function';
|
|
|
18
18
|
export declare class Varpa extends BaseFunction {
|
|
19
19
|
minParams: number;
|
|
20
20
|
maxParams: number;
|
|
21
|
-
calculate(...variants: BaseValueObject[]):
|
|
21
|
+
calculate(...variants: BaseValueObject[]): import("../../..").ArrayValueObject | BaseValueObject;
|
|
22
22
|
}
|
|
@@ -18,4 +18,4 @@ import { FUNCTION_NAMES_TEXT } from './function-names';
|
|
|
18
18
|
import { Textafter } from './textafter';
|
|
19
19
|
import { Textbefore } from './textbefore';
|
|
20
20
|
import { Textsplit } from './textsplit';
|
|
21
|
-
export declare const functionText: ((
|
|
21
|
+
export declare const functionText: ((typeof Concatenate | FUNCTION_NAMES_TEXT)[] | (typeof Textafter | FUNCTION_NAMES_TEXT)[] | (typeof Textbefore | FUNCTION_NAMES_TEXT)[] | (typeof Textsplit | FUNCTION_NAMES_TEXT)[])[];
|
|
@@ -20,7 +20,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Textafter extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(text: BaseValueObject, delimiter: BaseValueObject, instanceNum?: BaseValueObject, matchMode?: BaseValueObject, matchEnd?: BaseValueObject, ifNotFound?: BaseValueObject):
|
|
23
|
+
calculate(text: BaseValueObject, delimiter: BaseValueObject, instanceNum?: BaseValueObject, matchMode?: BaseValueObject, matchEnd?: BaseValueObject, ifNotFound?: BaseValueObject): ArrayValueObject | StringValueObject;
|
|
24
24
|
private _getResultArray;
|
|
25
25
|
private _checkVariantsError;
|
|
26
26
|
private _getStringValue;
|
|
@@ -20,7 +20,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
20
20
|
export declare class Textbefore extends BaseFunction {
|
|
21
21
|
minParams: number;
|
|
22
22
|
maxParams: number;
|
|
23
|
-
calculate(text: BaseValueObject, delimiter: BaseValueObject, instanceNum?: BaseValueObject, matchMode?: BaseValueObject, matchEnd?: BaseValueObject, ifNotFound?: BaseValueObject):
|
|
23
|
+
calculate(text: BaseValueObject, delimiter: BaseValueObject, instanceNum?: BaseValueObject, matchMode?: BaseValueObject, matchEnd?: BaseValueObject, ifNotFound?: BaseValueObject): ArrayValueObject | StringValueObject;
|
|
24
24
|
private _getResultArray;
|
|
25
25
|
private _checkVariantsError;
|
|
26
26
|
private _getStringValue;
|
|
@@ -19,7 +19,7 @@ import { BaseFunction } from '../../base-function';
|
|
|
19
19
|
export declare class Textsplit extends BaseFunction {
|
|
20
20
|
minParams: number;
|
|
21
21
|
maxParams: number;
|
|
22
|
-
calculate(text: BaseValueObject, colDelimiter: BaseValueObject, rowDelimiter?: BaseValueObject, ignoreEmpty?: BaseValueObject, matchMode?: BaseValueObject, padWith?: BaseValueObject):
|
|
22
|
+
calculate(text: BaseValueObject, colDelimiter: BaseValueObject, rowDelimiter?: BaseValueObject, ignoreEmpty?: BaseValueObject, matchMode?: BaseValueObject, padWith?: BaseValueObject): ArrayValueObject | BaseValueObject;
|
|
23
23
|
private _getStringValues;
|
|
24
24
|
private _getResultArray;
|
|
25
25
|
private _getResult;
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Filterxml } from './filterxml';
|
|
17
17
|
import { FUNCTION_NAMES_WEB } from './function-names';
|
|
18
|
-
export declare const functionWeb: (
|
|
18
|
+
export declare const functionWeb: (typeof Filterxml | FUNCTION_NAMES_WEB)[][];
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
export type { FormulaUnitType, IArrayFormulaEmbeddedMap, IArrayFormulaRangeType, IArrayFormulaUnitCellType, IDirtyUnitDefinedNameMap, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetNameMap, IDirtyUnitSuperTableMap, IFeatureDirtyRangeType, IFormulaData, IFormulaDataItem, IFormulaDatasetConfig, IFormulaExecuteResultMap, IFormulaExternalReferenceBinding, IFormulaExternalReferenceResource, IFormulaExternalReferences, IFormulaStringMap, IFormulaUnitNameMap, IFormulaUnitNameMapItem, IRuntimeImageFormulaDataType, IRuntimeUnitDataType, ISheetData, IUnitData, IUnitImageFormulaDataType, IUnitSheetNameMap, } from './basics/common';
|
|
17
17
|
export { BooleanValue } from './basics/common';
|
|
18
18
|
export { type IOtherFormulaData } from './basics/common';
|
|
19
|
-
export type { IExprTreeNode, ISuperTable, IUnitRowData } from './basics/common';
|
|
19
|
+
export type { IExprTreeNode, ISuperTable, ISuperTableData, IUnitRowData } from './basics/common';
|
|
20
20
|
export { isInDirtyRange } from './basics/dirty';
|
|
21
21
|
export { ERROR_TYPE_SET, ErrorType } from './basics/error-type';
|
|
22
22
|
export { type ISheetFormulaError } from './basics/error-type';
|
|
23
23
|
export { FunctionType } from './basics/function';
|
|
24
24
|
export type { IFunctionInfo, IFunctionParam } from './basics/function';
|
|
25
25
|
export { type IFunctionNames } from './basics/function';
|
|
26
|
-
export { CELL_INVERTED_INDEX_CACHE } from './basics/inverted-index-cache';
|
|
27
26
|
export { includeFormulaLexerToken, isFormulaLexerToken, normalizeSheetName } from './basics/match-token';
|
|
28
27
|
export { matchRefDrawToken } from './basics/match-token';
|
|
29
28
|
export { isReferenceString } from './basics/regex';
|
|
@@ -77,7 +76,7 @@ export { generateRandomDependencyTreeId } from './engine/dependency/formula-depe
|
|
|
77
76
|
export { Interpreter } from './engine/interpreter/interpreter';
|
|
78
77
|
export { BaseReferenceObject } from './engine/reference-object/base-reference-object';
|
|
79
78
|
export type { FunctionVariantType } from './engine/reference-object/base-reference-object';
|
|
80
|
-
export { AsyncArrayObject, AsyncObject
|
|
79
|
+
export { AsyncArrayObject, AsyncObject } from './engine/reference-object/base-reference-object';
|
|
81
80
|
export { RangeReferenceObject } from './engine/reference-object/range-reference-object';
|
|
82
81
|
export { generateExecuteAstNodeData } from './engine/utils/ast-node-tool';
|
|
83
82
|
export { extractFormulaError } from './engine/utils/cell';
|
|
@@ -135,6 +134,7 @@ export { FUNCTION_NAMES_UNIVER } from './functions/univer/function-names';
|
|
|
135
134
|
export { getObjectValue } from './functions/util';
|
|
136
135
|
export { functionWeb } from './functions/web/function-map';
|
|
137
136
|
export { FUNCTION_NAMES_WEB } from './functions/web/function-names';
|
|
137
|
+
export type { IFormulaDataSnapshot } from './models/formula-data-snapshot';
|
|
138
138
|
export { FormulaDataModel } from './models/formula-data.model';
|
|
139
139
|
export type { IRangeChange } from './models/formula-data.model';
|
|
140
140
|
export { UniverFormulaEnginePlugin } from './plugin';
|
|
@@ -156,6 +156,7 @@ export { FormulaCalculationTriggerService, mergeDirtyData } from './services/for
|
|
|
156
156
|
export { IFormulaChangesetCalculationService } from './services/formula-changeset-calculation.service';
|
|
157
157
|
export type { IFormulaInfo, IOtherFormulaResult } from './services/formula-common';
|
|
158
158
|
export { FormulaResultStatus } from './services/formula-common';
|
|
159
|
+
export { FormulaResultService } from './services/formula-result.service';
|
|
159
160
|
export { DescriptionService, IDescriptionService } from './services/formula/description.service';
|
|
160
161
|
export type { ISearchItem, ISearchItemWithType } from './services/formula/description.service';
|
|
161
162
|
export { FormulaCalculationSessionService, FormulaResultApplicationType, } from './services/formula/formula-calculation-session.service';
|