@univerjs/engine-formula 0.1.4 → 0.1.6

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 (168) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +3186 -2830
  3. package/lib/types/basics/calculate.d.ts +1 -15
  4. package/lib/types/basics/common.d.ts +17 -17
  5. package/lib/types/basics/dirty.d.ts +2 -16
  6. package/lib/types/basics/function.d.ts +23 -33
  7. package/lib/types/basics/match-token.d.ts +1 -15
  8. package/lib/types/basics/object-class-type.d.ts +2 -15
  9. package/lib/types/basics/runtime.d.ts +2 -16
  10. package/lib/types/commands/mutations/register-function.mutation.d.ts +2 -16
  11. package/lib/types/commands/mutations/set-array-formula-data.mutation.d.ts +4 -18
  12. package/lib/types/commands/mutations/set-defined-name.mutation.d.ts +14 -18
  13. package/lib/types/commands/mutations/set-feature-calculation.mutation.d.ts +3 -17
  14. package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +6 -18
  15. package/lib/types/commands/mutations/set-formula-data.mutation.d.ts +3 -17
  16. package/lib/types/commands/mutations/set-numfmt-formula-data.mutation.d.ts +3 -17
  17. package/lib/types/commands/mutations/set-other-formula.mutation.d.ts +15 -19
  18. package/lib/types/commands/mutations/set-super-table.mutation.d.ts +4 -18
  19. package/lib/types/commands/mutations/unregister-function.mutation.d.ts +2 -16
  20. package/lib/types/controller/calculate.controller.d.ts +3 -17
  21. package/lib/types/controller/formula.controller.d.ts +5 -20
  22. package/lib/types/controller/register-function.controller.d.ts +3 -17
  23. package/lib/types/controller/set-defined-name.controller.d.ts +2 -16
  24. package/lib/types/controller/set-feature-calculation.controller.d.ts +2 -16
  25. package/lib/types/controller/set-other-formula.controller.d.ts +2 -16
  26. package/lib/types/controller/set-super-table.controller.d.ts +2 -16
  27. package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +11 -26
  28. package/lib/types/engine/analysis/lexer-node.d.ts +7 -17
  29. package/lib/types/engine/analysis/lexer-tree-builder.d.ts +9 -20
  30. package/lib/types/engine/analysis/lexer.d.ts +10 -21
  31. package/lib/types/engine/analysis/parser.d.ts +14 -29
  32. package/lib/types/engine/ast-node/ast-root-node.d.ts +4 -18
  33. package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +3 -18
  34. package/lib/types/engine/ast-node/base-ast-node.d.ts +9 -21
  35. package/lib/types/engine/ast-node/function-node.d.ts +10 -24
  36. package/lib/types/engine/ast-node/lambda-node.d.ts +6 -20
  37. package/lib/types/engine/ast-node/lambda-parameter-node.d.ts +4 -19
  38. package/lib/types/engine/ast-node/null-node.d.ts +2 -16
  39. package/lib/types/engine/ast-node/operator-node.d.ts +6 -20
  40. package/lib/types/engine/ast-node/prefix-node.d.ts +8 -23
  41. package/lib/types/engine/ast-node/reference-node.d.ts +10 -27
  42. package/lib/types/engine/ast-node/suffix-node.d.ts +7 -22
  43. package/lib/types/engine/ast-node/union-node.d.ts +5 -19
  44. package/lib/types/engine/ast-node/value-node.d.ts +4 -18
  45. package/lib/types/engine/dependency/dependency-tree.d.ts +4 -19
  46. package/lib/types/engine/dependency/formula-dependency.d.ts +12 -25
  47. package/lib/types/engine/interpreter/interpreter.d.ts +6 -20
  48. package/lib/types/engine/reference-object/base-reference-object.d.ts +20 -32
  49. package/lib/types/engine/reference-object/cell-reference-object.d.ts +4 -18
  50. package/lib/types/engine/reference-object/column-reference-object.d.ts +2 -16
  51. package/lib/types/engine/reference-object/range-reference-object.d.ts +2 -16
  52. package/lib/types/engine/reference-object/row-reference-object.d.ts +2 -16
  53. package/lib/types/engine/reference-object/table-reference-object.d.ts +2 -17
  54. package/lib/types/engine/utils/array-object.d.ts +3 -17
  55. package/lib/types/engine/utils/ast-node-tool.d.ts +3 -17
  56. package/lib/types/engine/utils/cell.d.ts +2 -16
  57. package/lib/types/engine/utils/compare.d.ts +1 -15
  58. package/lib/types/engine/utils/function-definition.d.ts +1 -15
  59. package/lib/types/engine/utils/node-type.d.ts +5 -19
  60. package/lib/types/engine/utils/object-compare.d.ts +2 -16
  61. package/lib/types/engine/utils/prefixHandler.d.ts +4 -18
  62. package/lib/types/engine/utils/r1c1-reference.d.ts +2 -16
  63. package/lib/types/engine/utils/reference.d.ts +2 -17
  64. package/lib/types/engine/utils/relative-formula.d.ts +4 -0
  65. package/lib/types/engine/utils/sequence.d.ts +2 -16
  66. package/lib/types/engine/utils/value-object.d.ts +6 -0
  67. package/lib/types/engine/value-object/array-value-object.d.ts +5 -20
  68. package/lib/types/engine/value-object/base-value-object.d.ts +6 -21
  69. package/lib/types/engine/value-object/cube-value-object.d.ts +3 -17
  70. package/lib/types/engine/value-object/lambda-value-object.d.ts +4 -18
  71. package/lib/types/engine/value-object/primitive-object.d.ts +3 -17
  72. package/lib/types/functions/__tests__/create-function-test-bed.d.ts +13 -26
  73. package/lib/types/functions/base-function.d.ts +8 -24
  74. package/lib/types/functions/compatibility/function-map.d.ts +2 -16
  75. package/lib/types/functions/date/date/index.d.ts +2 -16
  76. package/lib/types/functions/date/day/index.d.ts +2 -16
  77. package/lib/types/functions/date/edate/index.d.ts +2 -16
  78. package/lib/types/functions/date/function-map.d.ts +2 -16
  79. package/lib/types/functions/date/month/index.d.ts +2 -16
  80. package/lib/types/functions/date/today/index.d.ts +3 -18
  81. package/lib/types/functions/date/year/index.d.ts +2 -16
  82. package/lib/types/functions/information/function-map.d.ts +2 -16
  83. package/lib/types/functions/information/isblank/index.d.ts +2 -16
  84. package/lib/types/functions/information/iserr/index.d.ts +2 -16
  85. package/lib/types/functions/information/iserror/index.d.ts +2 -16
  86. package/lib/types/functions/information/islogical/index.d.ts +2 -16
  87. package/lib/types/functions/information/isna/index.d.ts +2 -16
  88. package/lib/types/functions/information/isnontext/index.d.ts +2 -16
  89. package/lib/types/functions/information/isnumber/index.d.ts +2 -16
  90. package/lib/types/functions/information/isref/index.d.ts +3 -17
  91. package/lib/types/functions/information/istext/index.d.ts +2 -16
  92. package/lib/types/functions/logical/and/index.d.ts +2 -16
  93. package/lib/types/functions/logical/function-map.d.ts +4 -18
  94. package/lib/types/functions/logical/if/index.d.ts +2 -16
  95. package/lib/types/functions/logical/iferror/index.d.ts +3 -17
  96. package/lib/types/functions/logical/lambda/index.d.ts +2 -16
  97. package/lib/types/functions/logical/makearray/index.d.ts +3 -17
  98. package/lib/types/functions/logical/or/index.d.ts +2 -16
  99. package/lib/types/functions/lookup/address/index.d.ts +2 -16
  100. package/lib/types/functions/lookup/column/index.d.ts +3 -17
  101. package/lib/types/functions/lookup/columns/index.d.ts +2 -16
  102. package/lib/types/functions/lookup/function-map.d.ts +12 -22
  103. package/lib/types/functions/lookup/hlookup/index.d.ts +2 -16
  104. package/lib/types/functions/lookup/index/index.d.ts +3 -19
  105. package/lib/types/functions/lookup/indirect/index.d.ts +3 -17
  106. package/lib/types/functions/lookup/lookup/index.d.ts +3 -17
  107. package/lib/types/functions/lookup/match/index.d.ts +3 -17
  108. package/lib/types/functions/lookup/offset/index.d.ts +4 -18
  109. package/lib/types/functions/lookup/row/index.d.ts +3 -17
  110. package/lib/types/functions/lookup/rows/index.d.ts +2 -16
  111. package/lib/types/functions/lookup/vlookup/index.d.ts +5 -17
  112. package/lib/types/functions/lookup/xlookup/index.d.ts +3 -17
  113. package/lib/types/functions/lookup/xmatch/index.d.ts +3 -17
  114. package/lib/types/functions/math/abs/index.d.ts +2 -16
  115. package/lib/types/functions/math/acos/index.d.ts +2 -16
  116. package/lib/types/functions/math/acosh/index.d.ts +2 -16
  117. package/lib/types/functions/math/acot/index.d.ts +2 -16
  118. package/lib/types/functions/math/function-map.d.ts +4 -18
  119. package/lib/types/functions/math/mod/index.d.ts +2 -16
  120. package/lib/types/functions/math/power/index.d.ts +2 -16
  121. package/lib/types/functions/math/product/index.d.ts +2 -16
  122. package/lib/types/functions/math/subtotal/index.d.ts +3 -17
  123. package/lib/types/functions/math/sum/index.d.ts +2 -16
  124. package/lib/types/functions/math/sumif/index.d.ts +2 -16
  125. package/lib/types/functions/math/sumifs/index.d.ts +3 -18
  126. package/lib/types/functions/meta/compare/index.d.ts +3 -17
  127. package/lib/types/functions/meta/cube/index.d.ts +2 -16
  128. package/lib/types/functions/meta/divided/index.d.ts +2 -16
  129. package/lib/types/functions/meta/function-map.d.ts +2 -16
  130. package/lib/types/functions/meta/minus/index.d.ts +2 -16
  131. package/lib/types/functions/meta/multiply/index.d.ts +2 -16
  132. package/lib/types/functions/meta/plus/index.d.ts +2 -16
  133. package/lib/types/functions/statistical/average/index.d.ts +2 -16
  134. package/lib/types/functions/statistical/count/index.d.ts +2 -16
  135. package/lib/types/functions/statistical/counta/index.d.ts +2 -16
  136. package/lib/types/functions/statistical/function-map.d.ts +2 -16
  137. package/lib/types/functions/statistical/max/index.d.ts +2 -16
  138. package/lib/types/functions/statistical/min/index.d.ts +2 -16
  139. package/lib/types/functions/statistical/stdev-p/index.d.ts +3 -17
  140. package/lib/types/functions/statistical/stdev-s/index.d.ts +3 -17
  141. package/lib/types/functions/statistical/stdeva/index.d.ts +3 -17
  142. package/lib/types/functions/statistical/stdevpa/index.d.ts +3 -17
  143. package/lib/types/functions/statistical/var-p/index.d.ts +3 -17
  144. package/lib/types/functions/statistical/var-s/index.d.ts +3 -17
  145. package/lib/types/functions/statistical/vara/index.d.ts +3 -17
  146. package/lib/types/functions/statistical/varpa/index.d.ts +3 -17
  147. package/lib/types/functions/text/concatenate/index.d.ts +2 -16
  148. package/lib/types/functions/text/function-map.d.ts +2 -16
  149. package/lib/types/functions/text/len/index.d.ts +2 -16
  150. package/lib/types/functions/text/lenb/index.d.ts +2 -16
  151. package/lib/types/functions/text/text/index.d.ts +2 -16
  152. package/lib/types/index.d.ts +8 -5
  153. package/lib/types/models/__tests__/create-command-test-bed.d.ts +10 -25
  154. package/lib/types/models/formula-data.model.d.ts +3 -18
  155. package/lib/types/plugin.d.ts +4 -19
  156. package/lib/types/services/active-dirty-manager.service.d.ts +35 -0
  157. package/lib/types/services/calculate-formula.service.d.ts +12 -27
  158. package/lib/types/services/current-data.service.d.ts +20 -19
  159. package/lib/types/services/defined-names.service.d.ts +52 -25
  160. package/lib/types/services/feature-calculation-manager.service.d.ts +5 -20
  161. package/lib/types/services/function.service.d.ts +5 -20
  162. package/lib/types/services/other-formula-manager.service.d.ts +8 -19
  163. package/lib/types/services/runtime.service.d.ts +6 -21
  164. package/lib/types/services/super-table.service.d.ts +4 -19
  165. package/lib/umd/index.js +1 -1
  166. package/package.json +6 -6
  167. package/lib/types/engine/utils/object-covert.d.ts +0 -18
  168. /package/lib/types/engine/utils/__tests__/{object-covert.spec.d.ts → value-object.spec.d.ts} +0 -0
