@univerjs/sheets-formula 0.2.11 → 0.2.13
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 +576 -436
- package/lib/locale/en-US.json +208 -193
- package/lib/locale/ru-RU.json +208 -193
- package/lib/locale/vi-VN.json +539 -44
- package/lib/locale/zh-CN.json +216 -201
- package/lib/locale/zh-TW.json +222 -207
- package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +6 -6
- package/lib/types/common/plugin-name.d.ts +1 -1
- package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +1 -1
- package/lib/types/controllers/config.schema.d.ts +32 -0
- package/lib/types/controllers/formula-ui.controller.d.ts +4 -13
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/controllers/prompt.controller.d.ts +7 -6
- package/lib/types/controllers/utils/ref-range-formula.d.ts +6 -0
- package/lib/types/formula-ui-plugin.d.ts +8 -5
- package/lib/types/locale/en-US.d.ts +106 -91
- package/lib/types/locale/function-list/information/en-US.d.ts +3 -20
- package/lib/types/locale/function-list/information/ja-JP.d.ts +3 -20
- package/lib/types/locale/function-list/information/vi-VN.d.ts +37 -0
- package/lib/types/locale/function-list/information/zh-CN.d.ts +3 -20
- package/lib/types/locale/function-list/information/zh-TW.d.ts +3 -20
- package/lib/types/locale/function-list/logical/en-US.d.ts +22 -10
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +22 -10
- package/lib/types/locale/function-list/logical/vi-VN.d.ts +22 -10
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +22 -10
- package/lib/types/locale/function-list/logical/zh-TW.d.ts +22 -10
- package/lib/types/locale/function-list/lookup/en-US.d.ts +46 -14
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +46 -14
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +126 -4
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +46 -14
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +46 -14
- package/lib/types/locale/function-list/math/en-US.d.ts +35 -47
- package/lib/types/locale/function-list/math/ja-JP.d.ts +35 -47
- package/lib/types/locale/function-list/math/vi-VN.d.ts +276 -0
- package/lib/types/locale/function-list/math/zh-CN.d.ts +35 -47
- package/lib/types/locale/function-list/math/zh-TW.d.ts +35 -47
- package/lib/types/locale/ru-RU.d.ts +106 -91
- package/lib/types/locale/vi-VN.d.ts +461 -14
- package/lib/types/locale/zh-CN.d.ts +106 -91
- package/lib/types/locale/zh-TW.d.ts +106 -91
- package/lib/types/services/description.service.d.ts +4 -4
- package/lib/types/services/prompt.service.d.ts +1 -1
- package/lib/types/services/register-function.service.d.ts +1 -1
- package/lib/types/services/remote/remote-register-function.service.d.ts +1 -1
- package/lib/types/views/more-functions/interface.d.ts +1 -1
- package/lib/umd/index.js +4 -4
- package/package.json +27 -25
package/lib/es/index.js
CHANGED
|
@@ -2,18 +2,19 @@ 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, FOCUSING_DOC, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, connectInjector, throttle, cellToRange, RANGE_TYPE, DisposableCollection, Optional, isICellData, RxDisposable, FORMULA_EDITOR_ACTIVATED, FOCUSING_EDITOR_INPUT_FORMULA, getCellInfoInMergeData, AbsoluteRefType, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, Plugin, DependentOn } from "@univerjs/core";
|
|
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, getCellInfoInMergeData, 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
|
-
import { IRenderManagerService,
|
|
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
|
-
import { DATA_TYPE, APPLY_TYPE, IAutoFillService, PREDEFINED_HOOK_NAME, COPY_TYPE, ISheetClipboardService, ISheetSelectionRenderService, SelectionShape, SELECTION_SHAPE_DEPTH, IEditorBridgeService, SheetSkeletonManagerService, SheetPasteCommand, useActiveWorkbook, getCurrentRangeDisable$, PASTE_SPECIAL_MENU_ID,
|
|
11
|
-
import { IEditorService, ISidebarService,
|
|
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";
|
|
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";
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import { DocSkeletonManagerService, DocSelectionManagerService } from "@univerjs/docs";
|
|
16
|
+
import { DocSelectionRenderService, ReplaceContentCommand, MoveCursorOperation } from "@univerjs/docs-ui";
|
|
17
|
+
const FORMULA_UI_PLUGIN_NAME = "SHEET_FORMULA_UI_PLUGIN";
|
|
17
18
|
var __defProp$j = Object.defineProperty, __getOwnPropDesc$j = Object.getOwnPropertyDescriptor, __decorateClass$j = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
18
19
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19
20
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
@@ -424,21 +425,23 @@ let FormulaClipboardController = (_a4 = class extends Disposable {
|
|
|
424
425
|
}
|
|
425
426
|
_onPasteCells(pasteFrom, pasteTo, data, payload, isSpecialPaste) {
|
|
426
427
|
var _a23;
|
|
427
|
-
|
|
428
|
-
if (pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_VALUE || pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMAT || pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_COL_WIDTH)
|
|
428
|
+
if ([PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMAT, PREDEFINED_HOOK_NAME.SPECIAL_PASTE_COL_WIDTH].includes(payload.pasteType))
|
|
429
429
|
return {
|
|
430
430
|
undos: [],
|
|
431
431
|
redos: []
|
|
432
432
|
};
|
|
433
|
-
const
|
|
433
|
+
const workbook = this._currentUniverSheet.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET), unitId = pasteTo.unitId || workbook.getUnitId(), subUnitId = pasteTo.subUnitId || ((_a23 = workbook.getActiveSheet()) == null ? void 0 : _a23.getSheetId());
|
|
434
|
+
if (!unitId || !subUnitId)
|
|
435
|
+
return {
|
|
436
|
+
undos: [],
|
|
437
|
+
redos: []
|
|
438
|
+
};
|
|
439
|
+
const pastedRange = pasteTo.range, matrix = data, copyInfo = {
|
|
434
440
|
copyType: payload.copyType || COPY_TYPE.COPY,
|
|
435
441
|
copyRange: pasteFrom == null ? void 0 : pasteFrom.range,
|
|
436
442
|
pasteType: payload.pasteType
|
|
437
|
-
}
|
|
438
|
-
return
|
|
439
|
-
undos: [],
|
|
440
|
-
redos: []
|
|
441
|
-
} : this._injector.invoke((accessor) => getSetCellFormulaMutations(
|
|
443
|
+
};
|
|
444
|
+
return this._injector.invoke((accessor) => getSetCellFormulaMutations(
|
|
442
445
|
unitId,
|
|
443
446
|
subUnitId,
|
|
444
447
|
pastedRange,
|
|
@@ -461,43 +464,7 @@ FormulaClipboardController = __decorateClass$g([
|
|
|
461
464
|
__decorateParam$g(4, Inject(FormulaDataModel))
|
|
462
465
|
], FormulaClipboardController);
|
|
463
466
|
function getSetCellFormulaMutations(unitId, subUnitId, range, matrix, accessor, copyInfo, lexerTreeBuilder, formulaDataModel, isSpecialPaste = !1, pasteFrom) {
|
|
464
|
-
const redoMutationsInfo = [], undoMutationsInfo = [], valueMatrix =
|
|
465
|
-
let copyRowLength = 0, copyColumnLength = 0;
|
|
466
|
-
if (copyInfo && copyInfo.copyRange) {
|
|
467
|
-
const { copyType, copyRange } = copyInfo;
|
|
468
|
-
copyType === COPY_TYPE.COPY && copyRange && (copyRowLength = copyRange.rows.length, copyColumnLength = copyRange.cols.length);
|
|
469
|
-
}
|
|
470
|
-
matrix.forValue((row, col, value) => {
|
|
471
|
-
var _a23, _b, _c, _d;
|
|
472
|
-
const originalFormula = value.f || "", originalFormulaId = value.si || "";
|
|
473
|
-
let valueObject = {};
|
|
474
|
-
if (isSpecialPaste && (valueObject = Tools.deepClone(value), valueObject.s = null), !(!copyRowLength || !copyColumnLength)) {
|
|
475
|
-
if (isFormulaId(originalFormulaId)) {
|
|
476
|
-
const { unitId: pasteFromUnitId = "", subUnitId: pasteFromSubUnitId = "", range: pasteFromRange } = pasteFrom || {};
|
|
477
|
-
if ((pasteFromUnitId && unitId !== pasteFromUnitId || pasteFromSubUnitId && subUnitId !== pasteFromSubUnitId) && (pasteFromRange != null && pasteFromRange.rows) && (pasteFromRange != null && pasteFromRange.cols)) {
|
|
478
|
-
const formulaString = formulaDataModel.getFormulaStringByCell(pasteFromRange.rows[row], pasteFromRange.cols[col], pasteFromSubUnitId, pasteFromUnitId), rowIndex = row % copyRowLength, colIndex = col % copyColumnLength, copyX = copyInfo != null && copyInfo.copyRange ? (_a23 = copyInfo == null ? void 0 : copyInfo.copyRange) == null ? void 0 : _a23.cols[colIndex] : colIndex, copyY = copyInfo != null && copyInfo.copyRange ? (_b = copyInfo == null ? void 0 : copyInfo.copyRange) == null ? void 0 : _b.rows[rowIndex] : rowIndex, offsetX = range.cols[col] - copyX, offsetY = range.rows[row] - copyY, shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(formulaString || "", offsetX, offsetY);
|
|
479
|
-
valueObject.si = null, valueObject.f = shiftedFormula, valueObject.v = null, valueObject.p = null;
|
|
480
|
-
} else
|
|
481
|
-
valueObject.si = originalFormulaId, valueObject.f = null, valueObject.v = null, valueObject.p = null;
|
|
482
|
-
} else if (isFormulaString(originalFormula)) {
|
|
483
|
-
const rowIndex = row % copyRowLength, colIndex = col % copyColumnLength, index = `${rowIndex}_${colIndex}`;
|
|
484
|
-
let formulaId = formulaIdMap.get(index);
|
|
485
|
-
if (formulaId)
|
|
486
|
-
valueObject.si = formulaId, valueObject.f = null, valueObject.v = null, valueObject.p = null;
|
|
487
|
-
else {
|
|
488
|
-
formulaId = Tools.generateRandomId(6), formulaIdMap.set(index, formulaId);
|
|
489
|
-
const copyX = copyInfo != null && copyInfo.copyRange ? (_c = copyInfo == null ? void 0 : copyInfo.copyRange) == null ? void 0 : _c.cols[colIndex] : colIndex, copyY = copyInfo != null && copyInfo.copyRange ? (_d = copyInfo == null ? void 0 : copyInfo.copyRange) == null ? void 0 : _d.rows[rowIndex] : rowIndex, offsetX = range.cols[col] - copyX, offsetY = range.rows[row] - copyY, shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(originalFormula, offsetX, offsetY);
|
|
490
|
-
valueObject.si = formulaId, valueObject.f = shiftedFormula, valueObject.v = null, valueObject.p = null;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
if (copyInfo.pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMULA && value.p) {
|
|
494
|
-
const richText = getCellRichText(value);
|
|
495
|
-
richText && (valueObject.p = null, valueObject.v = richText);
|
|
496
|
-
}
|
|
497
|
-
valueMatrix.setValue(range.rows[row], range.cols[col], valueObject);
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
const setValuesMutation = {
|
|
467
|
+
const redoMutationsInfo = [], undoMutationsInfo = [], valueMatrix = getValueMatrix(unitId, subUnitId, range, matrix, copyInfo, lexerTreeBuilder, formulaDataModel, pasteFrom), setValuesMutation = {
|
|
501
468
|
unitId,
|
|
502
469
|
subUnitId,
|
|
503
470
|
cellValue: valueMatrix.getData()
|
|
@@ -519,6 +486,111 @@ function getSetCellFormulaMutations(unitId, subUnitId, range, matrix, accessor,
|
|
|
519
486
|
};
|
|
520
487
|
}
|
|
521
488
|
__name(getSetCellFormulaMutations, "getSetCellFormulaMutations");
|
|
489
|
+
function getValueMatrix(unitId, subUnitId, range, matrix, copyInfo, lexerTreeBuilder, formulaDataModel, pasteFrom) {
|
|
490
|
+
return pasteFrom ? copyInfo.pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_VALUE ? getSpecialPasteValueValueMatrix(unitId, subUnitId, range, matrix, formulaDataModel, pasteFrom) : copyInfo.pasteType === PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMULA ? getSpecialPasteFormulaValueMatrix(unitId, subUnitId, range, matrix, lexerTreeBuilder, formulaDataModel, pasteFrom) : getDefaultPasteValueMatrix(unitId, subUnitId, range, matrix, lexerTreeBuilder, formulaDataModel, pasteFrom) : getValueMatrixOfPasteFromIsNull(unitId, subUnitId, range, matrix, formulaDataModel);
|
|
491
|
+
}
|
|
492
|
+
__name(getValueMatrix, "getValueMatrix");
|
|
493
|
+
function getValueMatrixOfPasteFromIsNull(unitId, subUnitId, range, matrix, formulaDataModel) {
|
|
494
|
+
var _a23, _b;
|
|
495
|
+
const valueMatrix = new ObjectMatrix(), formulaData = (_b = (_a23 = formulaDataModel.getFormulaData()) == null ? void 0 : _a23[unitId]) == null ? void 0 : _b[subUnitId];
|
|
496
|
+
return matrix.forValue((row, col, value) => {
|
|
497
|
+
var _a24;
|
|
498
|
+
const toRow = range.rows[row], toCol = range.cols[col], valueObject = {};
|
|
499
|
+
isFormulaString(value.v) ? (valueObject.v = null, valueObject.f = `${value.v}`, valueObject.si = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject)) : (_a24 = formulaData == null ? void 0 : formulaData[toRow]) != null && _a24[toCol] && (valueObject.v = value.v, valueObject.f = null, valueObject.si = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject));
|
|
500
|
+
}), valueMatrix;
|
|
501
|
+
}
|
|
502
|
+
__name(getValueMatrixOfPasteFromIsNull, "getValueMatrixOfPasteFromIsNull");
|
|
503
|
+
function getSpecialPasteValueValueMatrix(unitId, subUnitId, range, matrix, formulaDataModel, pasteFrom) {
|
|
504
|
+
var _a23, _b, _c, _d;
|
|
505
|
+
const valueMatrix = new ObjectMatrix(), arrayFormulaCellData = (_b = (_a23 = formulaDataModel.getArrayFormulaCellData()) == null ? void 0 : _a23[pasteFrom.unitId]) == null ? void 0 : _b[pasteFrom.subUnitId], formulaData = (_d = (_c = formulaDataModel.getFormulaData()) == null ? void 0 : _c[unitId]) == null ? void 0 : _d[subUnitId];
|
|
506
|
+
return matrix.forValue((row, col, value) => {
|
|
507
|
+
var _a24, _b2;
|
|
508
|
+
const fromRow = pasteFrom.range.rows[row % pasteFrom.range.rows.length], fromCol = pasteFrom.range.cols[col % pasteFrom.range.cols.length], toRow = range.rows[row], toCol = range.cols[col], valueObject = {};
|
|
509
|
+
if (isFormulaString(value.f) || isFormulaId(value.si))
|
|
510
|
+
valueObject.v = value.v, valueObject.f = null, valueObject.si = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
511
|
+
else if ((_a24 = arrayFormulaCellData == null ? void 0 : arrayFormulaCellData[fromRow]) != null && _a24[fromCol]) {
|
|
512
|
+
const cell = arrayFormulaCellData[fromRow][fromCol];
|
|
513
|
+
valueObject.v = cell.v, valueObject.f = null, valueObject.si = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
514
|
+
} else if ((_b2 = formulaData == null ? void 0 : formulaData[toRow]) != null && _b2[toCol]) {
|
|
515
|
+
if (valueObject.v = value.v, valueObject.f = null, valueObject.si = null, valueObject.p = null, value.p) {
|
|
516
|
+
const richText = getCellRichText(value);
|
|
517
|
+
richText && (valueObject.v = richText);
|
|
518
|
+
}
|
|
519
|
+
valueMatrix.setValue(toRow, toCol, valueObject);
|
|
520
|
+
}
|
|
521
|
+
}), valueMatrix;
|
|
522
|
+
}
|
|
523
|
+
__name(getSpecialPasteValueValueMatrix, "getSpecialPasteValueValueMatrix");
|
|
524
|
+
function getSpecialPasteFormulaValueMatrix(unitId, subUnitId, range, matrix, lexerTreeBuilder, formulaDataModel, pasteFrom) {
|
|
525
|
+
const valueMatrix = new ObjectMatrix(), formulaIdMap = /* @__PURE__ */ new Map();
|
|
526
|
+
return matrix.forValue((row, col, value) => {
|
|
527
|
+
const toRow = range.rows[row], toCol = range.cols[col], valueObject = {};
|
|
528
|
+
if (isFormulaId(value.si)) {
|
|
529
|
+
if (pasteFrom.unitId !== unitId || pasteFrom.subUnitId !== subUnitId) {
|
|
530
|
+
const formulaString = formulaDataModel.getFormulaStringByCell(
|
|
531
|
+
pasteFrom.range.rows[row % pasteFrom.range.rows.length],
|
|
532
|
+
pasteFrom.range.cols[col % pasteFrom.range.cols.length],
|
|
533
|
+
pasteFrom.subUnitId,
|
|
534
|
+
pasteFrom.unitId
|
|
535
|
+
), offsetX = range.cols[col] - pasteFrom.range.cols[col % pasteFrom.range.cols.length], offsetY = range.rows[row] - pasteFrom.range.rows[row % pasteFrom.range.rows.length], shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(formulaString || "", offsetX, offsetY);
|
|
536
|
+
valueObject.si = null, valueObject.f = shiftedFormula;
|
|
537
|
+
} else
|
|
538
|
+
valueObject.si = value.si, valueObject.f = null;
|
|
539
|
+
valueObject.v = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
540
|
+
} else if (isFormulaString(value.f)) {
|
|
541
|
+
const index = `${row % pasteFrom.range.rows.length}_${col % pasteFrom.range.cols.length}`;
|
|
542
|
+
let formulaId = formulaIdMap.get(index);
|
|
543
|
+
if (formulaId)
|
|
544
|
+
valueObject.si = formulaId, valueObject.f = null;
|
|
545
|
+
else {
|
|
546
|
+
formulaId = Tools.generateRandomId(6), formulaIdMap.set(index, formulaId);
|
|
547
|
+
const offsetX = range.cols[col] - pasteFrom.range.cols[col % pasteFrom.range.cols.length], offsetY = range.rows[row] - pasteFrom.range.rows[row % pasteFrom.range.rows.length], shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(value.f || "", offsetX, offsetY);
|
|
548
|
+
valueObject.si = formulaId, valueObject.f = shiftedFormula;
|
|
549
|
+
}
|
|
550
|
+
valueObject.v = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
551
|
+
} else {
|
|
552
|
+
if (valueObject.v = value.v, valueObject.f = null, valueObject.si = null, valueObject.p = null, value.p) {
|
|
553
|
+
const richText = getCellRichText(value);
|
|
554
|
+
richText && (valueObject.v = richText);
|
|
555
|
+
}
|
|
556
|
+
valueMatrix.setValue(toRow, toCol, valueObject);
|
|
557
|
+
}
|
|
558
|
+
}), valueMatrix;
|
|
559
|
+
}
|
|
560
|
+
__name(getSpecialPasteFormulaValueMatrix, "getSpecialPasteFormulaValueMatrix");
|
|
561
|
+
function getDefaultPasteValueMatrix(unitId, subUnitId, range, matrix, lexerTreeBuilder, formulaDataModel, pasteFrom) {
|
|
562
|
+
var _a23, _b;
|
|
563
|
+
const valueMatrix = new ObjectMatrix(), formulaIdMap = /* @__PURE__ */ new Map(), formulaData = (_b = (_a23 = formulaDataModel.getFormulaData()) == null ? void 0 : _a23[unitId]) == null ? void 0 : _b[subUnitId];
|
|
564
|
+
return matrix.forValue((row, col, value) => {
|
|
565
|
+
var _a24;
|
|
566
|
+
const toRow = range.rows[row], toCol = range.cols[col], valueObject = {};
|
|
567
|
+
if (isFormulaId(value.si)) {
|
|
568
|
+
if (pasteFrom.unitId !== unitId || pasteFrom.subUnitId !== subUnitId) {
|
|
569
|
+
const formulaString = formulaDataModel.getFormulaStringByCell(
|
|
570
|
+
pasteFrom.range.rows[row % pasteFrom.range.rows.length],
|
|
571
|
+
pasteFrom.range.cols[col % pasteFrom.range.cols.length],
|
|
572
|
+
pasteFrom.subUnitId,
|
|
573
|
+
pasteFrom.unitId
|
|
574
|
+
), offsetX = range.cols[col] - pasteFrom.range.cols[col % pasteFrom.range.cols.length], offsetY = range.rows[row] - pasteFrom.range.rows[row % pasteFrom.range.rows.length], shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(formulaString || "", offsetX, offsetY);
|
|
575
|
+
valueObject.si = null, valueObject.f = shiftedFormula;
|
|
576
|
+
} else
|
|
577
|
+
valueObject.si = value.si, valueObject.f = null;
|
|
578
|
+
valueObject.v = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
579
|
+
} else if (isFormulaString(value.f)) {
|
|
580
|
+
const index = `${row % pasteFrom.range.rows.length}_${col % pasteFrom.range.cols.length}`;
|
|
581
|
+
let formulaId = formulaIdMap.get(index);
|
|
582
|
+
if (formulaId)
|
|
583
|
+
valueObject.si = formulaId, valueObject.f = null;
|
|
584
|
+
else {
|
|
585
|
+
formulaId = Tools.generateRandomId(6), formulaIdMap.set(index, formulaId);
|
|
586
|
+
const offsetX = range.cols[col] - pasteFrom.range.cols[col % pasteFrom.range.cols.length], offsetY = range.rows[row] - pasteFrom.range.rows[row % pasteFrom.range.rows.length], shiftedFormula = lexerTreeBuilder.moveFormulaRefOffset(value.f || "", offsetX, offsetY);
|
|
587
|
+
valueObject.si = formulaId, valueObject.f = shiftedFormula;
|
|
588
|
+
}
|
|
589
|
+
valueObject.v = null, valueObject.p = null, valueMatrix.setValue(toRow, toCol, valueObject);
|
|
590
|
+
} else (_a24 = formulaData == null ? void 0 : formulaData[toRow]) != null && _a24[toCol] && (valueObject.v = value.v, valueObject.f = null, valueObject.si = null, valueObject.p = value.p, valueMatrix.setValue(toRow, toCol, valueObject));
|
|
591
|
+
}), valueMatrix;
|
|
592
|
+
}
|
|
593
|
+
__name(getDefaultPasteValueMatrix, "getDefaultPasteValueMatrix");
|
|
522
594
|
function getCellRichText(cell) {
|
|
523
595
|
if (cell != null && cell.p) {
|
|
524
596
|
const body = cell == null ? void 0 : cell.p.body;
|
|
@@ -1271,7 +1343,7 @@ function HelpFunction() {
|
|
|
1271
1343
|
}
|
|
1272
1344
|
__name(handleSwitchActive, "handleSwitchActive");
|
|
1273
1345
|
function handleClose() {
|
|
1274
|
-
setHelpVisible(!helpVisible), injector.get(
|
|
1346
|
+
setHelpVisible(!helpVisible), injector.get(ILayoutService).focus();
|
|
1275
1347
|
}
|
|
1276
1348
|
return __name(handleClose, "handleClose"), /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: helpVisible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Popup, { visible, offset, children: functionInfo ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.formulaHelpFunction, children: [
|
|
1277
1349
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$5.formulaHelpFunctionTitle, children: [
|
|
@@ -1531,7 +1603,7 @@ function InputParams(props) {
|
|
|
1531
1603
|
] });
|
|
1532
1604
|
}
|
|
1533
1605
|
__name(InputParams, "InputParams");
|
|
1534
|
-
const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
1606
|
+
const PLUGIN_CONFIG_KEY_BASE = "sheets-formula.base.config", defaultPluginBaseConfig = {}, PLUGIN_CONFIG_KEY_REMOTE = "sheets-formula.remote.config", defaultPluginRemoteConfig = {}, PLUGIN_CONFIG_KEY_MOBILE = "sheets-formula.mobile.config", defaultPluginMobileConfig = {}, FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
1535
1607
|
{
|
|
1536
1608
|
functionName: FUNCTION_NAMES_COMPATIBILITY.BETADIST,
|
|
1537
1609
|
functionType: FunctionType.Compatibility,
|
|
@@ -6739,16 +6811,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
6739
6811
|
abstract: "formula.functionList.ISFORMULA.abstract",
|
|
6740
6812
|
functionParameter: [
|
|
6741
6813
|
{
|
|
6742
|
-
name: "formula.functionList.ISFORMULA.functionParameter.
|
|
6743
|
-
detail: "formula.functionList.ISFORMULA.functionParameter.
|
|
6744
|
-
example: "A1
|
|
6745
|
-
require: 1,
|
|
6746
|
-
repeat: 0
|
|
6747
|
-
},
|
|
6748
|
-
{
|
|
6749
|
-
name: "formula.functionList.ISFORMULA.functionParameter.number2.name",
|
|
6750
|
-
detail: "formula.functionList.ISFORMULA.functionParameter.number2.detail",
|
|
6751
|
-
example: "A1:A20",
|
|
6814
|
+
name: "formula.functionList.ISFORMULA.functionParameter.reference.name",
|
|
6815
|
+
detail: "formula.functionList.ISFORMULA.functionParameter.reference.detail",
|
|
6816
|
+
example: "A1",
|
|
6752
6817
|
require: 1,
|
|
6753
6818
|
repeat: 0
|
|
6754
6819
|
}
|
|
@@ -6888,16 +6953,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
6888
6953
|
abstract: "formula.functionList.N.abstract",
|
|
6889
6954
|
functionParameter: [
|
|
6890
6955
|
{
|
|
6891
|
-
name: "formula.functionList.N.functionParameter.
|
|
6892
|
-
detail: "formula.functionList.N.functionParameter.
|
|
6893
|
-
example: "
|
|
6894
|
-
require: 1,
|
|
6895
|
-
repeat: 0
|
|
6896
|
-
},
|
|
6897
|
-
{
|
|
6898
|
-
name: "formula.functionList.N.functionParameter.number2.name",
|
|
6899
|
-
detail: "formula.functionList.N.functionParameter.number2.detail",
|
|
6900
|
-
example: "A1:A20",
|
|
6956
|
+
name: "formula.functionList.N.functionParameter.value.name",
|
|
6957
|
+
detail: "formula.functionList.N.functionParameter.value.detail",
|
|
6958
|
+
example: "7",
|
|
6901
6959
|
require: 1,
|
|
6902
6960
|
repeat: 0
|
|
6903
6961
|
}
|
|
@@ -6908,22 +6966,7 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
6908
6966
|
functionType: FunctionType.Information,
|
|
6909
6967
|
description: "formula.functionList.NA.description",
|
|
6910
6968
|
abstract: "formula.functionList.NA.abstract",
|
|
6911
|
-
functionParameter: [
|
|
6912
|
-
{
|
|
6913
|
-
name: "formula.functionList.NA.functionParameter.number1.name",
|
|
6914
|
-
detail: "formula.functionList.NA.functionParameter.number1.detail",
|
|
6915
|
-
example: "A1:A20",
|
|
6916
|
-
require: 1,
|
|
6917
|
-
repeat: 0
|
|
6918
|
-
},
|
|
6919
|
-
{
|
|
6920
|
-
name: "formula.functionList.NA.functionParameter.number2.name",
|
|
6921
|
-
detail: "formula.functionList.NA.functionParameter.number2.detail",
|
|
6922
|
-
example: "A1:A20",
|
|
6923
|
-
require: 1,
|
|
6924
|
-
repeat: 0
|
|
6925
|
-
}
|
|
6926
|
-
]
|
|
6969
|
+
functionParameter: []
|
|
6927
6970
|
},
|
|
6928
6971
|
{
|
|
6929
6972
|
functionName: FUNCTION_NAMES_INFORMATION.SHEET,
|
|
@@ -7014,16 +7057,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7014
7057
|
abstract: "formula.functionList.BYCOL.abstract",
|
|
7015
7058
|
functionParameter: [
|
|
7016
7059
|
{
|
|
7017
|
-
name: "formula.functionList.BYCOL.functionParameter.
|
|
7018
|
-
detail: "formula.functionList.BYCOL.functionParameter.
|
|
7019
|
-
example: "A1:
|
|
7060
|
+
name: "formula.functionList.BYCOL.functionParameter.array.name",
|
|
7061
|
+
detail: "formula.functionList.BYCOL.functionParameter.array.detail",
|
|
7062
|
+
example: "A1:C2",
|
|
7020
7063
|
require: 1,
|
|
7021
7064
|
repeat: 0
|
|
7022
7065
|
},
|
|
7023
7066
|
{
|
|
7024
|
-
name: "formula.functionList.BYCOL.functionParameter.
|
|
7025
|
-
detail: "formula.functionList.BYCOL.functionParameter.
|
|
7026
|
-
example: "
|
|
7067
|
+
name: "formula.functionList.BYCOL.functionParameter.lambda.name",
|
|
7068
|
+
detail: "formula.functionList.BYCOL.functionParameter.lambda.detail",
|
|
7069
|
+
example: "LAMBDA(array, MAX(array))",
|
|
7027
7070
|
require: 1,
|
|
7028
7071
|
repeat: 0
|
|
7029
7072
|
}
|
|
@@ -7036,16 +7079,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7036
7079
|
abstract: "formula.functionList.BYROW.abstract",
|
|
7037
7080
|
functionParameter: [
|
|
7038
7081
|
{
|
|
7039
|
-
name: "formula.functionList.BYROW.functionParameter.
|
|
7040
|
-
detail: "formula.functionList.BYROW.functionParameter.
|
|
7041
|
-
example: "A1:
|
|
7082
|
+
name: "formula.functionList.BYROW.functionParameter.array.name",
|
|
7083
|
+
detail: "formula.functionList.BYROW.functionParameter.array.detail",
|
|
7084
|
+
example: "A1:C2",
|
|
7042
7085
|
require: 1,
|
|
7043
7086
|
repeat: 0
|
|
7044
7087
|
},
|
|
7045
7088
|
{
|
|
7046
|
-
name: "formula.functionList.BYROW.functionParameter.
|
|
7047
|
-
detail: "formula.functionList.BYROW.functionParameter.
|
|
7048
|
-
example: "
|
|
7089
|
+
name: "formula.functionList.BYROW.functionParameter.lambda.name",
|
|
7090
|
+
detail: "formula.functionList.BYROW.functionParameter.lambda.detail",
|
|
7091
|
+
example: "LAMBDA(array, MAX(array))",
|
|
7049
7092
|
require: 1,
|
|
7050
7093
|
repeat: 0
|
|
7051
7094
|
}
|
|
@@ -7269,16 +7312,23 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7269
7312
|
abstract: "formula.functionList.MAP.abstract",
|
|
7270
7313
|
functionParameter: [
|
|
7271
7314
|
{
|
|
7272
|
-
name: "formula.functionList.MAP.functionParameter.
|
|
7273
|
-
detail: "formula.functionList.MAP.functionParameter.
|
|
7274
|
-
example: "
|
|
7315
|
+
name: "formula.functionList.MAP.functionParameter.array1.name",
|
|
7316
|
+
detail: "formula.functionList.MAP.functionParameter.array1.detail",
|
|
7317
|
+
example: "D2:D11",
|
|
7275
7318
|
require: 1,
|
|
7276
7319
|
repeat: 0
|
|
7277
7320
|
},
|
|
7278
7321
|
{
|
|
7279
|
-
name: "formula.functionList.MAP.functionParameter.
|
|
7280
|
-
detail: "formula.functionList.MAP.functionParameter.
|
|
7281
|
-
example: "
|
|
7322
|
+
name: "formula.functionList.MAP.functionParameter.array2.name",
|
|
7323
|
+
detail: "formula.functionList.MAP.functionParameter.array2.detail",
|
|
7324
|
+
example: "E2:E11",
|
|
7325
|
+
require: 0,
|
|
7326
|
+
repeat: 1
|
|
7327
|
+
},
|
|
7328
|
+
{
|
|
7329
|
+
name: "formula.functionList.MAP.functionParameter.lambda.name",
|
|
7330
|
+
detail: "formula.functionList.MAP.functionParameter.lambda.detail",
|
|
7331
|
+
example: 'LAMBDA(s,c,AND(s="Large",c="Red"))',
|
|
7282
7332
|
require: 1,
|
|
7283
7333
|
repeat: 0
|
|
7284
7334
|
}
|
|
@@ -7328,16 +7378,23 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7328
7378
|
abstract: "formula.functionList.REDUCE.abstract",
|
|
7329
7379
|
functionParameter: [
|
|
7330
7380
|
{
|
|
7331
|
-
name: "formula.functionList.REDUCE.functionParameter.
|
|
7332
|
-
detail: "formula.functionList.REDUCE.functionParameter.
|
|
7333
|
-
example: "
|
|
7381
|
+
name: "formula.functionList.REDUCE.functionParameter.initialValue.name",
|
|
7382
|
+
detail: "formula.functionList.REDUCE.functionParameter.initialValue.detail",
|
|
7383
|
+
example: "1",
|
|
7334
7384
|
require: 1,
|
|
7335
7385
|
repeat: 0
|
|
7336
7386
|
},
|
|
7337
7387
|
{
|
|
7338
|
-
name: "formula.functionList.REDUCE.functionParameter.
|
|
7339
|
-
detail: "formula.functionList.REDUCE.functionParameter.
|
|
7340
|
-
example: "A1:
|
|
7388
|
+
name: "formula.functionList.REDUCE.functionParameter.array.name",
|
|
7389
|
+
detail: "formula.functionList.REDUCE.functionParameter.array.detail",
|
|
7390
|
+
example: "A1:C2",
|
|
7391
|
+
require: 1,
|
|
7392
|
+
repeat: 0
|
|
7393
|
+
},
|
|
7394
|
+
{
|
|
7395
|
+
name: "formula.functionList.REDUCE.functionParameter.lambda.name",
|
|
7396
|
+
detail: "formula.functionList.REDUCE.functionParameter.lambda.detail",
|
|
7397
|
+
example: "LAMBDA(a,b,a+b^2)",
|
|
7341
7398
|
require: 1,
|
|
7342
7399
|
repeat: 0
|
|
7343
7400
|
}
|
|
@@ -7350,16 +7407,23 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7350
7407
|
abstract: "formula.functionList.SCAN.abstract",
|
|
7351
7408
|
functionParameter: [
|
|
7352
7409
|
{
|
|
7353
|
-
name: "formula.functionList.SCAN.functionParameter.
|
|
7354
|
-
detail: "formula.functionList.SCAN.functionParameter.
|
|
7355
|
-
example: "
|
|
7410
|
+
name: "formula.functionList.SCAN.functionParameter.initialValue.name",
|
|
7411
|
+
detail: "formula.functionList.SCAN.functionParameter.initialValue.detail",
|
|
7412
|
+
example: "1",
|
|
7356
7413
|
require: 1,
|
|
7357
7414
|
repeat: 0
|
|
7358
7415
|
},
|
|
7359
7416
|
{
|
|
7360
|
-
name: "formula.functionList.SCAN.functionParameter.
|
|
7361
|
-
detail: "formula.functionList.SCAN.functionParameter.
|
|
7362
|
-
example: "A1:
|
|
7417
|
+
name: "formula.functionList.SCAN.functionParameter.array.name",
|
|
7418
|
+
detail: "formula.functionList.SCAN.functionParameter.array.detail",
|
|
7419
|
+
example: "A1:C2",
|
|
7420
|
+
require: 1,
|
|
7421
|
+
repeat: 0
|
|
7422
|
+
},
|
|
7423
|
+
{
|
|
7424
|
+
name: "formula.functionList.SCAN.functionParameter.lambda.name",
|
|
7425
|
+
detail: "formula.functionList.SCAN.functionParameter.lambda.detail",
|
|
7426
|
+
example: "LAMBDA(a,b,a+b^2)",
|
|
7363
7427
|
require: 1,
|
|
7364
7428
|
repeat: 0
|
|
7365
7429
|
}
|
|
@@ -7620,18 +7684,25 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7620
7684
|
abstract: "formula.functionList.DROP.abstract",
|
|
7621
7685
|
functionParameter: [
|
|
7622
7686
|
{
|
|
7623
|
-
name: "formula.functionList.DROP.functionParameter.
|
|
7624
|
-
detail: "formula.functionList.DROP.functionParameter.
|
|
7625
|
-
example: "
|
|
7687
|
+
name: "formula.functionList.DROP.functionParameter.array.name",
|
|
7688
|
+
detail: "formula.functionList.DROP.functionParameter.array.detail",
|
|
7689
|
+
example: "A2:C4",
|
|
7626
7690
|
require: 1,
|
|
7627
7691
|
repeat: 0
|
|
7628
7692
|
},
|
|
7629
7693
|
{
|
|
7630
|
-
name: "formula.functionList.DROP.functionParameter.
|
|
7631
|
-
detail: "formula.functionList.DROP.functionParameter.
|
|
7632
|
-
example: "
|
|
7694
|
+
name: "formula.functionList.DROP.functionParameter.rows.name",
|
|
7695
|
+
detail: "formula.functionList.DROP.functionParameter.rows.detail",
|
|
7696
|
+
example: "2",
|
|
7633
7697
|
require: 1,
|
|
7634
7698
|
repeat: 0
|
|
7699
|
+
},
|
|
7700
|
+
{
|
|
7701
|
+
name: "formula.functionList.DROP.functionParameter.columns.name",
|
|
7702
|
+
detail: "formula.functionList.DROP.functionParameter.columns.detail",
|
|
7703
|
+
example: "2",
|
|
7704
|
+
require: 0,
|
|
7705
|
+
repeat: 0
|
|
7635
7706
|
}
|
|
7636
7707
|
]
|
|
7637
7708
|
},
|
|
@@ -7642,18 +7713,32 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
7642
7713
|
abstract: "formula.functionList.EXPAND.abstract",
|
|
7643
7714
|
functionParameter: [
|
|
7644
7715
|
{
|
|
7645
|
-
name: "formula.functionList.EXPAND.functionParameter.
|
|
7646
|
-
detail: "formula.functionList.EXPAND.functionParameter.
|
|
7647
|
-
example: "
|
|
7716
|
+
name: "formula.functionList.EXPAND.functionParameter.array.name",
|
|
7717
|
+
detail: "formula.functionList.EXPAND.functionParameter.array.detail",
|
|
7718
|
+
example: "A2",
|
|
7648
7719
|
require: 1,
|
|
7649
7720
|
repeat: 0
|
|
7650
7721
|
},
|
|
7651
7722
|
{
|
|
7652
|
-
name: "formula.functionList.EXPAND.functionParameter.
|
|
7653
|
-
detail: "formula.functionList.EXPAND.functionParameter.
|
|
7654
|
-
example: "
|
|
7723
|
+
name: "formula.functionList.EXPAND.functionParameter.rows.name",
|
|
7724
|
+
detail: "formula.functionList.EXPAND.functionParameter.rows.detail",
|
|
7725
|
+
example: "3",
|
|
7655
7726
|
require: 1,
|
|
7656
7727
|
repeat: 0
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
name: "formula.functionList.EXPAND.functionParameter.columns.name",
|
|
7731
|
+
detail: "formula.functionList.EXPAND.functionParameter.columns.detail",
|
|
7732
|
+
example: "3",
|
|
7733
|
+
require: 0,
|
|
7734
|
+
repeat: 0
|
|
7735
|
+
},
|
|
7736
|
+
{
|
|
7737
|
+
name: "formula.functionList.EXPAND.functionParameter.padWith.name",
|
|
7738
|
+
detail: "formula.functionList.EXPAND.functionParameter.padWith.detail",
|
|
7739
|
+
example: '"-"',
|
|
7740
|
+
require: 0,
|
|
7741
|
+
repeat: 0
|
|
7657
7742
|
}
|
|
7658
7743
|
]
|
|
7659
7744
|
},
|
|
@@ -8129,18 +8214,25 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8129
8214
|
abstract: "formula.functionList.TAKE.abstract",
|
|
8130
8215
|
functionParameter: [
|
|
8131
8216
|
{
|
|
8132
|
-
name: "formula.functionList.TAKE.functionParameter.
|
|
8133
|
-
detail: "formula.functionList.TAKE.functionParameter.
|
|
8134
|
-
example: "
|
|
8217
|
+
name: "formula.functionList.TAKE.functionParameter.array.name",
|
|
8218
|
+
detail: "formula.functionList.TAKE.functionParameter.array.detail",
|
|
8219
|
+
example: "A2:C4",
|
|
8135
8220
|
require: 1,
|
|
8136
8221
|
repeat: 0
|
|
8137
8222
|
},
|
|
8138
8223
|
{
|
|
8139
|
-
name: "formula.functionList.TAKE.functionParameter.
|
|
8140
|
-
detail: "formula.functionList.TAKE.functionParameter.
|
|
8141
|
-
example: "
|
|
8224
|
+
name: "formula.functionList.TAKE.functionParameter.rows.name",
|
|
8225
|
+
detail: "formula.functionList.TAKE.functionParameter.rows.detail",
|
|
8226
|
+
example: "2",
|
|
8142
8227
|
require: 1,
|
|
8143
8228
|
repeat: 0
|
|
8229
|
+
},
|
|
8230
|
+
{
|
|
8231
|
+
name: "formula.functionList.TAKE.functionParameter.columns.name",
|
|
8232
|
+
detail: "formula.functionList.TAKE.functionParameter.columns.detail",
|
|
8233
|
+
example: "2",
|
|
8234
|
+
require: 0,
|
|
8235
|
+
repeat: 0
|
|
8144
8236
|
}
|
|
8145
8237
|
]
|
|
8146
8238
|
},
|
|
@@ -8151,17 +8243,24 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8151
8243
|
abstract: "formula.functionList.TOCOL.abstract",
|
|
8152
8244
|
functionParameter: [
|
|
8153
8245
|
{
|
|
8154
|
-
name: "formula.functionList.TOCOL.functionParameter.
|
|
8155
|
-
detail: "formula.functionList.TOCOL.functionParameter.
|
|
8156
|
-
example: "
|
|
8246
|
+
name: "formula.functionList.TOCOL.functionParameter.array.name",
|
|
8247
|
+
detail: "formula.functionList.TOCOL.functionParameter.array.detail",
|
|
8248
|
+
example: "A2:D4",
|
|
8157
8249
|
require: 1,
|
|
8158
8250
|
repeat: 0
|
|
8159
8251
|
},
|
|
8160
8252
|
{
|
|
8161
|
-
name: "formula.functionList.TOCOL.functionParameter.
|
|
8162
|
-
detail: "formula.functionList.TOCOL.functionParameter.
|
|
8163
|
-
example: "
|
|
8164
|
-
require:
|
|
8253
|
+
name: "formula.functionList.TOCOL.functionParameter.ignore.name",
|
|
8254
|
+
detail: "formula.functionList.TOCOL.functionParameter.ignore.detail",
|
|
8255
|
+
example: "1",
|
|
8256
|
+
require: 0,
|
|
8257
|
+
repeat: 0
|
|
8258
|
+
},
|
|
8259
|
+
{
|
|
8260
|
+
name: "formula.functionList.TOCOL.functionParameter.scanByColumn.name",
|
|
8261
|
+
detail: "formula.functionList.TOCOL.functionParameter.scanByColumn.detail",
|
|
8262
|
+
example: "TRUE",
|
|
8263
|
+
require: 0,
|
|
8165
8264
|
repeat: 0
|
|
8166
8265
|
}
|
|
8167
8266
|
]
|
|
@@ -8173,17 +8272,24 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8173
8272
|
abstract: "formula.functionList.TOROW.abstract",
|
|
8174
8273
|
functionParameter: [
|
|
8175
8274
|
{
|
|
8176
|
-
name: "formula.functionList.TOROW.functionParameter.
|
|
8177
|
-
detail: "formula.functionList.TOROW.functionParameter.
|
|
8178
|
-
example: "
|
|
8275
|
+
name: "formula.functionList.TOROW.functionParameter.array.name",
|
|
8276
|
+
detail: "formula.functionList.TOROW.functionParameter.array.detail",
|
|
8277
|
+
example: "A2:D4",
|
|
8179
8278
|
require: 1,
|
|
8180
8279
|
repeat: 0
|
|
8181
8280
|
},
|
|
8182
8281
|
{
|
|
8183
|
-
name: "formula.functionList.TOROW.functionParameter.
|
|
8184
|
-
detail: "formula.functionList.TOROW.functionParameter.
|
|
8185
|
-
example: "
|
|
8186
|
-
require:
|
|
8282
|
+
name: "formula.functionList.TOROW.functionParameter.ignore.name",
|
|
8283
|
+
detail: "formula.functionList.TOROW.functionParameter.ignore.detail",
|
|
8284
|
+
example: "1",
|
|
8285
|
+
require: 0,
|
|
8286
|
+
repeat: 0
|
|
8287
|
+
},
|
|
8288
|
+
{
|
|
8289
|
+
name: "formula.functionList.TOROW.functionParameter.scanByColumn.name",
|
|
8290
|
+
detail: "formula.functionList.TOROW.functionParameter.scanByColumn.detail",
|
|
8291
|
+
example: "TRUE",
|
|
8292
|
+
require: 0,
|
|
8187
8293
|
repeat: 0
|
|
8188
8294
|
}
|
|
8189
8295
|
]
|
|
@@ -8297,18 +8403,25 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8297
8403
|
abstract: "formula.functionList.WRAPCOLS.abstract",
|
|
8298
8404
|
functionParameter: [
|
|
8299
8405
|
{
|
|
8300
|
-
name: "formula.functionList.WRAPCOLS.functionParameter.
|
|
8301
|
-
detail: "formula.functionList.WRAPCOLS.functionParameter.
|
|
8302
|
-
example: "
|
|
8406
|
+
name: "formula.functionList.WRAPCOLS.functionParameter.vector.name",
|
|
8407
|
+
detail: "formula.functionList.WRAPCOLS.functionParameter.vector.detail",
|
|
8408
|
+
example: "A2:G2",
|
|
8303
8409
|
require: 1,
|
|
8304
8410
|
repeat: 0
|
|
8305
8411
|
},
|
|
8306
8412
|
{
|
|
8307
|
-
name: "formula.functionList.WRAPCOLS.functionParameter.
|
|
8308
|
-
detail: "formula.functionList.WRAPCOLS.functionParameter.
|
|
8309
|
-
example: "
|
|
8413
|
+
name: "formula.functionList.WRAPCOLS.functionParameter.wrapCount.name",
|
|
8414
|
+
detail: "formula.functionList.WRAPCOLS.functionParameter.wrapCount.detail",
|
|
8415
|
+
example: "3",
|
|
8310
8416
|
require: 1,
|
|
8311
8417
|
repeat: 0
|
|
8418
|
+
},
|
|
8419
|
+
{
|
|
8420
|
+
name: "formula.functionList.WRAPCOLS.functionParameter.padWith.name",
|
|
8421
|
+
detail: "formula.functionList.WRAPCOLS.functionParameter.padWith.detail",
|
|
8422
|
+
example: '"x"',
|
|
8423
|
+
require: 0,
|
|
8424
|
+
repeat: 0
|
|
8312
8425
|
}
|
|
8313
8426
|
]
|
|
8314
8427
|
},
|
|
@@ -8319,18 +8432,25 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8319
8432
|
abstract: "formula.functionList.WRAPROWS.abstract",
|
|
8320
8433
|
functionParameter: [
|
|
8321
8434
|
{
|
|
8322
|
-
name: "formula.functionList.WRAPROWS.functionParameter.
|
|
8323
|
-
detail: "formula.functionList.WRAPROWS.functionParameter.
|
|
8324
|
-
example: "
|
|
8435
|
+
name: "formula.functionList.WRAPROWS.functionParameter.vector.name",
|
|
8436
|
+
detail: "formula.functionList.WRAPROWS.functionParameter.vector.detail",
|
|
8437
|
+
example: "A2:G2",
|
|
8325
8438
|
require: 1,
|
|
8326
8439
|
repeat: 0
|
|
8327
8440
|
},
|
|
8328
8441
|
{
|
|
8329
|
-
name: "formula.functionList.WRAPROWS.functionParameter.
|
|
8330
|
-
detail: "formula.functionList.WRAPROWS.functionParameter.
|
|
8331
|
-
example: "
|
|
8442
|
+
name: "formula.functionList.WRAPROWS.functionParameter.wrapCount.name",
|
|
8443
|
+
detail: "formula.functionList.WRAPROWS.functionParameter.wrapCount.detail",
|
|
8444
|
+
example: "3",
|
|
8332
8445
|
require: 1,
|
|
8333
8446
|
repeat: 0
|
|
8447
|
+
},
|
|
8448
|
+
{
|
|
8449
|
+
name: "formula.functionList.WRAPROWS.functionParameter.padWith.name",
|
|
8450
|
+
detail: "formula.functionList.WRAPROWS.functionParameter.padWith.detail",
|
|
8451
|
+
example: '"x"',
|
|
8452
|
+
require: 0,
|
|
8453
|
+
repeat: 0
|
|
8334
8454
|
}
|
|
8335
8455
|
]
|
|
8336
8456
|
},
|
|
@@ -8731,16 +8851,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8731
8851
|
abstract: "formula.functionList.COMBIN.abstract",
|
|
8732
8852
|
functionParameter: [
|
|
8733
8853
|
{
|
|
8734
|
-
name: "formula.functionList.COMBIN.functionParameter.
|
|
8735
|
-
detail: "formula.functionList.COMBIN.functionParameter.
|
|
8736
|
-
example: "
|
|
8854
|
+
name: "formula.functionList.COMBIN.functionParameter.number.name",
|
|
8855
|
+
detail: "formula.functionList.COMBIN.functionParameter.number.detail",
|
|
8856
|
+
example: "8",
|
|
8737
8857
|
require: 1,
|
|
8738
8858
|
repeat: 0
|
|
8739
8859
|
},
|
|
8740
8860
|
{
|
|
8741
|
-
name: "formula.functionList.COMBIN.functionParameter.
|
|
8742
|
-
detail: "formula.functionList.COMBIN.functionParameter.
|
|
8743
|
-
example: "
|
|
8861
|
+
name: "formula.functionList.COMBIN.functionParameter.numberChosen.name",
|
|
8862
|
+
detail: "formula.functionList.COMBIN.functionParameter.numberChosen.detail",
|
|
8863
|
+
example: "2",
|
|
8744
8864
|
require: 1,
|
|
8745
8865
|
repeat: 0
|
|
8746
8866
|
}
|
|
@@ -8753,16 +8873,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8753
8873
|
abstract: "formula.functionList.COMBINA.abstract",
|
|
8754
8874
|
functionParameter: [
|
|
8755
8875
|
{
|
|
8756
|
-
name: "formula.functionList.COMBINA.functionParameter.
|
|
8757
|
-
detail: "formula.functionList.COMBINA.functionParameter.
|
|
8758
|
-
example: "
|
|
8876
|
+
name: "formula.functionList.COMBINA.functionParameter.number.name",
|
|
8877
|
+
detail: "formula.functionList.COMBINA.functionParameter.number.detail",
|
|
8878
|
+
example: "8",
|
|
8759
8879
|
require: 1,
|
|
8760
8880
|
repeat: 0
|
|
8761
8881
|
},
|
|
8762
8882
|
{
|
|
8763
|
-
name: "formula.functionList.COMBINA.functionParameter.
|
|
8764
|
-
detail: "formula.functionList.COMBINA.functionParameter.
|
|
8765
|
-
example: "
|
|
8883
|
+
name: "formula.functionList.COMBINA.functionParameter.numberChosen.name",
|
|
8884
|
+
detail: "formula.functionList.COMBINA.functionParameter.numberChosen.detail",
|
|
8885
|
+
example: "2",
|
|
8766
8886
|
require: 1,
|
|
8767
8887
|
repeat: 0
|
|
8768
8888
|
}
|
|
@@ -8932,16 +9052,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8932
9052
|
abstract: "formula.functionList.FACT.abstract",
|
|
8933
9053
|
functionParameter: [
|
|
8934
9054
|
{
|
|
8935
|
-
name: "formula.functionList.FACT.functionParameter.
|
|
8936
|
-
detail: "formula.functionList.FACT.functionParameter.
|
|
8937
|
-
example: "
|
|
8938
|
-
require: 1,
|
|
8939
|
-
repeat: 0
|
|
8940
|
-
},
|
|
8941
|
-
{
|
|
8942
|
-
name: "formula.functionList.FACT.functionParameter.number2.name",
|
|
8943
|
-
detail: "formula.functionList.FACT.functionParameter.number2.detail",
|
|
8944
|
-
example: "A1:A20",
|
|
9055
|
+
name: "formula.functionList.FACT.functionParameter.number.name",
|
|
9056
|
+
detail: "formula.functionList.FACT.functionParameter.number.detail",
|
|
9057
|
+
example: "5",
|
|
8945
9058
|
require: 1,
|
|
8946
9059
|
repeat: 0
|
|
8947
9060
|
}
|
|
@@ -8954,16 +9067,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
8954
9067
|
abstract: "formula.functionList.FACTDOUBLE.abstract",
|
|
8955
9068
|
functionParameter: [
|
|
8956
9069
|
{
|
|
8957
|
-
name: "formula.functionList.FACTDOUBLE.functionParameter.
|
|
8958
|
-
detail: "formula.functionList.FACTDOUBLE.functionParameter.
|
|
8959
|
-
example: "
|
|
8960
|
-
require: 1,
|
|
8961
|
-
repeat: 0
|
|
8962
|
-
},
|
|
8963
|
-
{
|
|
8964
|
-
name: "formula.functionList.FACTDOUBLE.functionParameter.number2.name",
|
|
8965
|
-
detail: "formula.functionList.FACTDOUBLE.functionParameter.number2.detail",
|
|
8966
|
-
example: "A1:A20",
|
|
9070
|
+
name: "formula.functionList.FACTDOUBLE.functionParameter.number.name",
|
|
9071
|
+
detail: "formula.functionList.FACTDOUBLE.functionParameter.number.detail",
|
|
9072
|
+
example: "6",
|
|
8967
9073
|
require: 1,
|
|
8968
9074
|
repeat: 0
|
|
8969
9075
|
}
|
|
@@ -9051,16 +9157,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9051
9157
|
{
|
|
9052
9158
|
name: "formula.functionList.GCD.functionParameter.number1.name",
|
|
9053
9159
|
detail: "formula.functionList.GCD.functionParameter.number1.detail",
|
|
9054
|
-
example: "
|
|
9160
|
+
example: "5",
|
|
9055
9161
|
require: 1,
|
|
9056
9162
|
repeat: 0
|
|
9057
9163
|
},
|
|
9058
9164
|
{
|
|
9059
9165
|
name: "formula.functionList.GCD.functionParameter.number2.name",
|
|
9060
9166
|
detail: "formula.functionList.GCD.functionParameter.number2.detail",
|
|
9061
|
-
example: "
|
|
9062
|
-
require:
|
|
9063
|
-
repeat:
|
|
9167
|
+
example: "2",
|
|
9168
|
+
require: 0,
|
|
9169
|
+
repeat: 1
|
|
9064
9170
|
}
|
|
9065
9171
|
]
|
|
9066
9172
|
},
|
|
@@ -9071,16 +9177,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9071
9177
|
abstract: "formula.functionList.INT.abstract",
|
|
9072
9178
|
functionParameter: [
|
|
9073
9179
|
{
|
|
9074
|
-
name: "formula.functionList.INT.functionParameter.
|
|
9075
|
-
detail: "formula.functionList.INT.functionParameter.
|
|
9076
|
-
example: "
|
|
9077
|
-
require: 1,
|
|
9078
|
-
repeat: 0
|
|
9079
|
-
},
|
|
9080
|
-
{
|
|
9081
|
-
name: "formula.functionList.INT.functionParameter.number2.name",
|
|
9082
|
-
detail: "formula.functionList.INT.functionParameter.number2.detail",
|
|
9083
|
-
example: "A1:A20",
|
|
9180
|
+
name: "formula.functionList.INT.functionParameter.number.name",
|
|
9181
|
+
detail: "formula.functionList.INT.functionParameter.number.detail",
|
|
9182
|
+
example: "8.9",
|
|
9084
9183
|
require: 1,
|
|
9085
9184
|
repeat: 0
|
|
9086
9185
|
}
|
|
@@ -9117,16 +9216,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9117
9216
|
{
|
|
9118
9217
|
name: "formula.functionList.LCM.functionParameter.number1.name",
|
|
9119
9218
|
detail: "formula.functionList.LCM.functionParameter.number1.detail",
|
|
9120
|
-
example: "
|
|
9219
|
+
example: "5",
|
|
9121
9220
|
require: 1,
|
|
9122
9221
|
repeat: 0
|
|
9123
9222
|
},
|
|
9124
9223
|
{
|
|
9125
9224
|
name: "formula.functionList.LCM.functionParameter.number2.name",
|
|
9126
9225
|
detail: "formula.functionList.LCM.functionParameter.number2.detail",
|
|
9127
|
-
example: "
|
|
9128
|
-
require:
|
|
9129
|
-
repeat:
|
|
9226
|
+
example: "2",
|
|
9227
|
+
require: 0,
|
|
9228
|
+
repeat: 1
|
|
9130
9229
|
}
|
|
9131
9230
|
]
|
|
9132
9231
|
},
|
|
@@ -9211,16 +9310,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9211
9310
|
abstract: "formula.functionList.MDETERM.abstract",
|
|
9212
9311
|
functionParameter: [
|
|
9213
9312
|
{
|
|
9214
|
-
name: "formula.functionList.MDETERM.functionParameter.
|
|
9215
|
-
detail: "formula.functionList.MDETERM.functionParameter.
|
|
9216
|
-
example: "
|
|
9217
|
-
require: 1,
|
|
9218
|
-
repeat: 0
|
|
9219
|
-
},
|
|
9220
|
-
{
|
|
9221
|
-
name: "formula.functionList.MDETERM.functionParameter.number2.name",
|
|
9222
|
-
detail: "formula.functionList.MDETERM.functionParameter.number2.detail",
|
|
9223
|
-
example: "A1:A20",
|
|
9313
|
+
name: "formula.functionList.MDETERM.functionParameter.array.name",
|
|
9314
|
+
detail: "formula.functionList.MDETERM.functionParameter.array.detail",
|
|
9315
|
+
example: "{3,6,1;1,1,0;3,10,2}",
|
|
9224
9316
|
require: 1,
|
|
9225
9317
|
repeat: 0
|
|
9226
9318
|
}
|
|
@@ -9233,16 +9325,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9233
9325
|
abstract: "formula.functionList.MINVERSE.abstract",
|
|
9234
9326
|
functionParameter: [
|
|
9235
9327
|
{
|
|
9236
|
-
name: "formula.functionList.MINVERSE.functionParameter.
|
|
9237
|
-
detail: "formula.functionList.MINVERSE.functionParameter.
|
|
9238
|
-
example: "
|
|
9239
|
-
require: 1,
|
|
9240
|
-
repeat: 0
|
|
9241
|
-
},
|
|
9242
|
-
{
|
|
9243
|
-
name: "formula.functionList.MINVERSE.functionParameter.number2.name",
|
|
9244
|
-
detail: "formula.functionList.MINVERSE.functionParameter.number2.detail",
|
|
9245
|
-
example: "A1:A20",
|
|
9328
|
+
name: "formula.functionList.MINVERSE.functionParameter.array.name",
|
|
9329
|
+
detail: "formula.functionList.MINVERSE.functionParameter.array.detail",
|
|
9330
|
+
example: "{3,6,1;1,1,0;3,10,2}",
|
|
9246
9331
|
require: 1,
|
|
9247
9332
|
repeat: 0
|
|
9248
9333
|
}
|
|
@@ -9255,16 +9340,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9255
9340
|
abstract: "formula.functionList.MMULT.abstract",
|
|
9256
9341
|
functionParameter: [
|
|
9257
9342
|
{
|
|
9258
|
-
name: "formula.functionList.MMULT.functionParameter.
|
|
9259
|
-
detail: "formula.functionList.MMULT.functionParameter.
|
|
9260
|
-
example: "
|
|
9343
|
+
name: "formula.functionList.MMULT.functionParameter.array1.name",
|
|
9344
|
+
detail: "formula.functionList.MMULT.functionParameter.array1.detail",
|
|
9345
|
+
example: "A2:B3",
|
|
9261
9346
|
require: 1,
|
|
9262
9347
|
repeat: 0
|
|
9263
9348
|
},
|
|
9264
9349
|
{
|
|
9265
|
-
name: "formula.functionList.MMULT.functionParameter.
|
|
9266
|
-
detail: "formula.functionList.MMULT.functionParameter.
|
|
9267
|
-
example: "
|
|
9350
|
+
name: "formula.functionList.MMULT.functionParameter.array2.name",
|
|
9351
|
+
detail: "formula.functionList.MMULT.functionParameter.array2.detail",
|
|
9352
|
+
example: "A5:B6",
|
|
9268
9353
|
require: 1,
|
|
9269
9354
|
repeat: 0
|
|
9270
9355
|
}
|
|
@@ -9323,16 +9408,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9323
9408
|
{
|
|
9324
9409
|
name: "formula.functionList.MULTINOMIAL.functionParameter.number1.name",
|
|
9325
9410
|
detail: "formula.functionList.MULTINOMIAL.functionParameter.number1.detail",
|
|
9326
|
-
example: "
|
|
9411
|
+
example: "5",
|
|
9327
9412
|
require: 1,
|
|
9328
9413
|
repeat: 0
|
|
9329
9414
|
},
|
|
9330
9415
|
{
|
|
9331
9416
|
name: "formula.functionList.MULTINOMIAL.functionParameter.number2.name",
|
|
9332
9417
|
detail: "formula.functionList.MULTINOMIAL.functionParameter.number2.detail",
|
|
9333
|
-
example: "
|
|
9334
|
-
require:
|
|
9335
|
-
repeat:
|
|
9418
|
+
example: "2",
|
|
9419
|
+
require: 0,
|
|
9420
|
+
repeat: 1
|
|
9336
9421
|
}
|
|
9337
9422
|
]
|
|
9338
9423
|
},
|
|
@@ -9343,16 +9428,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9343
9428
|
abstract: "formula.functionList.MUNIT.abstract",
|
|
9344
9429
|
functionParameter: [
|
|
9345
9430
|
{
|
|
9346
|
-
name: "formula.functionList.MUNIT.functionParameter.
|
|
9347
|
-
detail: "formula.functionList.MUNIT.functionParameter.
|
|
9348
|
-
example: "
|
|
9349
|
-
require: 1,
|
|
9350
|
-
repeat: 0
|
|
9351
|
-
},
|
|
9352
|
-
{
|
|
9353
|
-
name: "formula.functionList.MUNIT.functionParameter.number2.name",
|
|
9354
|
-
detail: "formula.functionList.MUNIT.functionParameter.number2.detail",
|
|
9355
|
-
example: "A1:A20",
|
|
9431
|
+
name: "formula.functionList.MUNIT.functionParameter.dimension.name",
|
|
9432
|
+
detail: "formula.functionList.MUNIT.functionParameter.dimension.detail",
|
|
9433
|
+
example: "3",
|
|
9356
9434
|
require: 1,
|
|
9357
9435
|
repeat: 0
|
|
9358
9436
|
}
|
|
@@ -9431,16 +9509,16 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9431
9509
|
abstract: "formula.functionList.QUOTIENT.abstract",
|
|
9432
9510
|
functionParameter: [
|
|
9433
9511
|
{
|
|
9434
|
-
name: "formula.functionList.QUOTIENT.functionParameter.
|
|
9435
|
-
detail: "formula.functionList.QUOTIENT.functionParameter.
|
|
9436
|
-
example: "
|
|
9512
|
+
name: "formula.functionList.QUOTIENT.functionParameter.numerator.name",
|
|
9513
|
+
detail: "formula.functionList.QUOTIENT.functionParameter.numerator.detail",
|
|
9514
|
+
example: "5",
|
|
9437
9515
|
require: 1,
|
|
9438
9516
|
repeat: 0
|
|
9439
9517
|
},
|
|
9440
9518
|
{
|
|
9441
|
-
name: "formula.functionList.QUOTIENT.functionParameter.
|
|
9442
|
-
detail: "formula.functionList.QUOTIENT.functionParameter.
|
|
9443
|
-
example: "
|
|
9519
|
+
name: "formula.functionList.QUOTIENT.functionParameter.denominator.name",
|
|
9520
|
+
detail: "formula.functionList.QUOTIENT.functionParameter.denominator.detail",
|
|
9521
|
+
example: "2",
|
|
9444
9522
|
require: 1,
|
|
9445
9523
|
repeat: 0
|
|
9446
9524
|
}
|
|
@@ -9658,16 +9736,30 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9658
9736
|
abstract: "formula.functionList.SERIESSUM.abstract",
|
|
9659
9737
|
functionParameter: [
|
|
9660
9738
|
{
|
|
9661
|
-
name: "formula.functionList.SERIESSUM.functionParameter.
|
|
9662
|
-
detail: "formula.functionList.SERIESSUM.functionParameter.
|
|
9663
|
-
example: "
|
|
9739
|
+
name: "formula.functionList.SERIESSUM.functionParameter.x.name",
|
|
9740
|
+
detail: "formula.functionList.SERIESSUM.functionParameter.x.detail",
|
|
9741
|
+
example: "0.785398163",
|
|
9664
9742
|
require: 1,
|
|
9665
9743
|
repeat: 0
|
|
9666
9744
|
},
|
|
9667
9745
|
{
|
|
9668
|
-
name: "formula.functionList.SERIESSUM.functionParameter.
|
|
9669
|
-
detail: "formula.functionList.SERIESSUM.functionParameter.
|
|
9670
|
-
example: "
|
|
9746
|
+
name: "formula.functionList.SERIESSUM.functionParameter.n.name",
|
|
9747
|
+
detail: "formula.functionList.SERIESSUM.functionParameter.n.detail",
|
|
9748
|
+
example: "0",
|
|
9749
|
+
require: 1,
|
|
9750
|
+
repeat: 0
|
|
9751
|
+
},
|
|
9752
|
+
{
|
|
9753
|
+
name: "formula.functionList.SERIESSUM.functionParameter.m.name",
|
|
9754
|
+
detail: "formula.functionList.SERIESSUM.functionParameter.m.detail",
|
|
9755
|
+
example: "2",
|
|
9756
|
+
require: 1,
|
|
9757
|
+
repeat: 0
|
|
9758
|
+
},
|
|
9759
|
+
{
|
|
9760
|
+
name: "formula.functionList.SERIESSUM.functionParameter.coefficients.name",
|
|
9761
|
+
detail: "formula.functionList.SERIESSUM.functionParameter.coefficients.detail",
|
|
9762
|
+
example: "{1,-0.5,0.041666667,-0.001388889}",
|
|
9671
9763
|
require: 1,
|
|
9672
9764
|
repeat: 0
|
|
9673
9765
|
}
|
|
@@ -9680,17 +9772,31 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9680
9772
|
abstract: "formula.functionList.SEQUENCE.abstract",
|
|
9681
9773
|
functionParameter: [
|
|
9682
9774
|
{
|
|
9683
|
-
name: "formula.functionList.SEQUENCE.functionParameter.
|
|
9684
|
-
detail: "formula.functionList.SEQUENCE.functionParameter.
|
|
9685
|
-
example: "
|
|
9775
|
+
name: "formula.functionList.SEQUENCE.functionParameter.rows.name",
|
|
9776
|
+
detail: "formula.functionList.SEQUENCE.functionParameter.rows.detail",
|
|
9777
|
+
example: "4",
|
|
9686
9778
|
require: 1,
|
|
9687
9779
|
repeat: 0
|
|
9688
9780
|
},
|
|
9689
9781
|
{
|
|
9690
|
-
name: "formula.functionList.SEQUENCE.functionParameter.
|
|
9691
|
-
detail: "formula.functionList.SEQUENCE.functionParameter.
|
|
9692
|
-
example: "
|
|
9693
|
-
require:
|
|
9782
|
+
name: "formula.functionList.SEQUENCE.functionParameter.columns.name",
|
|
9783
|
+
detail: "formula.functionList.SEQUENCE.functionParameter.columns.detail",
|
|
9784
|
+
example: "5",
|
|
9785
|
+
require: 0,
|
|
9786
|
+
repeat: 0
|
|
9787
|
+
},
|
|
9788
|
+
{
|
|
9789
|
+
name: "formula.functionList.SEQUENCE.functionParameter.start.name",
|
|
9790
|
+
detail: "formula.functionList.SEQUENCE.functionParameter.start.detail",
|
|
9791
|
+
example: "1",
|
|
9792
|
+
require: 0,
|
|
9793
|
+
repeat: 0
|
|
9794
|
+
},
|
|
9795
|
+
{
|
|
9796
|
+
name: "formula.functionList.SEQUENCE.functionParameter.step.name",
|
|
9797
|
+
detail: "formula.functionList.SEQUENCE.functionParameter.step.detail",
|
|
9798
|
+
example: "1",
|
|
9799
|
+
require: 0,
|
|
9694
9800
|
repeat: 0
|
|
9695
9801
|
}
|
|
9696
9802
|
]
|
|
@@ -9702,16 +9808,9 @@ const FUNCTION_LIST_ARRAY = [], FUNCTION_LIST_COMPATIBILITY = [
|
|
|
9702
9808
|
abstract: "formula.functionList.SIGN.abstract",
|
|
9703
9809
|
functionParameter: [
|
|
9704
9810
|
{
|
|
9705
|
-
name: "formula.functionList.SIGN.functionParameter.
|
|
9706
|
-
detail: "formula.functionList.SIGN.functionParameter.
|
|
9707
|
-
example: "
|
|
9708
|
-
require: 1,
|
|
9709
|
-
repeat: 0
|
|
9710
|
-
},
|
|
9711
|
-
{
|
|
9712
|
-
name: "formula.functionList.SIGN.functionParameter.number2.name",
|
|
9713
|
-
detail: "formula.functionList.SIGN.functionParameter.number2.detail",
|
|
9714
|
-
example: "A1:A20",
|
|
9811
|
+
name: "formula.functionList.SIGN.functionParameter.number.name",
|
|
9812
|
+
detail: "formula.functionList.SIGN.functionParameter.number.detail",
|
|
9813
|
+
example: "10",
|
|
9715
9814
|
require: 1,
|
|
9716
9815
|
repeat: 0
|
|
9717
9816
|
}
|
|
@@ -13793,9 +13892,9 @@ var __defProp$d = Object.defineProperty, __getOwnPropDesc$d = Object.getOwnPrope
|
|
|
13793
13892
|
const IDescriptionService = createIdentifier("formula-ui.description-service");
|
|
13794
13893
|
var _a7;
|
|
13795
13894
|
let DescriptionService = (_a7 = class {
|
|
13796
|
-
constructor(
|
|
13895
|
+
constructor(_functionService, _localeService, _configService) {
|
|
13797
13896
|
__publicField(this, "_descriptions", []);
|
|
13798
|
-
this.
|
|
13897
|
+
this._functionService = _functionService, this._localeService = _localeService, this._configService = _configService, this._initialize();
|
|
13799
13898
|
}
|
|
13800
13899
|
dispose() {
|
|
13801
13900
|
this._localeService.localeChanged$.complete();
|
|
@@ -13858,6 +13957,7 @@ let DescriptionService = (_a7 = class {
|
|
|
13858
13957
|
}), this._initDescription(), this._registerDescriptions();
|
|
13859
13958
|
}
|
|
13860
13959
|
_initDescription() {
|
|
13960
|
+
var _a23;
|
|
13861
13961
|
const functions = [
|
|
13862
13962
|
...functionArray,
|
|
13863
13963
|
...functionCompatibility,
|
|
@@ -13875,8 +13975,8 @@ let DescriptionService = (_a7 = class {
|
|
|
13875
13975
|
...functionText,
|
|
13876
13976
|
...functionUniver,
|
|
13877
13977
|
...functionWeb
|
|
13878
|
-
].map((item) => item[1]), filterFunctionList = FUNCTION_LIST.filter((item) => functions.includes(item.functionName));
|
|
13879
|
-
this._descriptions = filterFunctionList.concat(
|
|
13978
|
+
].map((item) => item[1]), filterFunctionList = FUNCTION_LIST.filter((item) => functions.includes(item.functionName)), config = this._configService.getConfig(PLUGIN_CONFIG_KEY_BASE);
|
|
13979
|
+
this._descriptions = filterFunctionList.concat((_a23 = config == null ? void 0 : config.description) != null ? _a23 : []);
|
|
13880
13980
|
}
|
|
13881
13981
|
_registerDescriptions() {
|
|
13882
13982
|
const localeService = this._localeService, functionListLocale = this._descriptions.map((functionInfo) => ({
|
|
@@ -13896,8 +13996,9 @@ let DescriptionService = (_a7 = class {
|
|
|
13896
13996
|
}
|
|
13897
13997
|
}, __name(_a7, "DescriptionService"), _a7);
|
|
13898
13998
|
DescriptionService = __decorateClass$d([
|
|
13899
|
-
__decorateParam$d(
|
|
13900
|
-
__decorateParam$d(
|
|
13999
|
+
__decorateParam$d(0, IFunctionService),
|
|
14000
|
+
__decorateParam$d(1, Inject(LocaleService)),
|
|
14001
|
+
__decorateParam$d(2, IConfigService)
|
|
13901
14002
|
], DescriptionService);
|
|
13902
14003
|
const formulaSelectFunctionSelect = "univer-formula-select-function-select", formulaSelectFunctionResult = "univer-formula-select-function-result", formulaSelectFunctionResultItem = "univer-formula-select-function-result-item", formulaSelectFunctionResultItemNameLight = "univer-formula-select-function-result-item-name-light", formulaSelectFunctionResultItemSelected = "univer-formula-select-function-result-item-selected", formulaSelectFunctionResultItemActive = "univer-formula-select-function-result-item-active", formulaSelectFunctionContent = "univer-formula-select-function-content", styles = {
|
|
13903
14004
|
formulaSelectFunctionSelect,
|
|
@@ -14048,76 +14149,7 @@ const OtherFormulaMarkDirty = {
|
|
|
14048
14149
|
handler() {
|
|
14049
14150
|
return !0;
|
|
14050
14151
|
}
|
|
14051
|
-
};
|
|
14052
|
-
function InsertFunctionMenuItemFactory(accessor) {
|
|
14053
|
-
return {
|
|
14054
|
-
id: InsertFunctionOperation.id,
|
|
14055
|
-
icon: "FunctionSingle",
|
|
14056
|
-
tooltip: "formula.insert.tooltip",
|
|
14057
|
-
group: MenuGroup.TOOLBAR_FORMULAS_INSERT,
|
|
14058
|
-
type: MenuItemType.SELECTOR,
|
|
14059
|
-
positions: [MenuPosition.TOOLBAR_START],
|
|
14060
|
-
selections: [
|
|
14061
|
-
{
|
|
14062
|
-
label: "SUM",
|
|
14063
|
-
value: "SUM",
|
|
14064
|
-
icon: "SumSingle"
|
|
14065
|
-
},
|
|
14066
|
-
{
|
|
14067
|
-
label: "AVERAGE",
|
|
14068
|
-
value: "AVERAGE",
|
|
14069
|
-
icon: "AvgSingle"
|
|
14070
|
-
},
|
|
14071
|
-
{
|
|
14072
|
-
label: "COUNT",
|
|
14073
|
-
value: "COUNT",
|
|
14074
|
-
icon: "CntSingle"
|
|
14075
|
-
},
|
|
14076
|
-
{
|
|
14077
|
-
label: "MAX",
|
|
14078
|
-
value: "MAX",
|
|
14079
|
-
icon: "MaxSingle"
|
|
14080
|
-
},
|
|
14081
|
-
{
|
|
14082
|
-
label: "MIN",
|
|
14083
|
-
value: "MIN",
|
|
14084
|
-
icon: "MinSingle"
|
|
14085
|
-
}
|
|
14086
|
-
],
|
|
14087
|
-
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
|
|
14088
|
-
disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
14089
|
-
};
|
|
14090
|
-
}
|
|
14091
|
-
__name(InsertFunctionMenuItemFactory, "InsertFunctionMenuItemFactory");
|
|
14092
|
-
function MoreFunctionsMenuItemFactory(accessor) {
|
|
14093
|
-
return {
|
|
14094
|
-
id: MoreFunctionsOperation.id,
|
|
14095
|
-
title: "formula.insert.more",
|
|
14096
|
-
positions: InsertFunctionOperation.id,
|
|
14097
|
-
type: MenuItemType.BUTTON
|
|
14098
|
-
};
|
|
14099
|
-
}
|
|
14100
|
-
__name(MoreFunctionsMenuItemFactory, "MoreFunctionsMenuItemFactory");
|
|
14101
|
-
function menuClipboardDisabledObservable(injector) {
|
|
14102
|
-
return injector.get(IUniverInstanceService).getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_SHEET).pipe(
|
|
14103
|
-
switchMap((workbook) => workbook ? injector.get(IClipboardInterfaceService) ? new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard)) : of(!0) : of(!0))
|
|
14104
|
-
);
|
|
14105
|
-
}
|
|
14106
|
-
__name(menuClipboardDisabledObservable, "menuClipboardDisabledObservable");
|
|
14107
|
-
function PasteFormulaMenuItemFactory(accessor) {
|
|
14108
|
-
return {
|
|
14109
|
-
id: SheetOnlyPasteFormulaCommand.id,
|
|
14110
|
-
type: MenuItemType.BUTTON,
|
|
14111
|
-
title: "formula.operation.pasteFormula",
|
|
14112
|
-
positions: [PASTE_SPECIAL_MENU_ID],
|
|
14113
|
-
disabled$: menuClipboardDisabledObservable(accessor).pipe(
|
|
14114
|
-
combineLatestWith(getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission] })),
|
|
14115
|
-
map(([d1, d2]) => d1 || d2)
|
|
14116
|
-
)
|
|
14117
|
-
};
|
|
14118
|
-
}
|
|
14119
|
-
__name(PasteFormulaMenuItemFactory, "PasteFormulaMenuItemFactory");
|
|
14120
|
-
const META_KEY_CTRL_AND_SHIFT = "meta_key_ctrl_And_Shift";
|
|
14152
|
+
}, META_KEY_CTRL_AND_SHIFT = "meta_key_ctrl_And_Shift";
|
|
14121
14153
|
function whenEditorStandalone(contextService) {
|
|
14122
14154
|
return contextService.getContextValue(FOCUSING_DOC) && contextService.getContextValue(FOCUSING_UNIVER_EDITOR) && contextService.getContextValue(FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE);
|
|
14123
14155
|
}
|
|
@@ -14216,27 +14248,102 @@ function singleEditorPromptSelectionShortcutItem() {
|
|
|
14216
14248
|
return shortcutList;
|
|
14217
14249
|
}
|
|
14218
14250
|
__name(singleEditorPromptSelectionShortcutItem, "singleEditorPromptSelectionShortcutItem");
|
|
14251
|
+
function InsertFunctionMenuItemFactory(accessor) {
|
|
14252
|
+
return {
|
|
14253
|
+
id: InsertFunctionOperation.id,
|
|
14254
|
+
icon: "FunctionSingle",
|
|
14255
|
+
tooltip: "formula.insert.tooltip",
|
|
14256
|
+
type: MenuItemType.SELECTOR,
|
|
14257
|
+
selections: [
|
|
14258
|
+
{
|
|
14259
|
+
label: "SUM",
|
|
14260
|
+
value: "SUM",
|
|
14261
|
+
icon: "SumSingle"
|
|
14262
|
+
},
|
|
14263
|
+
{
|
|
14264
|
+
label: "AVERAGE",
|
|
14265
|
+
value: "AVERAGE",
|
|
14266
|
+
icon: "AvgSingle"
|
|
14267
|
+
},
|
|
14268
|
+
{
|
|
14269
|
+
label: "COUNT",
|
|
14270
|
+
value: "COUNT",
|
|
14271
|
+
icon: "CntSingle"
|
|
14272
|
+
},
|
|
14273
|
+
{
|
|
14274
|
+
label: "MAX",
|
|
14275
|
+
value: "MAX",
|
|
14276
|
+
icon: "MaxSingle"
|
|
14277
|
+
},
|
|
14278
|
+
{
|
|
14279
|
+
label: "MIN",
|
|
14280
|
+
value: "MIN",
|
|
14281
|
+
icon: "MinSingle"
|
|
14282
|
+
}
|
|
14283
|
+
],
|
|
14284
|
+
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET),
|
|
14285
|
+
disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission], rangeTypes: [RangeProtectionPermissionEditPoint] })
|
|
14286
|
+
};
|
|
14287
|
+
}
|
|
14288
|
+
__name(InsertFunctionMenuItemFactory, "InsertFunctionMenuItemFactory");
|
|
14289
|
+
function MoreFunctionsMenuItemFactory(accessor) {
|
|
14290
|
+
return {
|
|
14291
|
+
id: MoreFunctionsOperation.id,
|
|
14292
|
+
title: "formula.insert.more",
|
|
14293
|
+
type: MenuItemType.BUTTON
|
|
14294
|
+
};
|
|
14295
|
+
}
|
|
14296
|
+
__name(MoreFunctionsMenuItemFactory, "MoreFunctionsMenuItemFactory");
|
|
14297
|
+
function menuClipboardDisabledObservable(injector) {
|
|
14298
|
+
return injector.get(IUniverInstanceService).getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_SHEET).pipe(
|
|
14299
|
+
switchMap((workbook) => workbook ? injector.get(IClipboardInterfaceService) ? new Observable((subscriber) => subscriber.next(!injector.get(IClipboardInterfaceService).supportClipboard)) : of(!0) : of(!0))
|
|
14300
|
+
);
|
|
14301
|
+
}
|
|
14302
|
+
__name(menuClipboardDisabledObservable, "menuClipboardDisabledObservable");
|
|
14303
|
+
function PasteFormulaMenuItemFactory(accessor) {
|
|
14304
|
+
return {
|
|
14305
|
+
id: SheetOnlyPasteFormulaCommand.id,
|
|
14306
|
+
type: MenuItemType.BUTTON,
|
|
14307
|
+
title: "formula.operation.pasteFormula",
|
|
14308
|
+
disabled$: menuClipboardDisabledObservable(accessor).pipe(
|
|
14309
|
+
combineLatestWith(getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], rangeTypes: [RangeProtectionPermissionEditPoint], worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission] })),
|
|
14310
|
+
map(([d1, d2]) => d1 || d2)
|
|
14311
|
+
)
|
|
14312
|
+
};
|
|
14313
|
+
}
|
|
14314
|
+
__name(PasteFormulaMenuItemFactory, "PasteFormulaMenuItemFactory");
|
|
14315
|
+
const menuSchema = {
|
|
14316
|
+
[RibbonStartGroup.FORMULAS_INSERT]: {
|
|
14317
|
+
[InsertFunctionOperation.id]: {
|
|
14318
|
+
order: 1,
|
|
14319
|
+
menuItemFactory: InsertFunctionMenuItemFactory,
|
|
14320
|
+
[MoreFunctionsOperation.id]: {
|
|
14321
|
+
order: 1,
|
|
14322
|
+
menuItemFactory: MoreFunctionsMenuItemFactory
|
|
14323
|
+
}
|
|
14324
|
+
}
|
|
14325
|
+
},
|
|
14326
|
+
[PASTE_SPECIAL_MENU_ID]: {
|
|
14327
|
+
[SheetOnlyPasteFormulaCommand.id]: {
|
|
14328
|
+
order: 4,
|
|
14329
|
+
menuItemFactory: PasteFormulaMenuItemFactory
|
|
14330
|
+
}
|
|
14331
|
+
}
|
|
14332
|
+
};
|
|
14219
14333
|
var __defProp$c = Object.defineProperty, __getOwnPropDesc$c = Object.getOwnPropertyDescriptor, __decorateClass$c = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
14220
14334
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14221
14335
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
14222
14336
|
return kind && result && __defProp$c(target, key, result), result;
|
|
14223
|
-
}, "__decorateClass$c"), __decorateParam$c = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$c");
|
|
14224
|
-
const DefaultSheetFormulaConfig = {};
|
|
14225
|
-
var _a8;
|
|
14337
|
+
}, "__decorateClass$c"), __decorateParam$c = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$c"), _a8;
|
|
14226
14338
|
let FormulaUIController = (_a8 = class extends Disposable {
|
|
14227
|
-
constructor(
|
|
14228
|
-
super(), this.
|
|
14339
|
+
constructor(_injector, _menuManagerService, _commandService, _shortcutService, _uiPartsService, _renderManagerService, _componentManager) {
|
|
14340
|
+
super(), this._injector = _injector, this._menuManagerService = _menuManagerService, this._commandService = _commandService, this._shortcutService = _shortcutService, this._uiPartsService = _uiPartsService, this._renderManagerService = _renderManagerService, this._componentManager = _componentManager, this._initialize();
|
|
14229
14341
|
}
|
|
14230
14342
|
_initialize() {
|
|
14231
14343
|
this._registerCommands(), this._registerMenus(), this._registerShortcuts(), this._registerComponents(), this._registerRenderModules();
|
|
14232
14344
|
}
|
|
14233
14345
|
_registerMenus() {
|
|
14234
|
-
|
|
14235
|
-
[InsertFunctionMenuItemFactory, MoreFunctionsMenuItemFactory, PasteFormulaMenuItemFactory].forEach(
|
|
14236
|
-
(factory) => {
|
|
14237
|
-
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(factory), menu));
|
|
14238
|
-
}
|
|
14239
|
-
);
|
|
14346
|
+
this._menuManagerService.mergeMenu(menuSchema);
|
|
14240
14347
|
}
|
|
14241
14348
|
_registerCommands() {
|
|
14242
14349
|
[
|
|
@@ -14274,13 +14381,13 @@ let FormulaUIController = (_a8 = class extends Disposable {
|
|
|
14274
14381
|
}, __name(_a8, "FormulaUIController"), _a8);
|
|
14275
14382
|
FormulaUIController = __decorateClass$c([
|
|
14276
14383
|
OnLifecycle(LifecycleStages.Ready, FormulaUIController),
|
|
14277
|
-
__decorateParam$c(
|
|
14278
|
-
__decorateParam$c(
|
|
14279
|
-
__decorateParam$c(
|
|
14280
|
-
__decorateParam$c(
|
|
14281
|
-
__decorateParam$c(
|
|
14282
|
-
__decorateParam$c(
|
|
14283
|
-
__decorateParam$c(
|
|
14384
|
+
__decorateParam$c(0, Inject(Injector)),
|
|
14385
|
+
__decorateParam$c(1, IMenuManagerService),
|
|
14386
|
+
__decorateParam$c(2, ICommandService),
|
|
14387
|
+
__decorateParam$c(3, IShortcutService),
|
|
14388
|
+
__decorateParam$c(4, IUIPartsService),
|
|
14389
|
+
__decorateParam$c(5, IRenderManagerService),
|
|
14390
|
+
__decorateParam$c(6, Inject(ComponentManager))
|
|
14284
14391
|
], FormulaUIController);
|
|
14285
14392
|
var __defProp$b = Object.defineProperty, __getOwnPropDesc$b = Object.getOwnPropertyDescriptor, __decorateClass$b = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
14286
14393
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -14827,6 +14934,14 @@ function formulaDataItemToCellData(formulaDataItem) {
|
|
|
14827
14934
|
return checkFormulaId && (cellData.si = si), checkFormulaString && x === 0 && y === 0 && (cellData.f = f2), cellData.f === void 0 && (cellData.f = null), cellData.si === void 0 && (cellData.si = null), cellData;
|
|
14828
14935
|
}
|
|
14829
14936
|
__name(formulaDataItemToCellData, "formulaDataItemToCellData");
|
|
14937
|
+
function formulaDataToCellData(formulaData) {
|
|
14938
|
+
const cellData = new ObjectMatrix({});
|
|
14939
|
+
return new ObjectMatrix(formulaData).forValue((r, c, formulaDataItem) => {
|
|
14940
|
+
const cellDataItem = formulaDataItemToCellData(formulaDataItem);
|
|
14941
|
+
cellData.setValue(r, c, cellDataItem);
|
|
14942
|
+
}), cellData.clone();
|
|
14943
|
+
}
|
|
14944
|
+
__name(formulaDataToCellData, "formulaDataToCellData");
|
|
14830
14945
|
function isFormulaDataItem(cell) {
|
|
14831
14946
|
const formulaString = (cell == null ? void 0 : cell.f) || "", formulaId = (cell == null ? void 0 : cell.si) || "", checkFormulaString = isFormulaString(formulaString), checkFormulaId = isFormulaId(formulaId);
|
|
14832
14947
|
return !!(checkFormulaString || checkFormulaId);
|
|
@@ -14869,7 +14984,8 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
14869
14984
|
this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_DOC),
|
|
14870
14985
|
this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SLIDE)
|
|
14871
14986
|
).pipe(
|
|
14872
|
-
filter((unit) => this._editorService.getEditor(unit.getUnitId()) == null)
|
|
14987
|
+
filter((unit) => this._editorService.getEditor(unit.getUnitId()) == null),
|
|
14988
|
+
filter((unit) => !isInternalEditorID(unit.getUnitId()))
|
|
14873
14989
|
).subscribe((unit) => this._handleUnitAdded(unit))
|
|
14874
14990
|
)
|
|
14875
14991
|
), this.disposeWithMe(
|
|
@@ -14893,7 +15009,18 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
14893
15009
|
[sheetId]: newSheetFormulaData
|
|
14894
15010
|
}
|
|
14895
15011
|
};
|
|
14896
|
-
this.
|
|
15012
|
+
this._commandService.executeCommand(
|
|
15013
|
+
SetRangeValuesMutation.id,
|
|
15014
|
+
{
|
|
15015
|
+
unitId,
|
|
15016
|
+
subUnitId: sheetId,
|
|
15017
|
+
cellValue: formulaDataToCellData(newSheetFormulaData)
|
|
15018
|
+
},
|
|
15019
|
+
{
|
|
15020
|
+
onlyLocal: !0,
|
|
15021
|
+
fromFormula: !0
|
|
15022
|
+
}
|
|
15023
|
+
), this._formulaDataModel.updateArrayFormulaCellData(unitId, sheetId, cellValue), this._formulaDataModel.updateArrayFormulaRange(unitId, sheetId, cellValue), this._commandService.executeCommand(
|
|
14897
15024
|
SetFormulaDataMutation.id,
|
|
14898
15025
|
{
|
|
14899
15026
|
formulaData: newFormulaData
|
|
@@ -14963,6 +15090,15 @@ let UpdateFormulaController = (_a10 = class extends Disposable {
|
|
|
14963
15090
|
{
|
|
14964
15091
|
onlyLocal: !0
|
|
14965
15092
|
}
|
|
15093
|
+
), this._commandService.executeCommand(
|
|
15094
|
+
SetFormulaCalculationStartMutation.id,
|
|
15095
|
+
{
|
|
15096
|
+
commands: [],
|
|
15097
|
+
forceCalculation: !0
|
|
15098
|
+
},
|
|
15099
|
+
{
|
|
15100
|
+
onlyLocal: !0
|
|
15101
|
+
}
|
|
14966
15102
|
);
|
|
14967
15103
|
}
|
|
14968
15104
|
_getUpdateFormula(command) {
|
|
@@ -16247,8 +16383,9 @@ var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPrope
|
|
|
16247
16383
|
const sheetEditorUnitIds = [DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY];
|
|
16248
16384
|
var _a19;
|
|
16249
16385
|
let PromptController = (_a19 = class extends Disposable {
|
|
16250
|
-
constructor(_commandService, _contextService,
|
|
16386
|
+
constructor(_commandService, _contextService, _editorBridgeService, _formulaPromptService, _lexerTreeBuilder, _renderManagerService, _themeService, _sheetsSelectionsService, _refSelectionsService, _univerInstanceService, _descriptionService, _docSelectionManagerService, _contextMenuService, _editorService, _layoutService) {
|
|
16251
16387
|
super();
|
|
16388
|
+
__publicField(this, "_listenInputCache", /* @__PURE__ */ new Set());
|
|
16252
16389
|
__publicField(this, "_formulaRefColors", []);
|
|
16253
16390
|
__publicField(this, "_previousSequenceNodes");
|
|
16254
16391
|
__publicField(this, "_previousRangesCount", 0);
|
|
@@ -16266,7 +16403,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16266
16403
|
__publicField(this, "_currentlyWorkingRefRenderer", null);
|
|
16267
16404
|
__publicField(this, "_selectionsChangeDisposables");
|
|
16268
16405
|
__publicField(this, "_isSelectingMode", !1);
|
|
16269
|
-
this._commandService = _commandService, this._contextService = _contextService, this.
|
|
16406
|
+
this._commandService = _commandService, this._contextService = _contextService, this._editorBridgeService = _editorBridgeService, this._formulaPromptService = _formulaPromptService, this._lexerTreeBuilder = _lexerTreeBuilder, this._renderManagerService = _renderManagerService, this._themeService = _themeService, this._sheetsSelectionsService = _sheetsSelectionsService, this._refSelectionsService = _refSelectionsService, this._univerInstanceService = _univerInstanceService, this._descriptionService = _descriptionService, this._docSelectionManagerService = _docSelectionManagerService, this._contextMenuService = _contextMenuService, this._editorService = _editorService, this._layoutService = _layoutService, this._initialize();
|
|
16270
16407
|
}
|
|
16271
16408
|
// TODO@wzhudev: selection render service would be a render unit, we we cannot
|
|
16272
16409
|
// easily access it here.
|
|
@@ -16309,7 +16446,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16309
16446
|
}
|
|
16310
16447
|
_initialCursorSync() {
|
|
16311
16448
|
this.disposeWithMe(
|
|
16312
|
-
this.
|
|
16449
|
+
this._docSelectionManagerService.textSelection$.subscribe((params) => {
|
|
16313
16450
|
var _a23;
|
|
16314
16451
|
if ((params == null ? void 0 : params.unitId) == null)
|
|
16315
16452
|
return;
|
|
@@ -16323,13 +16460,20 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16323
16460
|
}
|
|
16324
16461
|
_initialEditorInputChange() {
|
|
16325
16462
|
const arrows = [KeyCode.ARROW_DOWN, KeyCode.ARROW_UP, KeyCode.ARROW_LEFT, KeyCode.ARROW_RIGHT, KeyCode.CTRL, KeyCode.SHIFT];
|
|
16326
|
-
this.
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16463
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_DOC).subscribe((documentDataModel) => {
|
|
16464
|
+
var _a23;
|
|
16465
|
+
const unitId = documentDataModel == null ? void 0 : documentDataModel.getUnitId();
|
|
16466
|
+
if (unitId == null || this._listenInputCache.has(unitId) || this._editorService.getEditor(unitId) == null)
|
|
16467
|
+
return;
|
|
16468
|
+
const docSelectionRenderService = (_a23 = this._renderManagerService.getRenderById(unitId)) == null ? void 0 : _a23.with(DocSelectionRenderService);
|
|
16469
|
+
docSelectionRenderService && this.disposeWithMe(
|
|
16470
|
+
docSelectionRenderService.onInputBefore$.subscribe((param) => {
|
|
16471
|
+
this._previousSequenceNodes = null, this._previousInsertRefStringIndex = null, this._selectionRenderService.setSkipLastEnabled(!0);
|
|
16472
|
+
const event = param == null ? void 0 : param.event;
|
|
16473
|
+
event && (arrows.includes(event.which) ? this._inputPanelState = 2 : (this._arrowMoveActionState !== 1 && (this._arrowMoveActionState = 2), this._inputPanelState = 1), event.which !== KeyCode.F4 && (this._userCursorMove = !1));
|
|
16474
|
+
})
|
|
16475
|
+
), this._listenInputCache.add(unitId);
|
|
16476
|
+
});
|
|
16333
16477
|
}
|
|
16334
16478
|
_closeRangePromptWhenEditorInvisible() {
|
|
16335
16479
|
this.disposeWithMe(
|
|
@@ -16410,7 +16554,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16410
16554
|
_initAcceptFormula() {
|
|
16411
16555
|
this.disposeWithMe(
|
|
16412
16556
|
this._formulaPromptService.acceptFormulaName$.subscribe((formulaString) => {
|
|
16413
|
-
const activeRange = this.
|
|
16557
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
16414
16558
|
if (activeRange == null) {
|
|
16415
16559
|
this._hideFunctionPanel();
|
|
16416
16560
|
return;
|
|
@@ -16437,7 +16581,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16437
16581
|
);
|
|
16438
16582
|
}
|
|
16439
16583
|
_changeFunctionPanelState() {
|
|
16440
|
-
const activeRange = this.
|
|
16584
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
16441
16585
|
if (activeRange == null) {
|
|
16442
16586
|
this._hideFunctionPanel();
|
|
16443
16587
|
return;
|
|
@@ -16500,7 +16644,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16500
16644
|
* @returns Return the character under the current cursor in the editor.
|
|
16501
16645
|
*/
|
|
16502
16646
|
_getCurrentChar() {
|
|
16503
|
-
const activeRange = this.
|
|
16647
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
16504
16648
|
if (activeRange == null)
|
|
16505
16649
|
return;
|
|
16506
16650
|
const { startOffset } = activeRange, config = this._getCurrentBodyDataStreamAndOffset();
|
|
@@ -16550,7 +16694,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16550
16694
|
this._contextService.setContextValue(FOCUSING_EDITOR_INPUT_FORMULA, !0), this._contextService.setContextValue(DISABLE_NORMAL_SELECTIONS, !0), this._contextService.setContextValue(UNI_DISABLE_CHANGING_FOCUS_KEY, !0);
|
|
16551
16695
|
const lastSequenceNodes = this._lexerTreeBuilder.sequenceNodesBuilder(config.dataStream) || [];
|
|
16552
16696
|
this._formulaPromptService.setSequenceNodes(lastSequenceNodes);
|
|
16553
|
-
const activeRange = this.
|
|
16697
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
16554
16698
|
if (activeRange == null)
|
|
16555
16699
|
return;
|
|
16556
16700
|
const { startOffset } = activeRange;
|
|
@@ -16753,7 +16897,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16753
16897
|
let dataStream = generateStringWithSequence(sequenceNodes);
|
|
16754
16898
|
const { textRuns, refSelections } = this._buildTextRuns(sequenceNodes);
|
|
16755
16899
|
this._isSelectionMovingRefSelections = refSelections, this._allSelectionRenderServices.forEach((r) => this._updateRefSelectionStyle(r, this._isSelectionMovingRefSelections));
|
|
16756
|
-
const activeRange = this.
|
|
16900
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
16757
16901
|
if (activeRange == null)
|
|
16758
16902
|
return;
|
|
16759
16903
|
this._currentInsertRefStringIndex = textSelectionOffset, editorUnitId == null && (editorUnitId = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId()), this._fitEditorSize();
|
|
@@ -16778,22 +16922,20 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
16778
16922
|
],
|
|
16779
16923
|
segmentId: null,
|
|
16780
16924
|
options: { fromSelection }
|
|
16781
|
-
}), this.
|
|
16925
|
+
}), this._docSelectionManagerService.replaceTextRanges([
|
|
16782
16926
|
{
|
|
16783
16927
|
startOffset: textSelectionOffset + 1 - offset,
|
|
16784
16928
|
endOffset: textSelectionOffset + 1 - offset,
|
|
16785
16929
|
style
|
|
16786
16930
|
}
|
|
16787
16931
|
], !0, { fromSelection })) : (this._updateEditorModel(`${formulaString}\r
|
|
16788
|
-
`, textRuns), this.
|
|
16932
|
+
`, textRuns), this._docSelectionManagerService.replaceTextRanges([
|
|
16789
16933
|
{
|
|
16790
16934
|
startOffset: textSelectionOffset + 1 - offset,
|
|
16791
16935
|
endOffset: textSelectionOffset + 1 - offset,
|
|
16792
16936
|
style
|
|
16793
16937
|
}
|
|
16794
|
-
], !0, { fromSelection })),
|
|
16795
|
-
this._textSelectionRenderManager.focus();
|
|
16796
|
-
}, 0);
|
|
16938
|
+
], !0, { fromSelection })), this._layoutService.focus();
|
|
16797
16939
|
}
|
|
16798
16940
|
_fitEditorSize() {
|
|
16799
16941
|
const editorUnitId = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId();
|
|
@@ -17079,7 +17221,7 @@ let PromptController = (_a19 = class extends Disposable {
|
|
|
17079
17221
|
* Absolute range, triggered by F4
|
|
17080
17222
|
*/
|
|
17081
17223
|
_changeRefString() {
|
|
17082
|
-
const activeRange = this.
|
|
17224
|
+
const activeRange = this._docSelectionManagerService.getActiveTextRange();
|
|
17083
17225
|
if (activeRange == null)
|
|
17084
17226
|
return;
|
|
17085
17227
|
const { startOffset } = activeRange, strIndex = startOffset - 2, nodeIndex = this._formulaPromptService.getCurrentSequenceNodeIndex(strIndex), node = this._formulaPromptService.getCurrentSequenceNodeByIndex(nodeIndex);
|
|
@@ -17130,19 +17272,19 @@ PromptController = __decorateClass$1([
|
|
|
17130
17272
|
OnLifecycle(LifecycleStages.Steady, PromptController),
|
|
17131
17273
|
__decorateParam$1(0, ICommandService),
|
|
17132
17274
|
__decorateParam$1(1, IContextService),
|
|
17133
|
-
__decorateParam$1(2,
|
|
17134
|
-
__decorateParam$1(3, Inject(
|
|
17135
|
-
__decorateParam$1(4, Inject(
|
|
17136
|
-
__decorateParam$1(5,
|
|
17137
|
-
__decorateParam$1(6,
|
|
17138
|
-
__decorateParam$1(7, Inject(
|
|
17139
|
-
__decorateParam$1(8,
|
|
17140
|
-
__decorateParam$1(9,
|
|
17141
|
-
__decorateParam$1(10,
|
|
17142
|
-
__decorateParam$1(11, Inject(
|
|
17143
|
-
__decorateParam$1(12,
|
|
17144
|
-
__decorateParam$1(13,
|
|
17145
|
-
__decorateParam$1(14,
|
|
17275
|
+
__decorateParam$1(2, Inject(IEditorBridgeService)),
|
|
17276
|
+
__decorateParam$1(3, Inject(IFormulaPromptService)),
|
|
17277
|
+
__decorateParam$1(4, Inject(LexerTreeBuilder)),
|
|
17278
|
+
__decorateParam$1(5, IRenderManagerService),
|
|
17279
|
+
__decorateParam$1(6, Inject(ThemeService)),
|
|
17280
|
+
__decorateParam$1(7, Inject(SheetsSelectionsService)),
|
|
17281
|
+
__decorateParam$1(8, IRefSelectionsService),
|
|
17282
|
+
__decorateParam$1(9, IUniverInstanceService),
|
|
17283
|
+
__decorateParam$1(10, Inject(IDescriptionService)),
|
|
17284
|
+
__decorateParam$1(11, Inject(DocSelectionManagerService)),
|
|
17285
|
+
__decorateParam$1(12, IContextMenuService),
|
|
17286
|
+
__decorateParam$1(13, IEditorService),
|
|
17287
|
+
__decorateParam$1(14, ILayoutService)
|
|
17146
17288
|
], PromptController);
|
|
17147
17289
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __defNormalProp2 = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, "__defNormalProp"), __decorateClass = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
17148
17290
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -17150,8 +17292,10 @@ var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnProperty
|
|
|
17150
17292
|
return kind && result && __defProp2(target, key, result), result;
|
|
17151
17293
|
}, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam"), __publicField2 = /* @__PURE__ */ __name((obj, key, value) => __defNormalProp2(obj, typeof key != "symbol" ? key + "" : key, value), "__publicField"), _a20;
|
|
17152
17294
|
let UniverRemoteSheetsFormulaPlugin = (_a20 = class extends Plugin {
|
|
17153
|
-
constructor(_config =
|
|
17154
|
-
super(), this._config = _config, this._injector = _injector;
|
|
17295
|
+
constructor(_config = defaultPluginRemoteConfig, _injector, _configService) {
|
|
17296
|
+
super(), this._config = _config, this._injector = _injector, this._configService = _configService;
|
|
17297
|
+
const { ...rest } = this._config;
|
|
17298
|
+
this._configService.setConfig(PLUGIN_CONFIG_KEY_REMOTE, rest);
|
|
17155
17299
|
}
|
|
17156
17300
|
onStarting() {
|
|
17157
17301
|
this._injector.add([RemoteRegisterFunctionService]), this._injector.get(IRPCChannelService).registerChannel(
|
|
@@ -17160,29 +17304,29 @@ let UniverRemoteSheetsFormulaPlugin = (_a20 = class extends Plugin {
|
|
|
17160
17304
|
);
|
|
17161
17305
|
}
|
|
17162
17306
|
}, __name(_a20, "UniverRemoteSheetsFormulaPlugin"), _a20);
|
|
17163
|
-
__publicField2(UniverRemoteSheetsFormulaPlugin, "pluginName", "
|
|
17307
|
+
__publicField2(UniverRemoteSheetsFormulaPlugin, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
|
|
17164
17308
|
__publicField2(UniverRemoteSheetsFormulaPlugin, "type", UniverInstanceType.UNIVER_SHEET);
|
|
17165
17309
|
UniverRemoteSheetsFormulaPlugin = __decorateClass([
|
|
17166
17310
|
DependentOn(UniverFormulaEnginePlugin),
|
|
17167
|
-
__decorateParam(1, Inject(Injector))
|
|
17311
|
+
__decorateParam(1, Inject(Injector)),
|
|
17312
|
+
__decorateParam(2, IConfigService)
|
|
17168
17313
|
], UniverRemoteSheetsFormulaPlugin);
|
|
17169
17314
|
var _a21;
|
|
17170
17315
|
let UniverSheetsFormulaPlugin = (_a21 = class extends Plugin {
|
|
17171
|
-
constructor(_config =
|
|
17172
|
-
super(), this._config = _config, this._injector = _injector, this._renderManagerService = _renderManagerService, this.
|
|
17316
|
+
constructor(_config = defaultPluginBaseConfig, _injector, _renderManagerService, _configService) {
|
|
17317
|
+
super(), this._config = _config, this._injector = _injector, this._renderManagerService = _renderManagerService, this._configService = _configService;
|
|
17318
|
+
const { menu, ...rest } = this._config;
|
|
17319
|
+
menu && this._configService.setConfig("menu", menu, { merge: !0 }), this._configService.setConfig(PLUGIN_CONFIG_KEY_BASE, rest);
|
|
17173
17320
|
}
|
|
17174
17321
|
onStarting() {
|
|
17175
17322
|
const j = this._injector, dependencies = [
|
|
17176
17323
|
[IFormulaPromptService, { useClass: FormulaPromptService }],
|
|
17177
17324
|
[IRefSelectionsService, { useClass: RefSelectionsService }],
|
|
17178
|
-
[IDescriptionService, {
|
|
17179
|
-
var _a23;
|
|
17180
|
-
return j.createInstance(DescriptionService, (_a23 = this._config) == null ? void 0 : _a23.description);
|
|
17181
|
-
}, "useFactory") }],
|
|
17325
|
+
[IDescriptionService, { useClass: DescriptionService }],
|
|
17182
17326
|
[IRegisterFunctionService, { useClass: RegisterFunctionService }],
|
|
17183
17327
|
[FormulaRefRangeService],
|
|
17184
17328
|
[RegisterOtherFormulaService],
|
|
17185
|
-
[FormulaUIController
|
|
17329
|
+
[FormulaUIController],
|
|
17186
17330
|
[FormulaAutoFillController],
|
|
17187
17331
|
[FormulaClipboardController],
|
|
17188
17332
|
[ArrayFormulaDisplayController],
|
|
@@ -17216,12 +17360,15 @@ __publicField2(UniverSheetsFormulaPlugin, "type", UniverInstanceType.UNIVER_SHEE
|
|
|
17216
17360
|
UniverSheetsFormulaPlugin = __decorateClass([
|
|
17217
17361
|
DependentOn(UniverFormulaEnginePlugin),
|
|
17218
17362
|
__decorateParam(1, Inject(Injector)),
|
|
17219
|
-
__decorateParam(2, IRenderManagerService)
|
|
17363
|
+
__decorateParam(2, IRenderManagerService),
|
|
17364
|
+
__decorateParam(3, IConfigService)
|
|
17220
17365
|
], UniverSheetsFormulaPlugin);
|
|
17221
17366
|
var _a22;
|
|
17222
17367
|
let UniverSheetsFormulaMobilePlugin = (_a22 = class extends Plugin {
|
|
17223
|
-
constructor(_config =
|
|
17224
|
-
super(), this._config = _config, this._injector = _injector, this.
|
|
17368
|
+
constructor(_config = defaultPluginMobileConfig, _injector, _configService) {
|
|
17369
|
+
super(), this._config = _config, this._injector = _injector, this._configService = _configService;
|
|
17370
|
+
const { menu, ...rest } = this._config;
|
|
17371
|
+
menu && this._configService.setConfig("menu", menu, { merge: !0 }), this._configService.setConfig(PLUGIN_CONFIG_KEY_MOBILE, rest);
|
|
17225
17372
|
}
|
|
17226
17373
|
onStarting() {
|
|
17227
17374
|
this._init();
|
|
@@ -17230,15 +17377,7 @@ let UniverSheetsFormulaMobilePlugin = (_a22 = class extends Plugin {
|
|
|
17230
17377
|
[
|
|
17231
17378
|
// services
|
|
17232
17379
|
[IFormulaPromptService, { useClass: FormulaPromptService }],
|
|
17233
|
-
[
|
|
17234
|
-
IDescriptionService,
|
|
17235
|
-
{
|
|
17236
|
-
useFactory: /* @__PURE__ */ __name(() => {
|
|
17237
|
-
var _a23;
|
|
17238
|
-
return this._injector.createInstance(DescriptionService, (_a23 = this._config) == null ? void 0 : _a23.description);
|
|
17239
|
-
}, "useFactory")
|
|
17240
|
-
}
|
|
17241
|
-
],
|
|
17380
|
+
[IDescriptionService, { useClass: DescriptionService }],
|
|
17242
17381
|
[IRegisterFunctionService, { useClass: RegisterFunctionService }],
|
|
17243
17382
|
[FormulaRefRangeService],
|
|
17244
17383
|
[RegisterOtherFormulaService],
|
|
@@ -17253,7 +17392,8 @@ let UniverSheetsFormulaMobilePlugin = (_a22 = class extends Plugin {
|
|
|
17253
17392
|
}
|
|
17254
17393
|
}, __name(_a22, "UniverSheetsFormulaMobilePlugin"), __publicField(_a22, "pluginName", FORMULA_UI_PLUGIN_NAME), __publicField(_a22, "type", UniverInstanceType.UNIVER_SHEET), _a22);
|
|
17255
17394
|
UniverSheetsFormulaMobilePlugin = __decorateClass([
|
|
17256
|
-
__decorateParam(1, Inject(Injector))
|
|
17395
|
+
__decorateParam(1, Inject(Injector)),
|
|
17396
|
+
__decorateParam(2, IConfigService)
|
|
17257
17397
|
], UniverSheetsFormulaMobilePlugin);
|
|
17258
17398
|
export {
|
|
17259
17399
|
DescriptionService,
|