@univerjs/engine-formula 0.2.4 → 0.2.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 (163) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +11684 -8513
  3. package/lib/types/basics/common.d.ts +2 -0
  4. package/lib/types/commands/mutations/set-feature-calculation.mutation.d.ts +6 -3
  5. package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +4 -10
  6. package/lib/types/controller/formula.controller.d.ts +1 -2
  7. package/lib/types/controller/set-dependency.controller.d.ts +4 -1
  8. package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +7 -8
  9. package/lib/types/engine/ast-node/function-node.d.ts +1 -1
  10. package/lib/types/engine/ast-node/prefix-node.d.ts +1 -2
  11. package/lib/types/engine/ast-node/reference-node.d.ts +1 -1
  12. package/lib/types/engine/ast-node/suffix-node.d.ts +1 -1
  13. package/lib/types/engine/dependency/dependency-tree.d.ts +4 -1
  14. package/lib/types/engine/dependency/formula-dependency.d.ts +1 -0
  15. package/lib/types/engine/utils/prefixHandler.d.ts +1 -2
  16. package/lib/types/engine/value-object/array-value-object.d.ts +1 -0
  17. package/lib/types/engine/value-object/base-value-object.d.ts +1 -0
  18. package/lib/types/engine/value-object/primitive-object.d.ts +3 -0
  19. package/lib/types/functions/__tests__/create-function-test-bed.d.ts +7 -8
  20. package/lib/types/functions/date/datedif/__tests__/index.spec.d.ts +16 -0
  21. package/lib/types/functions/date/datedif/index.d.ts +9 -0
  22. package/lib/types/functions/date/days/__tests__/index.spec.d.ts +16 -0
  23. package/lib/types/functions/date/days/index.d.ts +8 -0
  24. package/lib/types/functions/date/days360/__tests__/index.spec.d.ts +16 -0
  25. package/lib/types/functions/date/days360/index.d.ts +9 -0
  26. package/lib/types/functions/date/eomonth/__tests__/index.spec.d.ts +16 -0
  27. package/lib/types/functions/date/eomonth/index.d.ts +8 -0
  28. package/lib/types/functions/date/function-map.d.ts +1 -1
  29. package/lib/types/functions/date/isoweeknum/__tests__/index.spec.d.ts +16 -0
  30. package/lib/types/functions/date/isoweeknum/index.d.ts +9 -0
  31. package/lib/types/functions/date/networkdays/index.d.ts +1 -0
  32. package/lib/types/functions/date/networkdays-intl/index.d.ts +1 -0
  33. package/lib/types/functions/date/weekday/index.d.ts +1 -0
  34. package/lib/types/functions/date/weeknum/__tests__/index.spec.d.ts +16 -0
  35. package/lib/types/functions/date/weeknum/index.d.ts +10 -0
  36. package/lib/types/functions/date/workday/index.d.ts +1 -0
  37. package/lib/types/functions/date/workday-intl/index.d.ts +2 -0
  38. package/lib/types/functions/date/yearfrac/__tests__/index.spec.d.ts +16 -0
  39. package/lib/types/functions/date/yearfrac/index.d.ts +12 -0
  40. package/lib/types/functions/information/cell/__tests__/index.spec.d.ts +16 -0
  41. package/lib/types/functions/information/cell/index.d.ts +12 -0
  42. package/lib/types/functions/information/error-type/__tests__/index.spec.d.ts +16 -0
  43. package/lib/types/functions/information/error-type/index.d.ts +10 -0
  44. package/lib/types/functions/information/function-map.d.ts +2 -1
  45. package/lib/types/functions/information/type/__tests__/index.spec.d.ts +16 -0
  46. package/lib/types/functions/information/type/index.d.ts +10 -0
  47. package/lib/types/functions/lookup/areas/__tests__/index.spec.d.ts +16 -0
  48. package/lib/types/functions/lookup/areas/index.d.ts +11 -0
  49. package/lib/types/functions/lookup/choosecols/__tests__/index.spec.d.ts +16 -0
  50. package/lib/types/functions/lookup/choosecols/index.d.ts +9 -0
  51. package/lib/types/functions/lookup/chooserows/__tests__/index.spec.d.ts +16 -0
  52. package/lib/types/functions/lookup/chooserows/index.d.ts +9 -0
  53. package/lib/types/functions/lookup/filter/__tests__/index.spec.d.ts +16 -0
  54. package/lib/types/functions/lookup/filter/index.d.ts +11 -0
  55. package/lib/types/functions/lookup/function-map.d.ts +3 -6
  56. package/lib/types/functions/lookup/hstack/__tests__/index.spec.d.ts +16 -0
  57. package/lib/types/functions/lookup/hstack/index.d.ts +9 -0
  58. package/lib/types/functions/lookup/sort/__tests__/index.spec.d.ts +16 -0
  59. package/lib/types/functions/lookup/sort/index.d.ts +14 -0
  60. package/lib/types/functions/lookup/sortby/__tests__/index.spec.d.ts +16 -0
  61. package/lib/types/functions/lookup/sortby/index.d.ts +17 -0
  62. package/lib/types/functions/lookup/transpose/__tests__/index.spec.d.ts +16 -0
  63. package/lib/types/functions/lookup/transpose/index.d.ts +9 -0
  64. package/lib/types/functions/lookup/unique/__tests__/index.spec.d.ts +16 -0
  65. package/lib/types/functions/lookup/unique/index.d.ts +12 -0
  66. package/lib/types/functions/lookup/vstack/__tests__/index.spec.d.ts +16 -0
  67. package/lib/types/functions/lookup/vstack/index.d.ts +9 -0
  68. package/lib/types/functions/lookup/xlookup/index.d.ts +1 -0
  69. package/lib/types/functions/math/base/index.d.ts +1 -0
  70. package/lib/types/functions/math/ceiling/__tests__/index.spec.d.ts +16 -0
  71. package/lib/types/functions/math/ceiling/index.d.ts +8 -0
  72. package/lib/types/functions/math/ceiling-math/__tests__/index.spec.d.ts +16 -0
  73. package/lib/types/functions/math/ceiling-math/index.d.ts +9 -0
  74. package/lib/types/functions/math/ceiling-precise/__tests__/index.spec.d.ts +16 -0
  75. package/lib/types/functions/math/ceiling-precise/index.d.ts +8 -0
  76. package/lib/types/functions/math/cosh/index.d.ts +1 -1
  77. package/lib/types/functions/math/cot/index.d.ts +1 -0
  78. package/lib/types/functions/math/coth/index.d.ts +1 -0
  79. package/lib/types/functions/math/csc/index.d.ts +1 -0
  80. package/lib/types/functions/math/csch/index.d.ts +1 -0
  81. package/lib/types/functions/math/decimal/__tests__/index.spec.d.ts +16 -0
  82. package/lib/types/functions/math/decimal/index.d.ts +9 -0
  83. package/lib/types/functions/math/degrees/__tests__/index.spec.d.ts +16 -0
  84. package/lib/types/functions/math/degrees/index.d.ts +9 -0
  85. package/lib/types/functions/math/even/__tests__/index.spec.d.ts +16 -0
  86. package/lib/types/functions/math/even/index.d.ts +9 -0
  87. package/lib/types/functions/math/exp/__tests__/index.spec.d.ts +16 -0
  88. package/lib/types/functions/math/exp/index.d.ts +8 -0
  89. package/lib/types/functions/math/floor/__tests__/index.spec.d.ts +16 -0
  90. package/lib/types/functions/math/floor/index.d.ts +8 -0
  91. package/lib/types/functions/math/floor-math/__tests__/index.spec.d.ts +16 -0
  92. package/lib/types/functions/math/floor-math/index.d.ts +8 -0
  93. package/lib/types/functions/math/floor-precise/__tests__/index.spec.d.ts +16 -0
  94. package/lib/types/functions/math/floor-precise/index.d.ts +8 -0
  95. package/lib/types/functions/math/function-map.d.ts +3 -2
  96. package/lib/types/functions/math/ln/__tests__/index.spec.d.ts +16 -0
  97. package/lib/types/functions/math/ln/index.d.ts +8 -0
  98. package/lib/types/functions/math/log/__tests__/index.spec.d.ts +16 -0
  99. package/lib/types/functions/math/log/index.d.ts +8 -0
  100. package/lib/types/functions/math/log10/__tests__/index.spec.d.ts +16 -0
  101. package/lib/types/functions/math/log10/index.d.ts +8 -0
  102. package/lib/types/functions/math/mround/__tests__/index.spec.d.ts +16 -0
  103. package/lib/types/functions/math/mround/index.d.ts +8 -0
  104. package/lib/types/functions/math/odd/__tests__/index.spec.d.ts +16 -0
  105. package/lib/types/functions/math/odd/index.d.ts +9 -0
  106. package/lib/types/functions/math/pi/__tests__/index.spec.d.ts +16 -0
  107. package/lib/types/functions/math/pi/index.d.ts +8 -0
  108. package/lib/types/functions/math/radians/__tests__/index.spec.d.ts +16 -0
  109. package/lib/types/functions/math/radians/index.d.ts +9 -0
  110. package/lib/types/functions/math/rand/__tests__/index.spec.d.ts +16 -0
  111. package/lib/types/functions/math/rand/index.d.ts +8 -0
  112. package/lib/types/functions/math/randarray/__tests__/index.spec.d.ts +16 -0
  113. package/lib/types/functions/math/randarray/index.d.ts +13 -0
  114. package/lib/types/functions/math/randbetween/__tests__/index.spec.d.ts +16 -0
  115. package/lib/types/functions/math/randbetween/index.d.ts +8 -0
  116. package/lib/types/functions/math/round/__tests__/index.spec.d.ts +16 -0
  117. package/lib/types/functions/math/round/index.d.ts +8 -0
  118. package/lib/types/functions/math/rounddown/__tests__/index.spec.d.ts +16 -0
  119. package/lib/types/functions/math/rounddown/index.d.ts +8 -0
  120. package/lib/types/functions/math/roundup/__tests__/index.spec.d.ts +16 -0
  121. package/lib/types/functions/math/roundup/index.d.ts +8 -0
  122. package/lib/types/functions/math/sec/__tests__/index.spec.d.ts +16 -0
  123. package/lib/types/functions/math/sec/index.d.ts +9 -0
  124. package/lib/types/functions/math/sech/__tests__/index.spec.d.ts +16 -0
  125. package/lib/types/functions/math/sech/index.d.ts +9 -0
  126. package/lib/types/functions/math/sqrt/__tests__/index.spec.d.ts +16 -0
  127. package/lib/types/functions/math/sqrt/index.d.ts +8 -0
  128. package/lib/types/functions/math/sqrtpi/__tests__/index.spec.d.ts +16 -0
  129. package/lib/types/functions/math/sqrtpi/index.d.ts +8 -0
  130. package/lib/types/functions/math/sumproduct/index.d.ts +2 -0
  131. package/lib/types/functions/math/sumsq/__tests__/index.spec.d.ts +16 -0
  132. package/lib/types/functions/math/sumsq/index.d.ts +8 -0
  133. package/lib/types/functions/math/sumx2my2/__tests__/index.spec.d.ts +16 -0
  134. package/lib/types/functions/math/sumx2my2/index.d.ts +9 -0
  135. package/lib/types/functions/math/sumx2py2/__tests__/index.spec.d.ts +16 -0
  136. package/lib/types/functions/math/sumx2py2/index.d.ts +9 -0
  137. package/lib/types/functions/math/sumxmy2/__tests__/index.spec.d.ts +16 -0
  138. package/lib/types/functions/math/sumxmy2/index.d.ts +9 -0
  139. package/lib/types/functions/math/trunc/__tests__/index.spec.d.ts +16 -0
  140. package/lib/types/functions/math/trunc/index.d.ts +8 -0
  141. package/lib/types/functions/text/function-map.d.ts +6 -3
  142. package/lib/types/functions/text/rept/__test__/index.spec.d.ts +16 -0
  143. package/lib/types/functions/text/rept/index.d.ts +8 -0
  144. package/lib/types/functions/text/textafter/__test__/index.spec.d.ts +16 -0
  145. package/lib/types/functions/text/textafter/index.d.ts +15 -0
  146. package/lib/types/functions/text/textbefore/__test__/index.spec.d.ts +16 -0
  147. package/lib/types/functions/text/textbefore/index.d.ts +15 -0
  148. package/lib/types/functions/text/textsplit/__test__/index.spec.d.ts +16 -0
  149. package/lib/types/functions/text/textsplit/index.d.ts +15 -0
  150. package/lib/types/index.d.ts +3 -3
  151. package/lib/types/models/__tests__/create-command-test-bed.d.ts +7 -8
  152. package/lib/types/plugin.d.ts +1 -2
  153. package/lib/types/services/active-dirty-manager.service.d.ts +1 -1
  154. package/lib/types/services/current-data.service.d.ts +11 -1
  155. package/lib/types/services/defined-names.service.d.ts +1 -1
  156. package/lib/types/services/dependency-manager.service.d.ts +16 -6
  157. package/lib/types/services/feature-calculation-manager.service.d.ts +19 -12
  158. package/lib/types/services/function.service.d.ts +2 -3
  159. package/lib/types/services/other-formula-manager.service.d.ts +1 -1
  160. package/lib/types/services/runtime.service.d.ts +1 -1
  161. package/lib/types/services/super-table.service.d.ts +1 -1
  162. package/lib/umd/index.js +1 -1
  163. package/package.json +9 -11
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Choosecols extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(array: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
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,9 @@
1
+ import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Chooserows extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(array: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
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,11 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Filter extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(array: BaseValueObject, include: BaseValueObject, ifEmpty?: BaseValueObject): BaseValueObject;
8
+ private _getResultArrayByR1C1;
9
+ private _getResultArrayByR1;
10
+ private _getResultArrayByC1;
11
+ }
@@ -1,13 +1,10 @@
1
- import { Address } from './address';
2
- import { Column } from './column';
3
1
  import { FUNCTION_NAMES_LOOKUP } from './function-names';
4
- import { Hlookup } from './hlookup';
2
+ import { Choose } from './choose';
3
+ import { Hstack } from './hstack';
5
4
  import { Indirect } from './indirect';
6
5
  import { Lookup } from './lookup';
7
6
  import { Match } from './match';
8
- import { Vlookup } from './vlookup';
9
7
  import { Xlookup } from './xlookup';
10
8
  import { Xmatch } from './xmatch';
11
- import { Choose } from './choose';
12
9
 
13
- export declare const functionLookup: ((FUNCTION_NAMES_LOOKUP | typeof Address)[] | (FUNCTION_NAMES_LOOKUP | typeof Choose)[] | (FUNCTION_NAMES_LOOKUP | typeof Column)[] | (FUNCTION_NAMES_LOOKUP | typeof Indirect)[] | (FUNCTION_NAMES_LOOKUP | typeof Vlookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Lookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Match)[] | (FUNCTION_NAMES_LOOKUP | typeof Hlookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Xlookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Xmatch)[])[];
10
+ export declare const functionLookup: ((FUNCTION_NAMES_LOOKUP | typeof Choose)[] | (FUNCTION_NAMES_LOOKUP | typeof Hstack)[] | (FUNCTION_NAMES_LOOKUP | typeof Indirect)[] | (FUNCTION_NAMES_LOOKUP | typeof Lookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Match)[] | (FUNCTION_NAMES_LOOKUP | typeof Xlookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Xmatch)[])[];
@@ -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 { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Hstack extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
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,14 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Sort extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(array: BaseValueObject, sortIndex?: BaseValueObject, sortOrder?: BaseValueObject, byCol?: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
9
+ private _checkArrayError;
10
+ private _getResult;
11
+ private _sort;
12
+ private _sortAsc;
13
+ private _sortDesc;
14
+ }
@@ -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,17 @@
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 Sortby extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ErrorValueObject | ArrayValueObject;
9
+ private _getVariantsError;
10
+ private _getResultArray;
11
+ private _getByArraysAndSortOrders;
12
+ private _transposeArray;
13
+ private _sort;
14
+ private _compare;
15
+ private _asc;
16
+ private _desc;
17
+ }
@@ -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 { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Transpose extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(array: BaseValueObject): BaseValueObject | ArrayValueObject;
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,12 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Unique extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(array: BaseValueObject, byCol?: BaseValueObject, exactlyOnce?: BaseValueObject): BaseValueObject;
8
+ private _getResult;
9
+ private _getRepeatRows;
10
+ private _getRepeatRowsByObjects;
11
+ private _transposeArray;
12
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { BaseFunction } from '../../base-function';
4
+
5
+ export declare class Vstack extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
9
+ }
@@ -6,6 +6,7 @@ export declare class Xlookup extends BaseFunction {
6
6
  minParams: number;
7
7
  maxParams: number;
8
8
  calculate(lookupValue: BaseValueObject, lookupArray: ArrayValueObject, returnArray: ArrayValueObject, ifNotFound?: BaseValueObject, matchMode?: BaseValueObject, searchMode?: BaseValueObject): BaseValueObject | ArrayValueObject;
9
+ private _getResult;
9
10
  private _handleExpandObject;
10
11
  private _handleSingleObject;
11
12
  private _getSearchModeValue;
@@ -6,4 +6,5 @@ export declare class Base extends BaseFunction {
6
6
  minParams: number;
7
7
  maxParams: number;
8
8
  calculate(number: BaseValueObject, radix: BaseValueObject, minLength?: BaseValueObject): BaseValueObject | StringValueObject;
9
+ private _handleSingleObject;
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 Ceiling extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance: 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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class CeilingMath extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance?: BaseValueObject, mode?: BaseValueObject): BaseValueObject;
8
+ private _getResult;
9
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class CeilingPrecise extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance?: BaseValueObject): BaseValueObject;
8
+ }
@@ -4,5 +4,5 @@ import { BaseFunction } from '../../base-function';
4
4
  export declare class Cosh extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
