@univerjs/sheets-formula 0.1.0-beta.1 → 0.1.0-beta.3

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 (41) hide show
  1. package/{LICENSE.txt → LICENSE} +0 -2
  2. package/lib/cjs/index.js +8 -6
  3. package/lib/es/index.js +13649 -2250
  4. package/lib/index.css +1 -1
  5. package/lib/types/commands/operations/insert-function.operation.d.ts +12 -1
  6. package/lib/types/controllers/prompt.controller.d.ts +4 -1
  7. package/lib/types/controllers/update-formula.controller.d.ts +1 -0
  8. package/lib/types/controllers/utils/__tests__/redo-undo-formula-data.spec.d.ts +16 -0
  9. package/lib/types/controllers/utils/offset-formula-data.d.ts +52 -0
  10. package/lib/types/controllers/utils/redo-undo-formula-data.d.ts +19 -0
  11. package/lib/types/formula-ui-plugin.d.ts +6 -1
  12. package/lib/types/index.d.ts +6 -0
  13. package/lib/types/locale/en-US.d.ts +81 -60
  14. package/lib/types/locale/function-list/compatibility/en-US.d.ts +0 -54
  15. package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +0 -54
  16. package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +0 -54
  17. package/lib/types/locale/function-list/logical/en-US.d.ts +2 -2
  18. package/lib/types/locale/function-list/logical/ja-JP.d.ts +2 -2
  19. package/lib/types/locale/function-list/logical/zh-CN.d.ts +2 -2
  20. package/lib/types/locale/function-list/lookup/en-US.d.ts +24 -4
  21. package/lib/types/locale/function-list/lookup/ja-JP.d.ts +24 -4
  22. package/lib/types/locale/function-list/lookup/zh-CN.d.ts +24 -4
  23. package/lib/types/locale/zh-CN.d.ts +81 -60
  24. package/lib/types/services/description.service.d.ts +15 -1
  25. package/lib/types/services/formula-custom-function.service.d.ts +34 -0
  26. package/lib/types/services/function-list/compatibility.d.ts +1 -1
  27. package/lib/types/services/function-list/cube.d.ts +1 -1
  28. package/lib/types/services/function-list/database.d.ts +1 -1
  29. package/lib/types/services/function-list/date.d.ts +1 -1
  30. package/lib/types/services/function-list/engineering.d.ts +1 -1
  31. package/lib/types/services/function-list/financial.d.ts +1 -1
  32. package/lib/types/services/function-list/information.d.ts +1 -1
  33. package/lib/types/services/function-list/logical.d.ts +1 -1
  34. package/lib/types/services/function-list/lookup.d.ts +1 -1
  35. package/lib/types/services/function-list/text.d.ts +1 -1
  36. package/lib/types/services/function-list/web.d.ts +1 -1
  37. package/lib/types/services/register-function.service.d.ts +70 -0
  38. package/lib/umd/index.js +8 -6
  39. package/package.json +45 -43
  40. package/lib/types/controllers/utils.d.ts +0 -27
  41. /package/lib/types/controllers/{__tests__/utils.spec.d.ts → utils/__tests__/offset-formula-data.spec.d.ts} +0 -0
