@univerjs/engine-formula 0.2.5 → 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 (60) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +11426 -9711
  3. package/lib/types/functions/date/datedif/index.d.ts +1 -0
  4. package/lib/types/functions/date/days360/index.d.ts +1 -0
  5. package/lib/types/functions/date/networkdays/index.d.ts +1 -0
  6. package/lib/types/functions/date/networkdays-intl/index.d.ts +1 -0
  7. package/lib/types/functions/date/weekday/index.d.ts +1 -0
  8. package/lib/types/functions/date/weeknum/index.d.ts +2 -1
  9. package/lib/types/functions/date/workday/index.d.ts +1 -0
  10. package/lib/types/functions/date/workday-intl/index.d.ts +2 -0
  11. package/lib/types/functions/date/yearfrac/index.d.ts +4 -0
  12. package/lib/types/functions/information/cell/index.d.ts +2 -2
  13. package/lib/types/functions/information/error-type/index.d.ts +1 -1
  14. package/lib/types/functions/lookup/areas/__tests__/index.spec.d.ts +16 -0
  15. package/lib/types/functions/lookup/areas/index.d.ts +11 -0
  16. package/lib/types/functions/lookup/choosecols/__tests__/index.spec.d.ts +16 -0
  17. package/lib/types/functions/lookup/choosecols/index.d.ts +9 -0
  18. package/lib/types/functions/lookup/chooserows/__tests__/index.spec.d.ts +16 -0
  19. package/lib/types/functions/lookup/chooserows/index.d.ts +9 -0
  20. package/lib/types/functions/lookup/filter/__tests__/index.spec.d.ts +16 -0
  21. package/lib/types/functions/lookup/filter/index.d.ts +11 -0
  22. package/lib/types/functions/lookup/function-map.d.ts +3 -6
  23. package/lib/types/functions/lookup/hstack/__tests__/index.spec.d.ts +16 -0
  24. package/lib/types/functions/lookup/hstack/index.d.ts +9 -0
  25. package/lib/types/functions/lookup/sort/__tests__/index.spec.d.ts +16 -0
  26. package/lib/types/functions/lookup/sort/index.d.ts +14 -0
  27. package/lib/types/functions/lookup/sortby/__tests__/index.spec.d.ts +16 -0
  28. package/lib/types/functions/lookup/sortby/index.d.ts +17 -0
  29. package/lib/types/functions/lookup/transpose/__tests__/index.spec.d.ts +16 -0
  30. package/lib/types/functions/lookup/transpose/index.d.ts +9 -0
  31. package/lib/types/functions/lookup/unique/__tests__/index.spec.d.ts +16 -0
  32. package/lib/types/functions/lookup/unique/index.d.ts +12 -0
  33. package/lib/types/functions/lookup/vstack/__tests__/index.spec.d.ts +16 -0
  34. package/lib/types/functions/lookup/vstack/index.d.ts +9 -0
  35. package/lib/types/functions/lookup/xlookup/index.d.ts +1 -0
  36. package/lib/types/functions/math/base/index.d.ts +1 -0
  37. package/lib/types/functions/math/ceiling-math/index.d.ts +1 -0
  38. package/lib/types/functions/math/cot/index.d.ts +1 -0
  39. package/lib/types/functions/math/coth/index.d.ts +1 -0
  40. package/lib/types/functions/math/csc/index.d.ts +1 -0
  41. package/lib/types/functions/math/csch/index.d.ts +1 -0
  42. package/lib/types/functions/math/decimal/index.d.ts +1 -1
  43. package/lib/types/functions/math/randarray/index.d.ts +2 -0
  44. package/lib/types/functions/math/sumproduct/index.d.ts +2 -0
  45. package/lib/types/functions/math/sumx2my2/index.d.ts +1 -0
  46. package/lib/types/functions/math/sumx2py2/index.d.ts +1 -0
  47. package/lib/types/functions/math/sumxmy2/index.d.ts +1 -0
  48. package/lib/types/functions/math/trunc/__tests__/index.spec.d.ts +16 -0
  49. package/lib/types/functions/math/trunc/index.d.ts +8 -0
  50. package/lib/types/functions/text/function-map.d.ts +6 -3
  51. package/lib/types/functions/text/rept/__test__/index.spec.d.ts +16 -0
  52. package/lib/types/functions/text/rept/index.d.ts +8 -0
  53. package/lib/types/functions/text/textafter/__test__/index.spec.d.ts +16 -0
  54. package/lib/types/functions/text/textafter/index.d.ts +15 -0
  55. package/lib/types/functions/text/textbefore/__test__/index.spec.d.ts +16 -0
  56. package/lib/types/functions/text/textbefore/index.d.ts +15 -0
  57. package/lib/types/functions/text/textsplit/__test__/index.spec.d.ts +16 -0
  58. package/lib/types/functions/text/textsplit/index.d.ts +15 -0
  59. package/lib/umd/index.js +1 -1
  60. package/package.json +9 -9
