@univerjs/sheets-formula 0.1.15 → 0.1.17
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 +4 -4
- package/lib/es/index.js +2887 -2805
- package/lib/locale/en-US.json +25 -21
- package/lib/locale/ru-RU.json +24 -20
- package/lib/locale/zh-CN.json +25 -21
- package/lib/types/commands/commands/formula-clipboard.command.d.ts +0 -1
- package/lib/types/controllers/active-dirty.controller.d.ts +1 -0
- package/lib/types/controllers/formula-alert-render.controller.d.ts +13 -0
- package/lib/types/controllers/formula-clipboard.controller.d.ts +5 -4
- package/lib/types/controllers/formula-ui.controller.d.ts +1 -1
- package/lib/types/controllers/prompt.controller.d.ts +2 -3
- package/lib/types/controllers/utils/ref-range-formula.d.ts +17 -0
- package/lib/types/formula-ui-plugin.d.ts +15 -3
- package/lib/types/index.d.ts +1 -2
- package/lib/types/locale/en-US.d.ts +10 -6
- package/lib/types/locale/function-list/lookup/en-US.d.ts +6 -2
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +6 -2
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +6 -2
- package/lib/types/locale/function-list/statistical/en-US.d.ts +2 -2
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +2 -2
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +2 -2
- package/lib/types/locale/function-list/text/en-US.d.ts +2 -2
- package/lib/types/locale/function-list/text/ja-JP.d.ts +2 -2
- package/lib/types/locale/function-list/text/ru-RU.d.ts +2 -2
- package/lib/types/locale/function-list/text/zh-CN.d.ts +2 -2
- package/lib/types/locale/ru-RU.d.ts +10 -6
- package/lib/types/locale/zh-CN.d.ts +10 -6
- package/lib/umd/index.js +4 -4
- package/package.json +21 -21
- package/lib/types/controllers/formula-alert.controller.d.ts +0 -12
package/lib/locale/en-US.json
CHANGED
|
@@ -3278,7 +3278,7 @@
|
|
|
3278
3278
|
}
|
|
3279
3279
|
},
|
|
3280
3280
|
"AVERAGEA": {
|
|
3281
|
-
"description": "Returns the average of its arguments, including numbers, text, and logical values",
|
|
3281
|
+
"description": "Returns the average of its arguments, including numbers, text, and logical values.",
|
|
3282
3282
|
"abstract": "Returns the average of its arguments, including numbers, text, and logical values",
|
|
3283
3283
|
"links": [
|
|
3284
3284
|
{
|
|
@@ -3287,13 +3287,13 @@
|
|
|
3287
3287
|
}
|
|
3288
3288
|
],
|
|
3289
3289
|
"functionParameter": {
|
|
3290
|
-
"
|
|
3291
|
-
"name": "
|
|
3292
|
-
"detail": "first"
|
|
3290
|
+
"value1": {
|
|
3291
|
+
"name": "value1",
|
|
3292
|
+
"detail": "The first number, cell reference, or range for which you want the average."
|
|
3293
3293
|
},
|
|
3294
|
-
"
|
|
3295
|
-
"name": "
|
|
3296
|
-
"detail": "
|
|
3294
|
+
"value2": {
|
|
3295
|
+
"name": "value2",
|
|
3296
|
+
"detail": "Additional numbers, cell references or ranges for which you want the average, up to a maximum of 255."
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
},
|
|
@@ -5522,7 +5522,7 @@
|
|
|
5522
5522
|
}
|
|
5523
5523
|
},
|
|
5524
5524
|
"CHOOSE": {
|
|
5525
|
-
"description": "Chooses a value from a list of values",
|
|
5525
|
+
"description": "Chooses a value from a list of values.",
|
|
5526
5526
|
"abstract": "Chooses a value from a list of values",
|
|
5527
5527
|
"links": [
|
|
5528
5528
|
{
|
|
@@ -5531,13 +5531,17 @@
|
|
|
5531
5531
|
}
|
|
5532
5532
|
],
|
|
5533
5533
|
"functionParameter": {
|
|
5534
|
-
"
|
|
5535
|
-
"name": "
|
|
5536
|
-
"detail": "
|
|
5534
|
+
"indexNum": {
|
|
5535
|
+
"name": "index_num",
|
|
5536
|
+
"detail": "Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254.\nIf index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.\nIf index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value.\nIf index_num is a fraction, it is truncated to the lowest integer before being used."
|
|
5537
5537
|
},
|
|
5538
|
-
"
|
|
5539
|
-
"name": "
|
|
5540
|
-
"detail": "
|
|
5538
|
+
"value1": {
|
|
5539
|
+
"name": "value1",
|
|
5540
|
+
"detail": "CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or text."
|
|
5541
|
+
},
|
|
5542
|
+
"value2": {
|
|
5543
|
+
"name": "value2",
|
|
5544
|
+
"detail": "1 to 254 value arguments."
|
|
5541
5545
|
}
|
|
5542
5546
|
}
|
|
5543
5547
|
},
|
|
@@ -6635,7 +6639,7 @@
|
|
|
6635
6639
|
},
|
|
6636
6640
|
"CONCAT": {
|
|
6637
6641
|
"description": "Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments.",
|
|
6638
|
-
"abstract": "Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments
|
|
6642
|
+
"abstract": "Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments",
|
|
6639
6643
|
"links": [
|
|
6640
6644
|
{
|
|
6641
6645
|
"title": "Instruction",
|
|
@@ -6643,13 +6647,13 @@
|
|
|
6643
6647
|
}
|
|
6644
6648
|
],
|
|
6645
6649
|
"functionParameter": {
|
|
6646
|
-
"
|
|
6647
|
-
"name": "
|
|
6648
|
-
"detail": "
|
|
6650
|
+
"text1": {
|
|
6651
|
+
"name": "text1",
|
|
6652
|
+
"detail": "Text item to be joined. A string, or array of strings, such as a range of cells."
|
|
6649
6653
|
},
|
|
6650
|
-
"
|
|
6651
|
-
"name": "
|
|
6652
|
-
"detail": "
|
|
6654
|
+
"text2": {
|
|
6655
|
+
"name": "text2",
|
|
6656
|
+
"detail": "Additional text items to be joined. There can be a maximum of 253 text arguments for the text items. Each can be a string, or array of strings, such as a range of cells."
|
|
6653
6657
|
}
|
|
6654
6658
|
}
|
|
6655
6659
|
},
|
package/lib/locale/ru-RU.json
CHANGED
|
@@ -3278,7 +3278,7 @@
|
|
|
3278
3278
|
}
|
|
3279
3279
|
},
|
|
3280
3280
|
"AVERAGEA": {
|
|
3281
|
-
"description": "Returns the average of its arguments, including numbers, text, and logical values",
|
|
3281
|
+
"description": "Returns the average of its arguments, including numbers, text, and logical values.",
|
|
3282
3282
|
"abstract": "Returns the average of its arguments, including numbers, text, and logical values",
|
|
3283
3283
|
"links": [
|
|
3284
3284
|
{
|
|
@@ -3287,13 +3287,13 @@
|
|
|
3287
3287
|
}
|
|
3288
3288
|
],
|
|
3289
3289
|
"functionParameter": {
|
|
3290
|
-
"
|
|
3291
|
-
"name": "
|
|
3292
|
-
"detail": "first"
|
|
3290
|
+
"value1": {
|
|
3291
|
+
"name": "value1",
|
|
3292
|
+
"detail": "The first number, cell reference, or range for which you want the average."
|
|
3293
3293
|
},
|
|
3294
|
-
"
|
|
3295
|
-
"name": "
|
|
3296
|
-
"detail": "
|
|
3294
|
+
"value2": {
|
|
3295
|
+
"name": "value2",
|
|
3296
|
+
"detail": "Additional numbers, cell references or ranges for which you want the average, up to a maximum of 255."
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
},
|
|
@@ -5522,7 +5522,7 @@
|
|
|
5522
5522
|
}
|
|
5523
5523
|
},
|
|
5524
5524
|
"CHOOSE": {
|
|
5525
|
-
"description": "Chooses a value from a list of values",
|
|
5525
|
+
"description": "Chooses a value from a list of values.",
|
|
5526
5526
|
"abstract": "Chooses a value from a list of values",
|
|
5527
5527
|
"links": [
|
|
5528
5528
|
{
|
|
@@ -5531,13 +5531,17 @@
|
|
|
5531
5531
|
}
|
|
5532
5532
|
],
|
|
5533
5533
|
"functionParameter": {
|
|
5534
|
-
"
|
|
5535
|
-
"name": "
|
|
5536
|
-
"detail": "
|
|
5534
|
+
"indexNum": {
|
|
5535
|
+
"name": "index_num",
|
|
5536
|
+
"detail": "Specifies which value argument is selected. Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number between 1 and 254.\nIf index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.\nIf index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the #VALUE! error value.\nIf index_num is a fraction, it is truncated to the lowest integer before being used."
|
|
5537
5537
|
},
|
|
5538
|
-
"
|
|
5539
|
-
"name": "
|
|
5540
|
-
"detail": "
|
|
5538
|
+
"value1": {
|
|
5539
|
+
"name": "value1",
|
|
5540
|
+
"detail": "CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or text."
|
|
5541
|
+
},
|
|
5542
|
+
"value2": {
|
|
5543
|
+
"name": "value2",
|
|
5544
|
+
"detail": "1 to 254 value arguments."
|
|
5541
5545
|
}
|
|
5542
5546
|
}
|
|
5543
5547
|
},
|
|
@@ -6643,13 +6647,13 @@
|
|
|
6643
6647
|
}
|
|
6644
6648
|
],
|
|
6645
6649
|
"functionParameter": {
|
|
6646
|
-
"
|
|
6647
|
-
"name": "
|
|
6648
|
-
"detail": "
|
|
6650
|
+
"text1": {
|
|
6651
|
+
"name": "текст1",
|
|
6652
|
+
"detail": "Элемент текста, который нужно присоединить. Строка или массив строк, например диапазон ячеек."
|
|
6649
6653
|
},
|
|
6650
|
-
"
|
|
6651
|
-
"name": "
|
|
6652
|
-
"detail": "
|
|
6654
|
+
"text2": {
|
|
6655
|
+
"name": "текст2",
|
|
6656
|
+
"detail": "Дополнительные текстовые элементы для объединения. Для текстовых элементов можно указать до 253 аргументов. Каждый из них может быть строкой или массивом строк, например диапазоном ячеек."
|
|
6653
6657
|
}
|
|
6654
6658
|
}
|
|
6655
6659
|
},
|
package/lib/locale/zh-CN.json
CHANGED
|
@@ -3278,7 +3278,7 @@
|
|
|
3278
3278
|
}
|
|
3279
3279
|
},
|
|
3280
3280
|
"AVERAGEA": {
|
|
3281
|
-
"description": "
|
|
3281
|
+
"description": "返回其参数的平均值,包括数字、文本和逻辑值。",
|
|
3282
3282
|
"abstract": "返回其参数的平均值,包括数字、文本和逻辑值",
|
|
3283
3283
|
"links": [
|
|
3284
3284
|
{
|
|
@@ -3287,13 +3287,13 @@
|
|
|
3287
3287
|
}
|
|
3288
3288
|
],
|
|
3289
3289
|
"functionParameter": {
|
|
3290
|
-
"
|
|
3291
|
-
"name": "
|
|
3292
|
-
"detail": "
|
|
3290
|
+
"value1": {
|
|
3291
|
+
"name": "值 1",
|
|
3292
|
+
"detail": "要计算平均值的第一个数字、单元格引用或单元格区域。"
|
|
3293
3293
|
},
|
|
3294
|
-
"
|
|
3295
|
-
"name": "
|
|
3296
|
-
"detail": "
|
|
3294
|
+
"value2": {
|
|
3295
|
+
"name": "值 2",
|
|
3296
|
+
"detail": "要计算平均值的其他数字、单元格引用或单元格区域,最多可包含 255 个。"
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
},
|
|
@@ -5522,7 +5522,7 @@
|
|
|
5522
5522
|
}
|
|
5523
5523
|
},
|
|
5524
5524
|
"CHOOSE": {
|
|
5525
|
-
"description": "
|
|
5525
|
+
"description": "从值的列表中选择值。",
|
|
5526
5526
|
"abstract": "从值的列表中选择值",
|
|
5527
5527
|
"links": [
|
|
5528
5528
|
{
|
|
@@ -5531,13 +5531,17 @@
|
|
|
5531
5531
|
}
|
|
5532
5532
|
],
|
|
5533
5533
|
"functionParameter": {
|
|
5534
|
-
"
|
|
5535
|
-
"name": "
|
|
5536
|
-
"detail": "
|
|
5534
|
+
"indexNum": {
|
|
5535
|
+
"name": "索引",
|
|
5536
|
+
"detail": "用于指定所选定的数值参数。 index_num 必须是介于 1 到 254 之间的数字,或是包含 1 到 254 之间的数字的公式或单元格引用。\n如果 index_num 为 1,则 CHOOSE 返回 value1;如果为 2,则 CHOOSE 返回 value2,以此类推。\n如果 index_num 小于 1 或大于列表中最后一个值的索引号,则 CHOOSE 返回 #VALUE! 错误值。\n如果 index_num 为小数,则在使用前将被截尾取整。"
|
|
5537
5537
|
},
|
|
5538
|
-
"
|
|
5539
|
-
"name": "
|
|
5540
|
-
"detail": "
|
|
5538
|
+
"value1": {
|
|
5539
|
+
"name": "值 1",
|
|
5540
|
+
"detail": "CHOOSE 将根据 index_num 从中选择一个数值或一项要执行的操作。 参数可以是数字、单元格引用、定义的名称、公式、函数或文本。"
|
|
5541
|
+
},
|
|
5542
|
+
"value2": {
|
|
5543
|
+
"name": "值 2",
|
|
5544
|
+
"detail": "1 到 254 个值参数。"
|
|
5541
5545
|
}
|
|
5542
5546
|
}
|
|
5543
5547
|
},
|
|
@@ -6635,7 +6639,7 @@
|
|
|
6635
6639
|
},
|
|
6636
6640
|
"CONCAT": {
|
|
6637
6641
|
"description": "将多个区域和/或字符串的文本组合起来,但不提供分隔符或 IgnoreEmpty 参数。",
|
|
6638
|
-
"abstract": "将多个区域和/或字符串的文本组合起来,但不提供分隔符或 IgnoreEmpty
|
|
6642
|
+
"abstract": "将多个区域和/或字符串的文本组合起来,但不提供分隔符或 IgnoreEmpty 参数",
|
|
6639
6643
|
"links": [
|
|
6640
6644
|
{
|
|
6641
6645
|
"title": "教学",
|
|
@@ -6643,13 +6647,13 @@
|
|
|
6643
6647
|
}
|
|
6644
6648
|
],
|
|
6645
6649
|
"functionParameter": {
|
|
6646
|
-
"
|
|
6647
|
-
"name": "
|
|
6648
|
-
"detail": "
|
|
6650
|
+
"text1": {
|
|
6651
|
+
"name": "文本 1",
|
|
6652
|
+
"detail": "要联接的文本项。 字符串或字符串数组,如单元格区域。"
|
|
6649
6653
|
},
|
|
6650
|
-
"
|
|
6651
|
-
"name": "
|
|
6652
|
-
"detail": "
|
|
6654
|
+
"text2": {
|
|
6655
|
+
"name": "文本 2",
|
|
6656
|
+
"detail": "要联接的其他文本项。 文本项最多可以有 253 个文本参数。 每个参数可以是一个字符串或字符串数组,如单元格区域。"
|
|
6653
6657
|
}
|
|
6654
6658
|
}
|
|
6655
6659
|
},
|
|
@@ -17,6 +17,7 @@ export declare class ActiveDirtyController extends Disposable {
|
|
|
17
17
|
private _getSetRangeValuesMutationDirtyRange;
|
|
18
18
|
private _getMoveRangeMutationDirtyRange;
|
|
19
19
|
private _getMoveRowsMutationDirtyRange;
|
|
20
|
+
private _getReorderRangeMutationDirtyRange;
|
|
20
21
|
private _getDeleteRangeMutationDirtyRange;
|
|
21
22
|
private _getRemoveRowOrColumnMutation;
|
|
22
23
|
private _getRemoveSheetMutation;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Workbook, Disposable, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { CellAlertManagerService, HoverManagerService } from '@univerjs/sheets-ui';
|
|
3
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
4
|
+
|
|
5
|
+
export declare class FormulaAlertRenderController extends Disposable implements IRenderModule {
|
|
6
|
+
private readonly _context;
|
|
7
|
+
private readonly _hoverManagerService;
|
|
8
|
+
private readonly _cellAlertManagerService;
|
|
9
|
+
private readonly _localeService;
|
|
10
|
+
constructor(_context: IRenderContext<Workbook>, _hoverManagerService: HoverManagerService, _cellAlertManagerService: CellAlertManagerService, _localeService: LocaleService);
|
|
11
|
+
private _init;
|
|
12
|
+
private _initCellAlertPopup;
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IMutationInfo, Disposable, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
|
|
2
|
-
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
|
-
import { COPY_TYPE, ISheetClipboardService, ICellDataWithSpanInfo, IDiscreteRange } from '@univerjs/sheets-ui';
|
|
2
|
+
import { FormulaDataModel, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
|
+
import { COPY_TYPE, ISheetClipboardService, ICellDataWithSpanInfo, IDiscreteRange, ISheetDiscreteRangeLocation } from '@univerjs/sheets-ui';
|
|
4
4
|
import { IAccessor, Injector } from '@wendellhu/redi';
|
|
5
5
|
|
|
6
6
|
export declare const DEFAULT_PASTE_FORMULA = "default-paste-formula";
|
|
@@ -9,7 +9,8 @@ export declare class FormulaClipboardController extends Disposable {
|
|
|
9
9
|
private readonly _lexerTreeBuilder;
|
|
10
10
|
private readonly _sheetClipboardService;
|
|
11
11
|
private readonly _injector;
|
|
12
|
-
|
|
12
|
+
private readonly _formulaDataModel;
|
|
13
|
+
constructor(_currentUniverSheet: IUniverInstanceService, _lexerTreeBuilder: LexerTreeBuilder, _sheetClipboardService: ISheetClipboardService, _injector: Injector, _formulaDataModel: FormulaDataModel);
|
|
13
14
|
private _initialize;
|
|
14
15
|
private _registerClipboardHook;
|
|
15
16
|
private _pasteFormulaHook;
|
|
@@ -20,7 +21,7 @@ export declare function getSetCellFormulaMutations(unitId: string, subUnitId: st
|
|
|
20
21
|
copyType: COPY_TYPE;
|
|
21
22
|
copyRange?: IDiscreteRange;
|
|
22
23
|
pasteType: string;
|
|
23
|
-
}, lexerTreeBuilder: LexerTreeBuilder, isSpecialPaste
|
|
24
|
+
}, lexerTreeBuilder: LexerTreeBuilder, formulaDataModel: FormulaDataModel, isSpecialPaste: boolean | undefined, pasteFrom: ISheetDiscreteRangeLocation | null): {
|
|
24
25
|
undos: IMutationInfo<object>[];
|
|
25
26
|
redos: IMutationInfo<object>[];
|
|
26
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Disposable, ICommandService, IContextService, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
|
-
import {
|
|
2
|
+
import { TextSelectionManagerService } from '@univerjs/docs';
|
|
3
3
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
4
4
|
import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
5
5
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
@@ -22,7 +22,6 @@ export declare class PromptController extends Disposable {
|
|
|
22
22
|
private readonly _selectionRenderService;
|
|
23
23
|
private readonly _descriptionService;
|
|
24
24
|
private readonly _textSelectionManagerService;
|
|
25
|
-
private readonly _docViewModelManagerService;
|
|
26
25
|
private readonly _contextMenuService;
|
|
27
26
|
private readonly _editorService;
|
|
28
27
|
private _formulaRefColors;
|
|
@@ -39,7 +38,7 @@ export declare class PromptController extends Disposable {
|
|
|
39
38
|
private _userCursorMove;
|
|
40
39
|
private _previousEditorUnitId;
|
|
41
40
|
private _existsSequenceNode;
|
|
42
|
-
constructor(_commandService: ICommandService, _contextService: IContextService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _formulaPromptService: IFormulaPromptService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _selectionManagerService: SelectionManagerService, _univerInstanceService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _descriptionService: IDescriptionService, _textSelectionManagerService: TextSelectionManagerService,
|
|
41
|
+
constructor(_commandService: ICommandService, _contextService: IContextService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _formulaPromptService: IFormulaPromptService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _selectionManagerService: SelectionManagerService, _univerInstanceService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _descriptionService: IDescriptionService, _textSelectionManagerService: TextSelectionManagerService, _contextMenuService: IContextMenuService, _editorService: IEditorService);
|
|
43
42
|
dispose(): void;
|
|
44
43
|
private _resetTemp;
|
|
45
44
|
private _initialize;
|
|
@@ -63,4 +63,21 @@ export declare function refRangeFormula(oldFormulaData: IFormulaData, newFormula
|
|
|
63
63
|
* └──────────────────┴─────┴───┴───┴───────────┴─────┘
|
|
64
64
|
*/
|
|
65
65
|
export declare function formulaDataItemToCellData(formulaDataItem: Nullable<IFormulaDataItem>): Nullable<ICellData>;
|
|
66
|
+
/**
|
|
67
|
+
* Transfer the formulaDataItem to the cellData, contains formula
|
|
68
|
+
* ┌────────────────────────────────┬─────────────────┐
|
|
69
|
+
* │ IFormulaDataItem │ ICellData │
|
|
70
|
+
* ├──────────────────┬─────┬───┬───┼───────────┬─────┤
|
|
71
|
+
* │ f │ si │ x │ y │ f │ si │
|
|
72
|
+
* ├──────────────────┼─────┼───┼───┼───────────┼─────┤
|
|
73
|
+
* │ =SUM(1) │ │ │ │ =SUM(1) │ │
|
|
74
|
+
* │ │ id1 │ │ │ │ id1 │
|
|
75
|
+
* │ =SUM(1) │ id1 │ │ │ =SUM(1) │ │
|
|
76
|
+
* │ =SUM(1) │ id1 │ 0 │ 0 │ =SUM(1) │ │
|
|
77
|
+
* │ =SUM(1) │ id1 │ 0 │ 1 │ =SUM(1) │ │
|
|
78
|
+
* └──────────────────┴─────┴───┴───┴───────────┴─────┘
|
|
79
|
+
*
|
|
80
|
+
* The fifth case: The value f of the formula is already the result value. If the formula content of si contains #REF, it cannot be obtained from the formula offset of si, and the result value must be stored directly
|
|
81
|
+
*/
|
|
82
|
+
export declare function formulaDataItemToCellDataFormula(formulaDataItem: Nullable<IFormulaDataItem>): Nullable<ICellData>;
|
|
66
83
|
export declare function isFormulaDataItem(cell: IFormulaDataItem): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
4
|
import { IUniverSheetsFormulaConfig } from './controllers/formula-ui.controller';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -8,10 +9,21 @@ import { IUniverSheetsFormulaConfig } from './controllers/formula-ui.controller'
|
|
|
8
9
|
export declare class UniverSheetsFormulaPlugin extends Plugin {
|
|
9
10
|
private readonly _config;
|
|
10
11
|
readonly _injector: Injector;
|
|
11
|
-
private readonly
|
|
12
|
+
private readonly _renderManagerService;
|
|
12
13
|
static pluginName: string;
|
|
13
14
|
static type: UniverInstanceType;
|
|
14
|
-
constructor(_config: Partial<IUniverSheetsFormulaConfig>, _injector: Injector,
|
|
15
|
+
constructor(_config: Partial<IUniverSheetsFormulaConfig>, _injector: Injector, _renderManagerService: IRenderManagerService);
|
|
16
|
+
onStarting(): void;
|
|
17
|
+
onRendered(): void;
|
|
18
|
+
private _registerRenderModules;
|
|
19
|
+
_init(): void;
|
|
20
|
+
}
|
|
21
|
+
export declare class UniverSheetsFormulaMobilePlugin extends Plugin {
|
|
22
|
+
private readonly _config;
|
|
23
|
+
readonly _injector: Injector;
|
|
24
|
+
static pluginName: string;
|
|
25
|
+
static type: UniverInstanceType;
|
|
26
|
+
constructor(_config: Partial<IUniverSheetsFormulaConfig>, _injector: Injector);
|
|
15
27
|
onStarting(): void;
|
|
16
28
|
_init(): void;
|
|
17
29
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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
|
-
export { UniverSheetsFormulaPlugin } from './formula-ui-plugin';
|
|
16
|
+
export { UniverSheetsFormulaPlugin, UniverSheetsFormulaMobilePlugin } from './formula-ui-plugin';
|
|
17
17
|
export { IDescriptionService } from './services/description.service';
|
|
18
18
|
export { DescriptionService } from './services/description.service';
|
|
19
19
|
export { FormulaCustomFunctionService, IFormulaCustomFunctionService, } from './services/formula-custom-function.service';
|
|
@@ -21,6 +21,5 @@ export type { IRegisterFunctionParams, IUnregisterFunctionParams } from './servi
|
|
|
21
21
|
export { RegisterFunctionService } from './services/register-function.service';
|
|
22
22
|
export { IRegisterFunctionService } from './services/register-function.service';
|
|
23
23
|
export { FormulaRefRangeService } from './services/formula-ref-range.service';
|
|
24
|
-
export { SPECIAL_PASTE_FORMULA } from './commands/commands/formula-clipboard.command';
|
|
25
24
|
export { RegisterOtherFormulaService } from './services/register-other-formula.service';
|
|
26
25
|
export type { IFormulaInfo, IOtherFormulaResult } from './services/formula-common';
|
|
@@ -2661,11 +2661,11 @@ declare const _default: {
|
|
|
2661
2661
|
url: string;
|
|
2662
2662
|
}[];
|
|
2663
2663
|
functionParameter: {
|
|
2664
|
-
|
|
2664
|
+
text1: {
|
|
2665
2665
|
name: string;
|
|
2666
2666
|
detail: string;
|
|
2667
2667
|
};
|
|
2668
|
-
|
|
2668
|
+
text2: {
|
|
2669
2669
|
name: string;
|
|
2670
2670
|
detail: string;
|
|
2671
2671
|
};
|
|
@@ -3651,11 +3651,15 @@ declare const _default: {
|
|
|
3651
3651
|
url: string;
|
|
3652
3652
|
}[];
|
|
3653
3653
|
functionParameter: {
|
|
3654
|
-
|
|
3654
|
+
indexNum: {
|
|
3655
3655
|
name: string;
|
|
3656
3656
|
detail: string;
|
|
3657
3657
|
};
|
|
3658
|
-
|
|
3658
|
+
value1: {
|
|
3659
|
+
name: string;
|
|
3660
|
+
detail: string;
|
|
3661
|
+
};
|
|
3662
|
+
value2: {
|
|
3659
3663
|
name: string;
|
|
3660
3664
|
detail: string;
|
|
3661
3665
|
};
|
|
@@ -4369,11 +4373,11 @@ declare const _default: {
|
|
|
4369
4373
|
url: string;
|
|
4370
4374
|
}[];
|
|
4371
4375
|
functionParameter: {
|
|
4372
|
-
|
|
4376
|
+
value1: {
|
|
4373
4377
|
name: string;
|
|
4374
4378
|
detail: string;
|
|
4375
4379
|
};
|
|
4376
|
-
|
|
4380
|
+
value2: {
|
|
4377
4381
|
name: string;
|
|
4378
4382
|
detail: string;
|
|
4379
4383
|
};
|
|
@@ -70,11 +70,15 @@ declare const _default: {
|
|
|
70
70
|
url: string;
|
|
71
71
|
}[];
|
|
72
72
|
functionParameter: {
|
|
73
|
-
|
|
73
|
+
indexNum: {
|
|
74
74
|
name: string;
|
|
75
75
|
detail: string;
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
value1: {
|
|
78
|
+
name: string;
|
|
79
|
+
detail: string;
|
|
80
|
+
};
|
|
81
|
+
value2: {
|
|
78
82
|
name: string;
|
|
79
83
|
detail: string;
|
|
80
84
|
};
|
|
@@ -70,11 +70,15 @@ declare const _default: {
|
|
|
70
70
|
url: string;
|
|
71
71
|
}[];
|
|
72
72
|
functionParameter: {
|
|
73
|
-
|
|
73
|
+
indexNum: {
|
|
74
74
|
name: string;
|
|
75
75
|
detail: string;
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
value1: {
|
|
78
|
+
name: string;
|
|
79
|
+
detail: string;
|
|
80
|
+
};
|
|
81
|
+
value2: {
|
|
78
82
|
name: string;
|
|
79
83
|
detail: string;
|
|
80
84
|
};
|
|
@@ -70,11 +70,15 @@ declare const _default: {
|
|
|
70
70
|
url: string;
|
|
71
71
|
}[];
|
|
72
72
|
functionParameter: {
|
|
73
|
-
|
|
73
|
+
indexNum: {
|
|
74
74
|
name: string;
|
|
75
75
|
detail: string;
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
value1: {
|
|
78
|
+
name: string;
|
|
79
|
+
detail: string;
|
|
80
|
+
};
|
|
81
|
+
value2: {
|
|
78
82
|
name: string;
|
|
79
83
|
detail: string;
|
|
80
84
|
};
|