@univerjs/engine-formula 0.2.5 → 0.2.7

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 (82) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +11766 -9790
  3. package/lib/types/engine/dependency/dependency-tree.d.ts +1 -1
  4. package/lib/types/engine/dependency/formula-dependency.d.ts +6 -1
  5. package/lib/types/functions/date/datedif/index.d.ts +1 -0
  6. package/lib/types/functions/date/days360/index.d.ts +1 -0
  7. package/lib/types/functions/date/networkdays/index.d.ts +1 -0
  8. package/lib/types/functions/date/networkdays-intl/index.d.ts +1 -0
  9. package/lib/types/functions/date/weekday/index.d.ts +1 -0
  10. package/lib/types/functions/date/weeknum/index.d.ts +2 -1
  11. package/lib/types/functions/date/workday/index.d.ts +1 -0
  12. package/lib/types/functions/date/workday-intl/index.d.ts +2 -0
  13. package/lib/types/functions/date/yearfrac/index.d.ts +4 -0
  14. package/lib/types/functions/information/cell/index.d.ts +2 -2
  15. package/lib/types/functions/information/error-type/index.d.ts +1 -1
  16. package/lib/types/functions/information/iseven/iseven.d.ts +2 -3
  17. package/lib/types/functions/information/isodd/isodd.d.ts +2 -3
  18. package/lib/types/functions/logical/false/__tests__/index.spec.d.ts +16 -0
  19. package/lib/types/functions/logical/false/index.d.ts +8 -0
  20. package/lib/types/functions/logical/function-map.d.ts +2 -2
  21. package/lib/types/functions/logical/ifna/__tests__/index.spec.d.ts +16 -0
  22. package/lib/types/functions/logical/ifna/index.d.ts +9 -0
  23. package/lib/types/functions/logical/ifs/__tests__/index.spec.d.ts +16 -0
  24. package/lib/types/functions/logical/ifs/index.d.ts +8 -0
  25. package/lib/types/functions/logical/not/__tests__/index.spec.d.ts +16 -0
  26. package/lib/types/functions/logical/not/index.d.ts +8 -0
  27. package/lib/types/functions/logical/switch/__tests__/index.spec.d.ts +16 -0
  28. package/lib/types/functions/logical/switch/index.d.ts +9 -0
  29. package/lib/types/functions/logical/true/__tests__/index.spec.d.ts +16 -0
  30. package/lib/types/functions/logical/true/index.d.ts +8 -0
  31. package/lib/types/functions/logical/xor/__tests__/index.spec.d.ts +16 -0
  32. package/lib/types/functions/logical/xor/index.d.ts +8 -0
  33. package/lib/types/functions/lookup/areas/__tests__/index.spec.d.ts +16 -0
  34. package/lib/types/functions/lookup/areas/index.d.ts +11 -0
  35. package/lib/types/functions/lookup/choosecols/__tests__/index.spec.d.ts +16 -0
  36. package/lib/types/functions/lookup/choosecols/index.d.ts +9 -0
  37. package/lib/types/functions/lookup/chooserows/__tests__/index.spec.d.ts +16 -0
  38. package/lib/types/functions/lookup/chooserows/index.d.ts +9 -0
  39. package/lib/types/functions/lookup/filter/__tests__/index.spec.d.ts +16 -0
  40. package/lib/types/functions/lookup/filter/index.d.ts +11 -0
  41. package/lib/types/functions/lookup/function-map.d.ts +3 -6
  42. package/lib/types/functions/lookup/hstack/__tests__/index.spec.d.ts +16 -0
  43. package/lib/types/functions/lookup/hstack/index.d.ts +9 -0
  44. package/lib/types/functions/lookup/indirect/index.d.ts +1 -0
  45. package/lib/types/functions/lookup/sort/__tests__/index.spec.d.ts +16 -0
  46. package/lib/types/functions/lookup/sort/index.d.ts +14 -0
  47. package/lib/types/functions/lookup/sortby/__tests__/index.spec.d.ts +16 -0
  48. package/lib/types/functions/lookup/sortby/index.d.ts +17 -0
  49. package/lib/types/functions/lookup/transpose/__tests__/index.spec.d.ts +16 -0
  50. package/lib/types/functions/lookup/transpose/index.d.ts +9 -0
  51. package/lib/types/functions/lookup/unique/__tests__/index.spec.d.ts +16 -0
  52. package/lib/types/functions/lookup/unique/index.d.ts +12 -0
  53. package/lib/types/functions/lookup/vstack/__tests__/index.spec.d.ts +16 -0
  54. package/lib/types/functions/lookup/vstack/index.d.ts +9 -0
  55. package/lib/types/functions/lookup/xlookup/index.d.ts +1 -0
  56. package/lib/types/functions/math/base/index.d.ts +1 -0
  57. package/lib/types/functions/math/ceiling-math/index.d.ts +1 -0
  58. package/lib/types/functions/math/cot/index.d.ts +1 -0
  59. package/lib/types/functions/math/coth/index.d.ts +1 -0
  60. package/lib/types/functions/math/csc/index.d.ts +1 -0
  61. package/lib/types/functions/math/csch/index.d.ts +1 -0
  62. package/lib/types/functions/math/decimal/index.d.ts +1 -1
  63. package/lib/types/functions/math/randarray/index.d.ts +2 -0
  64. package/lib/types/functions/math/sumproduct/index.d.ts +2 -0
  65. package/lib/types/functions/math/sumx2my2/index.d.ts +1 -0
  66. package/lib/types/functions/math/sumx2py2/index.d.ts +1 -0
  67. package/lib/types/functions/math/sumxmy2/index.d.ts +1 -0
  68. package/lib/types/functions/math/trunc/__tests__/index.spec.d.ts +16 -0
  69. package/lib/types/functions/math/trunc/index.d.ts +8 -0
  70. package/lib/types/functions/statistical/function-map.d.ts +1 -1
  71. package/lib/types/functions/text/function-map.d.ts +6 -3
  72. package/lib/types/functions/text/rept/__test__/index.spec.d.ts +16 -0
  73. package/lib/types/functions/text/rept/index.d.ts +8 -0
  74. package/lib/types/functions/text/textafter/__test__/index.spec.d.ts +16 -0
  75. package/lib/types/functions/text/textafter/index.d.ts +15 -0
  76. package/lib/types/functions/text/textbefore/__test__/index.spec.d.ts +16 -0
  77. package/lib/types/functions/text/textbefore/index.d.ts +15 -0
  78. package/lib/types/functions/text/textsplit/__test__/index.spec.d.ts +16 -0
  79. package/lib/types/functions/text/textsplit/index.d.ts +15 -0
  80. package/lib/types/services/feature-calculation-manager.service.d.ts +1 -2
  81. package/lib/umd/index.js +1 -1
  82. package/package.json +9 -9
