@univerjs/engine-formula 0.1.9 → 0.1.11
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 +7758 -7333
- package/lib/types/basics/function.d.ts +16 -16
- package/lib/types/commands/mutations/set-array-formula-data.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-feature-calculation.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +2 -2
- package/lib/types/commands/mutations/set-formula-data.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-other-formula.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-super-table.mutation.d.ts +2 -2
- package/lib/types/controller/calculate.controller.d.ts +2 -2
- package/lib/types/controller/formula.controller.d.ts +4 -4
- package/lib/types/controller/register-function.controller.d.ts +2 -2
- package/lib/types/controller/set-defined-name.controller.d.ts +1 -1
- package/lib/types/controller/set-dependency.controller.d.ts +1 -1
- package/lib/types/controller/set-feature-calculation.controller.d.ts +1 -1
- package/lib/types/controller/set-other-formula.controller.d.ts +2 -2
- package/lib/types/controller/set-super-table.controller.d.ts +1 -1
- package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +2 -2
- package/lib/types/engine/analysis/lexer-node.d.ts +1 -1
- package/lib/types/engine/analysis/lexer-tree-builder.d.ts +4 -4
- package/lib/types/engine/analysis/lexer.d.ts +4 -4
- package/lib/types/engine/analysis/parser.d.ts +13 -13
- package/lib/types/engine/ast-node/ast-root-node.d.ts +3 -3
- package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +4 -4
- package/lib/types/engine/ast-node/base-ast-node.d.ts +5 -5
- package/lib/types/engine/ast-node/function-node.d.ts +10 -10
- package/lib/types/engine/ast-node/lambda-node.d.ts +5 -5
- package/lib/types/engine/ast-node/lambda-parameter-node.d.ts +3 -3
- package/lib/types/engine/ast-node/null-node.d.ts +1 -1
- package/lib/types/engine/ast-node/operator-node.d.ts +5 -5
- package/lib/types/engine/ast-node/prefix-node.d.ts +7 -7
- package/lib/types/engine/ast-node/reference-node.d.ts +8 -8
- package/lib/types/engine/ast-node/suffix-node.d.ts +6 -6
- package/lib/types/engine/ast-node/union-node.d.ts +4 -4
- package/lib/types/engine/ast-node/value-node.d.ts +3 -3
- package/lib/types/engine/dependency/dependency-tree.d.ts +2 -2
- package/lib/types/engine/dependency/formula-dependency.d.ts +10 -12
- package/lib/types/engine/interpreter/interpreter.d.ts +4 -5
- package/lib/types/engine/reference-object/base-reference-object.d.ts +6 -6
- package/lib/types/engine/reference-object/cell-reference-object.d.ts +3 -3
- package/lib/types/engine/reference-object/column-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/range-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/row-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/table-reference-object.d.ts +1 -1
- package/lib/types/engine/utils/array-object.d.ts +1 -1
- package/lib/types/engine/utils/ast-node-tool.d.ts +1 -1
- package/lib/types/engine/utils/node-type.d.ts +3 -3
- package/lib/types/engine/utils/numfmt-kit.d.ts +63 -0
- package/lib/types/engine/utils/object-compare.d.ts +1 -1
- package/lib/types/engine/utils/prefixHandler.d.ts +3 -3
- package/lib/types/engine/utils/value-object.d.ts +3 -3
- package/lib/types/engine/value-object/array-value-object.d.ts +4 -4
- package/lib/types/engine/value-object/base-value-object.d.ts +5 -5
- package/lib/types/engine/value-object/cube-value-object.d.ts +2 -2
- package/lib/types/engine/value-object/lambda-value-object.d.ts +3 -3
- package/lib/types/engine/value-object/primitive-object.d.ts +3 -3
- package/lib/types/functions/__tests__/create-function-test-bed.d.ts +3 -3
- package/lib/types/functions/base-function.d.ts +15 -7
- package/lib/types/functions/compatibility/function-map.d.ts +1 -1
- package/lib/types/functions/date/date/index.d.ts +3 -1
- package/lib/types/functions/date/day/index.d.ts +3 -1
- package/lib/types/functions/date/edate/index.d.ts +3 -1
- package/lib/types/functions/date/function-map.d.ts +1 -1
- package/lib/types/functions/date/month/index.d.ts +3 -1
- package/lib/types/functions/date/today/index.d.ts +5 -3
- package/lib/types/functions/date/year/index.d.ts +3 -1
- package/lib/types/functions/information/function-map.d.ts +1 -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/iseven/iseven.d.ts +4 -2
- 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/isodd/__tests__/isodd.spec.d.ts +16 -0
- package/lib/types/functions/information/isodd/isodd.d.ts +4 -2
- package/lib/types/functions/information/isref/index.d.ts +5 -3
- package/lib/types/functions/information/istext/index.d.ts +3 -1
- package/lib/types/functions/logical/and/index.d.ts +3 -1
- package/lib/types/functions/logical/function-map.d.ts +3 -3
- package/lib/types/functions/logical/if/index.d.ts +3 -1
- package/lib/types/functions/logical/iferror/index.d.ts +4 -2
- package/lib/types/functions/logical/lambda/index.d.ts +3 -1
- package/lib/types/functions/logical/makearray/index.d.ts +4 -2
- package/lib/types/functions/logical/or/index.d.ts +3 -1
- package/lib/types/functions/lookup/address/index.d.ts +3 -1
- package/lib/types/functions/lookup/column/index.d.ts +4 -2
- package/lib/types/functions/lookup/columns/index.d.ts +4 -2
- package/lib/types/functions/lookup/function-map.d.ts +10 -10
- package/lib/types/functions/lookup/hlookup/index.d.ts +3 -1
- package/lib/types/functions/lookup/index/index.d.ts +6 -2
- package/lib/types/functions/lookup/indirect/index.d.ts +4 -2
- package/lib/types/functions/lookup/lookup/index.d.ts +4 -2
- package/lib/types/functions/lookup/match/index.d.ts +4 -2
- package/lib/types/functions/lookup/offset/index.d.ts +3 -1
- package/lib/types/functions/lookup/row/index.d.ts +4 -2
- package/lib/types/functions/lookup/rows/index.d.ts +4 -2
- package/lib/types/functions/lookup/vlookup/index.d.ts +4 -2
- package/lib/types/functions/lookup/xlookup/index.d.ts +4 -2
- package/lib/types/functions/lookup/xmatch/index.d.ts +4 -2
- package/lib/types/functions/math/abs/index.d.ts +3 -1
- package/lib/types/functions/math/acos/index.d.ts +3 -1
- package/lib/types/functions/math/acosh/index.d.ts +3 -1
- package/lib/types/functions/math/acot/index.d.ts +3 -1
- package/lib/types/functions/math/function-map.d.ts +3 -3
- package/lib/types/functions/math/mod/index.d.ts +3 -1
- package/lib/types/functions/math/power/index.d.ts +3 -1
- package/lib/types/functions/math/product/index.d.ts +3 -1
- package/lib/types/functions/math/subtotal/index.d.ts +4 -2
- package/lib/types/functions/math/sum/index.d.ts +3 -1
- package/lib/types/functions/math/sumif/index.d.ts +3 -1
- package/lib/types/functions/math/sumifs/index.d.ts +4 -2
- package/lib/types/functions/meta/compare/index.d.ts +4 -2
- package/lib/types/functions/meta/cube/index.d.ts +3 -1
- package/lib/types/functions/meta/divided/index.d.ts +3 -1
- package/lib/types/functions/meta/function-map.d.ts +1 -1
- package/lib/types/functions/meta/minus/index.d.ts +3 -1
- package/lib/types/functions/meta/multiply/index.d.ts +3 -1
- package/lib/types/functions/meta/plus/index.d.ts +3 -1
- package/lib/types/functions/statistical/average/index.d.ts +3 -1
- package/lib/types/functions/statistical/count/index.d.ts +3 -1
- package/lib/types/functions/statistical/counta/index.d.ts +3 -1
- package/lib/types/functions/statistical/function-map.d.ts +1 -1
- package/lib/types/functions/statistical/max/index.d.ts +3 -1
- package/lib/types/functions/statistical/maxifs/index.d.ts +4 -2
- package/lib/types/functions/statistical/min/index.d.ts +3 -1
- package/lib/types/functions/statistical/stdev-p/index.d.ts +3 -1
- package/lib/types/functions/statistical/stdev-s/index.d.ts +3 -1
- package/lib/types/functions/statistical/stdeva/index.d.ts +3 -1
- package/lib/types/functions/statistical/stdevpa/index.d.ts +3 -1
- package/lib/types/functions/statistical/var-p/index.d.ts +3 -1
- package/lib/types/functions/statistical/var-s/index.d.ts +3 -1
- package/lib/types/functions/statistical/vara/index.d.ts +3 -1
- package/lib/types/functions/statistical/varpa/index.d.ts +3 -1
- package/lib/types/functions/text/concatenate/index.d.ts +3 -1
- package/lib/types/functions/text/function-map.d.ts +1 -1
- package/lib/types/functions/text/len/index.d.ts +3 -1
- package/lib/types/functions/text/lenb/index.d.ts +3 -1
- package/lib/types/functions/text/lower/index.d.ts +3 -1
- package/lib/types/functions/text/text/index.d.ts +3 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/models/__tests__/create-command-test-bed.d.ts +1 -1
- package/lib/types/models/formula-data.model.d.ts +9 -8
- package/lib/types/models/utils/formula-data-util.d.ts +1 -1
- package/lib/types/plugin.d.ts +3 -3
- package/lib/types/services/active-dirty-manager.service.d.ts +1 -1
- package/lib/types/services/calculate-formula.service.d.ts +8 -9
- package/lib/types/services/current-data.service.d.ts +1 -1
- package/lib/types/services/defined-names.service.d.ts +1 -1
- package/lib/types/services/dependency-manager.service.d.ts +1 -1
- package/lib/types/services/feature-calculation-manager.service.d.ts +2 -2
- package/lib/types/services/function.service.d.ts +5 -4
- package/lib/types/services/other-formula-manager.service.d.ts +1 -1
- package/lib/types/services/runtime.service.d.ts +4 -4
- package/lib/types/services/super-table.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
- /package/lib/types/{functions/information/iseven/iseven.spec.d.ts → engine/utils/__tests__/numfmt-kit.spec.d.ts} +0 -0
- /package/lib/types/functions/information/{isodd/isodd.spec.d.ts → iseven/__tests__/iseven.spec.d.ts} +0 -0
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The result of the INDEX function is a reference and is interpreted as such by other formulas. Depending on the formula, the return value of INDEX may be used as a reference or as a value.
|
|
6
6
|
*
|
|
7
7
|
* =INDEX(A2:A5,2,1):A1 same as =A1:A3
|
|
8
8
|
*
|
|
9
|
+
* We refer to Google Sheets and set both rowNum and columnNum to optional
|
|
10
|
+
*
|
|
9
11
|
*/
|
|
10
12
|
export declare class Index extends BaseFunction {
|
|
13
|
+
minParams: number;
|
|
14
|
+
maxParams: number;
|
|
11
15
|
needsReferenceObject: boolean;
|
|
12
|
-
calculate(reference: FunctionVariantType, rowNum
|
|
16
|
+
calculate(reference: FunctionVariantType, rowNum?: FunctionVariantType, columnNum?: FunctionVariantType, areaNum?: FunctionVariantType): FunctionVariantType;
|
|
13
17
|
private _calculateSingleCell;
|
|
14
18
|
private _getNumberValue;
|
|
15
19
|
private _getAreaNumberValue;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { BaseReferenceObject } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Indirect extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
isAddress(): boolean;
|
|
7
9
|
calculate(refText: BaseValueObject, a1?: BaseValueObject): BaseValueObject | BaseReferenceObject;
|
|
8
10
|
private _setDefault;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
-
import { BaseFunction } from '../../base-function';
|
|
3
1
|
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
4
4
|
|
|
5
5
|
export declare class Lookup extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
needsExpandParams: boolean;
|
|
7
9
|
calculate(lookupValue: BaseValueObject, lookupVectorOrArray: ArrayValueObject, resultVector?: BaseValueObject): BaseValueObject;
|
|
8
10
|
private _handleVector;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Match extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(lookupValue: BaseValueObject, lookupArray: ArrayValueObject, matchType?: BaseValueObject): BaseValueObject;
|
|
7
9
|
private _handleSingleObject;
|
|
8
10
|
private _getSearchModeValue;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
3
|
|
|
4
4
|
export declare class Offset extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
needsReferenceObject: boolean;
|
|
6
8
|
calculate(reference: FunctionVariantType, rows: FunctionVariantType, columns: FunctionVariantType, height?: FunctionVariantType, width?: FunctionVariantType): FunctionVariantType;
|
|
7
9
|
private _handleSingleObject;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Row extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(reference?: BaseValueObject): BaseValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Rows extends BaseFunction {
|
|
5
|
-
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
7
|
+
calculate(reference: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Vlookup extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(lookupValue: BaseValueObject, tableArray: BaseValueObject, colIndexNum: BaseValueObject, rangeLookup?: BaseValueObject): BaseValueObject | ArrayValueObject;
|
|
7
9
|
private _handleTableArray;
|
|
8
10
|
private _handleSingleObject;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Xlookup extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(lookupValue: BaseValueObject, lookupArray: ArrayValueObject, returnArray: ArrayValueObject, ifNotFound?: BaseValueObject, matchMode?: BaseValueObject, searchMode?: BaseValueObject): BaseValueObject | ArrayValueObject;
|
|
7
9
|
private _handleExpandObject;
|
|
8
10
|
private _handleSingleObject;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Xmatch extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(lookupValue: BaseValueObject, lookupArray: ArrayValueObject, matchMode?: BaseValueObject, searchMode?: BaseValueObject): BaseValueObject;
|
|
7
9
|
private _handleSingleObject;
|
|
8
10
|
private _getSearchModeValue;
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Abs extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Acos extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Acosh extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Acot extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Sumifs } from './sumifs';
|
|
2
|
-
import { Sum } from './sum';
|
|
3
|
-
import { Subtotal } from './subtotal';
|
|
4
1
|
import { FUNCTION_NAMES_MATH } from './function-names';
|
|
2
|
+
import { Subtotal } from './subtotal';
|
|
3
|
+
import { Sum } from './sum';
|
|
4
|
+
import { Sumifs } from './sumifs';
|
|
5
5
|
|
|
6
6
|
export declare const functionMath: ((FUNCTION_NAMES_MATH | typeof Subtotal)[] | (FUNCTION_NAMES_MATH | typeof Sum)[] | (FUNCTION_NAMES_MATH | typeof Sumifs)[])[];
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Mod extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(number: BaseValueObject, divisor: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Power extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(number: BaseValueObject, power: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Product extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
private _multiplyArray;
|
|
7
9
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
-
import { BaseFunction } from '../../base-function';
|
|
3
1
|
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
4
4
|
|
|
5
5
|
export declare class Subtotal extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
needsReferenceObject: boolean;
|
|
7
9
|
calculate(functionNum: FunctionVariantType, ...refs: FunctionVariantType[]): ArrayValueObject | FunctionVariantType;
|
|
8
10
|
private _handleSingleObject;
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Sum extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Sumif extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(range: BaseValueObject, criteria: BaseValueObject, sumRange?: BaseValueObject): BaseValueObject;
|
|
6
8
|
private _handleSingleObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Sumifs extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(sumRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { compareToken } from '../../../basics/token';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Compare extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
private _compareType;
|
|
7
9
|
setCompareType(token: compareToken): void;
|
|
8
10
|
calculate(variant1: BaseValueObject, variant2: BaseValueObject): BaseValueObject;
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Cube extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Divided extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant1: BaseValueObject, variant2: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Minus extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant1: BaseValueObject, variant2: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Multiply extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant1: BaseValueObject, variant2: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Plus extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(variant1: BaseValueObject, variant2: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Average extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Count extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Counta extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Max extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
private _validator;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { BaseFunction } from '../../base-function';
|
|
2
|
-
import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
1
|
import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
|
|
2
|
+
import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
4
|
|
|
5
5
|
export declare class Maxifs extends BaseFunction {
|
|
6
|
+
minParams: number;
|
|
7
|
+
maxParams: number;
|
|
6
8
|
calculate(maxRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Min extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
private _validator;
|
|
7
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class StdevP extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class StdevS extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Stdeva extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Stdevpa extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class VarP extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class VarS extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Vara extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Varpa extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...variants: BaseValueObject[]): BaseValueObject | import('../../..').ArrayValueObject;
|
|
6
8
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Concatenate extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(...textValues: BaseValueObject[]): BaseValueObject;
|
|
6
8
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Len extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(text: BaseValueObject): BaseValueObject;
|
|
6
8
|
private _handleSingleText;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Lenb extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(text: BaseValueObject): BaseValueObject;
|
|
6
8
|
private _handleSingleText;
|
|
7
9
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
|
|
4
4
|
export declare class Lower extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(text: BaseValueObject): BaseValueObject;
|
|
6
8
|
private _handleSingleText;
|
|
7
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
|
|
4
4
|
export declare class Text extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
5
7
|
calculate(text: BaseValueObject, formatText: BaseValueObject): BaseValueObject;
|
|
6
8
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -94,3 +94,4 @@ export { IFormulaRuntimeService, FormulaRuntimeService } from './services/runtim
|
|
|
94
94
|
export { IFormulaCurrentConfigService, FormulaCurrentConfigService } from './services/current-data.service';
|
|
95
95
|
export { IActiveDirtyManagerService } from './services/active-dirty-manager.service';
|
|
96
96
|
export type { IRangeChange } from './models/formula-data.model';
|
|
97
|
+
export { handleNumfmtInCell } from './engine/utils/numfmt-kit';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dependency } from '@wendellhu/redi';
|
|
2
1
|
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
+
import { Dependency } from '@wendellhu/redi';
|
|
3
3
|
|
|
4
4
|
export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
5
5
|
univer: Univer;
|