@univerjs/sheets-formula 0.1.0-beta.0 → 0.1.0-beta.2
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.
- package/lib/cjs/index.js +8 -6
- package/lib/es/index.js +13695 -2372
- package/lib/index.css +1 -1
- package/lib/types/commands/operations/insert-function.operation.d.ts +12 -1
- package/lib/types/controllers/utils.d.ts +3 -2
- package/lib/types/formula-ui-plugin.d.ts +6 -1
- package/lib/types/index.d.ts +6 -0
- package/lib/types/locale/en-US.d.ts +89 -80
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +0 -54
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +0 -54
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +0 -54
- package/lib/types/locale/function-list/logical/en-US.d.ts +6 -2
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +6 -2
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +6 -2
- package/lib/types/locale/function-list/lookup/en-US.d.ts +24 -4
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +24 -4
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +24 -4
- package/lib/types/locale/function-list/math/en-US.d.ts +4 -20
- package/lib/types/locale/function-list/math/ja-JP.d.ts +4 -20
- package/lib/types/locale/function-list/math/zh-CN.d.ts +4 -20
- package/lib/types/locale/zh-CN.d.ts +89 -80
- package/lib/types/services/description.service.d.ts +22 -1
- package/lib/types/services/formula-custom-function.service.d.ts +34 -0
- package/lib/types/services/function-list/array.d.ts +1 -1
- package/lib/types/services/function-list/compatibility.d.ts +1 -1
- package/lib/types/services/function-list/cube.d.ts +1 -1
- package/lib/types/services/function-list/database.d.ts +1 -1
- package/lib/types/services/function-list/date.d.ts +1 -1
- package/lib/types/services/function-list/engineering.d.ts +1 -1
- package/lib/types/services/function-list/financial.d.ts +1 -1
- package/lib/types/services/function-list/information.d.ts +1 -1
- package/lib/types/services/function-list/logical.d.ts +1 -1
- package/lib/types/services/function-list/lookup.d.ts +1 -1
- package/lib/types/services/function-list/text.d.ts +1 -1
- package/lib/types/services/function-list/web.d.ts +1 -1
- package/lib/types/services/register-function.service.d.ts +70 -0
- package/lib/umd/index.js +8 -6
- package/package.json +26 -26
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
16
|
+
import { type IFunctionInfo } from '@univerjs/engine-formula';
|
|
17
17
|
export declare const FUNCTION_LIST_TEXT: IFunctionInfo[];
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
16
|
+
import { type IFunctionInfo } from '@univerjs/engine-formula';
|
|
17
17
|
export declare const FUNCTION_LIST_WEB: IFunctionInfo[];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { ILocales } from '@univerjs/core';
|
|
17
|
+
import { Disposable, LocaleService } from '@univerjs/core';
|
|
18
|
+
import type { IFunctionInfo } from '@univerjs/engine-formula';
|
|
19
|
+
import { IFunctionService } from '@univerjs/engine-formula';
|
|
20
|
+
import { IDescriptionService } from './description.service';
|
|
21
|
+
import type { IRegisterFunctionList } from './formula-custom-function.service';
|
|
22
|
+
import { IFormulaCustomFunctionService } from './formula-custom-function.service';
|
|
23
|
+
/**
|
|
24
|
+
* Register function operation params
|
|
25
|
+
*/
|
|
26
|
+
export interface IRegisterFunctionParams {
|
|
27
|
+
/**
|
|
28
|
+
* i18n
|
|
29
|
+
*/
|
|
30
|
+
locales?: ILocales;
|
|
31
|
+
/**
|
|
32
|
+
* function description
|
|
33
|
+
*/
|
|
34
|
+
description?: IFunctionInfo[];
|
|
35
|
+
/**
|
|
36
|
+
* function calculation
|
|
37
|
+
*/
|
|
38
|
+
calculate: IRegisterFunctionList;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Unregister function operation params
|
|
42
|
+
*/
|
|
43
|
+
export interface IUnregisterFunctionParams {
|
|
44
|
+
/**
|
|
45
|
+
* Remove i18n
|
|
46
|
+
*/
|
|
47
|
+
localeKeys?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Function name
|
|
50
|
+
*/
|
|
51
|
+
functionNames: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface IRegisterFunctionService {
|
|
54
|
+
/**
|
|
55
|
+
* register descriptions
|
|
56
|
+
* @param functionList
|
|
57
|
+
*/
|
|
58
|
+
registerFunctions(params: IRegisterFunctionParams): void;
|
|
59
|
+
unregisterFunctions(params: IUnregisterFunctionParams): void;
|
|
60
|
+
}
|
|
61
|
+
export declare const IRegisterFunctionService: import("@wendellhu/redi").IdentifierDecorator<IRegisterFunctionService>;
|
|
62
|
+
export declare class RegisterFunctionService extends Disposable implements IRegisterFunctionService {
|
|
63
|
+
private readonly _localeService;
|
|
64
|
+
private readonly _descriptionService;
|
|
65
|
+
private readonly _formulaCustomFunctionService;
|
|
66
|
+
private readonly _functionService;
|
|
67
|
+
constructor(_localeService: LocaleService, _descriptionService: IDescriptionService, _formulaCustomFunctionService: IFormulaCustomFunctionService, _functionService: IFunctionService);
|
|
68
|
+
registerFunctions(params: IRegisterFunctionParams): void;
|
|
69
|
+
unregisterFunctions(params: IUnregisterFunctionParams): void;
|
|
70
|
+
}
|