@univerjs/engine-formula 0.2.12 → 0.2.14
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 +2 -2
- package/lib/es/index.js +1943 -487
- package/lib/types/basics/__tests__/math.spec.d.ts +16 -0
- package/lib/types/basics/math.d.ts +21 -0
- package/lib/types/controller/set-dependency.controller.d.ts +1 -1
- package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +6 -6
- package/lib/types/engine/dependency/dependency-tree.d.ts +2 -2
- package/lib/types/engine/reference-object/base-reference-object.d.ts +6 -6
- package/lib/types/engine/value-object/array-value-object.d.ts +1 -1
- package/lib/types/engine/value-object/lambda-value-object.d.ts +3 -2
- package/lib/types/functions/__tests__/create-function-test-bed.d.ts +6 -6
- package/lib/types/functions/base-function.d.ts +1 -1
- package/lib/types/functions/logical/bycol/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/logical/bycol/index.d.ts +7 -0
- package/lib/types/functions/logical/byrow/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/logical/byrow/index.d.ts +7 -0
- package/lib/types/functions/logical/function-map.d.ts +1 -1
- package/lib/types/functions/logical/map/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/logical/map/index.d.ts +8 -0
- package/lib/types/functions/logical/reduce/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/logical/reduce/index.d.ts +8 -0
- package/lib/types/functions/logical/scan/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/logical/scan/index.d.ts +8 -0
- package/lib/types/functions/lookup/drop/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/drop/index.d.ts +9 -0
- package/lib/types/functions/lookup/expand/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/expand/index.d.ts +9 -0
- package/lib/types/functions/lookup/function-map.d.ts +1 -1
- package/lib/types/functions/lookup/take/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/take/index.d.ts +9 -0
- package/lib/types/functions/lookup/tocol/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/tocol/index.d.ts +10 -0
- package/lib/types/functions/lookup/torow/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/torow/index.d.ts +10 -0
- package/lib/types/functions/lookup/wrapcols/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/wrapcols/index.d.ts +8 -0
- package/lib/types/functions/lookup/wraprows/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/lookup/wraprows/index.d.ts +8 -0
- package/lib/types/functions/math/combin/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/combin/index.d.ts +7 -0
- package/lib/types/functions/math/combina/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/combina/index.d.ts +7 -0
- package/lib/types/functions/math/fact/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/fact/index.d.ts +8 -0
- package/lib/types/functions/math/factdouble/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/factdouble/index.d.ts +8 -0
- package/lib/types/functions/math/gcd/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/gcd/index.d.ts +8 -0
- package/lib/types/functions/math/int/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/int/index.d.ts +8 -0
- package/lib/types/functions/math/lcm/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/lcm/index.d.ts +8 -0
- package/lib/types/functions/math/mdeterm/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/mdeterm/index.d.ts +7 -0
- package/lib/types/functions/math/minverse/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/minverse/index.d.ts +7 -0
- package/lib/types/functions/math/mmult/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/mmult/index.d.ts +9 -0
- package/lib/types/functions/math/mod/index.d.ts +1 -1
- package/lib/types/functions/math/multinomial/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/multinomial/index.d.ts +8 -0
- package/lib/types/functions/math/munit/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/munit/index.d.ts +8 -0
- package/lib/types/functions/math/quotient/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/quotient/index.d.ts +7 -0
- package/lib/types/functions/math/sequence/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/sequence/index.d.ts +8 -0
- package/lib/types/functions/math/seriessum/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/seriessum/index.d.ts +8 -0
- package/lib/types/functions/math/sign/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/sign/index.d.ts +8 -0
- package/lib/types/models/__tests__/create-command-test-bed.d.ts +6 -6
- package/lib/types/models/formula-data.model.d.ts +3 -2
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/active-dirty-manager.service.d.ts +1 -1
- 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 +4 -4
- package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
- package/lib/types/services/function.service.d.ts +1 -1
- package/lib/types/services/other-formula-manager.service.d.ts +1 -1
- package/lib/types/services/runtime.service.d.ts +1 -1
- package/lib/types/services/super-table.service.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +9 -9
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Factdouble extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(number: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Gcd extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Int extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(number: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Lcm extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,7 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Mdeterm extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(array: BaseValueObject): BaseValueObject;
|
|
7
|
+
}
|
|
@@ -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,7 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Minverse extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(array: BaseValueObject): BaseValueObject;
|
|
7
|
+
}
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Mmult extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(array1: BaseValueObject, array2: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _getMatrix;
|
|
8
|
+
private _getResult;
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
1
|
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
3
|
export declare class Mod extends BaseFunction {
|
|
4
4
|
minParams: number;
|
|
5
5
|
maxParams: number;
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Multinomial extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(...variants: BaseValueObject[]): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Munit extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(dimension: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,7 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Quotient extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(numerator: BaseValueObject, denominator: BaseValueObject): BaseValueObject;
|
|
7
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Sequence extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(rows: BaseValueObject, columns?: BaseValueObject, start?: BaseValueObject, step?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _getResult;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Seriessum extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(x: BaseValueObject, n: BaseValueObject, m: BaseValueObject, coefficients: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -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,8 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Sign extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(number: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -2,12 +2,12 @@ import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
|
2
2
|
export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
3
3
|
univer: Univer;
|
|
4
4
|
get: {
|
|
5
|
-
<T>(id: import('@
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
5
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
6
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
8
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
9
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
10
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
11
11
|
};
|
|
12
12
|
sheet: import('@univerjs/core').Workbook;
|
|
13
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IArrayFormulaRangeType, IArrayFormulaUnitCellType, IFormulaData, IFormulaDataItem, IRuntimeUnitDataType, IUnitData, IUnitSheetNameMap } from '../basics/common';
|
|
1
|
+
import { Disposable, IUniverInstanceService, ObjectMatrix, ICellData, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
3
2
|
import { LexerTreeBuilder } from '../engine/analysis/lexer-tree-builder';
|
|
3
|
+
import { IArrayFormulaRangeType, IArrayFormulaUnitCellType, IFormulaData, IFormulaDataItem, IRuntimeUnitDataType, IUnitData, IUnitSheetNameMap } from '../basics/common';
|
|
4
4
|
import { IFormulaIdMap } from './utils/formula-data-util';
|
|
5
5
|
export interface IRangeChange {
|
|
6
6
|
oldCell: IRange;
|
|
@@ -13,6 +13,7 @@ export declare class FormulaDataModel extends Disposable {
|
|
|
13
13
|
private _arrayFormulaRange;
|
|
14
14
|
private _arrayFormulaCellData;
|
|
15
15
|
constructor(_univerInstanceService: IUniverInstanceService, _lexerTreeBuilder: LexerTreeBuilder);
|
|
16
|
+
dispose(): void;
|
|
16
17
|
clearPreviousArrayFormulaCellData(clearArrayFormulaCellData: IRuntimeUnitDataType): void;
|
|
17
18
|
mergeArrayFormulaCellData(unitData: IRuntimeUnitDataType): void;
|
|
18
19
|
getFormulaData(): IFormulaData;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class UniverFormulaEnginePlugin extends Plugin {
|
|
|
5
5
|
protected _injector: Injector;
|
|
6
6
|
private readonly _configService;
|
|
7
7
|
static pluginName: string;
|
|
8
|
-
constructor(_config: Partial<IUniverEngineFormulaConfig
|
|
8
|
+
constructor(_config: Partial<IUniverEngineFormulaConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
9
9
|
onStarting(): void;
|
|
10
10
|
private _initialize;
|
|
11
11
|
}
|
|
@@ -31,4 +31,4 @@ export declare class ActiveDirtyManagerService extends Disposable implements IAc
|
|
|
31
31
|
register(commandId: string, dirtyConversion: IDirtyConversionManagerParams): void;
|
|
32
32
|
getDirtyConversionMap(): Map<string, IDirtyConversionManagerParams>;
|
|
33
33
|
}
|
|
34
|
-
export declare const IActiveDirtyManagerService: import('@
|
|
34
|
+
export declare const IActiveDirtyManagerService: import('@wendellhu/redi').IdentifierDecorator<ActiveDirtyManagerService>;
|
|
@@ -81,4 +81,4 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
81
81
|
private _mergeNameMap;
|
|
82
82
|
private _loadSheetData;
|
|
83
83
|
}
|
|
84
|
-
export declare const IFormulaCurrentConfigService: import('@
|
|
84
|
+
export declare const IFormulaCurrentConfigService: import('@wendellhu/redi').IdentifierDecorator<FormulaCurrentConfigService>;
|
|
@@ -59,4 +59,4 @@ export declare class DefinedNamesService extends Disposable implements IDefinedN
|
|
|
59
59
|
hasDefinedName(unitId: string): boolean;
|
|
60
60
|
private _update;
|
|
61
61
|
}
|
|
62
|
-
export declare const IDefinedNamesService: import('@
|
|
62
|
+
export declare const IDefinedNamesService: import('@wendellhu/redi').IdentifierDecorator<DefinedNamesService>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable, ObjectMatrix, Nullable } from '@univerjs/core';
|
|
2
2
|
import { FormulaDependencyTreeCache, FormulaDependencyTree } from '../engine/dependency/dependency-tree';
|
|
3
3
|
export interface IOtherFormulaDependencyParam {
|
|
4
4
|
[unitId: string]: Nullable<{
|
|
@@ -35,7 +35,7 @@ export interface IDependencyManagerService {
|
|
|
35
35
|
addFormulaDependency(unitId: string, sheetId: string, row: number, column: number, dependencyTree: FormulaDependencyTree): void;
|
|
36
36
|
removeFormulaDependency(unitId: string, sheetId: string, row: number, column: number): void;
|
|
37
37
|
hasFormulaDependency(unitId: string, sheetId: string, row: number, column: number): boolean;
|
|
38
|
-
clearFormulaDependency(unitId: string, sheetId
|
|
38
|
+
clearFormulaDependency(unitId: string, sheetId?: string): void;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Passively marked as dirty, register the reference and execution actions of the feature plugin.
|
|
@@ -78,7 +78,7 @@ export declare class DependencyManagerService extends Disposable implements IDep
|
|
|
78
78
|
hasFeatureFormulaDependency(unitId: string, sheetId: string, featureId: string): boolean;
|
|
79
79
|
addFormulaDependency(unitId: string, sheetId: string, row: number, column: number, dependencyTree: FormulaDependencyTree): void;
|
|
80
80
|
removeFormulaDependency(unitId: string, sheetId: string, row: number, column: number): void;
|
|
81
|
-
clearFormulaDependency(unitId: string, sheetId
|
|
81
|
+
clearFormulaDependency(unitId: string, sheetId?: string): void;
|
|
82
82
|
hasFormulaDependency(unitId: string, sheetId: string, row: number, column: number): boolean;
|
|
83
83
|
}
|
|
84
|
-
export declare const IDependencyManagerService: import('@
|
|
84
|
+
export declare const IDependencyManagerService: import('@wendellhu/redi').IdentifierDecorator<DependencyManagerService>;
|
|
@@ -39,4 +39,4 @@ export declare class FeatureCalculationManagerService extends Disposable impleme
|
|
|
39
39
|
register(unitId: string, subUnitId: string, featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
|
|
40
40
|
getReferenceExecutorMap(): Map<string, Map<string, Map<string, IFeatureCalculationManagerParam>>>;
|
|
41
41
|
}
|
|
42
|
-
export declare const IFeatureCalculationManagerService: import('@
|
|
42
|
+
export declare const IFeatureCalculationManagerService: import('@wendellhu/redi').IdentifierDecorator<FeatureCalculationManagerService>;
|
|
@@ -26,7 +26,7 @@ export interface IFunctionService {
|
|
|
26
26
|
hasDescription(functionToken: IFunctionNames): boolean;
|
|
27
27
|
unregisterDescriptions(...functionTokens: IFunctionNames[]): void;
|
|
28
28
|
}
|
|
29
|
-
export declare const IFunctionService: import('@
|
|
29
|
+
export declare const IFunctionService: import('@wendellhu/redi').IdentifierDecorator<FunctionService>;
|
|
30
30
|
export declare class FunctionService extends Disposable implements IFunctionService {
|
|
31
31
|
private _functionExecutors;
|
|
32
32
|
private _functionDescriptions;
|
|
@@ -35,4 +35,4 @@ export declare class OtherFormulaManagerService extends Disposable implements IO
|
|
|
35
35
|
batchRemove(formulaData: IDirtyUnitOtherFormulaMap): void;
|
|
36
36
|
getOtherFormulaData(): IOtherFormulaData;
|
|
37
37
|
}
|
|
38
|
-
export declare const IOtherFormulaManagerService: import('@
|
|
38
|
+
export declare const IOtherFormulaManagerService: import('@wendellhu/redi').IdentifierDecorator<OtherFormulaManagerService>;
|
|
@@ -179,4 +179,4 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
179
179
|
private _checkIfArrayFormulaExceeded;
|
|
180
180
|
private _isInDirtyRange;
|
|
181
181
|
}
|
|
182
|
-
export declare const IFormulaRuntimeService: import('@
|
|
182
|
+
export declare const IFormulaRuntimeService: import('@wendellhu/redi').IdentifierDecorator<FormulaRuntimeService>;
|
|
@@ -21,4 +21,4 @@ export declare class SuperTableService extends Disposable implements ISuperTable
|
|
|
21
21
|
registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
|
|
22
22
|
registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
|
|
23
23
|
}
|
|
24
|
-
export declare const ISuperTableService: import('@
|
|
24
|
+
export declare const ISuperTableService: import('@wendellhu/redi').IdentifierDecorator<ISuperTableService>;
|