@univerjs/sheets-formula 0.2.14 → 0.2.15
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 +2 -2
- package/lib/es/index.js +100 -64
- package/lib/locale/en-US.json +17 -13
- package/lib/locale/ru-RU.json +16 -12
- package/lib/locale/vi-VN.json +4 -4
- package/lib/locale/zh-CN.json +17 -13
- package/lib/locale/zh-TW.json +16 -12
- package/lib/types/controllers/formula-alert-render.controller.d.ts +5 -2
- package/lib/types/locale/en-US.d.ts +8 -4
- package/lib/types/locale/function-list/text/en-US.d.ts +8 -4
- package/lib/types/locale/function-list/text/ja-JP.d.ts +8 -4
- package/lib/types/locale/function-list/text/ru-RU.d.ts +8 -4
- package/lib/types/locale/function-list/text/zh-CN.d.ts +8 -4
- package/lib/types/locale/function-list/text/zh-TW.d.ts +8 -4
- package/lib/types/locale/ru-RU.d.ts +8 -4
- package/lib/types/locale/zh-CN.d.ts +8 -4
- package/lib/types/locale/zh-TW.d.ts +8 -4
- package/lib/umd/index.js +2 -2
- package/package.json +23 -23
package/lib/es/index.js
CHANGED
|
@@ -2,13 +2,13 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
-
import { Disposable, ObjectMatrix, Dimension, OnLifecycle, LifecycleStages, Inject, IUniverInstanceService, CellValueType, ThemeService, ICommandService, isFormulaString, isFormulaId, Tools, Direction, UniverInstanceType, Injector, DEFAULT_EMPTY_DOCUMENT_VALUE, toDisposable, ColorKit, Rectangle, ILogService, CommandType, createIdentifier, IContextService, isRealNum, getCellValueType, useDependency, LocaleService, useInjector, IConfigService, FOCUSING_DOC, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, connectInjector, throttle, cellToRange, isInternalEditorID, RANGE_TYPE, DisposableCollection, Optional, isICellData, RxDisposable, FORMULA_EDITOR_ACTIVATED, FOCUSING_EDITOR_INPUT_FORMULA,
|
|
5
|
+
import { Disposable, ObjectMatrix, Dimension, OnLifecycle, LifecycleStages, Inject, IUniverInstanceService, CellValueType, ThemeService, ICommandService, isFormulaString, isFormulaId, Tools, Direction, UniverInstanceType, Injector, DEFAULT_EMPTY_DOCUMENT_VALUE, toDisposable, ColorKit, Rectangle, ILogService, CommandType, createIdentifier, IContextService, isRealNum, getCellValueType, useDependency, LocaleService, useInjector, IConfigService, FOCUSING_DOC, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, connectInjector, throttle, cellToRange, isInternalEditorID, RANGE_TYPE, DisposableCollection, Optional, isICellData, RxDisposable, FORMULA_EDITOR_ACTIVATED, FOCUSING_EDITOR_INPUT_FORMULA, AbsoluteRefType, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, Plugin, DependentOn } from "@univerjs/core";
|
|
6
6
|
import { IRPCChannelService, fromModule, toModule } from "@univerjs/rpc";
|
|
7
7
|
import { SetDefinedNameMutation, RemoveDefinedNameMutation, FormulaDataModel, IActiveDirtyManagerService, IDefinedNamesService, SetArrayFormulaDataMutation, stripErrorMargin, LexerTreeBuilder, SetFormulaCalculationResultMutation, ErrorType, sequenceNodeType, serializeRange, FUNCTION_NAMES_COMPATIBILITY, FunctionType, FUNCTION_NAMES_CUBE, FUNCTION_NAMES_DATABASE, FUNCTION_NAMES_DATE, FUNCTION_NAMES_ENGINEERING, FUNCTION_NAMES_FINANCIAL, FUNCTION_NAMES_INFORMATION, FUNCTION_NAMES_LOGICAL, FUNCTION_NAMES_LOOKUP, FUNCTION_NAMES_MATH, FUNCTION_NAMES_STATISTICAL, FUNCTION_NAMES_TEXT, FUNCTION_NAMES_WEB, isReferenceStrings, functionArray, functionCompatibility, functionCube, functionDatabase, functionDate, functionEngineering, functionFinancial, functionInformation, functionLogical, functionLookup, functionMath, functionMeta, functionStatistical, functionText, functionUniver, functionWeb, IFunctionService, ERROR_TYPE_SET, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation, SetFormulaCalculationNotificationMutation, FormulaExecuteStageType, FormulaExecutedStateType, SetFormulaDataMutation, initSheetFormulaData, deserializeRangeWithSheet, serializeRangeToRefString, generateStringWithSequence, CustomFunction, serializeRangeWithSpreadsheet, serializeRangeWithSheet, SetOtherFormulaMutation, RemoveOtherFormulaMutation, matchRefDrawToken, matchToken, compareToken, normalizeSheetName, getAbsoluteRefTypeWitString, UniverFormulaEnginePlugin } from "@univerjs/engine-formula";
|
|
8
8
|
import { IRenderManagerService, DeviceInputEventType, ScrollTimerType, SHEET_VIEWPORT_KEY, Vector2 } from "@univerjs/engine-render";
|
|
9
9
|
import { SetRangeValuesMutation, SetStyleCommand, MoveRangeMutation, MoveRowsMutation, MoveColsMutation, ReorderRangeMutation, RemoveRowMutation, RemoveColMutation, RemoveSheetMutation, InsertSheetMutation, SetDefinedNameCommand, INTERCEPTOR_POINT, SheetInterceptorService, SetRangeValuesUndoMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetColWidthMutation, SetColHiddenMutation, SetColVisibleMutation, SetRowHiddenMutation, SetRowVisibleMutation, SetWorksheetRowAutoHeightMutation, SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, getCellAtRowCol, SetSelectionsOperation, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSetCellValuePermission, RangeProtectionPermissionEditPoint, SetBorderCommand, ClearSelectionFormatCommand, INumfmtService, handleMoveRange, EffectRefRangId, runRefRangeMutations, handleMoveRows, handleMoveCols, handleInsertRow, handleInsertCol, handleIRemoveRow, handleIRemoveCol, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleInsertRangeMoveDown, handleInsertRangeMoveRight, RemoveSheetCommand, SetWorksheetNameCommand, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, RemoveColCommand, RemoveRowCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, InsertColCommand, InsertRowCommand, MoveColsCommand, MoveRowsCommand, MoveRangeCommand, SetWorksheetActiveOperation, InsertDefinedNameCommand, RemoveDefinedNameCommand, RefRangeService, handleDefaultRangeChangeWithEffectRefCommands, SelectionMoveType, convertSelectionDataToRange, getNormalSelectionStyle, IRefSelectionsService, DISABLE_NORMAL_SELECTIONS, setEndForRange, getPrimaryForRange, RefSelectionsService } from "@univerjs/sheets";
|
|
10
10
|
import { DATA_TYPE, APPLY_TYPE, IAutoFillService, PREDEFINED_HOOK_NAME, COPY_TYPE, ISheetClipboardService, ISheetSelectionRenderService, SelectionShape, SELECTION_SHAPE_DEPTH, IEditorBridgeService, SheetSkeletonManagerService, SheetPasteCommand, useActiveWorkbook, whenFormulaEditorActivated, getCurrentRangeDisable$, PASTE_SPECIAL_MENU_ID, CellAlertType, HoverManagerService, CellAlertManagerService, BaseSelectionRenderService, getCoordByOffset, checkInHeaderRanges, getAllSelection, attachSelectionWithCoord, getSheetObject, getEditorObject, MoveSelectionCommand, JumpOver, ExpandSelectionCommand } from "@univerjs/sheets-ui";
|
|
11
|
-
import { IEditorService, ISidebarService, ILayoutService, KeyCode, MetaKeys, MenuItemType, getMenuHiddenObservable, IClipboardInterfaceService, RibbonStartGroup, BuiltInUIPart, ComponentManager, IMenuManagerService, IShortcutService, IUIPartsService, IProgressService, UNI_DISABLE_CHANGING_FOCUS_KEY, SetEditorResizeOperation, IContextMenuService } from "@univerjs/ui";
|
|
11
|
+
import { IEditorService, ISidebarService, ILayoutService, KeyCode, MetaKeys, MenuItemType, getMenuHiddenObservable, IClipboardInterfaceService, RibbonStartGroup, BuiltInUIPart, ComponentManager, IMenuManagerService, IShortcutService, IUIPartsService, IProgressService, IZenZoneService, UNI_DISABLE_CHANGING_FOCUS_KEY, SetEditorResizeOperation, IContextMenuService } from "@univerjs/ui";
|
|
12
12
|
import { Subject, throttleTime, combineLatestWith, map, switchMap, of, Observable, merge, filter, bufferTime, distinctUntilKeyChanged, distinctUntilChanged } from "rxjs";
|
|
13
13
|
import require$$0, { forwardRef, useRef, createElement, useEffect, useState } from "react";
|
|
14
14
|
import { Popup, Select, Input, Button } from "@univerjs/design";
|
|
@@ -13040,17 +13040,17 @@ const PLUGIN_CONFIG_KEY_BASE = "sheets-formula.base.config", defaultPluginBaseCo
|
|
|
13040
13040
|
abstract: "formula.functionList.LEFTB.abstract",
|
|
13041
13041
|
functionParameter: [
|
|
13042
13042
|
{
|
|
13043
|
-
name: "formula.functionList.LEFTB.functionParameter.
|
|
13044
|
-
detail: "formula.functionList.LEFTB.functionParameter.
|
|
13045
|
-
example: "
|
|
13043
|
+
name: "formula.functionList.LEFTB.functionParameter.text.name",
|
|
13044
|
+
detail: "formula.functionList.LEFTB.functionParameter.text.detail",
|
|
13045
|
+
example: '"Hello Univer"',
|
|
13046
13046
|
require: 1,
|
|
13047
13047
|
repeat: 0
|
|
13048
13048
|
},
|
|
13049
13049
|
{
|
|
13050
|
-
name: "formula.functionList.LEFTB.functionParameter.
|
|
13051
|
-
detail: "formula.functionList.LEFTB.functionParameter.
|
|
13052
|
-
example: "
|
|
13053
|
-
require:
|
|
13050
|
+
name: "formula.functionList.LEFTB.functionParameter.numBytes.name",
|
|
13051
|
+
detail: "formula.functionList.LEFTB.functionParameter.numBytes.detail",
|
|
13052
|
+
example: "1",
|
|
13053
|
+
require: 0,
|
|
13054
13054
|
repeat: 0
|
|
13055
13055
|
}
|
|
13056
13056
|
]
|
|
@@ -13107,16 +13107,23 @@ const PLUGIN_CONFIG_KEY_BASE = "sheets-formula.base.config", defaultPluginBaseCo
|
|
|
13107
13107
|
abstract: "formula.functionList.MID.abstract",
|
|
13108
13108
|
functionParameter: [
|
|
13109
13109
|
{
|
|
13110
|
-
name: "formula.functionList.MID.functionParameter.
|
|
13111
|
-
detail: "formula.functionList.MID.functionParameter.
|
|
13112
|
-
example: "
|
|
13110
|
+
name: "formula.functionList.MID.functionParameter.text.name",
|
|
13111
|
+
detail: "formula.functionList.MID.functionParameter.text.detail",
|
|
13112
|
+
example: '"Hello Univer"',
|
|
13113
13113
|
require: 1,
|
|
13114
13114
|
repeat: 0
|
|
13115
13115
|
},
|
|
13116
13116
|
{
|
|
13117
|
-
name: "formula.functionList.MID.functionParameter.
|
|
13118
|
-
detail: "formula.functionList.MID.functionParameter.
|
|
13119
|
-
example: "
|
|
13117
|
+
name: "formula.functionList.MID.functionParameter.startNum.name",
|
|
13118
|
+
detail: "formula.functionList.MID.functionParameter.startNum.detail",
|
|
13119
|
+
example: "1",
|
|
13120
|
+
require: 1,
|
|
13121
|
+
repeat: 0
|
|
13122
|
+
},
|
|
13123
|
+
{
|
|
13124
|
+
name: "formula.functionList.MID.functionParameter.numChars.name",
|
|
13125
|
+
detail: "formula.functionList.MID.functionParameter.numChars.detail",
|
|
13126
|
+
example: "1",
|
|
13120
13127
|
require: 1,
|
|
13121
13128
|
repeat: 0
|
|
13122
13129
|
}
|
|
@@ -15432,6 +15439,7 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
15432
15439
|
}
|
|
15433
15440
|
return { newFormulaData };
|
|
15434
15441
|
}
|
|
15442
|
+
// eslint-disable-next-line
|
|
15435
15443
|
_getNewRangeByMoveParam(unitRangeWidthOffset, formulaReferenceMoveParam, currentFormulaUnitId, currentFormulaSheetId) {
|
|
15436
15444
|
const { type, unitId: userUnitId, sheetId: userSheetId, range, from, to } = formulaReferenceMoveParam, {
|
|
15437
15445
|
range: unitRange,
|
|
@@ -15452,50 +15460,61 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
15452
15460
|
return;
|
|
15453
15461
|
const sequenceRange = Rectangle.moveOffset(unitRange, refOffsetX, refOffsetY);
|
|
15454
15462
|
let newRange = null;
|
|
15455
|
-
if (type
|
|
15456
|
-
if (
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
remainRange
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15481
|
-
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
remainRange
|
|
15485
|
-
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
15492
|
-
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15498
|
-
|
|
15463
|
+
if (type === 0) {
|
|
15464
|
+
if (from == null || to == null)
|
|
15465
|
+
return;
|
|
15466
|
+
const moveEdge = this._checkMoveEdge(sequenceRange, from), remainRange = Rectangle.getIntersects(sequenceRange, from);
|
|
15467
|
+
if (remainRange == null || moveEdge !== 4)
|
|
15468
|
+
return;
|
|
15469
|
+
const operators = handleMoveRange(
|
|
15470
|
+
{ id: EffectRefRangId.MoveRangeCommandId, params: { toRange: to, fromRange: from } },
|
|
15471
|
+
remainRange
|
|
15472
|
+
), result = runRefRangeMutations(operators, remainRange);
|
|
15473
|
+
if (result == null)
|
|
15474
|
+
return ErrorType.REF;
|
|
15475
|
+
newRange = this._getMoveNewRange(moveEdge, result, from, to, sequenceRange, remainRange);
|
|
15476
|
+
} else if (type === 1) {
|
|
15477
|
+
if (from == null || to == null)
|
|
15478
|
+
return;
|
|
15479
|
+
const moveEdge = this._checkMoveEdge(sequenceRange, from);
|
|
15480
|
+
let remainRange = Rectangle.getIntersects(sequenceRange, from);
|
|
15481
|
+
if (remainRange == null && (from.endRow < sequenceRange.startRow && to.endRow < sequenceRange.startRow || from.startRow > sequenceRange.endRow && to.startRow > sequenceRange.endRow))
|
|
15482
|
+
return;
|
|
15483
|
+
remainRange == null && (remainRange = {
|
|
15484
|
+
startRow: sequenceRange.startRow,
|
|
15485
|
+
endRow: sequenceRange.endRow,
|
|
15486
|
+
startColumn: sequenceRange.startColumn,
|
|
15487
|
+
endColumn: sequenceRange.endColumn,
|
|
15488
|
+
rangeType: RANGE_TYPE.NORMAL
|
|
15489
|
+
});
|
|
15490
|
+
const operators = handleMoveRows(
|
|
15491
|
+
{ id: EffectRefRangId.MoveRowsCommandId, params: { toRange: to, fromRange: from } },
|
|
15492
|
+
remainRange
|
|
15493
|
+
), result = runRefRangeMutations(operators, remainRange);
|
|
15494
|
+
if (result == null)
|
|
15495
|
+
return ErrorType.REF;
|
|
15496
|
+
newRange = this._getMoveNewRange(moveEdge, result, from, to, sequenceRange, remainRange);
|
|
15497
|
+
} else if (type === 2) {
|
|
15498
|
+
if (from == null || to == null)
|
|
15499
|
+
return;
|
|
15500
|
+
const moveEdge = this._checkMoveEdge(sequenceRange, from);
|
|
15501
|
+
let remainRange = Rectangle.getIntersects(sequenceRange, from);
|
|
15502
|
+
if (remainRange == null && (from.endColumn < sequenceRange.startColumn && to.endColumn < sequenceRange.startColumn || from.startColumn > sequenceRange.endColumn && to.startColumn > sequenceRange.endColumn))
|
|
15503
|
+
return;
|
|
15504
|
+
remainRange == null && (remainRange = {
|
|
15505
|
+
startRow: sequenceRange.startRow,
|
|
15506
|
+
endRow: sequenceRange.endRow,
|
|
15507
|
+
startColumn: sequenceRange.startColumn,
|
|
15508
|
+
endColumn: sequenceRange.endColumn,
|
|
15509
|
+
rangeType: RANGE_TYPE.NORMAL
|
|
15510
|
+
});
|
|
15511
|
+
const operators = handleMoveCols(
|
|
15512
|
+
{ id: EffectRefRangId.MoveColsCommandId, params: { toRange: to, fromRange: from } },
|
|
15513
|
+
remainRange
|
|
15514
|
+
), result = runRefRangeMutations(operators, remainRange);
|
|
15515
|
+
if (result == null)
|
|
15516
|
+
return ErrorType.REF;
|
|
15517
|
+
newRange = this._getMoveNewRange(moveEdge, result, from, to, sequenceRange, remainRange);
|
|
15499
15518
|
}
|
|
15500
15519
|
if (range != null) {
|
|
15501
15520
|
if (type === 3) {
|
|
@@ -15656,6 +15675,7 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
15656
15675
|
* @param originRange
|
|
15657
15676
|
* @param fromRange
|
|
15658
15677
|
*/
|
|
15678
|
+
// eslint-disable-next-line
|
|
15659
15679
|
_checkMoveEdge(originRange, fromRange) {
|
|
15660
15680
|
const { startRow, startColumn, endRow, endColumn } = originRange, {
|
|
15661
15681
|
startRow: fromStartRow,
|
|
@@ -15684,6 +15704,7 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
15684
15704
|
* @param remain "The range subtracted from the initial range by 'from'.
|
|
15685
15705
|
* @returns
|
|
15686
15706
|
*/
|
|
15707
|
+
// eslint-disable-next-line
|
|
15687
15708
|
_getMoveNewRange(moveEdge, result, from, to, origin, remain) {
|
|
15688
15709
|
const { startRow, endRow, startColumn, endColumn } = result, {
|
|
15689
15710
|
startRow: fromStartRow,
|
|
@@ -16160,11 +16181,11 @@ const ALERT_KEY = "SHEET_FORMULA_ALERT", ErrorTypeToMessageMap = {
|
|
|
16160
16181
|
};
|
|
16161
16182
|
var _a16;
|
|
16162
16183
|
let FormulaAlertRenderController = (_a16 = class extends Disposable {
|
|
16163
|
-
constructor(_context, _hoverManagerService, _cellAlertManagerService, _localeService) {
|
|
16164
|
-
super(), this._context = _context, this._hoverManagerService = _hoverManagerService, this._cellAlertManagerService = _cellAlertManagerService, this._localeService = _localeService, this._init();
|
|
16184
|
+
constructor(_context, _hoverManagerService, _cellAlertManagerService, _localeService, _zenZoneService) {
|
|
16185
|
+
super(), this._context = _context, this._hoverManagerService = _hoverManagerService, this._cellAlertManagerService = _cellAlertManagerService, this._localeService = _localeService, this._zenZoneService = _zenZoneService, this._init();
|
|
16165
16186
|
}
|
|
16166
16187
|
_init() {
|
|
16167
|
-
this._initCellAlertPopup();
|
|
16188
|
+
this._initCellAlertPopup(), this._initZenService();
|
|
16168
16189
|
}
|
|
16169
16190
|
_initCellAlertPopup() {
|
|
16170
16191
|
this.disposeWithMe(this._hoverManagerService.currentCell$.subscribe((cellPos) => {
|
|
@@ -16195,11 +16216,17 @@ let FormulaAlertRenderController = (_a16 = class extends Disposable {
|
|
|
16195
16216
|
this._cellAlertManagerService.removeAlert(ALERT_KEY);
|
|
16196
16217
|
}));
|
|
16197
16218
|
}
|
|
16219
|
+
_initZenService() {
|
|
16220
|
+
this.disposeWithMe(this._zenZoneService.visible$.subscribe((visible) => {
|
|
16221
|
+
visible && this._cellAlertManagerService.removeAlert(ALERT_KEY);
|
|
16222
|
+
}));
|
|
16223
|
+
}
|
|
16198
16224
|
}, __name(_a16, "FormulaAlertRenderController"), _a16);
|
|
16199
16225
|
FormulaAlertRenderController = __decorateClass$4([
|
|
16200
16226
|
__decorateParam$4(1, Inject(HoverManagerService)),
|
|
16201
16227
|
__decorateParam$4(2, Inject(CellAlertManagerService)),
|
|
16202
|
-
__decorateParam$4(3, Inject(LocaleService))
|
|
16228
|
+
__decorateParam$4(3, Inject(LocaleService)),
|
|
16229
|
+
__decorateParam$4(4, IZenZoneService)
|
|
16203
16230
|
], FormulaAlertRenderController);
|
|
16204
16231
|
var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor, __decorateClass$3 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
16205
16232
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -17022,7 +17049,16 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
17022
17049
|
if (!id || !Tools.isStringNumber(id))
|
|
17023
17050
|
return;
|
|
17024
17051
|
let { startRow, endRow, startColumn, endColumn } = toRange;
|
|
17025
|
-
const primary = getCellInfoInMergeData(startRow, startColumn
|
|
17052
|
+
const primary = skeleton ? skeleton.worksheet.getCellInfoInMergeData(startRow, startColumn) : {
|
|
17053
|
+
actualRow: startRow,
|
|
17054
|
+
actualColumn: startColumn,
|
|
17055
|
+
isMergedMainCell: !1,
|
|
17056
|
+
isMerged: !1,
|
|
17057
|
+
endRow: startRow,
|
|
17058
|
+
endColumn: startColumn,
|
|
17059
|
+
startRow,
|
|
17060
|
+
startColumn
|
|
17061
|
+
};
|
|
17026
17062
|
if (primary) {
|
|
17027
17063
|
const {
|
|
17028
17064
|
isMerged,
|
package/lib/locale/en-US.json
CHANGED
|
@@ -7436,13 +7436,13 @@
|
|
|
7436
7436
|
}
|
|
7437
7437
|
],
|
|
7438
7438
|
"functionParameter": {
|
|
7439
|
-
"
|
|
7440
|
-
"name": "
|
|
7441
|
-
"detail": "
|
|
7439
|
+
"text": {
|
|
7440
|
+
"name": "text",
|
|
7441
|
+
"detail": "The text string that contains the characters you want to extract."
|
|
7442
7442
|
},
|
|
7443
|
-
"
|
|
7444
|
-
"name": "
|
|
7445
|
-
"detail": "
|
|
7443
|
+
"numBytes": {
|
|
7444
|
+
"name": "num_bytes",
|
|
7445
|
+
"detail": "Specifies the number of characters you want LEFTB to extract, based on bytes."
|
|
7446
7446
|
}
|
|
7447
7447
|
}
|
|
7448
7448
|
},
|
|
@@ -7495,7 +7495,7 @@
|
|
|
7495
7495
|
}
|
|
7496
7496
|
},
|
|
7497
7497
|
"MID": {
|
|
7498
|
-
"description": "Returns a specific number of characters from a text string starting at the position you specify",
|
|
7498
|
+
"description": "Returns a specific number of characters from a text string starting at the position you specify.",
|
|
7499
7499
|
"abstract": "Returns a specific number of characters from a text string starting at the position you specify",
|
|
7500
7500
|
"links": [
|
|
7501
7501
|
{
|
|
@@ -7504,13 +7504,17 @@
|
|
|
7504
7504
|
}
|
|
7505
7505
|
],
|
|
7506
7506
|
"functionParameter": {
|
|
7507
|
-
"
|
|
7508
|
-
"name": "
|
|
7509
|
-
"detail": "
|
|
7507
|
+
"text": {
|
|
7508
|
+
"name": "text",
|
|
7509
|
+
"detail": "The text string containing the characters you want to extract."
|
|
7510
7510
|
},
|
|
7511
|
-
"
|
|
7512
|
-
"name": "
|
|
7513
|
-
"detail": "
|
|
7511
|
+
"startNum": {
|
|
7512
|
+
"name": "start_num",
|
|
7513
|
+
"detail": "The position of the first character you want to extract in text. The first character in text has start_num 1, and so on.\nIf start_num is greater than the length of text, MID/MIDB returns \"\" (empty text).\nIf start_num is less than the length of text, but start_num plus num_chars exceeds the length of text, MID/MIDB returns the characters up to the end of text.\nIf start_num is less than 1, MID/MIDB returns the #VALUE! error value."
|
|
7514
|
+
},
|
|
7515
|
+
"numChars": {
|
|
7516
|
+
"name": "num_chars",
|
|
7517
|
+
"detail": "Specifies the number of characters you want MID to return from text.\nIf num_chars is negative, MID returns the #VALUE! error value."
|
|
7514
7518
|
}
|
|
7515
7519
|
}
|
|
7516
7520
|
},
|
package/lib/locale/ru-RU.json
CHANGED
|
@@ -7436,13 +7436,13 @@
|
|
|
7436
7436
|
}
|
|
7437
7437
|
],
|
|
7438
7438
|
"functionParameter": {
|
|
7439
|
-
"
|
|
7440
|
-
"name": "
|
|
7441
|
-
"detail": "
|
|
7439
|
+
"text": {
|
|
7440
|
+
"name": "Текст",
|
|
7441
|
+
"detail": "Текстовая строка, содержащая символы, которые требуется извлечь."
|
|
7442
7442
|
},
|
|
7443
|
-
"
|
|
7444
|
-
"name": "
|
|
7445
|
-
"detail": "
|
|
7443
|
+
"numBytes": {
|
|
7444
|
+
"name": "Количество_байт",
|
|
7445
|
+
"detail": "Количество символов, извлекаемых функцией ЛЕВБ."
|
|
7446
7446
|
}
|
|
7447
7447
|
}
|
|
7448
7448
|
},
|
|
@@ -7504,13 +7504,17 @@
|
|
|
7504
7504
|
}
|
|
7505
7505
|
],
|
|
7506
7506
|
"functionParameter": {
|
|
7507
|
-
"
|
|
7508
|
-
"name": "
|
|
7509
|
-
"detail": "
|
|
7507
|
+
"text": {
|
|
7508
|
+
"name": "Текст",
|
|
7509
|
+
"detail": "Текстовая строка, содержащая символы, которые требуется извлечь."
|
|
7510
7510
|
},
|
|
7511
|
-
"
|
|
7512
|
-
"name": "
|
|
7513
|
-
"detail": "
|
|
7511
|
+
"startNum": {
|
|
7512
|
+
"name": "Начальная_позиция",
|
|
7513
|
+
"detail": "Позиция первого знака, извлекаемого из текста. Первый знак в тексте имеет начальную позицию 1 и так далее.\nЕсли start_num больше длины текста, функция MID/MIDB возвращает значение \"\" (пустой текст).\nЕсли start_num меньше длины текста, но start_num плюс num_chars превышает длину текста, функция MID/MIDB возвращает символы до конца текста.\nЕсли start_num меньше 1, MID/MIDB возвращает #VALUE! (значение ошибки)."
|
|
7514
|
+
},
|
|
7515
|
+
"numChars": {
|
|
7516
|
+
"name": "Количество_знаков",
|
|
7517
|
+
"detail": "Указывает, сколько знаков должна вернуть функция ПСТР.\nЕсли значение \"число_знаков\" отрицательно, функция ПСТР возвращает значение ошибки #ЗНАЧ!."
|
|
7514
7518
|
}
|
|
7515
7519
|
}
|
|
7516
7520
|
},
|
package/lib/locale/vi-VN.json
CHANGED
|
@@ -5816,21 +5816,21 @@
|
|
|
5816
5816
|
"links": [
|
|
5817
5817
|
{
|
|
5818
5818
|
"title": "Hướng dẫn",
|
|
5819
|
-
"url": "https://support.microsoft.com/vi-vn/office/mid-midb
|
|
5819
|
+
"url": "https://support.microsoft.com/vi-vn/office/mid-midb-ha%CC%80m-mid-midb-d5f9e25c-d7d6-472e-b568-4ecb12433028"
|
|
5820
5820
|
}
|
|
5821
5821
|
],
|
|
5822
5822
|
"functionParameter": {
|
|
5823
5823
|
"text": {
|
|
5824
5824
|
"name": "text",
|
|
5825
|
-
"detail": "
|
|
5825
|
+
"detail": "Chuỗi văn bản có chứa các ký tự mà bạn muốn trích xuất."
|
|
5826
5826
|
},
|
|
5827
5827
|
"start_num": {
|
|
5828
5828
|
"name": "start_num",
|
|
5829
|
-
"detail": "
|
|
5829
|
+
"detail": "Ví trí của ký tự thứ nhất mà bạn muốn trích xuất trong văn bản. Ký tự thứ nhất trong chuỗi văn bản có số bắt đầu là 1, và v.v.\nNếu start_num văn bản lớn hơn, thì hàm MID/MIDB trả về \"\" (văn bản trống).\nNếu start_num độ dài văn bản nhỏ hơn nhưng start_num cộng num_chars vượt quá độ dài văn bản, thì hàm MID/MIDB trả về các ký tự đến cuối văn bản.\nNếu start_num nhỏ hơn 1, thì hàm MID/MIDB trả về giá #VALUE! ."
|
|
5830
5830
|
},
|
|
5831
5831
|
"num_chars": {
|
|
5832
5832
|
"name": "num_chars",
|
|
5833
|
-
"detail": "
|
|
5833
|
+
"detail": "Bắt buộc đối với hàm MID. Chỉ rõ số ký tự mà bạn muốn hàm MID trả về từ văn bản.\nNếu số ký tự là số âm, thì hàm MID trả về giá trị lỗi #VALUE! ."
|
|
5834
5834
|
}
|
|
5835
5835
|
}
|
|
5836
5836
|
},
|
package/lib/locale/zh-CN.json
CHANGED
|
@@ -7427,7 +7427,7 @@
|
|
|
7427
7427
|
}
|
|
7428
7428
|
},
|
|
7429
7429
|
"LEFTB": {
|
|
7430
|
-
"description": "
|
|
7430
|
+
"description": "返回文本值中最左边的字符。",
|
|
7431
7431
|
"abstract": "返回文本值中最左边的字符",
|
|
7432
7432
|
"links": [
|
|
7433
7433
|
{
|
|
@@ -7436,13 +7436,13 @@
|
|
|
7436
7436
|
}
|
|
7437
7437
|
],
|
|
7438
7438
|
"functionParameter": {
|
|
7439
|
-
"
|
|
7440
|
-
"name": "
|
|
7441
|
-
"detail": "
|
|
7439
|
+
"text": {
|
|
7440
|
+
"name": "文本",
|
|
7441
|
+
"detail": "包含要提取的字符的文本字符串。"
|
|
7442
7442
|
},
|
|
7443
|
-
"
|
|
7444
|
-
"name": "
|
|
7445
|
-
"detail": "
|
|
7443
|
+
"numBytes": {
|
|
7444
|
+
"name": "字节数",
|
|
7445
|
+
"detail": "按字节指定要由 LEFTB 提取的字符的数量。"
|
|
7446
7446
|
}
|
|
7447
7447
|
}
|
|
7448
7448
|
},
|
|
@@ -7504,13 +7504,17 @@
|
|
|
7504
7504
|
}
|
|
7505
7505
|
],
|
|
7506
7506
|
"functionParameter": {
|
|
7507
|
-
"
|
|
7508
|
-
"name": "
|
|
7509
|
-
"detail": "
|
|
7507
|
+
"text": {
|
|
7508
|
+
"name": "文本",
|
|
7509
|
+
"detail": "包含要提取字符的文本字符串。"
|
|
7510
7510
|
},
|
|
7511
|
-
"
|
|
7512
|
-
"name": "
|
|
7513
|
-
"detail": "
|
|
7511
|
+
"startNum": {
|
|
7512
|
+
"name": "开始位置",
|
|
7513
|
+
"detail": "文本中要提取的第一个字符的位置。 文本中第一个字符的 start_num 为 1,以此类推。\n如果start_num大于文本长度,则 MID/MIDB 将返回“” (空文本) 。\n如果start_num小于文本长度,但start_num加num_chars超过文本长度,则 MID/MIDB 将返回字符到文本末尾。\n如果start_num小于 1,则 MID/MIDB 返回 #VALUE! 。"
|
|
7514
|
+
},
|
|
7515
|
+
"numChars": {
|
|
7516
|
+
"name": "字符数",
|
|
7517
|
+
"detail": "指定希望 MID 从文本中返回字符的个数。\n如果num_chars为负数,则 MID 返回 #VALUE! 。"
|
|
7514
7518
|
}
|
|
7515
7519
|
}
|
|
7516
7520
|
},
|
package/lib/locale/zh-TW.json
CHANGED
|
@@ -7436,13 +7436,13 @@
|
|
|
7436
7436
|
}
|
|
7437
7437
|
],
|
|
7438
7438
|
"functionParameter": {
|
|
7439
|
-
"
|
|
7440
|
-
"name": "
|
|
7441
|
-
"detail": "
|
|
7439
|
+
"text": {
|
|
7440
|
+
"name": "文字",
|
|
7441
|
+
"detail": "內含所要擷取字元的文字字串。"
|
|
7442
7442
|
},
|
|
7443
|
-
"
|
|
7444
|
-
"name": "
|
|
7445
|
-
"detail": "
|
|
7443
|
+
"numBytes": {
|
|
7444
|
+
"name": "字元數",
|
|
7445
|
+
"detail": "指定 LEFTB 所要擷取的字元數,以位元組為單位。"
|
|
7446
7446
|
}
|
|
7447
7447
|
}
|
|
7448
7448
|
},
|
|
@@ -7504,13 +7504,17 @@
|
|
|
7504
7504
|
}
|
|
7505
7505
|
],
|
|
7506
7506
|
"functionParameter": {
|
|
7507
|
-
"
|
|
7508
|
-
"name": "
|
|
7509
|
-
"detail": "
|
|
7507
|
+
"text": {
|
|
7508
|
+
"name": "text",
|
|
7509
|
+
"detail": "這是包含您想擷取之字元的文字字串。"
|
|
7510
7510
|
},
|
|
7511
|
-
"
|
|
7512
|
-
"name": "
|
|
7513
|
-
"detail": "
|
|
7511
|
+
"startNum": {
|
|
7512
|
+
"name": "start_num",
|
|
7513
|
+
"detail": " 這是要在文字中擷取之第一個字元的位置。 文字中的第一個字元start_num 1,依此類文字。\n如果start_num大於文字的長度,MID/MIDB 會傳回 “” (空白文字) 。\n如果start_num小於文字的長度,但start_num加上num_chars超過文字的長度,MID/MIDB 會傳回文字結尾的字元。\n如果 start_num 小於 1,MID/MIDB 會傳回 #VALUE! 錯誤值。"
|
|
7514
|
+
},
|
|
7515
|
+
"numChars": {
|
|
7516
|
+
"name": "num_chars",
|
|
7517
|
+
"detail": "指定您要 MID 從文字傳回的字元數。\n如果 num_chars 為負數,MID 會傳回 #VALUE! 的錯誤值。"
|
|
7514
7518
|
}
|
|
7515
7519
|
}
|
|
7516
7520
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Disposable, LocaleService, Workbook } from '@univerjs/core';
|
|
2
2
|
import { CellAlertManagerService, HoverManagerService } from '@univerjs/sheets-ui';
|
|
3
|
+
import { IZenZoneService } from '@univerjs/ui';
|
|
3
4
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
4
5
|
export declare class FormulaAlertRenderController extends Disposable implements IRenderModule {
|
|
5
6
|
private readonly _context;
|
|
6
7
|
private readonly _hoverManagerService;
|
|
7
8
|
private readonly _cellAlertManagerService;
|
|
8
9
|
private readonly _localeService;
|
|
9
|
-
|
|
10
|
+
private readonly _zenZoneService;
|
|
11
|
+
constructor(_context: IRenderContext<Workbook>, _hoverManagerService: HoverManagerService, _cellAlertManagerService: CellAlertManagerService, _localeService: LocaleService, _zenZoneService: IZenZoneService);
|
|
10
12
|
private _init;
|
|
11
13
|
private _initCellAlertPopup;
|
|
14
|
+
private _initZenService;
|
|
12
15
|
}
|
|
@@ -2728,11 +2728,11 @@ declare const _default: {
|
|
|
2728
2728
|
url: string;
|
|
2729
2729
|
}[];
|
|
2730
2730
|
functionParameter: {
|
|
2731
|
-
|
|
2731
|
+
text: {
|
|
2732
2732
|
name: string;
|
|
2733
2733
|
detail: string;
|
|
2734
2734
|
};
|
|
2735
|
-
|
|
2735
|
+
numBytes: {
|
|
2736
2736
|
name: string;
|
|
2737
2737
|
detail: string;
|
|
2738
2738
|
};
|
|
@@ -2788,11 +2788,15 @@ declare const _default: {
|
|
|
2788
2788
|
url: string;
|
|
2789
2789
|
}[];
|
|
2790
2790
|
functionParameter: {
|
|
2791
|
-
|
|
2791
|
+
text: {
|
|
2792
2792
|
name: string;
|
|
2793
2793
|
detail: string;
|
|
2794
2794
|
};
|
|
2795
|
-
|
|
2795
|
+
startNum: {
|
|
2796
|
+
name: string;
|
|
2797
|
+
detail: string;
|
|
2798
|
+
};
|
|
2799
|
+
numChars: {
|
|
2796
2800
|
name: string;
|
|
2797
2801
|
detail: string;
|
|
2798
2802
|
};
|
|
@@ -292,11 +292,11 @@ declare const _default: {
|
|
|
292
292
|
url: string;
|
|
293
293
|
}[];
|
|
294
294
|
functionParameter: {
|
|
295
|
-
|
|
295
|
+
text: {
|
|
296
296
|
name: string;
|
|
297
297
|
detail: string;
|
|
298
298
|
};
|
|
299
|
-
|
|
299
|
+
numBytes: {
|
|
300
300
|
name: string;
|
|
301
301
|
detail: string;
|
|
302
302
|
};
|
|
@@ -352,11 +352,15 @@ declare const _default: {
|
|
|
352
352
|
url: string;
|
|
353
353
|
}[];
|
|
354
354
|
functionParameter: {
|
|
355
|
-
|
|
355
|
+
text: {
|
|
356
356
|
name: string;
|
|
357
357
|
detail: string;
|
|
358
358
|
};
|
|
359
|
-
|
|
359
|
+
startNum: {
|
|
360
|
+
name: string;
|
|
361
|
+
detail: string;
|
|
362
|
+
};
|
|
363
|
+
numChars: {
|
|
360
364
|
name: string;
|
|
361
365
|
detail: string;
|
|
362
366
|
};
|
|
@@ -293,11 +293,11 @@ declare const _default: {
|
|
|
293
293
|
url: string;
|
|
294
294
|
}[];
|
|
295
295
|
functionParameter: {
|
|
296
|
-
|
|
296
|
+
text: {
|
|
297
297
|
name: string;
|
|
298
298
|
detail: string;
|
|
299
299
|
};
|
|
300
|
-
|
|
300
|
+
numBytes: {
|
|
301
301
|
name: string;
|
|
302
302
|
detail: string;
|
|
303
303
|
};
|
|
@@ -353,11 +353,15 @@ declare const _default: {
|
|
|
353
353
|
url: string;
|
|
354
354
|
}[];
|
|
355
355
|
functionParameter: {
|
|
356
|
-
|
|
356
|
+
text: {
|
|
357
357
|
name: string;
|
|
358
358
|
detail: string;
|
|
359
359
|
};
|
|
360
|
-
|
|
360
|
+
startNum: {
|
|
361
|
+
name: string;
|
|
362
|
+
detail: string;
|
|
363
|
+
};
|
|
364
|
+
numChars: {
|
|
361
365
|
name: string;
|
|
362
366
|
detail: string;
|
|
363
367
|
};
|
|
@@ -292,11 +292,11 @@ declare const _default: {
|
|
|
292
292
|
url: string;
|
|
293
293
|
}[];
|
|
294
294
|
functionParameter: {
|
|
295
|
-
|
|
295
|
+
text: {
|
|
296
296
|
name: string;
|
|
297
297
|
detail: string;
|
|
298
298
|
};
|
|
299
|
-
|
|
299
|
+
numBytes: {
|
|
300
300
|
name: string;
|
|
301
301
|
detail: string;
|
|
302
302
|
};
|
|
@@ -352,11 +352,15 @@ declare const _default: {
|
|
|
352
352
|
url: string;
|
|
353
353
|
}[];
|
|
354
354
|
functionParameter: {
|
|
355
|
-
|
|
355
|
+
text: {
|
|
356
356
|
name: string;
|
|
357
357
|
detail: string;
|
|
358
358
|
};
|
|
359
|
-
|
|
359
|
+
startNum: {
|
|
360
|
+
name: string;
|
|
361
|
+
detail: string;
|
|
362
|
+
};
|
|
363
|
+
numChars: {
|
|
360
364
|
name: string;
|
|
361
365
|
detail: string;
|
|
362
366
|
};
|