@univerjs/engine-formula 0.2.3 → 0.2.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +3737 -3211
  3. package/lib/types/basics/date.d.ts +9 -15
  4. package/lib/types/controller/formula.controller.d.ts +1 -2
  5. package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +7 -8
  6. package/lib/types/engine/ast-node/function-node.d.ts +1 -1
  7. package/lib/types/engine/ast-node/prefix-node.d.ts +1 -2
  8. package/lib/types/engine/ast-node/reference-node.d.ts +1 -1
  9. package/lib/types/engine/ast-node/suffix-node.d.ts +1 -1
  10. package/lib/types/engine/reference-object/base-reference-object.d.ts +1 -0
  11. package/lib/types/engine/utils/prefixHandler.d.ts +1 -2
  12. package/lib/types/engine/value-object/primitive-object.d.ts +1 -1
  13. package/lib/types/functions/__tests__/create-function-test-bed.d.ts +7 -8
  14. package/lib/types/functions/date/function-map.d.ts +3 -1
  15. package/lib/types/functions/date/hour/__tests__/index.spec.d.ts +16 -0
  16. package/lib/types/functions/date/hour/index.d.ts +9 -0
  17. package/lib/types/functions/date/minute/__tests__/index.spec.d.ts +16 -0
  18. package/lib/types/functions/date/minute/index.d.ts +9 -0
  19. package/lib/types/functions/date/networkdays/__tests__/index.spec.d.ts +16 -0
  20. package/lib/types/functions/date/networkdays/index.d.ts +8 -0
  21. package/lib/types/functions/date/networkdays-intl/__tests__/index.spec.d.ts +16 -0
  22. package/lib/types/functions/date/networkdays-intl/index.d.ts +9 -0
  23. package/lib/types/functions/date/second/__tests__/index.spec.d.ts +16 -0
  24. package/lib/types/functions/date/second/index.d.ts +9 -0
  25. package/lib/types/functions/date/weekday/__tests__/index.spec.d.ts +16 -0
  26. package/lib/types/functions/date/weekday/index.d.ts +9 -0
  27. package/lib/types/functions/date/workday/__tests__/index.spec.d.ts +16 -0
  28. package/lib/types/functions/date/workday/index.d.ts +8 -0
  29. package/lib/types/functions/date/workday-intl/__tests__/index.spec.d.ts +16 -0
  30. package/lib/types/functions/date/workday-intl/index.d.ts +9 -0
  31. package/lib/types/functions/math/sumproduct/__tests__/index.spec.d.ts +16 -0
  32. package/lib/types/functions/math/sumproduct/index.d.ts +8 -0
  33. package/lib/types/models/__tests__/create-command-test-bed.d.ts +7 -8
  34. package/lib/types/plugin.d.ts +1 -2
  35. package/lib/types/services/active-dirty-manager.service.d.ts +1 -1
  36. package/lib/types/services/current-data.service.d.ts +1 -1
  37. package/lib/types/services/defined-names.service.d.ts +1 -1
  38. package/lib/types/services/dependency-manager.service.d.ts +1 -1
  39. package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
  40. package/lib/types/services/function.service.d.ts +2 -3
  41. package/lib/types/services/other-formula-manager.service.d.ts +1 -1
  42. package/lib/types/services/runtime.service.d.ts +1 -1
  43. package/lib/types/services/super-table.service.d.ts +1 -1
  44. package/lib/umd/index.js +1 -1
  45. package/package.json +8 -10
@@ -1,18 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
2
+
16
3
  export declare const DEFAULT_DATE_FORMAT = "yyyy/mm/dd;@";
17
4
  export declare const DEFAULT_NOW_FORMAT = "yyyy/mm/dd hh:mm";
18
5
  export declare const DEFAULT_TIME_FORMAT = "h:mm A/P";
@@ -35,6 +22,7 @@ export declare function excelDateSerial(date: Date): number;
35
22
  */
36
23
  export declare function excelDateTimeSerial(date: Date): number;
37
24
  export declare function excelSerialToDate(serial: number): Date;
25
+ export declare function excelSerialToDateTime(serial: number): Date;
38
26
  export declare function formatDateDefault(date: Date): string;