@@ -32,7 +32,7 @@ export declare class FormulaDependencyTree extends Disposable {
32
32
  formulaId: Nullable<string>;
33
33
  featureId: Nullable<string>;
34
34
  isPassive: boolean;
35
- getDirtyData: Nullable<(tree: FormulaDependencyTree, dirtyData: IFormulaDirtyData, runtimeData: IAllRuntimeData) => {
35
+ getDirtyData: Nullable<(dirtyData: IFormulaDirtyData, runtimeData: IAllRuntimeData) => {
36
36
  runtimeCellData: IRuntimeUnitDataType;
37
37
  dirtyRanges: IFeatureDirtyRangeType;
38
38
  }>;
@@ -32,7 +32,7 @@ export declare class FormulaDependencyGenerator extends Disposable {
32
32
  */
33
33
  private _generateTreeList;
34
34
  private _registerFeatureFormulas;
35
- private _makePassiveDirtyForFeatureFormulas;
35
+ private _getFeatureFormulaTree;
36
36
  private _registerOtherFormulas;
37
37
  private _registerFormulas;
38
38
  /**
@@ -57,6 +57,11 @@ export declare class FormulaDependencyGenerator extends Disposable {
57
57
  * @param treeList
58
58
  */
59
59
  private _getUpdateTreeListAndMakeDependency;
60
+ private _dependencyFeatureCalculation;
61
+ private _clearFeatureCalculationNode;
62
+ private _getExistTreeList;
63
+ private _convertDirtyRangesToMap;
64
+ private _intersectFeatureCalculation;
60
65
  private _includeTreeFeature;
61
66
  private _includeOtherFormula;
62
67
  private _includeDefinedName;
@@ -5,4 +5,5 @@ export declare class Datedif extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, endDate: BaseValueObject, unit: BaseValueObject): BaseValueObject;
8
+ private _getResultByUnit;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Days360 extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, endDate: BaseValueObject, method?: BaseValueObject): BaseValueObject;
8
+ private _getResult;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Networkdays extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, endDate: BaseValueObject, holidays?: BaseValueObject): BaseValueObject;
8
+ private _getResultByHolidays;
8
9
  }
@@ -6,4 +6,5 @@ export declare class NetworkdaysIntl extends BaseFunction {
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, endDate: BaseValueObject, weekend?: BaseValueObject, holidays?: BaseValueObject): BaseValueObject;
8
8
  private _handleSingleObject;
9
+ private _getResultByHolidays;
9
10
  }
@@ -6,4 +6,5 @@ export declare class Weekday extends BaseFunction {
6
6
  maxParams: number;
7
7
  calculate(serialNumber: BaseValueObject, returnType?: BaseValueObject): BaseValueObject;
8
8
  private _handleSingleObject;
9
+ private _returnTypeMap;
9
10
  }
@@ -4,6 +4,7 @@ import { BaseFunction } from '../../base-function';
4
4
  export declare class Weeknum extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
- private returnTypeMap;
8
7
  calculate(serialNumber: BaseValueObject, returnType?: BaseValueObject): BaseValueObject;
8
+ private _getResult;
9
+ private _returnTypeMap;
9
10
  }
@@ -5,4 +5,5 @@ export declare class Workday extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, days: BaseValueObject, holidays?: BaseValueObject): BaseValueObject;
8
+ private _getResultByHolidays;
8
9
  }
