@univerjs/engine-formula 0.1.16 → 0.2.0

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.
Files changed (78) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +4972 -4258
  3. package/lib/types/basics/date.d.ts +12 -0
  4. package/lib/types/basics/regex.d.ts +5 -5
  5. package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +3 -1
  6. package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +6 -6
  7. package/lib/types/engine/analysis/lexer-node.d.ts +1 -5
  8. package/lib/types/engine/ast-node/function-node.d.ts +1 -0
  9. package/lib/types/engine/dependency/dependency-tree.d.ts +1 -0
  10. package/lib/types/engine/reference-object/base-reference-object.d.ts +6 -6
  11. package/lib/types/engine/utils/math-kit.d.ts +6 -0
  12. package/lib/types/engine/utils/value-object.d.ts +27 -0
  13. package/lib/types/engine/value-object/primitive-object.d.ts +4 -2
  14. package/lib/types/functions/__tests__/create-function-test-bed.d.ts +6 -6
  15. package/lib/types/functions/date/datevalue/__tests__/index.spec.d.ts +16 -0
  16. package/lib/types/functions/date/datevalue/index.d.ts +9 -0
  17. package/lib/types/functions/date/now/__tests__/index.spec.d.ts +16 -0
  18. package/lib/types/functions/date/now/index.d.ts +8 -0
  19. package/lib/types/functions/date/time/__tests__/index.spec.d.ts +16 -0
  20. package/lib/types/functions/date/time/index.d.ts +9 -0
  21. package/lib/types/functions/date/timevalue/__tests__/index.spec.d.ts +16 -0
  22. package/lib/types/functions/date/timevalue/index.d.ts +9 -0
  23. package/lib/types/functions/date/today/index.d.ts +1 -2
  24. package/lib/types/functions/information/isref/index.d.ts +2 -2
  25. package/lib/types/functions/lookup/address/index.d.ts +2 -2
  26. package/lib/types/functions/lookup/choose/__tests__/index.spec.d.ts +16 -0
  27. package/lib/types/functions/lookup/choose/index.d.ts +10 -0
  28. package/lib/types/functions/lookup/function-map.d.ts +3 -3
  29. package/lib/types/functions/lookup/offset/index.d.ts +1 -0
  30. package/lib/types/functions/math/asin/__tests__/index.spec.d.ts +16 -0
  31. package/lib/types/functions/math/asin/index.d.ts +8 -0
  32. package/lib/types/functions/math/asinh/__tests__/index.spec.d.ts +16 -0
  33. package/lib/types/functions/math/asinh/index.d.ts +8 -0
  34. package/lib/types/functions/math/atan/__tests__/index.spec.d.ts +16 -0
  35. package/lib/types/functions/math/atan/index.d.ts +8 -0
  36. package/lib/types/functions/math/atan2/__tests__/index.spec.d.ts +16 -0
  37. package/lib/types/functions/math/atan2/index.d.ts +8 -0
  38. package/lib/types/functions/math/atanh/__tests__/index.spec.d.ts +16 -0
  39. package/lib/types/functions/math/atanh/index.d.ts +8 -0
  40. package/lib/types/functions/math/cos/__tests__/index.spec.d.ts +16 -0
  41. package/lib/types/functions/math/cos/index.d.ts +8 -0
  42. package/lib/types/functions/math/sumifs/index.d.ts +3 -2
  43. package/lib/types/functions/math/tan/__tests__/index.spec.d.ts +16 -0
  44. package/lib/types/functions/math/tan/index.d.ts +8 -0
  45. package/lib/types/functions/math/tanh/__tests__/index.spec.d.ts +16 -0
  46. package/lib/types/functions/math/tanh/index.d.ts +8 -0
  47. package/lib/types/functions/meta/compare/__tests__/index.spec.d.ts +16 -0
  48. package/lib/types/functions/statistical/avedev/__tests__/index.spec.d.ts +16 -0
  49. package/lib/types/functions/statistical/avedev/index.d.ts +8 -0
  50. package/lib/types/functions/statistical/averagea/__tests__/index.spec.d.ts +16 -0
  51. package/lib/types/functions/statistical/averagea/index.d.ts +8 -0
  52. package/lib/types/functions/statistical/averageif/__tests__/index.spec.d.ts +16 -0
  53. package/lib/types/functions/statistical/averageif/index.d.ts +18 -0
  54. package/lib/types/functions/statistical/averageifs/__tests__/index.spec.d.ts +16 -0
  55. package/lib/types/functions/statistical/averageifs/index.d.ts +10 -0
  56. package/lib/types/functions/statistical/countblank/__tests__/index.spec.d.ts +16 -0
  57. package/lib/types/functions/statistical/countblank/index.d.ts +8 -0
  58. package/lib/types/functions/statistical/countif/__tests__/index.spec.d.ts +16 -0
  59. package/lib/types/functions/statistical/countif/index.d.ts +10 -0
  60. package/lib/types/functions/statistical/countifs/__tests__/index.spec.d.ts +16 -0
  61. package/lib/types/functions/statistical/countifs/index.d.ts +12 -0
  62. package/lib/types/functions/statistical/function-map.d.ts +2 -1
  63. package/lib/types/functions/statistical/maxa/__tests__/index.spec.d.ts +16 -0
  64. package/lib/types/functions/statistical/maxa/index.d.ts +9 -0
  65. package/lib/types/functions/statistical/maxifs/index.d.ts +1 -0
  66. package/lib/types/functions/statistical/mina/__tests__/index.spec.d.ts +16 -0
  67. package/lib/types/functions/statistical/mina/index.d.ts +9 -0
  68. package/lib/types/functions/statistical/minifs/__tests__/index.spec.d.ts +16 -0
  69. package/lib/types/functions/statistical/minifs/index.d.ts +10 -0
  70. package/lib/types/functions/text/concat/__tests__/index.spec.d.ts +16 -0
  71. package/lib/types/functions/text/concat/index.d.ts +9 -0
  72. package/lib/types/functions/text/function-map.d.ts +2 -1
  73. package/lib/types/index.d.ts +9 -9
  74. package/lib/types/models/__tests__/create-command-test-bed.d.ts +6 -6
  75. package/lib/types/services/dependency-manager.service.d.ts +2 -2
  76. package/lib/types/services/runtime.service.d.ts +5 -0
  77. package/lib/umd/index.js +1 -1
  78. package/package.json +10 -10
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Cos extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(variant: BaseValueObject): BaseValueObject;
8
+ }
@@ -1,9 +1,10 @@
1
1
  import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