39
27
  /**
40
28
  * Validate date string
@@ -48,3 +36,9 @@ export declare function parseFormattedDate(value: string): any;
48
36
  export declare function parseFormattedValue(value: string): any;
49
37
  export declare function parseFormattedTime(value: string): any;
50
38
  export declare function isDate(format: string): any;
39
+ export declare function isValidWeekend(weekend: number | string): boolean;
40
+ export declare function getWeekendArray(weekend: number | string): number[];
41
+ export declare function countWorkingDays(startDateSerialNumber: number, endDateSerialNumber: number, weekend?: number | string, holidays?: number[]): number;
42
+ export declare function getDateSerialNumberByWorkingDays(startDateSerialNumber: number, workingDays: number, weekend?: number | string, holidays?: number[]): (number | ErrorValueObject);
43
+ export declare function getDateSerialNumberByObject(serialNumberObject: BaseValueObject): (ErrorValueObject | number);
44
+ export declare function getWeekDayByDateSerialNumber(dateSerialNumber: number): number;
@@ -1,5 +1,4 @@
1
- import { Disposable, ICommandService } from '@univerjs/core';
2
- import { Ctor } from '@wendellhu/redi';
1
+ import { Disposable, ICommandService, Ctor } from '@univerjs/core';
3
2
  import { DataSyncPrimaryController } from '@univerjs/rpc';
4
3
  import { IFunctionNames } from '../basics/function';
5
4
  import { BaseFunction } from '../functions/base-function';
@@ -1,16 +1,15 @@
1
- import { IWorkbookData, Workbook, Univer } from '@univerjs/core';
2
- import { Dependency } from '@wendellhu/redi';
1
+ import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
3
2
  import { ISheetData } from '../../../basics/common';
4
3
 
5
4
  export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
6
5
  univer: Univer;
7
6
  get: {
8
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
9
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
10
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
11
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
12
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
13
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
7
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
8
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
9
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
10
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
11
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
12
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
14
13
  };
15
14
  sheet: Workbook;
16
15
  unitId: string;
@@ -1,4 +1,4 @@
1
- import { Injector } from '@wendellhu/redi';
1
+ import { Injector } from '@univerjs/core';
2
2
  import { AstNodePromiseType } from '../../basics/common';
3
3
  import { BaseFunction } from '../../functions/base-function';
4
4
  import { IFormulaCurrentConfigService } from '../../services/current-data.service';
@@ -1,5 +1,4 @@
1
- import { Nullable } from '@univerjs/core';
2
- import { IAccessor, Injector } from '@wendellhu/redi';
1
+ import { IAccessor, Nullable, Injector } from '@univerjs/core';
3
2
  import { BaseFunction } from '../../functions/base-function';
4
3
  import { IFunctionService } from '../../services/function.service';
5
4
  import { LexerNode } from '../analysis/lexer-node';
@@ -1,4 +1,4 @@
1
- import { IAccessor, Injector } from '@wendellhu/redi';
1
+ import { IAccessor, Injector } from '@univerjs/core';
2
2
  import { IFormulaRuntimeService } from '../../services/runtime.service';
3
3
  import { ISuperTableService } from '../../services/super-table.service';
4
4
  import { LexerNode } from '../analysis/lexer-node';
@@ -1,4 +1,4 @@
1
- import { IAccessor, Injector } from '@wendellhu/redi';
1
+ import { IAccessor, Injector } from '@univerjs/core';
2
2
  import { BaseFunction } from '../../functions/base-function';
3
3
  import { IFunctionService } from '../../services/function.service';
4
4
  import { LexerNode } from '../analysis/lexer-node';
@@ -89,6 +89,7 @@ export declare class BaseReferenceObject extends ObjectClassType {
89
89
  unionBy(referenceObject: BaseReferenceObject): NodeValueType;
90
90
  unionRange(rangeData1: IRange, rangeData2: IRange): IRange;
91
91
  getCellValueObject(cell: ICellData): ErrorValueObject | NullValueObject | NumberValueObject | import('../value-object/primitive-object').BooleanValueObject | StringValueObject | ArrayValueObject;
92
+ private _getPatternByCell;
92
93
  getCellByRow(row: number): ErrorValueObject | NullValueObject | NumberValueObject | import('../value-object/primitive-object').BooleanValueObject | StringValueObject | ArrayValueObject;
93
94
  getCellByColumn(column: number): ErrorValueObject | NullValueObject | NumberValueObject | import('../value-object/primitive-object').BooleanValueObject | StringValueObject | ArrayValueObject;
94
95
  getCurrentActiveSheetData(): import('../../basics/common').ISheetItem;
@@ -1,5 +1,4 @@
1
- import { Injector } from '@wendellhu/redi';
2
- import { Nullable } from '@univerjs/core';
1
+ import { Injector, Nullable } from '@univerjs/core';
3
2
  import { IFunctionService } from '../../services/function.service';
4
3
  import { PrefixNode } from '../ast-node/prefix-node';
5
4
 
@@ -165,4 +165,4 @@ export declare class StringValueObject extends BaseValueObject {
165
165
  }
166
166
  export declare function createBooleanValueObjectByRawValue(rawValue: string | number | boolean): BooleanValueObject;
167
167
  export declare function createStringValueObjectByRawValue(rawValue: string | number | boolean): StringValueObject;
168
- export declare function createNumberValueObjectByRawValue(rawValue: string | number | boolean): ErrorValueObject | NumberValueObject;
168
+ export declare function createNumberValueObjectByRawValue(rawValue: string | number | boolean, pattern?: string): ErrorValueObject | NumberValueObject;
@@ -1,17 +1,16 @@
1
- import { IWorkbookData, Workbook, Univer } from '@univerjs/core';
2
- import { Dependency } from '@wendellhu/redi';
1
+ import { Dependency, IWorkbookData, Workbook, Univer } from '@univerjs/core';
3
2
  import { ISheetData } from '../../basics/common';
4
3
  import { FunctionVariantType } from '../../engine/reference-object/base-reference-object';
5
4
 
6
5
  export declare function createFunctionTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
7
6
  univer: Univer;
8
7
  get: {
9
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
10
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
11
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
12
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
13
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
14
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
8
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
9
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
10
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
11
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
12
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
13
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
15
14
  };
16
15
  sheet: Workbook;
17
16
  unitId: string;
@@ -1,4 +1,6 @@
1
1
  import { DateFunction } from './date';
2
2
  import { FUNCTION_NAMES_DATE } from './function-names';
3
+ import { NetworkdaysIntl } from './networkdays-intl';
4
+ import { WorkdayIntl } from './workday-intl';
3
5
 
4
- export declare const functionDate: (FUNCTION_NAMES_DATE | typeof DateFunction)[][];
6
+ export declare const functionDate: ((FUNCTION_NAMES_DATE | typeof DateFunction)[] | (FUNCTION_NAMES_DATE | typeof NetworkdaysIntl)[] | (FUNCTION_NAMES_DATE | typeof WorkdayIntl)[])[];
@@ -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 Hour extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(serialNumber: 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 Minute extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(serialNumber: 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 Networkdays extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(startDate: BaseValueObject, endDate: BaseValueObject, holidays?: 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 NetworkdaysIntl extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(startDate: BaseValueObject, endDate: BaseValueObject, weekend?: BaseValueObject, holidays?: 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 Second extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(serialNumber: 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 Weekday extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(serialNumber: BaseValueObject, returnType?: 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 Workday extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(startDate: BaseValueObject, days: BaseValueObject, holidays?: 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 WorkdayIntl extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(startDate: BaseValueObject, days: BaseValueObject, weekend?: BaseValueObject, holidays?: 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 Sumproduct extends BaseFunction {
5
+ minParams: number;
6
+ maxParams: number;
7
+ calculate(array1: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject;
8
+ }
@@ -1,15 +1,14 @@
1
- import { IWorkbookData, Univer } from '@univerjs/core';
2
- import { Dependency } from '@wendellhu/redi';
1
+ import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
3
2
 
4
3
  export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
5
4
  univer: Univer;
6
5
  get: {
7
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
8
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
9
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
10
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
11
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
12
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
6
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
7
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
8
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
9
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
10
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
11
+ <T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
13
12
  };
14
13
  sheet: import('@univerjs/core').Workbook;
15
14
  };
@@ -1,5 +1,4 @@
1
- import { Plugin } from '@univerjs/core';
2
- import { Ctor, Injector } from '@wendellhu/redi';
1
+ import { Injector, Plugin, Ctor } from '@univerjs/core';
3
2
  import { IFunctionNames } from './basics/function';
4
3
  import { BaseFunction } from './functions/base-function';
5
4
 
@@ -32,4 +32,4 @@ export declare class ActiveDirtyManagerService extends Disposable implements IAc
32
32
  register(commandId: string, dirtyConversion: IDirtyConversionManagerParams): void;
33
33
  getDirtyConversionMap(): Map<string, IDirtyConversionManagerParams>;
34
34
  }
35
- export declare const IActiveDirtyManagerService: import('@wendellhu/redi').IdentifierDecorator<ActiveDirtyManagerService>;
35
+ export declare const IActiveDirtyManagerService: import('@univerjs/core').IdentifierDecorator<ActiveDirtyManagerService>;
@@ -72,4 +72,4 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
72
72
  private _mergeNameMap;
73
73
  private _loadSheetData;
74
74
  }
75
- export declare const IFormulaCurrentConfigService: import('@wendellhu/redi').IdentifierDecorator<FormulaCurrentConfigService>;
75
+ export declare const IFormulaCurrentConfigService: import('@univerjs/core').IdentifierDecorator<FormulaCurrentConfigService>;
@@ -60,4 +60,4 @@ export declare class DefinedNamesService extends Disposable implements IDefinedN
60
60
  hasDefinedName(unitId: string): boolean;
61
61
  private _update;
62
62
  }
63
- export declare const IDefinedNamesService: import('@wendellhu/redi').IdentifierDecorator<DefinedNamesService>;
63
+ export declare const IDefinedNamesService: import('@univerjs/core').IdentifierDecorator<DefinedNamesService>;
@@ -77,4 +77,4 @@ export declare class DependencyManagerService extends Disposable implements IDep
77
77
  clearFormulaDependency(unitId: string, sheetId: string): void;
78
78
  hasFormulaDependency(unitId: string, sheetId: string, row: number, column: number): boolean;
79
79
  }
80
- export declare const IDependencyManagerService: import('@wendellhu/redi').IdentifierDecorator<DependencyManagerService>;
80
+ export declare const IDependencyManagerService: import('@univerjs/core').IdentifierDecorator<DependencyManagerService>;
@@ -34,4 +34,4 @@ export declare class FeatureCalculationManagerService extends Disposable impleme
34
34
  register(featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
35
35
  getReferenceExecutorMap(): Map<string, IFeatureCalculationManagerParam>;
36
36
  }
37
- export declare const IFeatureCalculationManagerService: import('@wendellhu/redi').IdentifierDecorator<FeatureCalculationManagerService>;
37
+ export declare const IFeatureCalculationManagerService: import('@univerjs/core').IdentifierDecorator<FeatureCalculationManagerService>;
@@ -1,5 +1,4 @@
1
- import { Nullable, Disposable } from '@univerjs/core';
2
- import { IDisposable } from '@wendellhu/redi';
1
+ import { IDisposable, Nullable, Disposable } from '@univerjs/core';
3
2
  import { IFunctionInfo, IFunctionNames } from '../basics/function';
4
3
  import { BaseFunction } from '../functions/base-function';
5
4
 
@@ -43,4 +42,4 @@ export declare class FunctionService extends Disposable implements IFunctionServ
43
42
  hasDescription(functionToken: IFunctionNames): boolean;
44
43
  unregisterDescriptions(...functionTokens: IFunctionNames[]): void;
45
44
  }
46
- export declare const IFunctionService: import('@wendellhu/redi').IdentifierDecorator<FunctionService>;
45
+ export declare const IFunctionService: import('@univerjs/core').IdentifierDecorator<FunctionService>;
@@ -36,4 +36,4 @@ export declare class OtherFormulaManagerService extends Disposable implements IO
36
36
  batchRemove(formulaData: IDirtyUnitOtherFormulaMap): void;
37
37
  getOtherFormulaData(): IOtherFormulaData;
38
38
  }
39
- export declare const IOtherFormulaManagerService: import('@wendellhu/redi').IdentifierDecorator<OtherFormulaManagerService>;
39
+ export declare const IOtherFormulaManagerService: import('@univerjs/core').IdentifierDecorator<OtherFormulaManagerService>;
@@ -179,4 +179,4 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
179
179
  private _checkIfArrayFormulaExceeded;
180
180
  private _isInDirtyRange;
181
181
  }
182
- export declare const IFormulaRuntimeService: import('@wendellhu/redi').IdentifierDecorator<FormulaRuntimeService>;
182
+ export declare const IFormulaRuntimeService: import('@univerjs/core').IdentifierDecorator<FormulaRuntimeService>;
@@ -22,4 +22,4 @@ export declare class SuperTableService extends Disposable implements ISuperTable
22
22
  registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
23
23
  registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
24
24
  }
25
- export declare const ISuperTableService: import('@wendellhu/redi').IdentifierDecorator<ISuperTableService>;
25
+ export declare const ISuperTableService: import('@univerjs/core').IdentifierDecorator<ISuperTableService>;