@@ -6,4 +6,6 @@ export declare class WorkdayIntl extends BaseFunction {
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, days: BaseValueObject, weekend?: BaseValueObject, holidays?: BaseValueObject): BaseValueObject;
8
8
  private _handleSingleObject;
9
+ private _checkArrayError;
10
+ private _getResultByHolidays;
9
11
  }
@@ -5,4 +5,8 @@ export declare class Yearfrac extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(startDate: BaseValueObject, endDate: BaseValueObject, basis?: BaseValueObject): BaseValueObject;
8
+ private _checkArrayError;
9
+ private _getResultByNASD;
10
+ private _getResultByActual;
11
+ private _getResultByEuropean;
8
12
  }
@@ -1,5 +1,4 @@
1
1
  import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
2
- import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
3
2
  import { StringValueObject } from '../../../engine/value-object/primitive-object';
4
3
  import { BaseFunction } from '../../base-function';
5
4
 
@@ -7,6 +6,7 @@ export declare class Cell extends BaseFunction {
7
6
  needsReferenceObject: boolean;
8
7
  minParams: number;
9
8
  maxParams: number;
10
- calculate(infoType: FunctionVariantType, reference: FunctionVariantType): StringValueObject | ArrayValueObject | FunctionVariantType;
9
+ calculate(infoType: FunctionVariantType, reference: FunctionVariantType): StringValueObject | FunctionVariantType;
11
10
  private _handleSingleObject;
11
+ private _getWidthResult;
12
12
  }
@@ -5,6 +5,6 @@ export declare class ErrorType extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(errorVal: BaseValueObject): BaseValueObject;
8
- private errorTypeValueMap;
9
8
  private _handleSingleObject;
9
+ private _errorTypeValueMap;
10
10
  }
@@ -1,9 +1,8 @@
1
- import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
2
- import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
2
  import { BaseFunction } from '../../base-function';
4
3
 
5
4
  export declare class Iseven extends BaseFunction {
6
5
  minParams: number;
7
6
  maxParams: number;
8
- calculate(value: BaseValueObject): ErrorValueObject | BooleanValueObject;
7
+ calculate(value: BaseValueObject): BaseValueObject;
9
8
  }
@@ -1,9 +1,8 @@
1
- import { BaseValueObject, ErrorValueObject } from '../../../engine/value-object/base-value-object';
2
- import { BooleanValueObject } from '../../../engine/value-object/primitive-object';
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
2
  import { BaseFunction } from '../../base-function';
4
3
 
5
4
  export declare class Isodd extends BaseFunction {
6
5
  minParams: number;
7
6
  maxParams: number;
8
- calculate(value: BaseValueObject): ErrorValueObject | BooleanValueObject;
7
+ calculate(value: BaseValueObject): BaseValueObject;
9
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 { BooleanValueObject } from '../../../engine/value-object/primitive-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class False extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(): BooleanValueObject;
8
+ }
@@ -1,6 +1,6 @@
1
- import { And } from './and';
2
1
  import { FUNCTION_NAMES_LOGICAL } from './function-names';
2
+ import { And } from './and';
3
3
  import { Iferror } from './iferror';
4
4
  import { Makearray } from './makearray';
5
5
 
6
- export declare const functionLogical: ((FUNCTION_NAMES_LOGICAL | typeof And)[] | (FUNCTION_NAMES_LOGICAL | typeof Makearray)[] | (FUNCTION_NAMES_LOGICAL | typeof Iferror)[])[];
6
+ export declare const functionLogical: ((FUNCTION_NAMES_LOGICAL | typeof And)[] | (FUNCTION_NAMES_LOGICAL | typeof Iferror)[] | (FUNCTION_NAMES_LOGICAL | typeof Makearray)[])[];
@@ -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 Ifna extends BaseFunction {
6
+ minParams: number;
7
+ maxParams: number;
8
+ calculate(value: BaseValueObject, valueIfNa: 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,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Ifs extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...params: 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 Not extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(logicalValue: 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 Switch extends BaseFunction {
5
+ minParams: number;
6
+ calculate(expression: BaseValueObject, ...args: BaseValueObject[]): BaseValueObject;
7
+ private _handleNonArrayInputs;
8
+ private _handleArrayInputs;
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 { BooleanValueObject } from '../../../engine/value-object/primitive-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class True extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(): BooleanValueObject;
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 Xor extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(...logicalValues: 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,11 @@
1
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
2
+ import { 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 Areas extends BaseFunction {
7
+ minParams: number;
8
+ maxParams: number;
9
+ needsReferenceObject: boolean;
10
+ calculate(reference: FunctionVariantType): ErrorValueObject | NumberValueObject;
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
+ }
@@ -7,6 +7,7 @@ export declare class Indirect extends BaseFunction {
7
7
  maxParams: number;
8
8
  isAddress(): boolean;
9
9
  calculate(refText: BaseValueObject, a1?: BaseValueObject): BaseValueObject | BaseReferenceObject;
10
+ private _handleSingleObject;
10
11
  private _setDefault;
11
12
  /**
12
13
  * In Excel, to inject a defined name into a function that has positioning capabilities,
@@ -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
+ }