package/lib/index.css CHANGED
@@ -1 +1 @@
1
- .univer-formula-error-function{position:absolute}.univer-formula-help-function{-webkit-user-select:none;user-select:none;box-sizing:border-box;width:250px;margin:0;line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-help-function-title{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--padding-base) var(--padding-lg);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color));border-bottom:1px solid rgb(var(--border-color))}.univer-formula-help-function-title-icons{display:flex}.univer-formula-help-function-title-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin-left:var(--margin-xs);padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-formula-help-function-title-icon:hover{background-color:rgb(var(--bg-color-hover))}.univer-formula-help-function-content{overflow-y:auto;box-sizing:border-box;max-height:350px;padding:0 var(--padding-lg) var(--padding-base) var(--padding-lg)}.univer-formula-help-function-content-inner{margin-top:var(--margin-sm)}.univer-formula-help-function-content-params{margin:var(--margin-xs) 0}.univer-formula-help-function-content-params-title{margin-bottom:var(--margin-xs);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color))}.univer-formula-help-function-content-params-detail{font-size:var(--font-size-xxs);font-weight:400;color:rgb(var(--text-color-secondary))}.univer-formula-help-function-active{color:rgb(var(--primary-color))}.univer-formula-help-decorator{cursor:pointer;position:fixed;z-index:10;display:flex;align-items:center;justify-content:center;padding:var(--padding-xs)}.univer-formula-search-function{overflow-y:auto;box-sizing:border-box;width:250px;max-height:400px;margin:0;padding:var(--padding-sm);line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-search-function-item{cursor:pointer;box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-search-function-item-name{font-size:var(--font-size-xs)}.univer-formula-search-function-item-name-light{color:rgb(var(--error-color))}.univer-formula-search-function-item-desc{display:block;font-size:var(--font-size-xxs)}.univer-formula-search-function-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-more-functions{display:flex;flex-direction:column;justify-content:space-between;height:100%;line-height:20px}.univer-formula-more-functions-operation{display:flex;justify-content:flex-end}.univer-formula-more-functions-operation>button{margin:0 0 var(--margin-lg) var(--margin-base)}.univer-formula-function-params{margin-bottom:var(--margin-xs);font-size:var(--font-size-xxs)}.univer-formula-function-params-title{font-weight:500;color:rgb(var(--text-color-secondary))}.univer-formula-function-params-detail{font-weight:400;color:rgb(var(--text-color))}.univer-formula-input-params-list{overflow-y:auto;height:364px}.univer-formula-input-params-list-item-name{font-size:var(--font-size-sm)}.univer-formula-input-params-list-item-selector{margin:var(--margin-xxs) 0 var(--margin-xs) 0}.univer-formula-select-function-select{display:flex;gap:10%;align-items:center;justify-content:space-between}.univer-formula-select-function-result{-webkit-user-select:none;user-select:none;overflow-y:auto;box-sizing:border-box;width:100%;height:364px;margin:0;margin-top:var(--margin-xs);padding:var(--padding-base);list-style:none;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);outline:none}.univer-formula-select-function-result-item{cursor:pointer;position:relative;box-sizing:border-box;padding:var(--padding-xs) 28px;font-size:var(--font-size-xs);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-select-function-result-item-name-light{color:rgb(var(--error-color))}.univer-formula-select-function-result-item-selected{position:absolute;top:50%;left:6px;transform:translateY(-50%);display:inline-flex;font-size:var(--font-size-lg);color:rgb(var(--success-color))}.univer-formula-select-function-result-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-select-function-content{overflow-y:auto;max-height:307px;margin:var(--margin-xs) 0}
1
+ .univer-formula-error-function{position:absolute}.univer-formula-help-function{-webkit-user-select:none;user-select:none;box-sizing:border-box;width:250px;margin:0;line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-help-function-title{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--padding-base) var(--padding-lg);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color));overflow-wrap:anywhere;border-bottom:1px solid rgb(var(--border-color))}.univer-formula-help-function-title-icons{display:flex}.univer-formula-help-function-title-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin-left:var(--margin-xs);padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-formula-help-function-title-icon:hover{background-color:rgb(var(--bg-color-hover))}.univer-formula-help-function-content{overflow-y:auto;box-sizing:border-box;max-height:350px;padding:0 var(--padding-lg) var(--padding-base) var(--padding-lg)}.univer-formula-help-function-content-inner{margin-top:var(--margin-sm)}.univer-formula-help-function-content-params{margin:var(--margin-xs) 0}.univer-formula-help-function-content-params-title{margin-bottom:var(--margin-xs);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color))}.univer-formula-help-function-content-params-detail{font-size:var(--font-size-xxs);font-weight:400;color:rgb(var(--text-color-secondary))}.univer-formula-help-function-active{color:rgb(var(--primary-color))}.univer-formula-help-decorator{cursor:pointer;position:fixed;z-index:10;display:flex;align-items:center;justify-content:center;padding:var(--padding-xs)}.univer-formula-search-function{overflow-y:auto;box-sizing:border-box;width:250px;max-height:400px;margin:0;padding:var(--padding-sm);line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-search-function-item{cursor:pointer;box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-search-function-item-name{font-size:var(--font-size-xs)}.univer-formula-search-function-item-name-light{color:rgb(var(--error-color))}.univer-formula-search-function-item-desc{display:block;font-size:var(--font-size-xxs);color:rgb(var(--grey-500))}.univer-formula-search-function-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-more-functions{display:flex;flex-direction:column;justify-content:space-between;height:100%;line-height:20px}.univer-formula-more-functions-operation{display:flex;justify-content:flex-end}.univer-formula-more-functions-operation>button{margin:0 0 var(--margin-lg) var(--margin-base)}.univer-formula-function-params{margin-bottom:var(--margin-xs);font-size:var(--font-size-xxs)}.univer-formula-function-params-title{font-weight:500;color:rgb(var(--text-color-secondary))}.univer-formula-function-params-detail{font-weight:400;color:rgb(var(--text-color))}.univer-formula-input-params-list{overflow-y:auto;height:364px}.univer-formula-input-params-list-item-name{font-size:var(--font-size-sm)}.univer-formula-input-params-list-item-selector{margin:var(--margin-xxs) 0 var(--margin-xs) 0}.univer-formula-select-function-select{display:flex;gap:10%;align-items:center;justify-content:space-between}.univer-formula-select-function-result{-webkit-user-select:none;user-select:none;overflow-y:auto;box-sizing:border-box;width:100%;height:364px;margin:0;margin-top:var(--margin-xs);padding:var(--padding-base);list-style:none;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);outline:none}.univer-formula-select-function-result-item{cursor:pointer;position:relative;box-sizing:border-box;padding:var(--padding-xs) 28px;font-size:var(--font-size-xs);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-select-function-result-item>span{display:block}.univer-formula-select-function-result-item-name-light{color:rgb(var(--error-color))}.univer-formula-select-function-result-item-selected{position:absolute;top:50%;left:6px;transform:translateY(-50%);display:inline-flex;font-size:var(--font-size-lg);color:rgb(var(--success-color))}.univer-formula-select-function-result-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-select-function-content{overflow-y:auto;max-height:307px;margin:var(--margin-xs) 0}
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ICommand } from '@univerjs/core';
16
+ import type { ICellData, ICommand, IRange, Nullable } from '@univerjs/core';
17
17
  export interface IInsertFunctionOperationParams {
18
18
  /**
19
19
  * function name
@@ -21,3 +21,14 @@ export interface IInsertFunctionOperationParams {
21
21
  value: string;
22
22
  }
23
23
  export declare const InsertFunctionOperation: ICommand;
24
+ export declare function isNumberCell(cell: Nullable<ICellData>): boolean | void | null | undefined;
25
+ /**
26
+ * Check if a single cell
27
+ * @param range
28
+ */
29
+ export declare function isSingleCell(range: IRange): boolean;
30
+ /**
31
+ * Check if there is a multi-row, multi-column range
32
+ * @param range
33
+ */
34
+ export declare function isMultiRowsColumnsRange(range: IRange): boolean;
@@ -20,6 +20,7 @@ import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/en
20
20
  import { SelectionManagerService } from '@univerjs/sheets';
21
21
  import type { EditorBridgeService } from '@univerjs/sheets-ui';
22
22
  import { ISelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
23
+ import { IContextMenuService } from '@univerjs/ui';
23
24
  import { IDescriptionService } from '../services/description.service';
24
25
  import { IFormulaInputService } from '../services/formula-input.service';
25
26
  import { IFormulaPromptService } from '../services/prompt.service';
@@ -40,6 +41,7 @@ export declare class PromptController extends Disposable {
40
41
  private readonly _textSelectionManagerService;
41
42
  private readonly _formulaInputService;
42
43
  private readonly _docViewModelManagerService;
44
+ private readonly _contextMenuService;
43
45
  private _formulaRefColors;
44
46
  private _previousSequenceNodes;
45
47
  private _previousRangesCount;
@@ -53,7 +55,7 @@ export declare class PromptController extends Disposable {
53
55
  private _numberColor;
54
56
  private _insertSelections;
55
57
  private _inputPanelState;
56
- constructor(_commandService: ICommandService, _contextService: IContextService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _formulaPromptService: IFormulaPromptService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _selectionManagerService: SelectionManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _descriptionService: IDescriptionService, _textSelectionManagerService: TextSelectionManagerService, _formulaInputService: IFormulaInputService, _docViewModelManagerService: DocViewModelManagerService);
58
+ constructor(_commandService: ICommandService, _contextService: IContextService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _formulaPromptService: IFormulaPromptService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _selectionManagerService: SelectionManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _descriptionService: IDescriptionService, _textSelectionManagerService: TextSelectionManagerService, _formulaInputService: IFormulaInputService, _docViewModelManagerService: DocViewModelManagerService, _contextMenuService: IContextMenuService);
57
59
  dispose(): void;
58
60
  private _resetTemp;
59
61
  private _initialize;
@@ -152,6 +154,7 @@ export declare class PromptController extends Disposable {
152
154
  private _updateRefSelectionStyle;
153
155
  private _changeControlSelection;
154
156
  private _refreshFormulaAndCellEditor;
157
+ private _setRemainCapture;
155
158
  private _cursorStateListener;
156
159
  private _commandExecutedListener;
157
160
  private _moveInEditor;
@@ -28,6 +28,7 @@ export declare class UpdateFormulaController extends Disposable {
28
28
  constructor(_currentUniverService: IUniverInstanceService, _commandService: ICommandService, _lexerTreeBuilder: LexerTreeBuilder, _formulaDataModel: FormulaDataModel, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SelectionManagerService, _injector: Injector);
29
29
  private _initialize;
30
30
  private _commandExecutedListener;
31
+ private _handleRedoUndo;
31
32
  private _handleSetRangeValuesMutation;
32
33
  private _handleRemoveSheetMutation;
33
34
  private _handleInsertSheetMutation;
@@ -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,52 @@
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 { ICommandInfo, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
17
+ import { ObjectMatrix } from '@univerjs/core';
18
+ import type { IArrayFormulaRangeType } from '@univerjs/engine-formula';
19
+ import type { ISelectionWithStyle } from '@univerjs/sheets';
20
+ interface IFormulaDataGenerics<T> {
21
+ [unitId: string]: Nullable<{
22
+ [sheetId: string]: IObjectMatrixPrimitiveType<T>;
23
+ }>;
24
+ }
25
+ export interface IRefRangeWithPosition {
26
+ row: number;
27
+ column: number;
28
+ range: IRange;
29
+ }
30
+ export declare function offsetFormula<T>(formulaData: IFormulaDataGenerics<T>, command: ICommandInfo, unitId: string, sheetId: string, selections?: Readonly<Nullable<ISelectionWithStyle[]>>, formulaRangeData?: IFormulaDataGenerics<IRange>, refRanges?: IRefRangeWithPosition[]): IFormulaDataGenerics<T>;
31
+ export declare function offsetArrayFormula(arrayFormulaRange: IArrayFormulaRangeType, command: ICommandInfo, unitId: string, sheetId: string): IArrayFormulaRangeType;
32
+ export declare function checkFormulaDataNull<T>(formulaData: IFormulaDataGenerics<T>, unitId: string, sheetId: string): boolean;
33
+ export declare function removeFormulaData<T>(formulaData: IFormulaDataGenerics<T>, unitId: string, sheetId: string): void;
34
+ export declare function removeValueFormulaArray<T>(formulaRange: IRange, formulaMatrix: ObjectMatrix<T>): void;
35
+ export declare function inFormulaRange(row: number, column: number, formulaMatrix?: ObjectMatrix<IRange>): boolean;
36
+ export declare function moveRangeUpdateFormulaData<T>(fromRange: IRange, toRange: IRange, fromArrayFormulaCellDataMatrix: ObjectMatrix<T>, toArrayFormulaCellDataMatrix: ObjectMatrix<T>, arrayFormulaRangeMatrix?: ObjectMatrix<IRange>): void;
37
+ /**
38
+ * Handle arrayFormulaRange and arrayFormulaCellData. If removing rows affects the array formula, the array formula cell data needs to be cleared and will be regenerated during recalculation.
39
+ * @param range
40
+ * @param formulaMatrix
41
+ * @param formulaRangeMatrix
42
+ * @param refRanges
43
+ */
44
+ export declare function removeFormulaArrayRow<T>(range: IRange, formulaMatrix: ObjectMatrix<T>, formulaRangeMatrix: ObjectMatrix<IRange>, refRanges?: IRefRangeWithPosition[]): void;
45
+ /**
46
+ * Handle arrayFormulaRange and arrayFormulaCellData. If removing columns affects the array formula, the array formula cell data needs to be cleared and will be regenerated during recalculation.
47
+ * @param range
48
+ * @param formulaRangeMatrix
49
+ * @param refRanges
50
+ */
51
+ export declare function removeFormulaArrayColumn<T>(range: IRange, formulaMatrix: ObjectMatrix<T>, formulaRangeMatrix: ObjectMatrix<IRange>, refRanges?: IRefRangeWithPosition[]): void;
52
+ export {};
@@ -0,0 +1,19 @@
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 { ICommandInfo } from '@univerjs/core';
17
+ import type { IArrayFormulaRangeType, IArrayFormulaUnitCellType, IFormulaData } from '@univerjs/engine-formula';
18
+ import type { IMoveRangeMutationParams } from '@univerjs/sheets';
19
+ export declare function handleRedoUndoMoveRange(command: ICommandInfo<IMoveRangeMutationParams>, formulaData: IFormulaData, arrayFormulaRange: IArrayFormulaRangeType, arrayFormulaCellData: IArrayFormulaUnitCellType): void;
@@ -14,10 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { IUniverInstanceService, LocaleService, Plugin, PluginType } from '@univerjs/core';
17
- import type { IFunctionInfo } from '@univerjs/engine-formula';
17
+ import type { BaseFunction, IFunctionInfo, IFunctionNames } from '@univerjs/engine-formula';
18
+ import type { Ctor } from '@wendellhu/redi';
18
19
  import { Injector } from '@wendellhu/redi';
20
+ /**
21
+ * The configuration of the formula UI plugin.
22
+ */
19
23
  interface IFormulaUIConfig {
20
24
  description: IFunctionInfo[];
25
+ function: Array<[Ctor<BaseFunction>, IFunctionNames]>;
21
26
  }
22
27
  export declare class UniverSheetsFormulaPlugin extends Plugin {
23
28
  private _config;
@@ -15,3 +15,9 @@
15
15
  */
16
16
  export { UniverSheetsFormulaPlugin } from './formula-ui-plugin';
17
17
  export { enUS, zhCN } from './locale';
18
+ export { IDescriptionService } from './services/description.service';
19
+ export { DescriptionService } from './services/description.service';
20
+ export { FormulaCustomFunctionService, IFormulaCustomFunctionService, } from './services/formula-custom-function.service';
21
+ export type { IRegisterFunctionParams, IUnregisterFunctionParams } from './services/register-function.service';
22
+ export { RegisterFunctionService } from './services/register-function.service';
23
+ export { IRegisterFunctionService } from './services/register-function.service';
@@ -187,24 +187,6 @@ declare const _default: {
187
187
  };
188
188
  };
189
189
  };
190
- CONCATENATE: {
191
- description: string;
192
- abstract: string;
193
- links: {
194
- title: string;
195
- url: string;
196
- }[];
197
- functionParameter: {
198
- number1: {
199
- name: string;
200
- detail: string;
201
- };
202
- number2: {
203
- name: string;
204
- detail: string;
205
- };
206
- };
207
- };
208
190
  CONFIDENCE: {
209
191
  description: string;
210
192
  abstract: string;
@@ -313,42 +295,6 @@ declare const _default: {
313
295
  };
314
296
  };
315
297
  };
316
- FLOOR: {
317
- description: string;
318
- abstract: string;
319
- links: {
320
- title: string;
321
- url: string;
322
- }[];
323
- functionParameter: {
324
- number1: {
325
- name: string;
326
- detail: string;
327
- };
328
- number2: {
329
- name: string;
330
- detail: string;
331
- };
332
- };
333
- };
334
- FORECAST: {
335
- description: string;
336
- abstract: string;
337
- links: {
338
- title: string;
339
- url: string;
340
- }[];
341
- functionParameter: {
342
- number1: {
343
- name: string;
344
- detail: string;
345
- };
346
- number2: {
347
- name: string;
348
- detail: string;
349
- };
350
- };
351
- };
352
298
  FTEST: {
353
299
  description: string;
354
300
  abstract: string;
@@ -2445,11 +2391,11 @@ declare const _default: {
2445
2391
  url: string;
2446
2392
  }[];
2447
2393
  functionParameter: {
2448
- number1: {
2394
+ parameter: {
2449
2395
  name: string;
2450
2396
  detail: string;
2451
2397
  };
2452
- number2: {
2398
+ calculation: {
2453
2399
  name: string;
2454
2400
  detail: string;
2455
2401
  };
@@ -2765,6 +2711,24 @@ declare const _default: {
2765
2711
  };
2766
2712
  };
2767
2713
  };
2714
+ CONCATENATE: {
2715
+ description: string;
2716
+ abstract: string;
2717
+ links: {
2718
+ title: string;
2719
+ url: string;
2720
+ }[];
2721
+ functionParameter: {
2722
+ number1: {
2723
+ name: string;
2724
+ detail: string;
2725
+ };
2726
+ number2: {
2727
+ name: string;
2728
+ detail: string;
2729
+ };
2730
+ };
2731
+ };
2768
2732
  DBCS: {
2769
2733
  description: string;
2770
2734
  abstract: string;
@@ -3691,11 +3655,23 @@ declare const _default: {
3691
3655
  url: string;
3692
3656
  }[];
3693
3657
  functionParameter: {
3694
- number1: {
3658
+ row_num: {
3695
3659
  name: string;
3696
3660
  detail: string;
3697
3661
  };
3698
- number2: {
3662
+ column_num: {
3663
+ name: string;
3664
+ detail: string;
3665
+ };
3666
+ abs_num: {
3667
+ name: string;
3668
+ detail: string;
3669
+ };
3670
+ a1: {
3671
+ name: string;
3672
+ detail: string;
3673
+ };
3674
+ sheet_text: {
3699
3675
  name: string;
3700
3676
  detail: string;
3701
3677
  };
@@ -4249,11 +4225,19 @@ declare const _default: {
4249
4225
  url: string;
4250
4226
  }[];
4251
4227
  functionParameter: {
4252
- number1: {
4228
+ lookupValue: {
4253
4229
  name: string;
4254
4230
  detail: string;
4255
4231
  };
4256
- number2: {
4232
+ tableArray: {
4233
+ name: string;
4234
+ detail: string;
4235
+ };
4236
+ colIndexNum: {
4237
+ name: string;
4238
+ detail: string;
4239
+ };
4240
+ rangeLookup: {
4257
4241
  name: string;
4258
4242
  detail: string;
4259
4243
  };
@@ -4961,6 +4945,24 @@ declare const _default: {
4961
4945
  };
4962
4946
  };
4963
4947
  };
4948
+ FORECAST: {
4949
+ description: string;
4950
+ abstract: string;
4951
+ links: {
4952
+ title: string;
4953
+ url: string;
4954
+ }[];
4955
+ functionParameter: {
4956
+ number1: {
4957
+ name: string;
4958
+ detail: string;
4959
+ };
4960
+ number2: {
4961
+ name: string;
4962
+ detail: string;
4963
+ };
4964
+ };
4965
+ };
4964
4966
  FORECAST_ETS: {
4965
4967
  description: string;
4966
4968
  abstract: string;
@@ -6853,6 +6855,24 @@ declare const _default: {
6853
6855
  };
6854
6856
  };
6855
6857
  };
6858
+ FLOOR: {
6859
+ description: string;
6860
+ abstract: string;
6861
+ links: {
6862
+ title: string;
6863
+ url: string;
6864
+ }[];
6865
+ functionParameter: {
6866
+ number1: {
6867
+ name: string;
6868
+ detail: string;
6869
+ };
6870
+ number2: {
6871
+ name: string;
6872
+ detail: string;
6873
+ };
6874
+ };
6875
+ };
6856
6876
  FLOOR_MATH: {
6857
6877
  description: string;
6858
6878
  abstract: string;
@@ -9220,6 +9240,7 @@ declare const _default: {
9220
9240
  web: string;
9221
9241
  array: string;
9222
9242
  univer: string;
9243
+ user: string;
9223
9244
  };
9224
9245
  moreFunctions: {
9225
9246
  confirm: string;
@@ -122,24 +122,6 @@ declare const _default: {
122
122
  };
123
123
  };
124
124
  };
125
- CONCATENATE: {
126
- description: string;
127
- abstract: string;
128
- links: {
129
- title: string;
130
- url: string;
131
- }[];
132
- functionParameter: {
133
- number1: {
134
- name: string;
135
- detail: string;
136
- };
137
- number2: {
138
- name: string;
139
- detail: string;
140
- };
141
- };
142
- };
143
125
  CONFIDENCE: {
144
126
  description: string;
145
127
  abstract: string;
@@ -248,42 +230,6 @@ declare const _default: {
248
230
  };
249
231
  };
250
232
  };
251
- FLOOR: {
252
- description: string;
253
- abstract: string;
254
- links: {
255
- title: string;
256
- url: string;
257
- }[];
258
- functionParameter: {
259
- number1: {
260
- name: string;
261
- detail: string;
262
- };
263
- number2: {
264
- name: string;
265
- detail: string;
266
- };
267
- };
268
- };
269
- FORECAST: {
270
- description: string;
271
- abstract: string;
272
- links: {
273
- title: string;
274
- url: string;
275
- }[];
276
- functionParameter: {
277
- number1: {
278
- name: string;
279
- detail: string;
280
- };
281
- number2: {
282
- name: string;
283
- detail: string;
284
- };
285
- };
286
- };
287
233
  FTEST: {
288
234
  description: string;
289
235
  abstract: string;
@@ -122,24 +122,6 @@ declare const _default: {
122
122
  };
123
123
  };
124
124
  };
125
- CONCATENATE: {
126
- description: string;
127
- abstract: string;
128
- links: {
129
- title: string;
130
- url: string;
131
- }[];
132
- functionParameter: {
133
- number1: {
134
- name: string;
135
- detail: string;
136
- };
137
- number2: {
138
- name: string;
139
- detail: string;
140
- };
141
- };
142
- };
143
125
  CONFIDENCE: {
144
126
  description: string;
145
127
  abstract: string;
@@ -248,42 +230,6 @@ declare const _default: {
248
230
  };
249
231
  };
250
232
  };
251
- FLOOR: {
252
- description: string;
253
- abstract: string;
254
- links: {
255
- title: string;
256
- url: string;
257
- }[];
258
- functionParameter: {
259
- number1: {
260
- name: string;
261
- detail: string;
262
- };
263
- number2: {
264
- name: string;
265
- detail: string;
266
- };
267
- };
268
- };
269
- FORECAST: {
270
- description: string;
271
- abstract: string;
272
- links: {
273
- title: string;
274
- url: string;
275
- }[];
276
- functionParameter: {
277
- number1: {
278
- name: string;
279
- detail: string;
280
- };
281
- number2: {
282
- name: string;
283
- detail: string;
284
- };
285
- };
286
- };
287
233
  FTEST: {
288
234
  description: string;
289
235
  abstract: string;
@@ -122,24 +122,6 @@ declare const _default: {
122
122
  };
123
123
  };
124
124
  };
125
- CONCATENATE: {
126
- description: string;
127
- abstract: string;
128
- links: {
129
- title: string;
130
- url: string;
131
- }[];
132
- functionParameter: {
133
- number1: {
134
- name: string;
135
- detail: string;
136
- };
137
- number2: {
138
- name: string;
139
- detail: string;
140
- };
141
- };
142
- };
143
125
  CONFIDENCE: {
144
126
  description: string;
145
127
  abstract: string;
@@ -248,42 +230,6 @@ declare const _default: {
248
230
  };
249
231
  };
250
232
  };
251
- FLOOR: {
252
- description: string;
253
- abstract: string;
254
- links: {
255
- title: string;
256
- url: string;
257
- }[];
258
- functionParameter: {
259
- number1: {
260
- name: string;
261
- detail: string;
262
- };
263
- number2: {
264
- name: string;
265
- detail: string;
266
- };
267
- };
268
- };
269
- FORECAST: {
270
- description: string;
271
- abstract: string;
272
- links: {
273
- title: string;
274
- url: string;
275
- }[];
276
- functionParameter: {
277
- number1: {
278
- name: string;
279
- detail: string;
280
- };
281
- number2: {
282
- name: string;
283
- detail: string;
284
- };
285
- };
286
- };
287
233
  FTEST: {
288
234
  description: string;
289
235
  abstract: string;
@@ -166,11 +166,11 @@ declare const _default: {
166
166
  url: string;
167
167
  }[];
168
168
  functionParameter: {
169
- number1: {
169
+ parameter: {
170
170
  name: string;
171
171
  detail: string;
172
172
  };
173
- number2: {
173
+ calculation: {
174
174
  name: string;
175
175
  detail: string;
176
176
  };
@@ -166,11 +166,11 @@ declare const _default: {
166
166
  url: string;
167
167
  }[];
168
168
  functionParameter: {
169
- number1: {
169
+ parameter: {
170
170
  name: string;
171
171
  detail: string;
172
172
  };
173
- number2: {
173
+ calculation: {
174
174
  name: string;
175
175
  detail: string;
176
176
  };
@@ -166,11 +166,11 @@ declare const _default: {
166
166
  url: string;
167
167
  }[];
168
168
  functionParameter: {
169
- number1: {
169
+ parameter: {
170
170
  name: string;
171
171
  detail: string;
172
172
  };
173
- number2: {
173
+ calculation: {
174
174
  name: string;
175
175
  detail: string;
176
176
  };