@univerjs/engine-formula 0.4.0 → 0.4.1-experimental.20241023-bbb123f
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 +2882 -883
- package/lib/types/basics/database.d.ts +31 -0
- package/lib/types/basics/inverted-index-cache.d.ts +7 -18
- package/lib/types/basics/math.d.ts +12 -0
- package/lib/types/basics/object-class-type.d.ts +17 -2
- package/lib/types/basics/regex.d.ts +19 -2
- package/lib/types/engine/analysis/__tests__/dependency.spec.d.ts +16 -0
- package/lib/types/engine/analysis/parser.d.ts +1 -2
- package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +3 -2
- package/lib/types/engine/ast-node/base-ast-node.d.ts +2 -9
- package/lib/types/engine/ast-node/function-node.d.ts +1 -0
- package/lib/types/engine/ast-node/reference-node.d.ts +9 -2
- package/lib/types/engine/dependency/dependency-tree.d.ts +16 -8
- package/lib/types/engine/dependency/formula-dependency.d.ts +1 -0
- package/lib/types/engine/interpreter/interpreter.d.ts +3 -2
- package/lib/types/engine/reference-object/base-reference-object.d.ts +10 -0
- package/lib/types/engine/utils/ast-node-tool.d.ts +10 -0
- package/lib/types/engine/utils/char-kit.d.ts +5 -7
- package/lib/types/engine/utils/numfmt-kit.d.ts +14 -1
- package/lib/types/engine/utils/reference-cache.d.ts +3 -0
- package/lib/types/engine/value-object/array-value-object.d.ts +1 -0
- package/lib/types/engine/value-object/lambda-value-object.d.ts +2 -2
- package/lib/types/functions/base-function.d.ts +13 -5
- package/lib/types/functions/database/daverage/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/daverage/index.d.ts +8 -0
- package/lib/types/functions/database/dcount/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dcount/index.d.ts +8 -0
- package/lib/types/functions/database/dcounta/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dcounta/index.d.ts +8 -0
- package/lib/types/functions/database/dget/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dget/index.d.ts +7 -0
- package/lib/types/functions/database/dmax/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dmax/index.d.ts +8 -0
- package/lib/types/functions/database/dmin/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dmin/index.d.ts +8 -0
- package/lib/types/functions/database/dproduct/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dproduct/index.d.ts +8 -0
- package/lib/types/functions/database/dstdev/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dstdev/index.d.ts +8 -0
- package/lib/types/functions/database/dstdevp/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dstdevp/index.d.ts +8 -0
- package/lib/types/functions/database/dsum/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dsum/index.d.ts +8 -0
- package/lib/types/functions/database/dvar/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dvar/index.d.ts +8 -0
- package/lib/types/functions/database/dvarp/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/database/dvarp/index.d.ts +8 -0
- package/lib/types/functions/database/function-map.d.ts +3 -16
- package/lib/types/functions/financial/db/index.d.ts +1 -0
- package/lib/types/functions/financial/ddb/index.d.ts +1 -0
- package/lib/types/functions/financial/fv/index.d.ts +2 -1
- package/lib/types/functions/financial/ipmt/index.d.ts +2 -1
- package/lib/types/functions/financial/npv/index.d.ts +1 -0
- package/lib/types/functions/financial/pmt/index.d.ts +2 -1
- package/lib/types/functions/financial/ppmt/index.d.ts +2 -1
- package/lib/types/functions/financial/pv/index.d.ts +2 -1
- package/lib/types/functions/financial/sln/index.d.ts +1 -0
- package/lib/types/functions/financial/syd/index.d.ts +1 -0
- package/lib/types/functions/financial/tbillprice/index.d.ts +1 -0
- package/lib/types/functions/financial/vdb/index.d.ts +1 -0
- package/lib/types/functions/math/arabic/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/arabic/index.d.ts +8 -0
- package/lib/types/functions/math/roman/__tests__/index.spec.d.ts +16 -0
- package/lib/types/functions/math/roman/index.d.ts +9 -0
- package/lib/types/functions/text/arraytotext/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/arraytotext/index.d.ts +9 -0
- package/lib/types/functions/text/asc/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/asc/index.d.ts +8 -0
- package/lib/types/functions/text/bahttext/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/bahttext/index.d.ts +9 -0
- package/lib/types/functions/text/char/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/char/index.d.ts +8 -0
- package/lib/types/functions/text/clean/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/clean/index.d.ts +8 -0
- package/lib/types/functions/text/code/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/code/index.d.ts +8 -0
- package/lib/types/functions/text/dbcs/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/dbcs/index.d.ts +8 -0
- package/lib/types/functions/text/dollar/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/dollar/index.d.ts +9 -0
- package/lib/types/functions/text/exact/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/exact/index.d.ts +8 -0
- package/lib/types/functions/text/fixed/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/fixed/index.d.ts +8 -0
- package/lib/types/functions/text/leftb/index.d.ts +1 -2
- package/lib/types/functions/text/numbervalue/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/numbervalue/index.d.ts +8 -0
- package/lib/types/functions/text/proper/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/proper/index.d.ts +8 -0
- package/lib/types/functions/text/right/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/right/index.d.ts +8 -0
- package/lib/types/functions/text/rightb/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/rightb/index.d.ts +8 -0
- package/lib/types/functions/text/substitute/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/substitute/index.d.ts +9 -0
- package/lib/types/functions/text/t/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/t/index.d.ts +7 -0
- package/lib/types/functions/text/unichar/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/unichar/index.d.ts +8 -0
- package/lib/types/functions/text/unicode/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/unicode/index.d.ts +8 -0
- package/lib/types/functions/text/value/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/value/index.d.ts +8 -0
- package/lib/types/functions/text/valuetotext/__test__/index.spec.d.ts +16 -0
- package/lib/types/functions/text/valuetotext/index.d.ts +8 -0
- package/lib/types/services/current-data.service.d.ts +5 -2
- package/lib/types/services/dependency-manager.service.d.ts +21 -15
- package/lib/types/services/runtime.service.d.ts +2 -0
- package/lib/umd/index.js +2 -2
- package/package.json +5 -4
- package/LICENSE +0 -176
- package/lib/types/engine/dependency/generate-tree-id.d.ts +0 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Dollar extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
needsLocale: boolean;
|
|
7
|
+
calculate(number: BaseValueObject, decimals?: BaseValueObject): BaseValueObject;
|
|
8
|
+
private _handleSingleObject;
|
|
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 { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class Exact extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text1: BaseValueObject, text2: 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 Fixed extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(number: BaseValueObject, decimals?: BaseValueObject, noCommas?: 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 Numbervalue extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: BaseValueObject, decimalSeparator?: BaseValueObject, groupSeparator?: 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 Proper extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: 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 Right extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: BaseValueObject, numChars?: 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 Rightb extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: BaseValueObject, numBytes?: 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,9 @@
|
|
|
1
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
2
|
+
import { BaseFunction } from '../../base-function';
|
|
3
|
+
export declare class Substitute extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: BaseValueObject, oldText: BaseValueObject, newText: BaseValueObject, instanceNum?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
private _getObjectString;
|
|
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,7 @@
|
|
|
1
|
+
import { BaseFunction } from '../../base-function';
|
|
2
|
+
import { BaseValueObject } from '../../../engine/value-object/base-value-object';
|
|
3
|
+
export declare class T extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(value: 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 Unichar 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 Unicode extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: 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 Value extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(text: 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 Valuetotext extends BaseFunction {
|
|
4
|
+
minParams: number;
|
|
5
|
+
maxParams: number;
|
|
6
|
+
calculate(value: BaseValueObject, format?: BaseValueObject): BaseValueObject;
|
|
7
|
+
private _handleSingleObject;
|
|
8
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable, IUniverInstanceService, LocaleService, IUnitRange, LocaleType, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IArrayFormulaRangeType, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetDefinedNameMap, IDirtyUnitSheetNameMap, IFormulaData, IFormulaDatasetConfig, IRuntimeUnitDataType, IUnitData, IUnitExcludedCell, IUnitSheetNameMap, IUnitStylesData } from '../basics/common';
|
|
3
3
|
export interface IFormulaDirtyData {
|
|
4
4
|
forceCalculation: boolean;
|
|
@@ -38,9 +38,11 @@ export interface IFormulaCurrentConfigService {
|
|
|
38
38
|
setExecuteSubUnitId(subUnitId: string): void;
|
|
39
39
|
getDirtyData(): IFormulaDirtyData;
|
|
40
40
|
getClearDependencyTreeCache(): IDirtyUnitSheetNameMap;
|
|
41
|
+
getLocale(): LocaleType;
|
|
41
42
|
}
|
|
42
43
|
export declare class FormulaCurrentConfigService extends Disposable implements IFormulaCurrentConfigService {
|
|
43
44
|
private readonly _univerInstanceService;
|
|
45
|
+
private readonly _localeService;
|
|
44
46
|
private _unitData;
|
|
45
47
|
private _unitStylesData;
|
|
46
48
|
private _arrayFormulaCellData;
|
|
@@ -58,7 +60,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
58
60
|
private _sheetIdToNameMap;
|
|
59
61
|
private _executeUnitId;
|
|
60
62
|
private _executeSubUnitId;
|
|
61
|
-
constructor(_univerInstanceService: IUniverInstanceService);
|
|
63
|
+
constructor(_univerInstanceService: IUniverInstanceService, _localeService: LocaleService);
|
|
62
64
|
dispose(): void;
|
|
63
65
|
getExecuteUnitId(): Nullable<string>;
|
|
64
66
|
getExecuteSubUnitId(): Nullable<string>;
|
|
@@ -79,6 +81,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
79
81
|
getDirtyUnitOtherFormulaMap(): IDirtyUnitOtherFormulaMap;
|
|
80
82
|
getSheetName(unitId: string, sheetId: string): string;
|
|
81
83
|
getClearDependencyTreeCache(): IDirtyUnitSheetNameMap;
|
|
84
|
+
getLocale(): LocaleType;
|
|
82
85
|
load(config: IFormulaDatasetConfig): void;
|
|
83
86
|
getDirtyData(): IFormulaDirtyData;
|
|
84
87
|
loadDirtyRangesAndExcludedCell(dirtyRanges: IUnitRange[], excludedCell?: IUnitExcludedCell): void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUnitRange, Nullable, Disposable, ObjectMatrix } from '@univerjs/core';
|
|
2
2
|
import { FormulaDependencyTree } from '../engine/dependency/dependency-tree';
|
|
3
3
|
export interface IOtherFormulaDependencyParam {
|
|
4
4
|
[unitId: string]: Nullable<{
|
|
5
5
|
[sheetId: string]: {
|
|
6
|
-
[formulaId: string]: Nullable<
|
|
6
|
+
[formulaId: string]: Nullable<string>;
|
|
7
7
|
};
|
|
8
8
|
}>;
|
|
9
9
|
}
|
|
10
10
|
export interface IFeatureFormulaDependencyParam {
|
|
11
11
|
[unitId: string]: Nullable<{
|
|
12
12
|
[sheetId: string]: {
|
|
13
|
-
[featureId: string]: Nullable<
|
|
13
|
+
[featureId: string]: Nullable<string>;
|
|
14
14
|
};
|
|
15
15
|
}>;
|
|
16
16
|
}
|
|
17
17
|
export interface IFormulaDependencyParam {
|
|
18
18
|
[unitId: string]: Nullable<{
|
|
19
|
-
[sheetId: string]: ObjectMatrix<
|
|
19
|
+
[sheetId: string]: ObjectMatrix<string>;
|
|
20
20
|
}>;
|
|
21
21
|
}
|
|
22
22
|
export interface IDependencyManagerService {
|
|
@@ -37,11 +37,14 @@ export interface IDependencyManagerService {
|
|
|
37
37
|
removeFormulaDependencyByDefinedName(unitId: string, definedName: string): void;
|
|
38
38
|
clearFormulaDependency(unitId: string, sheetId?: string): void;
|
|
39
39
|
addDependencyRTreeCache(tree: FormulaDependencyTree): void;
|
|
40
|
-
searchDependency(search: IUnitRange[]):
|
|
41
|
-
|
|
40
|
+
searchDependency(search: IUnitRange[]): Set<string>;
|
|
41
|
+
getLastTreeId(): number;
|
|
42
42
|
clearDependencyAll(): void;
|
|
43
43
|
clearOtherFormulaDependency(unitId: string, sheetId?: string): void;
|
|
44
44
|
clearFeatureFormulaDependency(unitId: string, sheetId?: string): void;
|
|
45
|
+
openKdTree(): void;
|
|
46
|
+
closeKdTree(): void;
|
|
47
|
+
getTreeById(treeId: string): Nullable<FormulaDependencyTree>;
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Passively marked as dirty, register the reference and execution actions of the feature plugin.
|
|
@@ -53,16 +56,18 @@ export declare class DependencyManagerService extends Disposable implements IDep
|
|
|
53
56
|
private _otherFormulaData;
|
|
54
57
|
private _featureFormulaData;
|
|
55
58
|
private _formulaData;
|
|
59
|
+
private _allTreeMap;
|
|
56
60
|
private _dependencyRTreeCache;
|
|
57
|
-
private
|
|
61
|
+
private _dependencyTreeIdLast;
|
|
58
62
|
dispose(): void;
|
|
59
63
|
/**
|
|
60
64
|
* Get all FormulaDependencyTree from _otherFormulaData, _featureFormulaData, _formulaData
|
|
61
65
|
* return FormulaDependencyTree[]
|
|
62
66
|
*/
|
|
63
67
|
getAllTree(): FormulaDependencyTree[];
|
|
68
|
+
getTreeById(treeId: string): FormulaDependencyTree | undefined;
|
|
64
69
|
buildDependencyTree(shouldBeBuildTrees: FormulaDependencyTree[], dependencyTrees?: FormulaDependencyTree[]): FormulaDependencyTree[];
|
|
65
|
-
searchDependency(search: IUnitRange[]):
|
|
70
|
+
searchDependency(search: IUnitRange[]): Set<string>;
|
|
66
71
|
/**
|
|
67
72
|
* Build the dependency relationship between the trees.
|
|
68
73
|
* @param allTrees all FormulaDependencyTree
|
|
@@ -84,25 +89,26 @@ export declare class DependencyManagerService extends Disposable implements IDep
|
|
|
84
89
|
reset(): void;
|
|
85
90
|
addOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string, dependencyTree: FormulaDependencyTree): void;
|
|
86
91
|
removeOtherFormulaDependency(unitId: string, sheetId: string, formulaIds: string[]): void;
|
|
87
|
-
getOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string):
|
|
92
|
+
getOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string): FormulaDependencyTree | undefined;
|
|
88
93
|
hasOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string): boolean;
|
|
89
94
|
clearOtherFormulaDependency(unitId: string, sheetId?: string): void;
|
|
90
95
|
addFeatureFormulaDependency(unitId: string, sheetId: string, featureId: string, dependencyTree: FormulaDependencyTree): void;
|
|
91
96
|
removeFeatureFormulaDependency(unitId: string, sheetId: string, featureIds: string[]): void;
|
|
92
97
|
clearFeatureFormulaDependency(unitId: string, sheetId?: string): void;
|
|
93
|
-
getFeatureFormulaDependency(unitId: string, sheetId: string, featureId: string):
|
|
98
|
+
getFeatureFormulaDependency(unitId: string, sheetId: string, featureId: string): FormulaDependencyTree | undefined;
|
|
94
99
|
addFormulaDependency(unitId: string, sheetId: string, row: number, column: number, dependencyTree: FormulaDependencyTree): void;
|
|
95
100
|
removeFormulaDependency(unitId: string, sheetId: string, row: number, column: number): void;
|
|
96
101
|
clearFormulaDependency(unitId: string, sheetId?: string): void;
|
|
97
102
|
clearDependencyAll(): void;
|
|
98
|
-
getFormulaDependency(unitId: string, sheetId: string, row: number, column: number):
|
|
103
|
+
getFormulaDependency(unitId: string, sheetId: string, row: number, column: number): FormulaDependencyTree | undefined;
|
|
99
104
|
addDependencyRTreeCache(tree: FormulaDependencyTree): void;
|
|
100
|
-
private
|
|
101
|
-
|
|
102
|
-
private _clearTreeIdCache;
|
|
103
|
-
hasTreeIdInCache(treeId: string): boolean;
|
|
105
|
+
private _restDependencyTreeId;
|
|
106
|
+
getLastTreeId(): number;
|
|
104
107
|
private _removeDependencyRTreeCacheById;
|
|
105
108
|
private _removeDependencyRTreeCache;
|
|
106
109
|
removeFormulaDependencyByDefinedName(unitId: string, definedName: string): void;
|
|
110
|
+
openKdTree(): void;
|
|
111
|
+
closeKdTree(): void;
|
|
112
|
+
private _removeAllTreeMap;
|
|
107
113
|
}
|
|
108
114
|
export declare const IDependencyManagerService: import('@wendellhu/redi').IdentifierDecorator<DependencyManagerService>;
|
|
@@ -96,6 +96,7 @@ export interface IFormulaRuntimeService {
|
|
|
96
96
|
};
|
|
97
97
|
setRuntimeFeatureCellData(featureId: string, featureData: IRuntimeUnitDataType): void;
|
|
98
98
|
setRuntimeFeatureRange(featureId: string, featureRange: IFeatureDirtyRangeType): void;
|
|
99
|
+
clearReferenceAndNumberformatCache(): void;
|
|
99
100
|
}
|
|
100
101
|
export declare class FormulaRuntimeService extends Disposable implements IFormulaRuntimeService {
|
|
101
102
|
private readonly _currentConfigService;
|
|
@@ -152,6 +153,7 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
152
153
|
setFormulaExecuteStage(type: FormulaExecuteStageType): void;
|
|
153
154
|
getFormulaExecuteStage(): FormulaExecuteStageType;
|
|
154
155
|
reset(): void;
|
|
156
|
+
clearReferenceAndNumberformatCache(): void;
|
|
155
157
|
setCurrent(row: number, column: number, rowCount: number, columnCount: number, sheetId: string, unitId: string): void;
|
|
156
158
|
clearFunctionDefinitionPrivacyVar(): void;
|
|
157
159
|
registerFunctionDefinitionPrivacyVar(lambdaId: string, lambdaVar: Map<string, Nullable<BaseAstNode>>): void;
|