@univerjs/engine-formula 0.1.0-alpha.3 → 0.1.0-beta.1
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 +2632 -2451
- package/lib/types/basics/object-class-type.d.ts +1 -0
- package/lib/types/engine/ast-node/base-ast-node.d.ts +1 -0
- package/lib/types/engine/ast-node/lambda-node.d.ts +11 -3
- package/lib/types/engine/ast-node/union-node.d.ts +2 -3
- package/lib/types/engine/reference-object/base-reference-object.d.ts +9 -3
- package/lib/types/engine/value-object/array-value-object.d.ts +1 -0
- package/lib/types/engine/value-object/base-value-object.d.ts +1 -0
- package/lib/types/engine/value-object/lambda-value-object.d.ts +30 -0
- package/lib/types/functions/array/function-map.d.ts +3 -1
- package/lib/types/functions/array/function-names.d.ts +1 -0
- package/lib/types/functions/array/makearray/index.d.ts +22 -0
- package/lib/types/functions/base-function.d.ts +2 -1
- package/lib/types/functions/compatibility/function-map.d.ts +1 -1
- package/lib/types/functions/lookup/function-map.d.ts +1 -1
- package/lib/types/functions/{statistical/count/count.d.ts → math/abs/index.d.ts} +2 -2
- package/lib/types/functions/{statistical/counta/counta.d.ts → math/acos/index.d.ts} +2 -2
- package/lib/types/functions/math/acosh/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/{statistical/min/min.d.ts → math/acosh/index.d.ts} +2 -3
- package/lib/types/functions/math/acot/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/acot/index.d.ts +21 -0
- package/lib/types/functions/math/function-map.d.ts +1 -1
- package/lib/types/functions/math/function-names.d.ts +4 -0
- package/lib/types/functions/math/sum/{sum.d.ts → index.d.ts} +2 -2
- package/lib/types/functions/math/sumif/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/sumifs/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/meta/function-map.d.ts +2 -3
- package/lib/types/functions/statistical/average/{average.d.ts → index.d.ts} +2 -2
- package/lib/types/functions/statistical/count/index.d.ts +20 -0
- package/lib/types/functions/statistical/counta/index.d.ts +20 -0
- package/lib/types/functions/statistical/function-map.d.ts +1 -1
- package/lib/types/functions/statistical/max/{max.d.ts → index.d.ts} +2 -2
- package/lib/types/functions/statistical/min/index.d.ts +21 -0
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
- package/lib/types/functions/meta/union/union.d.ts +0 -23
- /package/lib/types/functions/compatibility/concatenate/{concatenate.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/lookup/indirect/{indirect.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/lookup/offset/{offset.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/math/{sumif/__tests__/sumif.spec.d.ts → abs/__tests__/index.spec.d.ts} +0 -0
- /package/lib/types/functions/math/{sumifs/__tests__/sumifs.spec.d.ts → acos/__tests__/index.spec.d.ts} +0 -0
- /package/lib/types/functions/math/power/{power.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/math/sumif/{sumif.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/math/sumifs/{sumifs.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/meta/compare/{compare.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/meta/divided/{divided.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/meta/minus/{minus.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/meta/multiply/{multiply.d.ts → index.d.ts} +0 -0
- /package/lib/types/functions/meta/plus/{plus.d.ts → index.d.ts} +0 -0
|
@@ -17,6 +17,7 @@ import { Disposable } from '@univerjs/core';
|
|
|
17
17
|
export declare class ObjectClassType extends Disposable {
|
|
18
18
|
isError(): boolean;
|
|
19
19
|
isAsyncObject(): boolean;
|
|
20
|
+
isAsyncArrayObject(): boolean;
|
|
20
21
|
isReferenceObject(): boolean;
|
|
21
22
|
isValueObject(): boolean;
|
|
22
23
|
isEqualType(object: ObjectClassType): boolean;
|
|
@@ -13,23 +13,31 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { AstNodePromiseType } from '../../basics/common';
|
|
16
17
|
import { IFormulaRuntimeService } from '../../services/runtime.service';
|
|
17
18
|
import { LexerNode } from '../analysis/lexer-node';
|
|
19
|
+
import { Interpreter } from '../interpreter/interpreter';
|
|
18
20
|
import { BaseAstNode } from './base-ast-node';
|
|
19
21
|
import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
20
22
|
import { NodeType } from './node-type';
|
|
21
|
-
export declare const LAMBDA_TOKEN: string;
|
|
22
23
|
export declare class LambdaNode extends BaseAstNode {
|
|
23
24
|
private _lambdaId;
|
|
24
|
-
|
|
25
|
+
private _interpreter;
|
|
26
|
+
private _lambdaPrivacyVarKeys;
|
|
27
|
+
private _isNotEmpty;
|
|
28
|
+
constructor(token: string, _lambdaId: string, _interpreter: Interpreter, _lambdaPrivacyVarKeys: string[]);
|
|
25
29
|
get nodeType(): NodeType;
|
|
30
|
+
setNotEmpty(state?: boolean): void;
|
|
31
|
+
isEmptyParamFunction(): boolean;
|
|
26
32
|
isFunctionParameter(): boolean;
|
|
27
33
|
getLambdaId(): string;
|
|
28
34
|
execute(): void;
|
|
35
|
+
executeAsync(): Promise<AstNodePromiseType>;
|
|
29
36
|
}
|
|
30
37
|
export declare class LambdaNodeFactory extends BaseAstNodeFactory {
|
|
31
38
|
private readonly _runtimeService;
|
|
32
|
-
|
|
39
|
+
private readonly _interpreter;
|
|
40
|
+
constructor(_runtimeService: IFormulaRuntimeService, _interpreter: Interpreter);
|
|
33
41
|
get zIndex(): number;
|
|
34
42
|
create(param: LexerNode): BaseAstNode;
|
|
35
43
|
checkAndCreateNodeType(param: LexerNode | string): BaseAstNode | undefined;
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { BaseFunction } from '../../functions/base-function';
|
|
17
16
|
import { IFunctionService } from '../../services/function.service';
|
|
18
17
|
import { LexerNode } from '../analysis/lexer-node';
|
|
19
18
|
import { BaseAstNode } from './base-ast-node';
|
|
@@ -21,10 +20,10 @@ import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
|
21
20
|
import { NodeType } from './node-type';
|
|
22
21
|
export declare class UnionNode extends BaseAstNode {
|
|
23
22
|
private _operatorString;
|
|
24
|
-
|
|
25
|
-
constructor(_operatorString: string, _functionExecutor: BaseFunction);
|
|
23
|
+
constructor(_operatorString: string);
|
|
26
24
|
get nodeType(): NodeType;
|
|
27
25
|
execute(): void;
|
|
26
|
+
private _unionFunction;
|
|
28
27
|
}
|
|
29
28
|
export declare class UnionNodeFactory extends BaseAstNodeFactory {
|
|
30
29
|
private readonly _functionService;
|
|
@@ -20,7 +20,7 @@ import { ObjectClassType } from '../../basics/object-class-type';
|
|
|
20
20
|
import { ArrayValueObject } from '../value-object/array-value-object';
|
|
21
21
|
import { type BaseValueObject, ErrorValueObject } from '../value-object/base-value-object';
|
|
22
22
|
import { BooleanValueObject, NumberValueObject, StringValueObject } from '../value-object/primitive-object';
|
|
23
|
-
export type NodeValueType = BaseValueObject | BaseReferenceObject | AsyncObject;
|
|
23
|
+
export type NodeValueType = BaseValueObject | BaseReferenceObject | AsyncObject | AsyncArrayObject;
|
|
24
24
|
export type FunctionVariantType = BaseValueObject | BaseReferenceObject;
|
|
25
25
|
export declare const FORMULA_REF_TO_ARRAY_CACHE: FormulaAstLRU<ArrayValueObject>;
|
|
26
26
|
export declare class BaseReferenceObject extends ObjectClassType {
|
|
@@ -114,7 +114,13 @@ export declare class BaseReferenceObject extends ObjectClassType {
|
|
|
114
114
|
}
|
|
115
115
|
export declare class AsyncObject extends ObjectClassType {
|
|
116
116
|
private _promise;
|
|
117
|
-
constructor(_promise: Promise<
|
|
117
|
+
constructor(_promise: Promise<BaseValueObject>);
|
|
118
118
|
isAsyncObject(): boolean;
|
|
119
|
-
getValue(): Promise<
|
|
119
|
+
getValue(): Promise<BaseValueObject>;
|
|
120
|
+
}
|
|
121
|
+
export declare class AsyncArrayObject extends ObjectClassType {
|
|
122
|
+
private _promiseList;
|
|
123
|
+
constructor(_promiseList: Array<Array<BaseValueObject | AsyncObject>>);
|
|
124
|
+
isAsyncArrayObject(): boolean;
|
|
125
|
+
getValue(): Promise<ArrayValueObject>;
|
|
120
126
|
}
|
|
@@ -121,6 +121,7 @@ export declare class ArrayValueObject extends BaseValueObject {
|
|
|
121
121
|
mean(): BaseValueObject;
|
|
122
122
|
median(): BaseValueObject;
|
|
123
123
|
var(): BaseValueObject;
|
|
124
|
+
std(): BaseValueObject;
|
|
124
125
|
log(): BaseValueObject;
|
|
125
126
|
log10(): BaseValueObject;
|
|
126
127
|
exp(): BaseValueObject;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { BaseAstNode } from '../ast-node/base-ast-node';
|
|
17
|
+
import type { Interpreter } from '../interpreter/interpreter';
|
|
18
|
+
import { AsyncObject } from '../reference-object/base-reference-object';
|
|
19
|
+
import { BaseValueObject } from './base-value-object';
|
|
20
|
+
export declare class LambdaValueObjectObject extends BaseValueObject {
|
|
21
|
+
private _lambdaNode;
|
|
22
|
+
private _interpreter;
|
|
23
|
+
private _lambdaPrivacyVarKeys;
|
|
24
|
+
private _lambdaPrivacyValueMap;
|
|
25
|
+
constructor(_lambdaNode: BaseAstNode, _interpreter: Interpreter, _lambdaPrivacyVarKeys: string[]);
|
|
26
|
+
isLambda(): boolean;
|
|
27
|
+
execute(...variants: BaseValueObject[]): BaseValueObject | AsyncObject;
|
|
28
|
+
private _setLambdaNodeValue;
|
|
29
|
+
private _setLambdaPrivacyValueMap;
|
|
30
|
+
}
|
|
@@ -13,4 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
import { FUNCTION_NAMES_ARRAY } from './function-names';
|
|
17
|
+
import { Makearray } from './makearray';
|
|
18
|
+
export declare const functionArray: (FUNCTION_NAMES_ARRAY | typeof Makearray)[][];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { AsyncArrayObject } from '../../../engine/reference-object/base-reference-object';
|
|
17
|
+
import { type BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
|
|
18
|
+
import { BaseFunction } from '../../base-function';
|
|
19
|
+
export declare class Makearray extends BaseFunction {
|
|
20
|
+
calculate(...variants: BaseValueObject[]): ErrorValueObject | AsyncArrayObject;
|
|
21
|
+
isAsync(): boolean;
|
|
22
|
+
}
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
import { Disposable } from '@univerjs/core';
|
|
17
17
|
import type { IFunctionNames } from '..';
|
|
18
18
|
import type { FunctionVariantType, NodeValueType } from '../engine/reference-object/base-reference-object';
|
|
19
|
+
import { type BaseValueObject } from '../engine/value-object/base-value-object';
|
|
19
20
|
export declare class BaseFunction extends Disposable {
|
|
20
21
|
private _name;
|
|
21
22
|
constructor(_name: IFunctionNames);
|
|
22
23
|
get name(): IFunctionNames;
|
|
23
24
|
isAsync(): boolean;
|
|
24
25
|
isAddress(): boolean;
|
|
25
|
-
calculate(...arg:
|
|
26
|
+
calculate(...arg: BaseValueObject[]): NodeValueType;
|
|
26
27
|
checkArrayType(variant: FunctionVariantType): boolean;
|
|
27
28
|
}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Concatenate } from './concatenate
|
|
16
|
+
import { Concatenate } from './concatenate';
|
|
17
17
|
import { FUNCTION_NAMES_COMPATIBILITY } from './function-names';
|
|
18
18
|
export declare const functionCompatibility: (FUNCTION_NAMES_COMPATIBILITY | typeof Concatenate)[][];
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { FUNCTION_NAMES_LOOKUP } from './function-names';
|
|
17
|
-
import { Offset } from './offset
|
|
17
|
+
import { Offset } from './offset';
|
|
18
18
|
export declare const functionLookup: (FUNCTION_NAMES_LOOKUP | typeof Offset)[][];
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
17
17
|
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
18
18
|
import { BaseFunction } from '../../base-function';
|
|
19
|
-
export declare class
|
|
20
|
-
calculate(
|
|
19
|
+
export declare class Abs extends BaseFunction {
|
|
20
|
+
calculate(variant: FunctionVariantType): BaseValueObject;
|
|
21
21
|
}
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
17
17
|
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
18
18
|
import { BaseFunction } from '../../base-function';
|
|
19
|
-
export declare class
|
|
20
|
-
calculate(
|
|
19
|
+
export declare class Acos extends BaseFunction {
|
|
20
|
+
calculate(variant: FunctionVariantType): BaseValueObject;
|
|
21
21
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
17
17
|
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
18
18
|
import { BaseFunction } from '../../base-function';
|
|
19
|
-
export declare class
|
|
20
|
-
calculate(
|
|
21
|
-
private _validator;
|
|
19
|
+
export declare class Acosh extends BaseFunction {
|
|
20
|
+
calculate(variant: FunctionVariantType): BaseValueObject;
|
|
22
21
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { 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 Acot extends BaseFunction {
|
|
20
|
+
calculate(variant: FunctionVariantType): BaseValueObject;
|
|
21
|
+
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
17
|
import { BaseFunction } from '../../base-function';
|
|
18
18
|
export declare class Sum extends BaseFunction {
|
|
19
|
-
calculate(...variants:
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
20
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Divided } from './divided
|
|
16
|
+
import { Divided } from './divided';
|
|
17
17
|
import { FUNCTION_NAMES_META } from './function-names';
|
|
18
|
-
|
|
19
|
-
export declare const functionMeta: ((FUNCTION_NAMES_META | typeof Divided)[] | (FUNCTION_NAMES_META | typeof Union)[])[];
|
|
18
|
+
export declare const functionMeta: (FUNCTION_NAMES_META | typeof Divided)[][];
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
17
|
import { BaseFunction } from '../../base-function';
|
|
18
18
|
export declare class Average extends BaseFunction {
|
|
19
|
-
calculate(...variants:
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
20
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
|
+
import { BaseFunction } from '../../base-function';
|
|
18
|
+
export declare class Count extends BaseFunction {
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
|
+
import { BaseFunction } from '../../base-function';
|
|
18
|
+
export declare class CountA extends BaseFunction {
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
|
+
}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Average } from './average
|
|
16
|
+
import { Average } from './average';
|
|
17
17
|
import { FUNCTION_NAMES_STATISTICAL } from './function-names';
|
|
18
18
|
export declare const functionStatistical: (FUNCTION_NAMES_STATISTICAL | typeof Average)[][];
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
17
|
import { BaseFunction } from '../../base-function';
|
|
18
18
|
export declare class Max extends BaseFunction {
|
|
19
|
-
calculate(...variants:
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
20
|
private _validator;
|
|
21
21
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
17
|
+
import { BaseFunction } from '../../base-function';
|
|
18
|
+
export declare class Min extends BaseFunction {
|
|
19
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
20
|
+
private _validator;
|
|
21
|
+
}
|