@@ -1,20 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, IUnitRangeName } from '@univerjs/core';
17
- import { AbsoluteRefType } from '@univerjs/core';
1
+ import { IRange, IUnitRangeName, AbsoluteRefType } from '@univerjs/core';
2
+
18
3
  export interface IAbsoluteRefTypeForRange {
19
4
  startAbsoluteRefType: AbsoluteRefType;
20
5
  endAbsoluteRefType?: AbsoluteRefType;
@@ -0,0 +1,4 @@
1
+ import { LexerTreeBuilder } from '../analysis/lexer-tree-builder';
2
+
3
+ export declare function isFormulaTransformable(lexerTreeBuilder: LexerTreeBuilder, formula: string): boolean;
4
+ export declare function transformFormula(lexerTreeBuilder: LexerTreeBuilder, formula: string, originRow: number, originCol: number, targetRow: number, targetCol: number): string;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { LexerNode } from '../analysis/lexer-node';
1
+ import { LexerNode } from '../analysis/lexer-node';
2
+
17
3
  export declare enum sequenceNodeType {
18
4
  NORMAL = 0,
19
5
  NUMBER = 1,
@@ -0,0 +1,6 @@
1
+ import { NumberValueObject } from '../value-object/primitive-object';
2
+ import { BaseValueObject } from '../value-object/base-value-object';
3
+ import { FunctionVariantType } from '../reference-object/base-reference-object';
4
+
5
+ export declare function convertTonNumber(valueObject: BaseValueObject): NumberValueObject;
6
+ export declare function isSingleValueObject(valueObject: FunctionVariantType): boolean;
@@ -1,24 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { compareToken } from '../../basics/token';
18
- import { ArrayBinarySearchType, ArrayOrderSearchType } from '../utils/compare';
19
- import type { callbackMapFnType, IArrayValueObject } from './base-value-object';
20
- import { BaseValueObject, ErrorValueObject } from './base-value-object';
21
1
  import { BooleanValueObject, NullValueObject, NumberValueObject, StringValueObject } from './primitive-object';
2
+ import { callbackMapFnType, IArrayValueObject, BaseValueObject, ErrorValueObject } from './base-value-object';
3
+ import { ArrayBinarySearchType, ArrayOrderSearchType } from '../utils/compare';
4
+ import { compareToken } from '../../basics/token';
5
+ import { Nullable } from '@univerjs/core';
6
+
22
7
  export declare function fromObjectToString(array: IArrayValueObject): string;
23
8
  export declare function transformToValueObject(array?: Array<Array<number | string | boolean | null>>): BaseValueObject[][];
24
9
  export declare function transformToValue(array?: Nullable<BaseValueObject>[][]): (string | number | boolean | null)[][];
@@ -1,24 +1,10 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { FormulaAstLRU } from '../../basics/cache-lru';
18
- import { ConcatenateType } from '../../basics/common';
19
- import { ErrorType } from '../../basics/error-type';
20
- import { ObjectClassType } from '../../basics/object-class-type';
21
1
  import { compareToken } from '../../basics/token';
2
+ import { ObjectClassType } from '../../basics/object-class-type';
3
+ import { ErrorType } from '../../basics/error-type';
4
+ import { ConcatenateType } from '../../basics/common';
5
+ import { FormulaAstLRU } from '../../basics/cache-lru';
6
+ import { Nullable } from '@univerjs/core';
7
+
22
8
  export type callbackMapFnType = (currentValue: BaseValueObject, row: number, column: number) => BaseValueObject;
23
9
  export interface IArrayValueObject {
24
10
  calculateValueList: Nullable<BaseValueObject>[][];
@@ -48,7 +34,6 @@ export declare class BaseValueObject extends ObjectClassType {
48
34
  setValue(value: string | number | boolean): void;
49
35
  setArrayValue(value: BaseValueObject[][]): void;
50
36
  isCube(): boolean;
51
- isArray(): boolean;
52
37
  isString(): boolean;
53
38
  isNumber(): boolean;
54
39
  isBoolean(): boolean;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ArrayValueObject } from './array-value-object';
17
- import { BaseValueObject } from './base-value-object';
18
1
  import { NumberValueObject } from './primitive-object';
2
+ import { BaseValueObject } from './base-value-object';
3
+ import { ArrayValueObject } from './array-value-object';
4
+
19
5
  export declare class CubeValueObject extends BaseValueObject {
20
6
  static create(values: ArrayValueObject[]): CubeValueObject;
21
7
  isCube(): boolean;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseAstNode } from '../ast-node/base-ast-node';
17
- import type { Interpreter } from '../interpreter/interpreter';
18
- import { AsyncObject } from '../reference-object/base-reference-object';
19
1
  import { BaseValueObject } from './base-value-object';
2
+ import { AsyncObject } from '../reference-object/base-reference-object';
3
+ import { Interpreter } from '../interpreter/interpreter';
4
+ import { BaseAstNode } from '../ast-node/base-ast-node';
5
+
20
6
  export declare class LambdaValueObjectObject extends BaseValueObject {
21
7
  private _lambdaNode;
22
8
  private _interpreter;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { compareToken } from '../../basics/token';
17
- import { FormulaAstLRU } from '../../basics/cache-lru';
18
1
  import { BaseValueObject, ErrorValueObject } from './base-value-object';
2
+ import { FormulaAstLRU } from '../../basics/cache-lru';
3
+ import { compareToken } from '../../basics/token';
4
+
19
5
  export type PrimitiveValueType = string | boolean | number | null;
20
6
  export declare class NullValueObject extends BaseValueObject {
21
7
  private static _instance;
@@ -1,34 +1,21 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IWorkbookData } from '@univerjs/core';
17
- import { Univer } from '@univerjs/core';
18
- import type { Dependency } from '@wendellhu/redi';
19
- import type { ISheetData } from '../../basics/common';
1
+ import { FunctionVariantType } from '../../engine/reference-object/base-reference-object';
2
+ import { ISheetData } from '../../basics/common';
3
+ import { Dependency } from '@wendellhu/redi';
4
+ import { IWorkbookData, Univer } from '@univerjs/core';
5
+
20
6
  export declare function createFunctionTestBed(workbookConfig?: IWorkbookData, dependencies?: Dependency[]): {
21
7
  univer: Univer;
22
8
  get: {
23
- <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp | undefined): T;
24
- <T_1>(id: import("@wendellhu/redi").DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_1[];
25
- <T_2>(id: import("@wendellhu/redi").DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_2 | null;
26
- <T_3>(id: import("@wendellhu/redi").DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_3;
27
- <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;
28
- <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;
9
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
10
+ <T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
11
+ <T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
12
+ <T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
13
+ <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;
14
+ <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;
29
15
  };
30
- sheet: import("@univerjs/core").Workbook;
16
+ sheet: import('@univerjs/core').Workbook;
31
17
  unitId: string;
32
18
  sheetId: string;
33
19
  sheetData: ISheetData;
34
20
  };
21
+ export declare function getObjectValue(result: FunctionVariantType): string | number | boolean | (string | number | boolean | null)[][];
@@ -1,27 +1,11 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IRange, Nullable } from '@univerjs/core';
17
- import { Disposable } from '@univerjs/core';
18
- import type { IFunctionNames } from '../basics/function';
19
- import type { BaseReferenceObject, FunctionVariantType, NodeValueType } from '../engine/reference-object/base-reference-object';
20
- import type { ArrayBinarySearchType } from '../engine/utils/compare';
21
- import { ArrayOrderSearchType } from '../engine/utils/compare';
22
- import type { ArrayValueObject } from '../engine/value-object/array-value-object';
23
- import { type BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
24
- import { type PrimitiveValueType } from '../engine/value-object/primitive-object';
1
+ import { PrimitiveValueType } from '../engine/value-object/primitive-object';
2
+ import { BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
3
+ import { ArrayValueObject } from '../engine/value-object/array-value-object';
4
+ import { ArrayBinarySearchType, ArrayOrderSearchType } from '../engine/utils/compare';
5
+ import { BaseReferenceObject, FunctionVariantType, NodeValueType } from '../engine/reference-object/base-reference-object';
6
+ import { IFunctionNames } from '../basics/function';
7
+ import { IRange, Nullable, Disposable } from '@univerjs/core';
8
+
25
9
  export declare class BaseFunction extends Disposable {
26
10
  private _name;
27
11
  private _unitId;
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { StdevS } from '../statistical/stdev-s';
17
1
  import { FUNCTION_NAMES_COMPATIBILITY } from './function-names';
2
+ import { StdevS } from '../statistical/stdev-s';
3
+
18
4
  export declare const functionCompatibility: (FUNCTION_NAMES_COMPATIBILITY | typeof StdevS)[][];
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class DateFunction extends BaseFunction {
19
5
  calculate(year: BaseValueObject, month: BaseValueObject, day: BaseValueObject): BaseValueObject;
20
6
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Day extends BaseFunction {
19
5
  calculate(serialNumber: BaseValueObject): BaseValueObject;
20
6
  private _handleSingleObject;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  /**
19
5
  * TODO@Dushusir: support plaine text date: =EDATE("2020-1-1",1), =EDATE("2020/1/1",1) and other formats
20
6
  */
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { DateFunction } from './date';
17
1
  import { FUNCTION_NAMES_DATE } from './function-names';
2
+ import { DateFunction } from './date';
3
+
18
4
  export declare const functionDate: (FUNCTION_NAMES_DATE | typeof DateFunction)[][];
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Month extends BaseFunction {
19
5
  calculate(serialNumber: BaseValueObject): BaseValueObject;
20
6
  private _handleSingleObject;
@@ -1,22 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
- import { ErrorValueObject } from '../../../engine/value-object/base-value-object';
18
- import { NumberValueObject } from '../../../engine/value-object/primitive-object';
19
1
  import { BaseFunction } from '../../base-function';
2
+ import { NumberValueObject } from '../../../engine/value-object/primitive-object';
3
+ import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
4
+
20
5
  export declare class Today extends BaseFunction {
21
6
  calculate(value?: BaseValueObject): ErrorValueObject | NumberValueObject;
22
7
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Year extends BaseFunction {
19
5
  calculate(serialNumber: BaseValueObject): BaseValueObject;
20
6
  private _handleSingleObject;
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { FUNCTION_NAMES_INFORMATION } from './function-names';
17
1
  import { Isblank } from './isblank';
2
+ import { FUNCTION_NAMES_INFORMATION } from './function-names';
3
+
18
4
  export declare const functionInformation: (FUNCTION_NAMES_INFORMATION | typeof Isblank)[][];
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Isblank extends BaseFunction {
19
5
  calculate(value: BaseValueObject): BaseValueObject;
20
6
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Iserr extends BaseFunction {
19
5
  calculate(value: BaseValueObject): BaseValueObject;
20
6
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Iserror extends BaseFunction {
19
5
  calculate(value: BaseValueObject): BaseValueObject;
20
6
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Islogical extends BaseFunction {
19
5
  calculate(value: BaseValueObject): BaseValueObject;
20
6
  }
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type BaseValueObject } from '../../../engine/value-object/base-value-object';
17
1
  import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+
18
4
  export declare class Isna extends BaseFunction {
19
5
  calculate(value: BaseValueObject): BaseValueObject;
20
6
  }