@@ -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
  }
@@ -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
+ }
@@ -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
  }
@@ -5,4 +5,5 @@ export declare class CeilingMath extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(number: BaseValueObject, significance?: BaseValueObject, mode?: BaseValueObject): BaseValueObject;
8
+ private _getResult;
8
9
  }
@@ -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
  }
@@ -5,5 +5,5 @@ export declare class Decimal extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(text: BaseValueObject, radix: BaseValueObject): BaseValueObject;
8
- private isValidCharForRadix;
8
+ private _isValidCharForRadix;
9
9
  }
@@ -6,6 +6,8 @@ export declare class Randarray extends BaseFunction {
6
6
  minParams: number;
7
7
  maxParams: number;
8
8
  calculate(rows?: BaseValueObject, columns?: BaseValueObject, min?: BaseValueObject, max?: BaseValueObject, wholeNumber?: BaseValueObject): BaseValueObject | ArrayValueObject;
9
+ private _calculateResult;
9
10
  private _calculateSingleCell;
10
11
  private _handleError;
12
+ private _getValue;
11
13
  }
@@ -5,4 +5,6 @@ export declare class Sumproduct extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(array1: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject;
8
+ private _initArray1;
9
+ private _getResultArrayByArray1;
8
10
  }
@@ -5,4 +5,5 @@ export declare class Sumx2my2 extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(arrayX: BaseValueObject, arrayY: BaseValueObject): BaseValueObject;
8
+ private _calculateSingleCell;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Sumx2py2 extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(arrayX: BaseValueObject, arrayY: BaseValueObject): BaseValueObject;
8
+ private _calculateSingleCell;
8
9
  }
@@ -5,4 +5,5 @@ export declare class Sumxmy2 extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(arrayX: BaseValueObject, arrayY: BaseValueObject): BaseValueObject;
8
+ private _calculateSingleCell;
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,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+
4
+ export declare class Trunc extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(number: BaseValueObject, numDigits?: BaseValueObject): BaseValueObject;
8
+ }
@@ -1,6 +1,9 @@
1
- import { Concatenate } from './concatenate';
2
1
  import { FUNCTION_NAMES_TEXT } from './function-names';
3
- import { Lower } from './lower';
4
2
  import { Concat } from './concat';
3
+ import { Concatenate } from './concatenate';
4
+ import { Lower } from './lower';
5
+ import { Textafter } from './textafter';
6
+ import { Textbefore } from './textbefore';
7
+ import { Textsplit } from './textsplit';
5
8
 
6
- export declare const functionText: ((FUNCTION_NAMES_TEXT | typeof Concat)[] | (FUNCTION_NAMES_TEXT | typeof Concatenate)[] | (FUNCTION_NAMES_TEXT | typeof Lower)[])[];
9
+ export declare const functionText: ((FUNCTION_NAMES_TEXT | typeof Concat)[] | (FUNCTION_NAMES_TEXT | typeof Concatenate)[] | (FUNCTION_NAMES_TEXT | typeof Lower)[] | (FUNCTION_NAMES_TEXT | typeof Textafter)[] | (FUNCTION_NAMES_TEXT | typeof Textbefore)[] | (FUNCTION_NAMES_TEXT | typeof Textsplit)[])[];
@@ -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 Rept extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(text: BaseValueObject, numberTimes: 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,15 @@
1
+ import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ import { StringValueObject } from '../../../engine/value-object/primitive-object';
4
+ import { BaseFunction } from '../../base-function';
5
+
6
+ export declare class Textafter extends BaseFunction {
7
+ minParams: number;
8
+ maxParams: number;
9
+ calculate(text: BaseValueObject, delimiter: BaseValueObject, instanceNum?: BaseValueObject, matchMode?: BaseValueObject, matchEnd?: BaseValueObject, ifNotFound?: BaseValueObject): StringValueObject | ArrayValueObject;
10
+ private _getResultArray;
11
+ private _checkVariantsError;
12
+ private _getStringValue;
13
+ private _getVariantsNumberFloorValue;
14
+ private _getResult;
15
+ }