- import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
3
  import { BaseFunction } from '../../base-function';
4
4
 
5
5
  export declare class Sumifs extends BaseFunction {
6
6
  minParams: number;
7
7
  maxParams: number;
8
- calculate(sumRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
8
+ calculate(sumRange: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
9
+ private _aggregateResults;
9
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
+
4
+ export declare class Tan extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(variant: BaseValueObject): BaseValueObject;
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
+
4
+ export declare class Tanh extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(variant: BaseValueObject): BaseValueObject;
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,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
+
4
+ export declare class Avedev extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...variants: BaseValueObject[]): BaseValueObject;
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
+
4
+ export declare class Averagea extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...variants: BaseValueObject[]): BaseValueObject;
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,18 @@
1
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Averageif extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ needsReferenceObject: boolean;
8
+ calculate(range: FunctionVariantType, criteria: FunctionVariantType, averageRange?: FunctionVariantType): FunctionVariantType;
9
+ private _handleSingleObject;
10
+ /**
11
+ * Create reference object, starting from the first cell in the upper left corner, the height is rowCount and the width is columnCount
12
+ * @param averageRange
13
+ * @param rowCount
14
+ * @param columnCount
15
+ * @returns
16
+ */
17
+ private _createRangeReferenceObject;
18
+ }
@@ -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 { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Averageifs extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(averageRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
9
+ private _aggregateResults;
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
+
4
+ export declare class Countblank extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(variant: BaseValueObject): BaseValueObject;
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,10 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Countif extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(range: BaseValueObject, criteria: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
9
+ private _countA;
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 { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { NumberValueObject } from '../../../engine/value-object/primitive-object';
4
+ import { BaseFunction } from '../../base-function';
5
+
6
+ export declare class Countifs extends BaseFunction {
7
+ minParams: number;
8
+ maxParams: number;
9
+ calculate(...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
10
+ private _aggregateResults;
11
+ }
12
+ export declare function countTrueValue(array: ArrayValueObject): NumberValueObject;
@@ -1,4 +1,5 @@
1
1
  import { FUNCTION_NAMES_STATISTICAL } from './function-names';
2
2
  import { StdevP } from './stdev-p';
3
+ import { Averageif } from './averageif';
3
4
 
4
- export declare const functionStatistical: (FUNCTION_NAMES_STATISTICAL | typeof StdevP)[][];
5
+ export declare const functionStatistical: ((FUNCTION_NAMES_STATISTICAL | typeof Averageif)[] | (FUNCTION_NAMES_STATISTICAL | typeof StdevP)[])[];
@@ -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
+
4
+ export declare class Maxa extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...variants: BaseValueObject[]): BaseValueObject;
8
+ private _validator;
9
+ }
@@ -6,4 +6,5 @@ export declare class Maxifs extends BaseFunction {
6
6
  minParams: number;
7
7
  maxParams: number;
8
8
  calculate(maxRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
9
+ private _aggregateResults;
9
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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Mina extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...variants: BaseValueObject[]): BaseValueObject;
8
+ private _validator;
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,10 @@
1
+ import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Minifs extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(minRange: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
9
+ private _aggregateResults;
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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { StringValueObject } from '../../../engine/value-object/primitive-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Concat extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(...textValues: BaseValueObject[]): StringValueObject;
9
+ }
@@ -1,5 +1,6 @@
1
1
  import { Concatenate } from './concatenate';
2
2
  import { FUNCTION_NAMES_TEXT } from './function-names';
3
3
  import { Lower } from './lower';
4
+ import { Concat } from './concat';
4
5
 
5
- export declare const functionText: ((FUNCTION_NAMES_TEXT | typeof Concatenate)[] | (FUNCTION_NAMES_TEXT | typeof Lower)[])[];
6
+ export declare const functionText: ((FUNCTION_NAMES_TEXT | typeof Concat)[] | (FUNCTION_NAMES_TEXT | typeof Concatenate)[] | (FUNCTION_NAMES_TEXT | typeof Lower)[])[];
@@ -21,15 +21,6 @@ export { type IFunctionNames } from './basics/function';
21
21
  export { includeFormulaLexerToken, isFormulaLexerToken, normalizeSheetName } from './basics/match-token';
22
22
  export { convertUnitDataToRuntime } from './basics/runtime';
23
23
  export { matchToken, compareToken, operatorToken } from './basics/token';
24
- export { RegisterFunctionMutation } from './commands/mutations/register-function.mutation';
25
- export { type ISetArrayFormulaDataMutationParams, SetArrayFormulaDataMutation, } from './commands/mutations/set-array-formula-data.mutation';
26
- export { RemoveDefinedNameMutation, SetDefinedNameMutation, type ISetDefinedNameMutationSearchParam, type ISetDefinedNameMutationParam } from './commands/mutations/set-defined-name.mutation';
27
- export { RemoveFeatureCalculationMutation, SetFeatureCalculationMutation, } from './commands/mutations/set-feature-calculation.mutation';
28
- export { type ISetFormulaCalculationNotificationMutation, type ISetFormulaCalculationResultMutation, type ISetFormulaCalculationStartMutation, SetFormulaCalculationNotificationMutation, SetFormulaCalculationResultMutation, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation, } from './commands/mutations/set-formula-calculation.mutation';
29
- export { type ISetFormulaDataMutationParams, SetFormulaDataMutation, } from './commands/mutations/set-formula-data.mutation';
30
- export { RemoveOtherFormulaMutation, SetOtherFormulaMutation, type ISetOtherFormulaMutationParams, type IRemoveOtherFormulaMutationParams } from './commands/mutations/set-other-formula.mutation';
31
- export { RemoveSuperTableMutation, SetSuperTableMutation, SetSuperTableOptionMutation, } from './commands/mutations/set-super-table.mutation';
32
- export { UnregisterFunctionMutation } from './commands/mutations/unregister-function.mutation';
33
24
  export { LexerNode } from './engine/analysis/lexer-node';
34
25
  export { LexerTreeBuilder } from './engine/analysis/lexer-tree-builder';
35
26
  export { BaseReferenceObject, type FunctionVariantType } from './engine/reference-object/base-reference-object';
@@ -98,3 +89,12 @@ export { handleNumfmtInCell } from './engine/utils/numfmt-kit';
98
89
  export { AsyncArrayObject } from './engine/reference-object/base-reference-object';
99
90
  export { strip, stripErrorMargin } from './engine/utils/math-kit';
100
91
  export { AsyncObject } from './engine/reference-object/base-reference-object';
92
+ export { RegisterFunctionMutation } from './commands/mutations/register-function.mutation';
93
+ export { type ISetArrayFormulaDataMutationParams, SetArrayFormulaDataMutation } from './commands/mutations/set-array-formula-data.mutation';
94
+ export { RemoveDefinedNameMutation, SetDefinedNameMutation, type ISetDefinedNameMutationSearchParam, type ISetDefinedNameMutationParam } from './commands/mutations/set-defined-name.mutation';
95
+ export { RemoveFeatureCalculationMutation, SetFeatureCalculationMutation } from './commands/mutations/set-feature-calculation.mutation';
96
+ export { SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation, SetFormulaCalculationNotificationMutation, SetFormulaCalculationResultMutation, type ISetFormulaCalculationStartMutation, type ISetFormulaCalculationNotificationMutation, type ISetFormulaCalculationResultMutation, type IFormulaDirtyData, } from './commands/mutations/set-formula-calculation.mutation';
97
+ export { SetFormulaDataMutation, type ISetFormulaDataMutationParams } from './commands/mutations/set-formula-data.mutation';
98
+ export { SetOtherFormulaMutation, RemoveOtherFormulaMutation, type ISetOtherFormulaMutationParams, type IRemoveOtherFormulaMutationParams } from './commands/mutations/set-other-formula.mutation';
99
+ export { SetSuperTableMutation, RemoveSuperTableMutation, SetSuperTableOptionMutation } from './commands/mutations/set-super-table.mutation';
100
+ export { UnregisterFunctionMutation } from './commands/mutations/unregister-function.mutation';
@@ -4,12 +4,12 @@ import { Dependency } from '@wendellhu/redi';
4
4
  export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
5
5
  univer: Univer;
6
6
  get: {
7
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
8
- <T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
9
- <T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
10
- <T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
11
- <T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
12
- <T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
7
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
8
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
9
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
10
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
11
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
12
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
13
13
  };
14
14
  sheet: import('@univerjs/core').Workbook;
15
15
  };
@@ -16,7 +16,7 @@ export interface IFormulaDependencyParam {
16
16
  export interface IDependencyManagerService {
17
17
  dispose(): void;
18
18
  getAllTree(): FormulaDependencyTree[];
19
- buildDependencyTree(shouldBeBuildTrees: FormulaDependencyTree[] | FormulaDependencyTreeCache): FormulaDependencyTree[];
19
+ buildDependencyTree(shouldBeBuildTrees: FormulaDependencyTree[] | FormulaDependencyTreeCache, dependencyTrees?: FormulaDependencyTree[]): FormulaDependencyTree[];
20
20
  clearDependencyForTree(shouldBeClearTree: Nullable<FormulaDependencyTree>): void;
21
21
  reset(): void;
22
22
  addOtherFormulaDependency(unitId: string, sheetId: string, formulaId: string, dependencyTree: FormulaDependencyTree): void;
@@ -46,7 +46,7 @@ export declare class DependencyManagerService extends Disposable implements IDep
46
46
  * return FormulaDependencyTree[]
47
47
  */
48
48
  getAllTree(): FormulaDependencyTree[];
49
- buildDependencyTree(shouldBeBuildTrees: FormulaDependencyTree[] | FormulaDependencyTreeCache): FormulaDependencyTree[];
49
+ buildDependencyTree(shouldBeBuildTrees: FormulaDependencyTree[] | FormulaDependencyTreeCache, dependencyTrees?: FormulaDependencyTree[]): FormulaDependencyTree[];
50
50
  /**
51
51
  * Build the dependency relationship between the trees.
52
52
  * @param allTrees all FormulaDependencyTree
@@ -48,6 +48,7 @@ export interface IExecutionInProgressParams {
48
48
  completedFormulasCount: number;
49
49
  totalArrayFormulasToCalculate: number;
50
50
  completedArrayFormulasCount: number;
51
+ formulaCycleIndex: number;
51
52
  stage: FormulaExecuteStageType;
52
53
  }
53
54
  export interface IFormulaRuntimeService {
@@ -65,6 +66,7 @@ export interface IFormulaRuntimeService {
65
66
  getUnitArrayFormula(): IArrayFormulaRangeType;
66
67
  stopExecution(): void;
67
68
  setFormulaExecuteStage(type: FormulaExecuteStageType): void;
69
+ setFormulaCycleIndex(index: number): void;
68
70
  isStopExecution(): boolean;
69
71
  getFormulaExecuteStage(): FormulaExecuteStageType;
70
72
  setRuntimeOtherData(formulaId: string, functionVariant: FunctionVariantType): void;
@@ -119,6 +121,7 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
119
121
  private _completedFormulasCount;
120
122
  private _totalArrayFormulasToCalculate;
121
123
  private _completedArrayFormulasCount;
124
+ private _formulaCycleIndex;
122
125
  private _isCycleDependency;
123
126
  constructor(_currentConfigService: IFormulaCurrentConfigService);
124
127
  get currentRow(): number;
@@ -139,6 +142,8 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
139
142
  getTotalFormulasToCalculate(): number;
140
143
  setCompletedFormulasCount(value: number): void;
141
144
  getCompletedFormulasCount(): number;
145
+ setFormulaCycleIndex(index: number): void;
146
+ getFormulaCycleIndex(): number;
142
147
  markedAsSuccessfullyExecuted(): void;
143
148
  markedAsNoFunctionsExecuted(): void;
144
149
  markedAsStopFunctionsExecuted(): void;