@univerjs/sheets-formula-ui 0.3.0-nightly.202410101606
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/README.md +39 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/index.css +1 -0
- package/lib/locale/en-US.json +10987 -0
- package/lib/locale/ru-RU.json +10938 -0
- package/lib/locale/vi-VN.json +9511 -0
- package/lib/locale/zh-CN.json +10987 -0
- package/lib/locale/zh-TW.json +10987 -0
- package/lib/types/commands/commands/formula-clipboard.command.d.ts +2 -0
- package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +13 -0
- package/lib/types/commands/operations/__tests__/insert-function.operation.spec.d.ts +16 -0
- package/lib/types/commands/operations/editor-formula.operation.d.ts +11 -0
- package/lib/types/commands/operations/help-function.operation.d.ts +2 -0
- package/lib/types/commands/operations/insert-function.operation.d.ts +19 -0
- package/lib/types/commands/operations/more-functions.operation.d.ts +2 -0
- package/lib/types/commands/operations/reference-absolute.operation.d.ts +2 -0
- package/lib/types/commands/operations/search-function.operation.d.ts +2 -0
- package/lib/types/common/plugin-name.d.ts +16 -0
- package/lib/types/common/prompt.d.ts +16 -0
- package/lib/types/common/selection.d.ts +4 -0
- package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +7 -0
- package/lib/types/controllers/__tests__/formula-auto-fill.controller.spec.d.ts +16 -0
- package/lib/types/controllers/__tests__/formula-clipboard.controller.spec.d.ts +16 -0
- package/lib/types/controllers/__tests__/update-formula.controller.spec.d.ts +16 -0
- package/lib/types/controllers/config.schema.d.ts +15 -0
- package/lib/types/controllers/formula-alert-render.controller.d.ts +15 -0
- package/lib/types/controllers/formula-auto-fill.controller.d.ts +10 -0
- package/lib/types/controllers/formula-clipboard.controller.d.ts +25 -0
- package/lib/types/controllers/formula-editor-show.controller.d.ts +28 -0
- package/lib/types/controllers/formula-process.controller.d.ts +15 -0
- package/lib/types/controllers/formula-render.controller.d.ts +6 -0
- package/lib/types/controllers/formula-ui.controller.d.ts +19 -0
- package/lib/types/controllers/menu.d.ts +5 -0
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/controllers/prompt.controller.d.ts +170 -0
- package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts +9 -0
- package/lib/types/controllers/utils/__tests__/offset-formula-data.spec.d.ts +16 -0
- package/lib/types/controllers/utils/__tests__/ref-range-formula.spec.d.ts +16 -0
- package/lib/types/controllers/utils/__tests__/utils.spec.d.ts +16 -0
- package/lib/types/controllers/utils/offset-formula-data.d.ts +15 -0
- package/lib/types/controllers/utils/ref-range-formula.d.ts +71 -0
- package/lib/types/controllers/utils/utils.d.ts +15 -0
- package/lib/types/index.d.ts +25 -0
- package/lib/types/locale/en-US.d.ts +9983 -0
- package/lib/types/locale/function-list/array/en-US.d.ts +17 -0
- package/lib/types/locale/function-list/array/ja-JP.d.ts +17 -0
- package/lib/types/locale/function-list/array/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/array/vi-VN.d.ts +17 -0
- package/lib/types/locale/function-list/array/zh-CN.d.ts +17 -0
- package/lib/types/locale/function-list/array/zh-TW.d.ts +17 -0
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +762 -0
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +762 -0
- package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +762 -0
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +762 -0
- package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +762 -0
- package/lib/types/locale/function-list/cube/en-US.d.ts +144 -0
- package/lib/types/locale/function-list/cube/ja-JP.d.ts +144 -0
- package/lib/types/locale/function-list/cube/ru-RU.d.ts +144 -0
- package/lib/types/locale/function-list/cube/vi-VN.d.ts +144 -0
- package/lib/types/locale/function-list/cube/zh-CN.d.ts +144 -0
- package/lib/types/locale/function-list/cube/zh-TW.d.ts +144 -0
- package/lib/types/locale/function-list/database/en-US.d.ts +234 -0
- package/lib/types/locale/function-list/database/ja-JP.d.ts +234 -0
- package/lib/types/locale/function-list/database/ru-RU.d.ts +234 -0
- package/lib/types/locale/function-list/database/vi-VN.d.ts +234 -0
- package/lib/types/locale/function-list/database/zh-CN.d.ts +234 -0
- package/lib/types/locale/function-list/database/zh-TW.d.ts +234 -0
- package/lib/types/locale/function-list/date/en-US.d.ts +458 -0
- package/lib/types/locale/function-list/date/ja-JP.d.ts +458 -0
- package/lib/types/locale/function-list/date/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/date/vi-VN.d.ts +458 -0
- package/lib/types/locale/function-list/date/zh-CN.d.ts +458 -0
- package/lib/types/locale/function-list/date/zh-TW.d.ts +458 -0
- package/lib/types/locale/function-list/engineering/en-US.d.ts +894 -0
- package/lib/types/locale/function-list/engineering/ja-JP.d.ts +894 -0
- package/lib/types/locale/function-list/engineering/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/engineering/vi-VN.d.ts +894 -0
- package/lib/types/locale/function-list/engineering/zh-CN.d.ts +894 -0
- package/lib/types/locale/function-list/engineering/zh-TW.d.ts +894 -0
- package/lib/types/locale/function-list/financial/en-US.d.ts +1608 -0
- package/lib/types/locale/function-list/financial/ja-JP.d.ts +1608 -0
- package/lib/types/locale/function-list/financial/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/financial/vi-VN.d.ts +1608 -0
- package/lib/types/locale/function-list/financial/zh-CN.d.ts +1608 -0
- package/lib/types/locale/function-list/financial/zh-TW.d.ts +1608 -0
- package/lib/types/locale/function-list/information/en-US.d.ts +327 -0
- package/lib/types/locale/function-list/information/ja-JP.d.ts +327 -0
- package/lib/types/locale/function-list/information/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/information/vi-VN.d.ts +255 -0
- package/lib/types/locale/function-list/information/zh-CN.d.ts +327 -0
- package/lib/types/locale/function-list/information/zh-TW.d.ts +327 -0
- package/lib/types/locale/function-list/logical/en-US.d.ts +390 -0
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +390 -0
- package/lib/types/locale/function-list/logical/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/logical/vi-VN.d.ts +390 -0
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +390 -0
- package/lib/types/locale/function-list/logical/zh-TW.d.ts +390 -0
- package/lib/types/locale/function-list/lookup/en-US.d.ts +812 -0
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +812 -0
- package/lib/types/locale/function-list/lookup/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +722 -0
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +812 -0
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +812 -0
- package/lib/types/locale/function-list/math/en-US.d.ts +1388 -0
- package/lib/types/locale/function-list/math/ja-JP.d.ts +1388 -0
- package/lib/types/locale/function-list/math/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/math/vi-VN.d.ts +1298 -0
- package/lib/types/locale/function-list/math/zh-CN.d.ts +1388 -0
- package/lib/types/locale/function-list/math/zh-TW.d.ts +1388 -0
- package/lib/types/locale/function-list/statistical/en-US.d.ts +2160 -0
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +2160 -0
- package/lib/types/locale/function-list/statistical/ru-RU.d.ts +2 -0
- package/lib/types/locale/function-list/statistical/vi-VN.d.ts +1188 -0
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +2160 -0
- package/lib/types/locale/function-list/statistical/zh-TW.d.ts +2160 -0
- package/lib/types/locale/function-list/text/en-US.d.ts +904 -0
- package/lib/types/locale/function-list/text/ja-JP.d.ts +905 -0
- package/lib/types/locale/function-list/text/ru-RU.d.ts +856 -0
- package/lib/types/locale/function-list/text/vi-VN.d.ts +784 -0
- package/lib/types/locale/function-list/text/zh-CN.d.ts +904 -0
- package/lib/types/locale/function-list/text/zh-TW.d.ts +904 -0
- package/lib/types/locale/function-list/univer/en-US.d.ts +17 -0
- package/lib/types/locale/function-list/univer/ja-JP.d.ts +17 -0
- package/lib/types/locale/function-list/univer/ru-RU.d.ts +17 -0
- package/lib/types/locale/function-list/univer/vi-VN.d.ts +17 -0
- package/lib/types/locale/function-list/univer/zh-CN.d.ts +17 -0
- package/lib/types/locale/function-list/univer/zh-TW.d.ts +17 -0
- package/lib/types/locale/function-list/web/en-US.d.ts +72 -0
- package/lib/types/locale/function-list/web/ja-JP.d.ts +72 -0
- package/lib/types/locale/function-list/web/ru-RU.d.ts +72 -0
- package/lib/types/locale/function-list/web/vi-VN.d.ts +2 -0
- package/lib/types/locale/function-list/web/zh-CN.d.ts +72 -0
- package/lib/types/locale/function-list/web/zh-TW.d.ts +72 -0
- package/lib/types/locale/ru-RU.d.ts +9934 -0
- package/lib/types/locale/vi-VN.d.ts +8657 -0
- package/lib/types/locale/zh-CN.d.ts +9983 -0
- package/lib/types/locale/zh-TW.d.ts +9983 -0
- package/lib/types/services/formula-common.d.ts +18 -0
- package/lib/types/services/prompt.service.d.ts +160 -0
- package/lib/types/services/render-services/ref-selections.render-service.d.ts +42 -0
- package/lib/types/services/utils.d.ts +8 -0
- package/lib/types/sheets-formula-ui.plugin.d.ts +19 -0
- package/lib/types/views/FormulaPromptContainer.d.ts +2 -0
- package/lib/types/views/more-functions/MoreFunctions.d.ts +2 -0
- package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +22 -0
- package/lib/types/views/more-functions/function-params/FunctionParams.d.ts +8 -0
- package/lib/types/views/more-functions/input-params/InputParams.d.ts +7 -0
- package/lib/types/views/more-functions/interface.d.ts +16 -0
- package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +6 -0
- package/lib/types/views/prompt/help-function/HelpFunction.d.ts +2 -0
- package/lib/types/views/prompt/resize-scroll-observer.d.ts +18 -0
- package/lib/types/views/prompt/search-function/SearchFunction.d.ts +2 -0
- package/lib/umd/index.js +1 -0
- package/package.json +113 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ICellData, IMutationInfo, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
2
|
+
import { IFormulaData, IFormulaDataItem } from '@univerjs/engine-formula';
|
|
3
|
+
export declare enum FormulaReferenceMoveType {
|
|
4
|
+
MoveRange = 0,// range
|
|
5
|
+
MoveRows = 1,// move rows
|
|
6
|
+
MoveCols = 2,// move columns
|
|
7
|
+
InsertRow = 3,// row
|
|
8
|
+
InsertColumn = 4,// column
|
|
9
|
+
RemoveRow = 5,// row
|
|
10
|
+
RemoveColumn = 6,// column
|
|
11
|
+
DeleteMoveLeft = 7,// range
|
|
12
|
+
DeleteMoveUp = 8,// range
|
|
13
|
+
InsertMoveDown = 9,// range
|
|
14
|
+
InsertMoveRight = 10,// range
|
|
15
|
+
SetName = 11,
|
|
16
|
+
RemoveSheet = 12
|
|
17
|
+
}
|
|
18
|
+
export interface IFormulaReferenceMoveParam {
|
|
19
|
+
type: FormulaReferenceMoveType;
|
|
20
|
+
unitId: string;
|
|
21
|
+
sheetId: string;
|
|
22
|
+
range?: IRange;
|
|
23
|
+
from?: IRange;
|
|
24
|
+
to?: IRange;
|
|
25
|
+
sheetName?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function getFormulaReferenceMoveUndoRedo(oldFormulaData: IFormulaData, newFormulaData: IFormulaData, formulaReferenceMoveParam: IFormulaReferenceMoveParam): {
|
|
28
|
+
undos: IMutationInfo<object>[];
|
|
29
|
+
redos: IMutationInfo<object>[];
|
|
30
|
+
};
|
|
31
|
+
export declare function getFormulaReferenceSheet(oldFormulaData: IFormulaData, newFormulaData: IFormulaData): {
|
|
32
|
+
undos: IMutationInfo<object>[];
|
|
33
|
+
redos: IMutationInfo<object>[];
|
|
34
|
+
};
|
|
35
|
+
export declare function getFormulaReferenceRange(oldFormulaData: IFormulaData, newFormulaData: IFormulaData, formulaReferenceMoveParam: IFormulaReferenceMoveParam): {
|
|
36
|
+
undos: IMutationInfo<object>[];
|
|
37
|
+
redos: IMutationInfo<object>[];
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* For different Command operations, it may be necessary to perform traversal in reverse or in forward order, so first determine the type of Command and then perform traversal.
|
|
41
|
+
* @param oldFormulaData
|
|
42
|
+
* @param newFormulaData
|
|
43
|
+
* @param formulaReferenceMoveParam
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare function refRangeFormula(oldFormulaData: IFormulaData, newFormulaData: IFormulaData, formulaReferenceMoveParam: IFormulaReferenceMoveParam): {
|
|
47
|
+
redoFormulaData: IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
48
|
+
undoFormulaData: IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Transfer the formulaDataItem to the cellData
|
|
52
|
+
* ┌────────────────────────────────┬─────────────────┐
|
|
53
|
+
* │ IFormulaDataItem │ ICellData │
|
|
54
|
+
* ├──────────────────┬─────┬───┬───┼───────────┬─────┤
|
|
55
|
+
* │ f │ si │ x │ y │ f │ si │
|
|
56
|
+
* ├──────────────────┼─────┼───┼───┼───────────┼─────┤
|
|
57
|
+
* │ =SUM(1) │ │ │ │ =SUM(1) │ │
|
|
58
|
+
* │ │ id1 │ │ │ │ id1 │
|
|
59
|
+
* │ =SUM(1) │ id1 │ │ │ =SUM(1) │ id1 │
|
|
60
|
+
* │ =SUM(1) │ id1 │ 0 │ 0 │ =SUM(1) │ id1 │
|
|
61
|
+
* │ =SUM(1) │ id1 │ 0 │ 1 │ │ id1 │
|
|
62
|
+
* └──────────────────┴─────┴───┴───┴───────────┴─────┘
|
|
63
|
+
*/
|
|
64
|
+
export declare function formulaDataItemToCellData(formulaDataItem: Nullable<IFormulaDataItem>): Nullable<ICellData>;
|
|
65
|
+
/**
|
|
66
|
+
* Convert formulaData to cellData
|
|
67
|
+
* @param formulaData
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
export declare function formulaDataToCellData(formulaData: IObjectMatrixPrimitiveType<IFormulaDataItem | null>): IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
71
|
+
export declare function isFormulaDataItem(cell: IFormulaDataItem): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICellData, IContextService, Nullable } from '@univerjs/core';
|
|
2
|
+
import { ErrorType } from '@univerjs/engine-formula';
|
|
3
|
+
export declare function whenEditorStandalone(contextService: IContextService): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Extract the formula error from the cell
|
|
6
|
+
* @param cell
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractFormulaError(cell: Nullable<ICellData>): ErrorType | null;
|
|
10
|
+
/**
|
|
11
|
+
* Extract the formula number from the cell, handle the precision issue
|
|
12
|
+
* @param cell
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function extractFormulaNumber(cell: Nullable<ICellData>): number | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { SheetOnlyPasteFormulaCommand } from './commands/commands/formula-clipboard.command';
|
|
17
|
+
export { SelectEditorFormulaOperation } from './commands/operations/editor-formula.operation';
|
|
18
|
+
export { HelpFunctionOperation } from './commands/operations/help-function.operation';
|
|
19
|
+
export { InsertFunctionOperation } from './commands/operations/insert-function.operation';
|
|
20
|
+
export { MoreFunctionsOperation } from './commands/operations/more-functions.operation';
|
|
21
|
+
export { ReferenceAbsoluteOperation } from './commands/operations/reference-absolute.operation';
|
|
22
|
+
export { SearchFunctionOperation } from './commands/operations/search-function.operation';
|
|
23
|
+
export type { IFormulaInfo, IOtherFormulaResult } from './services/formula-common';
|
|
24
|
+
export { FORMULA_PROMPT_ACTIVATED } from './services/prompt.service';
|
|
25
|
+
export { UniverSheetsFormulaUIPlugin } from './sheets-formula-ui.plugin';
|