- calculate(variant: BaseValueObject): BaseValueObject;
7
+ calculate(number: BaseValueObject): BaseValueObject;
8
8
  }
@@ -5,4 +5,5 @@ export declare class Cot extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(variant: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Coth extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(variant: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Csc extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(variant: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Csch extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(variant: BaseValueObject): BaseValueObject;
8
+ private _handleSingleObject;
8
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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Decimal extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(text: BaseValueObject, radix: BaseValueObject): BaseValueObject;
8
+ private _isValidCharForRadix;
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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Degrees extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(angle: 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,9 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Even extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: 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 { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Exp 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 Floor extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance: 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 FloorMath extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance?: BaseValueObject, mode?: 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 FloorPrecise extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, significance?: BaseValueObject): BaseValueObject;
8
+ }
@@ -1,7 +1,8 @@
1
- import { Base } from './base';
2
1
  import { FUNCTION_NAMES_MATH } from './function-names';
2
+ import { Base } from './base';
3
+ import { Randarray } from './randarray';
3
4
  import { Subtotal } from './subtotal';
4
5
  import { Sum } from './sum';
5
6
  import { Sumifs } from './sumifs';
6
7
 
7
- export declare const functionMath: ((FUNCTION_NAMES_MATH | typeof Base)[] | (FUNCTION_NAMES_MATH | typeof Subtotal)[] | (FUNCTION_NAMES_MATH | typeof Sum)[] | (FUNCTION_NAMES_MATH | typeof Sumifs)[])[];
8
+ export declare const functionMath: ((FUNCTION_NAMES_MATH | typeof Base)[] | (FUNCTION_NAMES_MATH | typeof Randarray)[] | (FUNCTION_NAMES_MATH | typeof Subtotal)[] | (FUNCTION_NAMES_MATH | typeof Sum)[] | (FUNCTION_NAMES_MATH | typeof Sumifs)[])[];