@univerjs/engine-formula 0.2.8 → 0.2.10
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 +7 -1
- package/lib/es/index.js +5085 -2046
- package/lib/types/basics/__tests__/engineering.spec.d.ts +16 -0
- package/lib/types/basics/complex.d.ts +57 -0
- package/lib/types/basics/date.d.ts +15 -6
- package/lib/types/basics/engineering.d.ts +2 -2
- package/lib/types/basics/error-type.d.ts +1 -0
- package/lib/types/basics/financial.d.ts +19 -15
- package/lib/types/basics/format.d.ts +1 -1
- package/lib/types/engine/analysis/lexer-tree-builder.d.ts +8 -0
- package/lib/types/engine/utils/check-variant-error.d.ts +9 -0
- package/lib/types/engine/utils/math-kit.d.ts +9 -8
- package/lib/types/engine/value-object/primitive-object.d.ts +4 -0
- package/lib/types/functions/compatibility/rank/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/compatibility/rank/index.d.ts +10 -0
- package/lib/types/functions/engineering/besseli/index.d.ts +2 -3
- package/lib/types/functions/engineering/besselj/index.d.ts +2 -3
- package/lib/types/functions/engineering/besselk/index.d.ts +2 -3
- package/lib/types/functions/engineering/bessely/index.d.ts +2 -3
- package/lib/types/functions/engineering/bin2dec/index.d.ts +2 -3
- package/lib/types/functions/engineering/bin2hex/index.d.ts +2 -3
- package/lib/types/functions/engineering/bin2oct/index.d.ts +2 -3
- package/lib/types/functions/engineering/complex/index.d.ts +2 -3
- package/lib/types/functions/engineering/convert/index.d.ts +2 -3
- package/lib/types/functions/engineering/dec2bin/index.d.ts +2 -3
- package/lib/types/functions/engineering/dec2hex/index.d.ts +2 -3
- package/lib/types/functions/engineering/dec2oct/index.d.ts +2 -3
- package/lib/types/functions/engineering/delta/index.d.ts +2 -3
- package/lib/types/functions/engineering/erf/index.d.ts +2 -3
- package/lib/types/functions/engineering/erf-precise/index.d.ts +2 -3
- package/lib/types/functions/engineering/erfc/index.d.ts +2 -3
- package/lib/types/functions/engineering/erfc-precise/index.d.ts +2 -3
- package/lib/types/functions/engineering/function-map.d.ts +3 -2
- package/lib/types/functions/engineering/gestep/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/gestep/index.d.ts +7 -0
- package/lib/types/functions/engineering/hex2bin/index.d.ts +2 -3
- package/lib/types/functions/engineering/hex2dec/index.d.ts +2 -3
- package/lib/types/functions/engineering/hex2oct/index.d.ts +2 -3
- package/lib/types/functions/engineering/imabs/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imabs/index.d.ts +7 -0
- package/lib/types/functions/engineering/imaginary/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imaginary/index.d.ts +7 -0
- package/lib/types/functions/engineering/imargument/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imargument/index.d.ts +7 -0
- package/lib/types/functions/engineering/imconjugate/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imconjugate/index.d.ts +7 -0
- package/lib/types/functions/engineering/imcos/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imcos/index.d.ts +7 -0
- package/lib/types/functions/engineering/imcosh/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imcosh/index.d.ts +7 -0
- package/lib/types/functions/engineering/imcot/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imcot/index.d.ts +7 -0
- package/lib/types/functions/engineering/imcsc/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imcsc/index.d.ts +7 -0
- package/lib/types/functions/engineering/imcsch/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imcsch/index.d.ts +7 -0
- package/lib/types/functions/engineering/imdiv/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imdiv/index.d.ts +7 -0
- package/lib/types/functions/engineering/imexp/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imexp/index.d.ts +7 -0
- package/lib/types/functions/engineering/imln/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imln/index.d.ts +7 -0
- package/lib/types/functions/engineering/imlog10/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imlog10/index.d.ts +7 -0
- package/lib/types/functions/engineering/imlog2/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imlog2/index.d.ts +7 -0
- package/lib/types/functions/engineering/impower/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/impower/index.d.ts +7 -0
- package/lib/types/functions/engineering/improduct/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/improduct/index.d.ts +8 -0
- package/lib/types/functions/engineering/imreal/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imreal/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsec/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsec/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsech/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsech/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsin/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsin/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsinh/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsinh/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsqrt/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsqrt/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsub/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsub/index.d.ts +7 -0
- package/lib/types/functions/engineering/imsum/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imsum/index.d.ts +8 -0
- package/lib/types/functions/engineering/imtan/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/engineering/imtan/index.d.ts +7 -0
- package/lib/types/functions/engineering/oct2bin/index.d.ts +2 -3
- package/lib/types/functions/engineering/oct2dec/index.d.ts +2 -3
- package/lib/types/functions/engineering/oct2hex/index.d.ts +2 -3
- package/lib/types/functions/financial/accrint/index.d.ts +2 -3
- package/lib/types/functions/financial/accrintm/index.d.ts +2 -3
- package/lib/types/functions/financial/amorlinc/index.d.ts +2 -3
- package/lib/types/functions/financial/coupdaybs/index.d.ts +2 -3
- package/lib/types/functions/financial/coupdays/index.d.ts +2 -3
- package/lib/types/functions/financial/coupdaysnc/index.d.ts +2 -3
- package/lib/types/functions/financial/coupncd/index.d.ts +2 -3
- package/lib/types/functions/financial/coupnum/index.d.ts +2 -3
- package/lib/types/functions/financial/couppcd/index.d.ts +2 -3
- package/lib/types/functions/financial/cumipmt/index.d.ts +2 -3
- package/lib/types/functions/financial/cumprinc/index.d.ts +2 -3
- package/lib/types/functions/financial/ddb/index.d.ts +0 -1
- package/lib/types/functions/financial/disc/index.d.ts +2 -3
- package/lib/types/functions/financial/dollarde/index.d.ts +2 -3
- package/lib/types/functions/financial/dollarfr/index.d.ts +2 -3
- package/lib/types/functions/financial/duration/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/duration/index.d.ts +7 -0
- package/lib/types/functions/financial/effect/index.d.ts +2 -3
- package/lib/types/functions/financial/function-map.d.ts +7 -3
- package/lib/types/functions/financial/fvschedule/index.d.ts +2 -3
- package/lib/types/functions/financial/intrate/index.d.ts +2 -3
- package/lib/types/functions/financial/irr/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/irr/index.d.ts +10 -0
- package/lib/types/functions/financial/mduration/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/mduration/index.d.ts +7 -0
- package/lib/types/functions/financial/mirr/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/mirr/index.d.ts +11 -0
- package/lib/types/functions/financial/nominal/index.d.ts +2 -3
- package/lib/types/functions/financial/npv/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/npv/index.d.ts +9 -0
- package/lib/types/functions/financial/oddfprice/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/oddfprice/index.d.ts +9 -0
- package/lib/types/functions/financial/oddfyield/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/oddfyield/index.d.ts +10 -0
- package/lib/types/functions/financial/oddlprice/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/oddlprice/index.d.ts +11 -0
- package/lib/types/functions/financial/oddlyield/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/oddlyield/index.d.ts +11 -0
- package/lib/types/functions/financial/pduration/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/pduration/index.d.ts +7 -0
- package/lib/types/functions/financial/price/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/price/index.d.ts +7 -0
- package/lib/types/functions/financial/pricedisc/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/pricedisc/index.d.ts +7 -0
- package/lib/types/functions/financial/pricemat/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/pricemat/index.d.ts +8 -0
- package/lib/types/functions/financial/received/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/received/index.d.ts +7 -0
- package/lib/types/functions/financial/rri/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/rri/index.d.ts +7 -0
- package/lib/types/functions/financial/sln/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/sln/index.d.ts +7 -0
- package/lib/types/functions/financial/syd/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/syd/index.d.ts +7 -0
- package/lib/types/functions/financial/tbilleq/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/tbilleq/index.d.ts +7 -0
- package/lib/types/functions/financial/tbillprice/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/tbillprice/index.d.ts +7 -0
- package/lib/types/functions/financial/tbillyield/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/tbillyield/index.d.ts +7 -0
- package/lib/types/functions/financial/vdb/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/vdb/index.d.ts +10 -0
- package/lib/types/functions/financial/xirr/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/xirr/index.d.ts +12 -0
- package/lib/types/functions/financial/xnpv/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/xnpv/index.d.ts +10 -0
- package/lib/types/functions/financial/yield/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/yield/index.d.ts +8 -0
- package/lib/types/functions/financial/yielddisc/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/yielddisc/index.d.ts +7 -0
- package/lib/types/functions/financial/yieldmat/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/financial/yieldmat/index.d.ts +8 -0
- package/lib/types/functions/statistical/rank-avg/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/statistical/rank-avg/index.d.ts +11 -0
- package/lib/types/functions/statistical/rank-eq/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/statistical/rank-eq/index.d.ts +10 -0
- package/lib/types/index.d.ts +20 -1
- package/lib/types/services/function.service.d.ts +1 -1
- package/lib/umd/index.js +7 -1
- package/package.json +8 -7
- package/lib/types/engine/utils/relative-formula.d.ts +0 -3
|
@@ -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 Pricemat extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, issue: BaseValueObject, rate: BaseValueObject, yld: BaseValueObject, basis?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _getDateCorrectOrder;
|
|
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 Received extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, investment: BaseValueObject, discount: BaseValueObject, basis?: 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 Rri extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(nper: BaseValueObject, pv: BaseValueObject, fv: 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 Sln extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(cost: BaseValueObject, salvage: BaseValueObject, life: 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 Syd extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(cost: BaseValueObject, salvage: BaseValueObject, life: BaseValueObject, per: 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 Tbilleq extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, discount: 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 Tbillprice extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, discount: 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 Tbillyield extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, pr: 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,10 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Vdb extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(cost: BaseValueObject, salvage: BaseValueObject, life: BaseValueObject, startPeriod: BaseValueObject, endPeriod: BaseValueObject, factor?: BaseValueObject, noSwitch?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _getResultArray;
|
|
8
|
+
private _getResult;
|
|
9
|
+
private _getVdb;
|
|
10
|
+
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Xirr extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(values: BaseValueObject, dates: BaseValueObject, guess?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _checkErrors;
|
|
8
|
+
private _checkErrorValues;
|
|
9
|
+
private _checkErrorDates;
|
|
10
|
+
private _checkValues;
|
|
11
|
+
private _iterF;
|
|
12
|
+
}
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Xnpv extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(rate: BaseValueObject, values: BaseValueObject, dates: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _checkErrors;
|
|
8
|
+
private _checkErrorValues;
|
|
9
|
+
private _checkErrorDates;
|
|
10
|
+
}
|
|
@@ -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 Yield extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, rate: BaseValueObject, pr: BaseValueObject, redemption: BaseValueObject, frequency: BaseValueObject, basis?: 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,7 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Yielddisc extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, pr: BaseValueObject, redemption: BaseValueObject, basis?: 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 { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Yieldmat extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(settlement: BaseValueObject, maturity: BaseValueObject, issue: BaseValueObject, rate: BaseValueObject, pr: BaseValueObject, basis?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _getDateCorrectOrder;
|
|
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,11 @@
|
|
|
1
|
+
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
|
+
export declare class RankAvg extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
7
|
+
needsReferenceObject: boolean;
|
|
8
|
+
calculate(number: FunctionVariantType, ref: FunctionVariantType, order?: FunctionVariantType): BaseValueObject;
|
|
9
|
+
private _getResult;
|
|
10
|
+
private _checkRefReferenceObject;
|
|
11
|
+
}
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
import { BaseFunction } from '../../base-function';
|
|
4
|
+
export declare class RankEq extends BaseFunction {
|
|
5
|
+
minParams: number;
|
|
6
|
+
maxParams: number;
|
|
7
|
+
needsReferenceObject: boolean;
|
|
8
|
+
calculate(number: FunctionVariantType, ref: FunctionVariantType, order?: FunctionVariantType): BaseValueObject;
|
|
9
|
+
private _checkRefReferenceObject;
|
|
10
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -81,15 +81,34 @@ export { FormulaExecutedStateType, type IAllRuntimeData } from './services/runti
|
|
|
81
81
|
export { isReferenceString } from './basics/regex';
|
|
82
82
|
export { matchRefDrawToken } from './basics/match-token';
|
|
83
83
|
export { IDefinedNamesService, DefinedNamesService, type IDefinedNamesServiceParam, type IDefinedNameMapItem } from './services/defined-names.service';
|
|
84
|
-
export { isFormulaTransformable, transformFormula } from './engine/utils/relative-formula';
|
|
85
84
|
export { IFormulaRuntimeService, FormulaRuntimeService } from './services/runtime.service';
|
|
86
85
|
export { IFormulaCurrentConfigService, FormulaCurrentConfigService, type IFormulaDirtyData } from './services/current-data.service';
|
|
87
86
|
export { IActiveDirtyManagerService } from './services/active-dirty-manager.service';
|
|
87
|
+
export { ActiveDirtyManagerService } from './services/active-dirty-manager.service';
|
|
88
88
|
export type { IRangeChange } from './models/formula-data.model';
|
|
89
89
|
export { handleNumfmtInCell } from './engine/utils/numfmt-kit';
|
|
90
90
|
export { AsyncArrayObject } from './engine/reference-object/base-reference-object';
|
|
91
91
|
export { strip, stripErrorMargin } from './engine/utils/math-kit';
|
|
92
92
|
export { AsyncObject } from './engine/reference-object/base-reference-object';
|
|
93
|
+
export { Lexer } from './engine/analysis/lexer';
|
|
94
|
+
export { FormulaDependencyGenerator } from './engine/dependency/formula-dependency';
|
|
95
|
+
export { ISuperTableService } from './services/super-table.service';
|
|
96
|
+
export { SuperTableService } from './services/super-table.service';
|
|
97
|
+
export { Interpreter } from './engine/interpreter/interpreter';
|
|
98
|
+
export { AstTreeBuilder } from './engine/analysis/parser';
|
|
99
|
+
export { AstRootNodeFactory } from './engine/ast-node/ast-root-node';
|
|
100
|
+
export { FunctionNodeFactory } from './engine/ast-node/function-node';
|
|
101
|
+
export { LambdaNodeFactory } from './engine/ast-node/lambda-node';
|
|
102
|
+
export { LambdaParameterNodeFactory } from './engine/ast-node/lambda-parameter-node';
|
|
103
|
+
export { OperatorNodeFactory } from './engine/ast-node/operator-node';
|
|
104
|
+
export { PrefixNodeFactory } from './engine/ast-node/prefix-node';
|
|
105
|
+
export { ReferenceNodeFactory } from './engine/ast-node/reference-node';
|
|
106
|
+
export { SuffixNodeFactory } from './engine/ast-node/suffix-node';
|
|
107
|
+
export { UnionNodeFactory } from './engine/ast-node/union-node';
|
|
108
|
+
export { ValueNodeFactory } from './engine/ast-node/value-node';
|
|
109
|
+
export { IDependencyManagerService } from './services/dependency-manager.service';
|
|
110
|
+
export { DependencyManagerService } from './services/dependency-manager.service';
|
|
111
|
+
export { CalculateController } from './controller/calculate.controller';
|
|
93
112
|
export { RegisterFunctionMutation } from './commands/mutations/register-function.mutation';
|
|
94
113
|
export { type ISetArrayFormulaDataMutationParams, SetArrayFormulaDataMutation } from './commands/mutations/set-array-formula-data.mutation';
|
|
95
114
|
export { RemoveDefinedNameMutation, SetDefinedNameMutation, type ISetDefinedNameMutationSearchParam, type ISetDefinedNameMutationParam } from './commands/mutations/set-defined-name.mutation';
|
|
@@ -26,6 +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('@univerjs/core').IdentifierDecorator<FunctionService>;
|
|
29
30
|
export declare class FunctionService extends Disposable implements IFunctionService {
|
|
30
31
|
private _functionExecutors;
|
|
31
32
|
private _functionDescriptions;
|
|
@@ -41,4 +42,3 @@ export declare class FunctionService extends Disposable implements IFunctionServ
|
|
|
41
42
|
hasDescription(functionToken: IFunctionNames): boolean;
|
|
42
43
|
unregisterDescriptions(...functionTokens: IFunctionNames[]): void;
|
|
43
44
|
}
|
|
44
|
-
export declare const IFunctionService: import('@univerjs/core').IdentifierDecorator<FunctionService>;
|