@univerjs/engine-formula 0.16.1 → 0.17.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/index.js +1 -1
- package/lib/es/index.js +2895 -2930
- package/lib/index.js +2895 -2930
- package/lib/types/engine/analysis/lexer-tree-builder.d.ts +3 -0
- package/lib/types/engine/utils/object-compare.d.ts +3 -4
- package/lib/types/engine/utils/value-object.d.ts +14 -9
- package/lib/types/engine/value-object/array-value-object.d.ts +14 -14
- package/lib/types/functions/financial/function-map.d.ts +1 -1
- package/lib/types/functions/information/function-map.d.ts +2 -1
- package/lib/types/functions/information/isblank/index.d.ts +3 -1
- package/lib/types/functions/information/iserr/index.d.ts +3 -1
- package/lib/types/functions/information/iserror/index.d.ts +3 -1
- package/lib/types/functions/information/islogical/index.d.ts +3 -1
- package/lib/types/functions/information/isna/index.d.ts +3 -1
- package/lib/types/functions/information/isnontext/index.d.ts +3 -1
- package/lib/types/functions/information/isnumber/index.d.ts +3 -1
- package/lib/types/functions/information/istext/index.d.ts +3 -1
- package/lib/types/functions/logical/function-map.d.ts +2 -1
- package/lib/types/functions/logical/if/index.d.ts +2 -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/drop/index.d.ts +1 -1
- package/lib/types/functions/lookup/expand/index.d.ts +1 -1
- package/lib/types/functions/lookup/formulatext/index.d.ts +2 -1
- package/lib/types/functions/lookup/hstack/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/take/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 +2 -1
- package/lib/types/functions/math/function-map.d.ts +1 -2
- package/lib/types/functions/math/int/index.d.ts +1 -1
- package/lib/types/functions/math/mod/index.d.ts +1 -1
- package/lib/types/functions/math/quotient/index.d.ts +1 -1
- package/lib/types/functions/math/seriessum/index.d.ts +1 -1
- package/lib/types/functions/math/sign/index.d.ts +1 -1
- package/lib/types/functions/math/sumifs/index.d.ts +1 -3
- package/lib/types/functions/meta/compare/index.d.ts +1 -1
- package/lib/types/functions/statistical/averageifs/index.d.ts +0 -1
- package/lib/types/functions/statistical/countifs/index.d.ts +0 -4
- package/lib/types/functions/statistical/devsq/index.d.ts +1 -1
- package/lib/types/functions/statistical/fisher/index.d.ts +1 -1
- package/lib/types/functions/statistical/fisherinv/index.d.ts +1 -1
- package/lib/types/functions/statistical/maxifs/index.d.ts +0 -1
- package/lib/types/functions/statistical/minifs/index.d.ts +0 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/plugin.d.ts +3 -1
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
- /package/lib/types/{controller/config.schema.d.ts → config/config.d.ts} +0 -0
- /package/lib/types/{controller → controllers}/calculate.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/computing-status.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/formula.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/set-dependency.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/set-feature-calculation.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/set-other-formula.controller.d.ts +0 -0
- /package/lib/types/{controller → controllers}/set-super-table.controller.d.ts +0 -0
|
@@ -19,6 +19,7 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
19
19
|
private _upLevel;
|
|
20
20
|
private _segment;
|
|
21
21
|
private _bracketState;
|
|
22
|
+
private _openBracketNormalIndexStack;
|
|
22
23
|
private _squareBracketState;
|
|
23
24
|
private _bracesState;
|
|
24
25
|
private _singleQuotationState;
|
|
@@ -92,6 +93,8 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
92
93
|
private _resetSegment;
|
|
93
94
|
private _openBracket;
|
|
94
95
|
private _closeBracket;
|
|
96
|
+
private _openBracketNormalIndex;
|
|
97
|
+
private _getNodesByCurrentBracketNormalIndex;
|
|
95
98
|
private _openSquareBracket;
|
|
96
99
|
private _closeSquareBracket;
|
|
97
100
|
private _getCurrentBracket;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArrayValueObject } from '../value-object/array-value-object';
|
|
2
2
|
import { BaseValueObject } from '../value-object/base-value-object';
|
|
3
|
+
import { compareToken } from '../../basics/token';
|
|
3
4
|
export declare function findCompareToken(str: string): [compareToken, BaseValueObject];
|
|
4
5
|
/**
|
|
5
6
|
* When it contains both comparison characters and wildcard characters
|
|
@@ -10,7 +11,5 @@ export declare function findCompareToken(str: string): [compareToken, BaseValueO
|
|
|
10
11
|
export declare function valueObjectCompare(range: BaseValueObject, criteria: BaseValueObject, operator?: compareToken, isCaseSensitive?: boolean): BaseValueObject;
|
|
11
12
|
/**
|
|
12
13
|
* Find the Boolean intersection of two ArrayValueObjects
|
|
13
|
-
* @param valueObject1
|
|
14
|
-
* @param valueObject2
|
|
15
14
|
*/
|
|
16
|
-
export declare function booleanObjectIntersection(valueObject1:
|
|
15
|
+
export declare function booleanObjectIntersection(valueObject1: ArrayValueObject, valueObject2: ArrayValueObject): ArrayValueObject;
|
|
@@ -28,23 +28,28 @@ export declare function calculateMaxDimensions(variants: BaseValueObject[]): {
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function parsePairedRangeAndCriteria(variants: FunctionVariantType[], targetRange?: FunctionVariantType): {
|
|
30
30
|
isError: boolean;
|
|
31
|
-
errorObject:
|
|
31
|
+
errorObject: ErrorValueObject | null;
|
|
32
32
|
rangeIsDifferentSize: boolean;
|
|
33
33
|
criteriaMaxRowLength: number;
|
|
34
34
|
criteriaMaxColumnLength: number;
|
|
35
|
-
targetRange:
|
|
35
|
+
targetRange: ArrayValueObject | null;
|
|
36
36
|
variants: BaseValueObject[];
|
|
37
37
|
};
|
|
38
38
|
export declare function baseValueObjectToArrayValueObject(valueObject: BaseValueObject): ArrayValueObject;
|
|
39
|
-
export declare function getBooleanResults(variants: BaseValueObject[], maxRowLength: number, maxColumnLength: number, isNumberSensitive?: boolean): BaseValueObject[][];
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
* Get the paired range and criteria result for COUNTIFS, SUMIFS, etc.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getPairedRangeAndCriteriaResult(variants: BaseValueObject[], params: {
|
|
43
|
+
formulaName: string;
|
|
44
|
+
maxRowLength: number;
|
|
45
|
+
maxColumnLength: number;
|
|
46
|
+
isNumberSensitive?: boolean;
|
|
47
|
+
targetRange?: ArrayValueObject;
|
|
48
|
+
}): BaseValueObject[][];
|
|
49
|
+
/**
|
|
50
|
+
* Two ArrayValueObject of the same type can be compared
|
|
46
51
|
*/
|
|
47
|
-
export declare function filterSameValueObjectResult(array: ArrayValueObject, range: ArrayValueObject, criteria: BaseValueObject):
|
|
52
|
+
export declare function filterSameValueObjectResult(array: ArrayValueObject, range: ArrayValueObject, criteria: BaseValueObject): ArrayValueObject;
|
|
48
53
|
/**
|
|
49
54
|
* Check if the two valueObjects are of the same type
|
|
50
55
|
* @param left
|
|
@@ -137,18 +137,18 @@ export declare class ArrayValueObject extends BaseValueObject {
|
|
|
137
137
|
countBlank(): BaseValueObject;
|
|
138
138
|
getNegative(): BaseValueObject;
|
|
139
139
|
getReciprocal(): BaseValueObject;
|
|
140
|
-
plus(valueObject: BaseValueObject):
|
|
141
|
-
minus(valueObject: BaseValueObject):
|
|
142
|
-
multiply(valueObject: BaseValueObject):
|
|
143
|
-
divided(valueObject: BaseValueObject):
|
|
144
|
-
mod(valueObject: BaseValueObject):
|
|
140
|
+
plus(valueObject: BaseValueObject): ArrayValueObject;
|
|
141
|
+
minus(valueObject: BaseValueObject): ArrayValueObject;
|
|
142
|
+
multiply(valueObject: BaseValueObject): ArrayValueObject;
|
|
143
|
+
divided(valueObject: BaseValueObject): ArrayValueObject;
|
|
144
|
+
mod(valueObject: BaseValueObject): ArrayValueObject;
|
|
145
145
|
modInverse(valueObject: BaseValueObject): BaseValueObject;
|
|
146
|
-
compare(valueObject: BaseValueObject, operator: compareToken, isCaseSensitive?: boolean):
|
|
147
|
-
concatenateFront(valueObject: BaseValueObject):
|
|
148
|
-
concatenateBack(valueObject: BaseValueObject):
|
|
146
|
+
compare(valueObject: BaseValueObject, operator: compareToken, isCaseSensitive?: boolean): ArrayValueObject;
|
|
147
|
+
concatenateFront(valueObject: BaseValueObject): ArrayValueObject;
|
|
148
|
+
concatenateBack(valueObject: BaseValueObject): ArrayValueObject;
|
|
149
149
|
map(callbackFn: callbackMapFnType): BaseValueObject;
|
|
150
|
-
mapValue(callbackFn: callbackMapFnType):
|
|
151
|
-
pow(valueObject: BaseValueObject):
|
|
150
|
+
mapValue(callbackFn: callbackMapFnType): ArrayValueObject;
|
|
151
|
+
pow(valueObject: BaseValueObject): ArrayValueObject;
|
|
152
152
|
/**
|
|
153
153
|
*
|
|
154
154
|
* @param valueObject In the case of an inverse, it is certainly not an array.
|
|
@@ -169,7 +169,7 @@ export declare class ArrayValueObject extends BaseValueObject {
|
|
|
169
169
|
tanh(): BaseValueObject;
|
|
170
170
|
atan(): BaseValueObject;
|
|
171
171
|
atanh(): BaseValueObject;
|
|
172
|
-
atan2(valueObject: BaseValueObject):
|
|
172
|
+
atan2(valueObject: BaseValueObject): ArrayValueObject;
|
|
173
173
|
atan2Inverse(valueObject: BaseValueObject): BaseValueObject;
|
|
174
174
|
mean(ddof?: number): BaseValueObject;
|
|
175
175
|
/**
|
|
@@ -211,11 +211,11 @@ export declare class ArrayValueObject extends BaseValueObject {
|
|
|
211
211
|
log10(): BaseValueObject;
|
|
212
212
|
exp(): BaseValueObject;
|
|
213
213
|
abs(): BaseValueObject;
|
|
214
|
-
round(valueObject: BaseValueObject):
|
|
214
|
+
round(valueObject: BaseValueObject): ArrayValueObject;
|
|
215
215
|
roundInverse(valueObject: BaseValueObject): BaseValueObject;
|
|
216
|
-
floor(valueObject: BaseValueObject):
|
|
216
|
+
floor(valueObject: BaseValueObject): ArrayValueObject;
|
|
217
217
|
floorInverse(valueObject: BaseValueObject): BaseValueObject;
|
|
218
|
-
ceil(valueObject: BaseValueObject):
|
|
218
|
+
ceil(valueObject: BaseValueObject): ArrayValueObject;
|
|
219
219
|
ceilInverse(valueObject: BaseValueObject): BaseValueObject;
|
|
220
220
|
toValue(): (string | number | boolean | null)[][];
|
|
221
221
|
private _clearCache;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FUNCTION_NAMES_FINANCIAL } from './function-names';
|
|
2
1
|
import { Accrint } from './accrint';
|
|
2
|
+
import { FUNCTION_NAMES_FINANCIAL } from './function-names';
|
|
3
3
|
import { Npv } from './npv';
|
|
4
4
|
import { Oddfprice } from './oddfprice';
|
|
5
5
|
import { Oddfyield } from './oddfyield';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Cell } from './cell';
|
|
2
2
|
import { FUNCTION_NAMES_INFORMATION } from './function-names';
|
|
3
3
|
import { Isbetween } from './isbetween';
|
|
4
|
-
|
|
4
|
+
import { Isblank } from './isblank';
|
|
5
|
+
export declare const functionInformation: ((FUNCTION_NAMES_INFORMATION | typeof Cell)[] | (FUNCTION_NAMES_INFORMATION | typeof Isbetween)[] | (FUNCTION_NAMES_INFORMATION | typeof Isblank)[])[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Isblank extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Iserr extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Iserror extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Islogical extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Isna extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Isnontext extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Isnumber extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
|
|
2
4
|
import { BaseFunction } from '../../base-function';
|
|
3
5
|
export declare class Istext extends BaseFunction {
|
|
4
6
|
minParams: number;
|
|
5
7
|
maxParams: number;
|
|
6
|
-
calculate(value: BaseValueObject):
|
|
8
|
+
calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { And } from './and';
|
|
2
2
|
import { FUNCTION_NAMES_LOGICAL } from './function-names';
|
|
3
|
+
import { If } from './if';
|
|
3
4
|
import { Iferror } from './iferror';
|
|
4
5
|
import { Makearray } from './makearray';
|
|
5
|
-
export declare const functionLogical: ((FUNCTION_NAMES_LOGICAL | typeof And)[] | (FUNCTION_NAMES_LOGICAL | typeof Iferror)[] | (FUNCTION_NAMES_LOGICAL | typeof Makearray)[])[];
|
|
6
|
+
export declare const functionLogical: ((FUNCTION_NAMES_LOGICAL | typeof And)[] | (FUNCTION_NAMES_LOGICAL | typeof If)[] | (FUNCTION_NAMES_LOGICAL | typeof Iferror)[] | (FUNCTION_NAMES_LOGICAL | typeof Makearray)[])[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
1
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
3
|
import { BaseFunction } from '../../base-function';
|
|
3
4
|
export declare class If extends BaseFunction {
|
|
4
5
|
minParams: number;
|
|
5
6
|
maxParams: number;
|
|
6
|
-
calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject): BaseValueObject;
|
|
7
|
+
calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject): BaseValueObject | ArrayValueObject;
|
|
7
8
|
private _handleSingleObject;
|
|
8
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Choosecols extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Chooserows extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Column extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Drop extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Expand extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
3
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
4
|
import { BaseFunction } from '../../base-function';
|
|
4
5
|
export declare class Formulatext extends BaseFunction {
|
|
@@ -6,5 +7,5 @@ export declare class Formulatext extends BaseFunction {
|
|
|
6
7
|
maxParams: number;
|
|
7
8
|
needsReferenceObject: boolean;
|
|
8
9
|
needsFormulaDataModel: boolean;
|
|
9
|
-
calculate(reference: FunctionVariantType): BaseValueObject;
|
|
10
|
+
calculate(reference: FunctionVariantType): BaseValueObject | ArrayValueObject;
|
|
10
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Hstack extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Row extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Sortby extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Take extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Vstack extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
3
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
4
|
import { BaseFunction } from '../../base-function';
|
|
4
5
|
export declare class Aggregate extends BaseFunction {
|
|
@@ -7,7 +8,7 @@ export declare class Aggregate extends BaseFunction {
|
|
|
7
8
|
needsReferenceObject: boolean;
|
|
8
9
|
needsFilteredOutRows: boolean;
|
|
9
10
|
needsFormulaDataModel: boolean;
|
|
10
|
-
calculate(functionNum: FunctionVariantType, options: FunctionVariantType, ...refs: FunctionVariantType[]): BaseValueObject;
|
|
11
|
+
calculate(functionNum: FunctionVariantType, options: FunctionVariantType, ...refs: FunctionVariantType[]): BaseValueObject | ArrayValueObject;
|
|
11
12
|
private _handleSingleObject;
|
|
12
13
|
private _getAggregateOptions;
|
|
13
14
|
private _handleLargeSmallPercentileQuartile;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FUNCTION_NAMES_MATH } from './function-names';
|
|
2
2
|
import { Product } from './product';
|
|
3
3
|
import { Randarray } from './randarray';
|
|
4
|
-
import { Subtotal } from './subtotal';
|
|
5
4
|
import { Sumifs } from './sumifs';
|
|
6
|
-
export declare const functionMath: ((FUNCTION_NAMES_MATH | typeof Product)[] | (FUNCTION_NAMES_MATH | typeof Randarray)[] | (FUNCTION_NAMES_MATH | typeof
|
|
5
|
+
export declare const functionMath: ((FUNCTION_NAMES_MATH | typeof Product)[] | (FUNCTION_NAMES_MATH | typeof Randarray)[] | (FUNCTION_NAMES_MATH | typeof Sumifs)[])[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Int extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Mod extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Quotient extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Seriessum extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Sign extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
2
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
4
3
|
import { BaseFunction } from '../../base-function';
|
|
5
4
|
export declare class Sumifs extends BaseFunction {
|
|
6
5
|
minParams: number;
|
|
7
6
|
maxParams: number;
|
|
8
7
|
needsReferenceObject: boolean;
|
|
9
|
-
calculate(sumRange: FunctionVariantType, ...variants: FunctionVariantType[]): BaseValueObject | ArrayValueObject;
|
|
10
|
-
private _aggregateResults;
|
|
8
|
+
calculate(sumRange: FunctionVariantType, ...variants: FunctionVariantType[]): import('../../..').BaseValueObject | ArrayValueObject;
|
|
11
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { compareToken } from '../../../basics/token';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { compareToken } from '../../../basics/token';
|
|
3
3
|
import { BaseFunction } from '../../base-function';
|
|
4
4
|
export declare class Compare extends BaseFunction {
|
|
5
5
|
minParams: number;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
2
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
4
|
-
import { NumberValueObject } from '../../../engine/value-object/primitive-object';
|
|
5
3
|
import { BaseFunction } from '../../base-function';
|
|
6
4
|
export declare class Countifs extends BaseFunction {
|
|
7
5
|
minParams: number;
|
|
8
6
|
maxParams: number;
|
|
9
7
|
needsReferenceObject: boolean;
|
|
10
8
|
calculate(...variants: FunctionVariantType[]): BaseValueObject;
|
|
11
|
-
private _aggregateResults;
|
|
12
9
|
}
|
|
13
|
-
export declare function countTrueValue(array: ArrayValueObject): NumberValueObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Devsq extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Fisher extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
export declare class Fisherinv extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -41,8 +41,8 @@ export { type ISetImageFormulaDataMutationParams, SetImageFormulaDataMutation }
|
|
|
41
41
|
export { type IRemoveOtherFormulaMutationParams, type ISetOtherFormulaMutationParams, RemoveOtherFormulaMutation, SetOtherFormulaMutation } from './commands/mutations/set-other-formula.mutation';
|
|
42
42
|
export { RemoveSuperTableMutation, SetSuperTableMutation, SetSuperTableOptionMutation } from './commands/mutations/set-super-table.mutation';
|
|
43
43
|
export type { ISetSuperTableMutationParam, ISetSuperTableMutationSearchParam } from './commands/mutations/set-super-table.mutation';
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
44
|
+
export { ENGINE_FORMULA_CYCLE_REFERENCE_COUNT, ENGINE_FORMULA_PLUGIN_CONFIG_KEY, ENGINE_FORMULA_RETURN_DEPENDENCY_TREE, type IUniverEngineFormulaConfig } from './config/config';
|
|
45
|
+
export { CalculateController } from './controllers/calculate.controller';
|
|
46
46
|
export { Lexer } from './engine/analysis/lexer';
|
|
47
47
|
export { LexerNode } from './engine/analysis/lexer-node';
|
|
48
48
|
export { LexerTreeBuilder } from './engine/analysis/lexer-tree-builder';
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { IUniverEngineFormulaConfig } from './
|
|
1
|
+
import { IUniverEngineFormulaConfig } from './config/config';
|
|
2
2
|
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
3
3
|
export declare class UniverFormulaEnginePlugin extends Plugin {
|
|
4
4
|
protected readonly _config: Partial<IUniverEngineFormulaConfig>;
|
|
5
5
|
protected _injector: Injector;
|
|
6
6
|
protected readonly _configService: IConfigService;
|
|
7
7
|
static pluginName: string;
|
|
8
|
+
static packageName: string;
|
|
9
|
+
static version: string;
|
|
8
10
|
constructor(_config: Partial<IUniverEngineFormulaConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
9
11
|
onStarting(): void;
|
|
10
12
|
onReady(): void;
|