@univerjs/sheets-ui 1.0.4 → 1.1.0
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 +295 -199
- package/lib/cjs/locale/ar-SA.js +15 -0
- package/lib/cjs/locale/ca-ES.js +15 -0
- package/lib/cjs/locale/de-DE.js +15 -0
- package/lib/cjs/locale/en-US.js +15 -0
- package/lib/cjs/locale/es-ES.js +15 -0
- package/lib/cjs/locale/fa-IR.js +15 -0
- package/lib/cjs/locale/fr-FR.js +15 -0
- package/lib/cjs/locale/id-ID.js +15 -0
- package/lib/cjs/locale/it-IT.js +15 -0
- package/lib/cjs/locale/ja-JP.js +15 -0
- package/lib/cjs/locale/ko-KR.js +15 -0
- package/lib/cjs/locale/pl-PL.js +15 -0
- package/lib/cjs/locale/pt-BR.js +15 -0
- package/lib/cjs/locale/ru-RU.js +15 -0
- package/lib/cjs/locale/sk-SK.js +15 -0
- package/lib/cjs/locale/vi-VN.js +15 -0
- package/lib/cjs/locale/zh-CN.js +15 -0
- package/lib/cjs/locale/zh-HK.js +15 -0
- package/lib/cjs/locale/zh-TW.js +15 -0
- package/lib/es/index.js +261 -165
- package/lib/es/locale/ar-SA.js +15 -0
- package/lib/es/locale/ca-ES.js +15 -0
- package/lib/es/locale/de-DE.js +15 -0
- package/lib/es/locale/en-US.js +15 -0
- package/lib/es/locale/es-ES.js +15 -0
- package/lib/es/locale/fa-IR.js +15 -0
- package/lib/es/locale/fr-FR.js +15 -0
- package/lib/es/locale/id-ID.js +15 -0
- package/lib/es/locale/it-IT.js +15 -0
- package/lib/es/locale/ja-JP.js +15 -0
- package/lib/es/locale/ko-KR.js +15 -0
- package/lib/es/locale/pl-PL.js +15 -0
- package/lib/es/locale/pt-BR.js +15 -0
- package/lib/es/locale/ru-RU.js +15 -0
- package/lib/es/locale/sk-SK.js +15 -0
- package/lib/es/locale/vi-VN.js +15 -0
- package/lib/es/locale/zh-CN.js +15 -0
- package/lib/es/locale/zh-HK.js +15 -0
- package/lib/es/locale/zh-TW.js +15 -0
- package/lib/index.css +0 -20
- package/lib/index.js +261 -165
- package/lib/locale/ar-SA.js +15 -0
- package/lib/locale/ca-ES.js +15 -0
- package/lib/locale/de-DE.js +15 -0
- package/lib/locale/en-US.js +15 -0
- package/lib/locale/es-ES.js +15 -0
- package/lib/locale/fa-IR.js +15 -0
- package/lib/locale/fr-FR.js +15 -0
- package/lib/locale/id-ID.js +15 -0
- package/lib/locale/it-IT.js +15 -0
- package/lib/locale/ja-JP.js +15 -0
- package/lib/locale/ko-KR.js +15 -0
- package/lib/locale/pl-PL.js +15 -0
- package/lib/locale/pt-BR.js +15 -0
- package/lib/locale/ru-RU.js +15 -0
- package/lib/locale/sk-SK.js +15 -0
- package/lib/locale/vi-VN.js +15 -0
- package/lib/locale/zh-CN.js +15 -0
- package/lib/locale/zh-HK.js +15 -0
- package/lib/locale/zh-TW.js +15 -0
- package/lib/types/locale/en-US.d.ts +15 -0
- package/lib/types/menu/zoom.menu.d.ts +2 -2
- package/lib/types/services/cell-alert-manager.service.d.ts +1 -0
- package/lib/types/services/editor/cell-editor-resize.service.d.ts +6 -0
- package/lib/types/views/border-panel/interface.d.ts +37 -4
- package/lib/umd/facade.js +3 -1
- package/lib/umd/index.js +10 -10
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -16
- package/lib/types/views/sheet-slider/SheetZoomInput.d.ts +0 -18
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BreakLineCommand, CoverContentCommand, DOCS_COMPONENT_MAIN_LAYER_INDEX, DOCS_VIEW_KEY, DOC_VERTICAL_PADDING, DeleteLeftCommand, DeleteRightCommand, DocSelectionRenderService, EnterCommand, IEditorService, IMEInputCommand, InnerPasteCommand, MobileRichTextToolbar, MoveCursorOperation, MoveSelectionOperation, NodePositionConvertToCursor, ReplaceSnapshotCommand, SetDocInputStyleCommand, SetInlineFormatBoldCommand, SetInlineFormatCommand, SetInlineFormatFontFamilyCommand, SetInlineFormatFontSizeCommand, SetInlineFormatItalicCommand, SetInlineFormatStrikethroughCommand, SetInlineFormatSubscriptCommand, SetInlineFormatSuperscriptCommand, SetInlineFormatTextColorCommand, SetInlineFormatUnderlineCommand, UniverDocsUIPlugin, VIEWPORT_KEY, convertBodyToHtml, getCanvasOffsetByEngine, getLineBounding } from "@univerjs/docs-ui";
|
|
2
2
|
import { AbsoluteRefType, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, CellModeEnum, CellValueType, ColorKit, CommandType, CustomRangeType, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_STYLES, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_HEIGHT, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DataStreamTreeTokenType, DependentOn, Direction, Disposable, DisposableCollection, DocumentFlavor, EDITOR_ACTIVATED, ErrorService, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_UNIVER_EDITOR, FontItalic, FontWeight, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, ILogService, IPermissionService, IUndoRedoService, IUniverInstanceService, Inject, Injector, InterceptorEffectEnum, InterceptorManager, LRUMap, LocaleService, LocaleType, LookUp, NilCommand, ObjectMatrix, Optional, Plugin, PresetListType, Quantity, RANGE_TYPE, Range, Rectangle, RxDisposable, SHEET_EDITOR_UNITS, ThemeService, Tools, UndoCommandId, UniverInstanceType, UserManagerService, VerticalAlign, Workbook, WorksheetHiddenState, WrapStrategy, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, composeStyles, convertCellToRange, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createParagraphId, createSectionId, dateKit, debounce, extractPureTextFromCell, fromEventSubject, generateRandomId, get, getEmptyCell, getIntersectRange, getNumfmtLocaleTag, getNumfmtParseValueFilter, getReverseDirection, handleStyleToString, isDefaultFormat, isFormulaString, isNotNullOrUndefined, isRealNum, isSafeUrl, isTextFormat, isValidRange, merge, mergeOverrideWithDependencies, nameCharacterCheck, numberToABC, numfmt, registerDependencies, sequenceExecute, set, skipParseTagNames, sortRules, splitIntoGrid, throttle, toDisposable, touchDependencies, willLoseNumericPrecision } from "@univerjs/core";
|
|
3
3
|
import { AUTO_FILL_APPLY_TYPE, AUTO_FILL_HOOK_TYPE, AddMergeUndoMutationFactory, AddRangeProtectionCommand, AddRangeProtectionMutation, AddWorksheetMergeAllCommand, AddWorksheetMergeCommand, AddWorksheetMergeHorizontalCommand, AddWorksheetMergeMutation, AddWorksheetMergeVerticalCommand, AddWorksheetProtectionCommand, AutoClearContentCommand, AutoFillCommand, AutoFillController, BEFORE_CELL_EDIT, BorderStyleManagerService, COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE, CancelFrozenCommand, CancelMarkDirtyRowAutoHeightOperation, ClearSelectionAllCommand, ClearSelectionContentCommand, ClearSelectionFormatCommand, CopySheetCommand, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, DeleteRangeProtectionCommand, DeleteRangeProtectionMutation, DeleteWorksheetProtectionCommand, DeltaColumnWidthCommand, DeltaRowHeightCommand, EditStateEnum, IAutoFillService, IExclusiveRangeService, INTERCEPTOR_POINT, INumfmtService, IRefSelectionsService, InsertColBeforeCommand, InsertColCommand, InsertColMutation, InsertDefinedNameCommand, InsertMultiColsLeftCommand, InsertMultiColsRightCommand, InsertMultiRowsAboveCommand, InsertMultiRowsAfterCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, InsertRowBeforeCommand, InsertRowCommand, InsertRowMutation, InsertSheetCommand, InsertSheetMutation, MAX_CELL_PER_SHEET_KEY, MERGE_CELL_INTERCEPTOR_CHECK, MarkDirtyRowAutoHeightOperation, MergeCellController, MoveColsCommand, MoveColsMutation, MoveRangeCommand, MoveRangeMutation, MoveRowsCommand, MoveRowsMutation, REF_SELECTIONS_ENABLED, RangeProtectionCache, RangeProtectionPermissionEditPoint, RangeProtectionPermissionViewPoint, RangeProtectionRuleModel, RefRangeService, RefSelectionsService, RefillCommand, RemoveColCommand, RemoveColMutation, RemoveDefinedNameCommand, RemoveMergeUndoMutationFactory, RemoveRowCommand, RemoveRowMutation, RemoveSheetCommand, RemoveSheetMutation, RemoveWorksheetMergeCommand, RemoveWorksheetMergeMutation, ResetBackgroundColorCommand, ResetTextColorCommand, SCOPE_WORKBOOK_VALUE_DEFINED_NAME, SELECTIONS_ENABLED, SELECTION_CONTROL_BORDER_BUFFER_COLOR, SELECTION_CONTROL_BORDER_BUFFER_WIDTH, SHEETS_PLUGIN_CONFIG_KEY, ScrollToCellOperation, SelectionMoveType, SetBackgroundColorCommand, SetBoldCommand, SetBorderBasicCommand, SetBorderCommand, SetColHiddenCommand, SetColHiddenMutation, SetColVisibleMutation, SetColWidthCommand, SetDefinedNameCommand, SetFontFamilyCommand, SetFontSizeCommand, SetFrozenCommand, SetFrozenMutation, SetFrozenMutationFactory, SetHorizontalTextAlignCommand, SetItalicCommand, SetProtectionCommand, SetRangeValuesCommand, SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, SetRowHeightCommand, SetRowHiddenCommand, SetRowHiddenMutation, SetRowVisibleMutation, SetSelectedColsVisibleCommand, SetSelectedRowsVisibleCommand, SetSelectionsOperation, SetShrinkToFitCommand, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetStrikeThroughCommand, SetStyleCommand, SetTabColorCommand, SetTabColorMutation, SetTextColorCommand, SetTextRotationCommand, SetTextWrapCommand, SetUnderlineCommand, SetVerticalTextAlignCommand, SetWorksheetActivateCommand, SetWorksheetActiveOperation, SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory, SetWorksheetHideCommand, SetWorksheetHideMutation, SetWorksheetNameCommand, SetWorksheetNameMutation, SetWorksheetOrderCommand, SetWorksheetOrderMutation, SetWorksheetPermissionPointsCommand, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightCommand, SetWorksheetRowIsAutoHeightMutation, SetWorksheetShowCommand, SheetCopyDownCommand, SheetCopyRightCommand, SheetInterceptorService, SheetPermissionCheckController, SheetPermissionInitController, SheetSkeletonService, SheetsSelectionsService, TextToNumberCommand, ToggleCellCheckboxCommand, ToggleGridlinesCommand, ToggleGridlinesMutation, UniverSheetsPlugin, ViewStateEnum, WorkbookCopyPermission, WorkbookCreateProtectPermission, WorkbookCreateSheetPermission, WorkbookDeleteColumnPermission, WorkbookDeleteRowPermission, WorkbookDeleteSheetPermission, WorkbookEditablePermission, WorkbookHideSheetPermission, WorkbookInsertColumnPermission, WorkbookInsertRowPermission, WorkbookManageCollaboratorPermission, WorkbookRenameSheetPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteProtectionPermission, WorksheetDeleteRowPermission, WorksheetEditPermission, WorksheetInsertColumnPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetProtectionPointModel, WorksheetProtectionRuleModel, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetViewPermission, adjustRangeOnMutation, alignToMergedCellsBorders, attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord, baseProtectionActions, convertPrimaryWithCoordToPrimary, convertSelectionDataToRange, countCells, defaultLargeSheetOperationConfig, deserializeListOptions, discreteRangeToRange, expandToContinuousRange, findFirstNonEmptyCell, getAddMergeMutationRangeByType, getAllWorksheetPermissionPoint, getCellAtRowCol, getCellType, getCellValue, getClearContentMutationParamsForRanges, getMoveRangeCommandMutations, getPrimaryForRange, getSelectionsService, getSheetCommandTarget, isCellImage, rangeToDiscreteRange, serializeListOptions, setEndForRange, validateDefinedName } from "@univerjs/sheets";
|
|
4
|
-
import { AnchoredContextMenu, BuiltInUIPart, COLOR_PICKER_COMPONENT, ComponentContainer, ComponentManager, ContextMenuGroup, ContextMenuPosition, CopyCommand, CutCommand, DISABLE_AUTO_FOCUS_KEY, FILE_PNG_CLIPBOARD_MIME_TYPE, FILE__BMP_CLIPBOARD_MIME_TYPE, FILE__JPEG_CLIPBOARD_MIME_TYPE, FILE__WEBP_CLIPBOARD_MIME_TYPE, FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, FONT_SIZE_COMPONENT, FONT_SIZE_LIST, FormatPainterSessionService, HTML_CLIPBOARD_MIME_TYPE, ICanvasPopupService, IClipboardInterfaceService, IContextMenuService, IDialogService, IFontService, ILayoutService, IMenuManagerService, IMessageService, INotificationService, IPlatformService, IRibbonService, IShortcutService, ISidebarService, IUIPartsService, IUIRuntimeScopeService, IWorkbenchService, IconManager, KeyCode, MenuItemType, MetaKeys, MobileDrawer, MobileMenu, MobileZoomIndicator, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, PasteCommand, RibbonPosition, RibbonStartGroup, RibbonViewGroup, SheetPasteShortKeyCommandName, Slider, ToggleFullscreenOperation, ToolbarItem, UI_PLUGIN_CONFIG_KEY, UniverMobileUIPlugin,
|
|
4
|
+
import { AnchoredContextMenu, BuiltInUIPart, COLOR_PICKER_COMPONENT, ComponentContainer, ComponentManager, ContextMenuGroup, ContextMenuPosition, CopyCommand, CutCommand, DISABLE_AUTO_FOCUS_KEY, FILE_PNG_CLIPBOARD_MIME_TYPE, FILE__BMP_CLIPBOARD_MIME_TYPE, FILE__JPEG_CLIPBOARD_MIME_TYPE, FILE__WEBP_CLIPBOARD_MIME_TYPE, FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, FONT_SIZE_COMPONENT, FONT_SIZE_LIST, FormatPainterSessionService, HTML_CLIPBOARD_MIME_TYPE, ICanvasPopupService, IClipboardInterfaceService, IContextMenuService, IDialogService, IFontService, ILayoutService, IMenuManagerService, IMessageService, INotificationService, IPlatformService, IRibbonService, IShortcutService, ISidebarService, IUIPartsService, IUIRuntimeScopeService, IWorkbenchService, IconManager, KeyCode, MenuItemType, MetaKeys, MobileDrawer, MobileMenu, MobileZoomIndicator, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, PasteCommand, RibbonPosition, RibbonStartGroup, RibbonViewGroup, SheetPasteShortKeyCommandName, Slider, ToggleFullscreenOperation, ToolbarItem, UI_PLUGIN_CONFIG_KEY, UniverMobileUIPlugin, bindFormatPainterCanvas, connectInjector, getEmbedBoundaryOwner, getEmbedChildUnitId, getMenuHiddenObservable, handleStringToStyle, imageMimeTypeSet, sanitizeParsedHtml, textTrim, useComponentsOfPart, useConfigValue, useDependency, useEvent, useObservable, useSidebarClick, useToolbarItemStatus, useVirtualList } from "@univerjs/ui";
|
|
5
5
|
import { CURSOR_TYPE, DashedRect, DeviceInputEventType, DeviceType, FIX_ONE_PIXEL_BLUR_OFFSET, Group, IRenderManagerService, Layer, NORMAL_TEXT_SELECTION_PLUGIN_STYLE, RENDER_CLASS_TYPE, RENDER_RAW_FORMULA_KEY, Rect, RegularPolygon, SHEET_EXTENSION_PREFIX, SHEET_VIEWPORT_KEY, ScrollBar, ScrollTimer, ScrollTimerType, Shape, SheetExtension, Spreadsheet, SpreadsheetColumnHeader, SpreadsheetRowHeader, TRANSFORM_CHANGE_OBSERVABLE_TYPE, UniverRenderEnginePlugin, Vector2, Viewport, calculateCellImageRect, cancelRequestFrame, convertTextRotation, convertTransformToOffsetX, convertTransformToOffsetY, fixLineWidthByScale, getCurrentTypeOfRenderer, getNextWheelZoomRatio, ptToPixel, requestNewFrame, withCurrentTypeOfRenderer } from "@univerjs/engine-render";
|
|
6
6
|
import { BehaviorSubject, EMPTY, Observable, Subject, Subscription, combineLatest, combineLatestWith, distinctUntilChanged, filter, from, fromEvent, isObservable, map, merge as merge$1, of, shareReplay, skip, startWith, switchMap, takeUntil, tap, throttleTime, withLatestFrom } from "rxjs";
|
|
7
7
|
import { DocSelectionManagerService, DocSkeletonManagerService, DocStateChangeManagerService, InsertTextCommand, RichTextEditingMutation, SetTextSelectionsOperation, UniverDocsPlugin } from "@univerjs/docs";
|
|
@@ -12,7 +12,7 @@ import { ITelemetryService } from "@univerjs/telemetry";
|
|
|
12
12
|
import { debounceTime, filter as filter$1, map as map$1, shareReplay as shareReplay$1, startWith as startWith$1, switchMap as switchMap$1 } from "rxjs/operators";
|
|
13
13
|
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { AddImageIcon, AdjustHeightDoubleIcon, AdjustWidthDoubleIcon, AlignBottomIcon, AlignTopIcon, AllBorderIcon, AutoHeightDoubleIcon, AutoWidthDoubleIcon, AutofillDoubleIcon, AutowrapIcon, BackSlashDoubleIcon, BasesMultiIcon, BoardsMultiIcon, BoldIcon, BrushIcon, CancelFreezeIcon, CancelMergeIcon, CheckMarkIcon, ClearFormatDoubleIcon, CloseIcon, CodeIcon, ConvertIcon, ConvertToNumberIcon, CopyDoubleIcon, CutIcon, DeleteCellShiftLeftDoubleIcon, DeleteCellShiftUpDoubleIcon, DeleteColumnDoubleIcon, DeleteIcon, DeleteRowDoubleIcon, DocsMultiIcon, DownBorderDoubleIcon, DownIcon, DownloadImageIcon, ErrorIcon, EyeIcon, EyelashIcon, FontColorDoubleIcon, FontSizeIncreaseIcon, FontSizeReduceIcon, FreezeColumnIcon, FreezeRowIcon, FreezeToSelectedIcon, FxIcon, HideDoubleIcon, HideGridlinesIcon, HorizontalBorderDoubleIcon, HorizontalMergeIcon, HorizontallyIcon, IncreaseIcon, InfoIcon, InnerBorderDoubleIcon, InsertCellDownDoubleIcon, InsertCellShiftRightDoubleIcon, InsertDoubleIcon, InsertRowAboveDoubleIcon, InsertRowBelowDoubleIcon, ItalicIcon, KeyboardIcon, LeftBorderDoubleIcon, LeftDoubleDiagonalDoubleIcon, LeftInsertColumnDoubleIcon, LeftJustifyingIcon, LeftRotationFortyFiveDegreesIcon, LeftRotationNinetyDegreesIcon, LeftTridiagonalDoubleIcon, LockIcon, MenuIcon, MergeAllIcon, MoreDownIcon, MoreLeftIcon, MoreRightIcon, NoBorderIcon, NoColorDoubleIcon, NoRotationIcon, OuterBorderDoubleIcon, OverflowIcon, PaintBucketDoubleIcon, PasteSpecialDoubleIcon, PenIcon, ProtectIcon, ReduceDoubleIcon, RightBorderDoubleIcon, RightDoubleDiagonalDoubleIcon, RightInsertColumnDoubleIcon, RightJustifyingIcon, RightRotationFortyFiveDegreesIcon, RightRotationNinetyDegreesIcon, SheetsMultiIcon, ShrinkToFitIcon, SlashDoubleIcon, SlidesMultiIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TruncationIcon, UnderlineIcon, UpBorderDoubleIcon, VerticalBorderDoubleIcon, VerticalCenterIcon, VerticalIntegrationIcon, VerticalTextIcon, WarningIcon, WriteIcon } from "@univerjs/icons";
|
|
15
|
+
import { AddImageIcon, AdjustHeightDoubleIcon, AdjustWidthDoubleIcon, AlignBottomIcon, AlignTopIcon, AllBorderIcon, AutoHeightDoubleIcon, AutoWidthDoubleIcon, AutofillDoubleIcon, AutowrapIcon, BackSlashDoubleIcon, BasesMultiIcon, BoardsMultiIcon, BoldIcon, BrushIcon, CancelFreezeIcon, CancelMergeIcon, CheckMarkIcon, ClearFormatDoubleIcon, CloseIcon, CodeIcon, ConvertIcon, ConvertToNumberIcon, CopyDoubleIcon, CutIcon, DeleteCellShiftLeftDoubleIcon, DeleteCellShiftUpDoubleIcon, DeleteColumnDoubleIcon, DeleteIcon, DeleteRowDoubleIcon, DocPasteOptionsIcon, DocsMultiIcon, DownBorderDoubleIcon, DownIcon, DownloadImageIcon, ErrorIcon, EyeIcon, EyelashIcon, FontColorDoubleIcon, FontSizeIncreaseIcon, FontSizeReduceIcon, FreezeColumnIcon, FreezeRowIcon, FreezeToSelectedIcon, FxIcon, HideDoubleIcon, HideGridlinesIcon, HorizontalBorderDoubleIcon, HorizontalMergeIcon, HorizontallyIcon, IncreaseIcon, InfoIcon, InnerBorderDoubleIcon, InsertCellDownDoubleIcon, InsertCellShiftRightDoubleIcon, InsertDoubleIcon, InsertRowAboveDoubleIcon, InsertRowBelowDoubleIcon, ItalicIcon, KeyboardIcon, LeftBorderDoubleIcon, LeftDoubleDiagonalDoubleIcon, LeftInsertColumnDoubleIcon, LeftJustifyingIcon, LeftRotationFortyFiveDegreesIcon, LeftRotationNinetyDegreesIcon, LeftTridiagonalDoubleIcon, LockIcon, MenuIcon, MergeAllIcon, MoreDownIcon, MoreLeftIcon, MoreRightIcon, NoBorderIcon, NoColorDoubleIcon, NoRotationIcon, OuterBorderDoubleIcon, OverflowIcon, PaintBucketDoubleIcon, PasteSpecialDoubleIcon, PenIcon, ProtectIcon, ReduceDoubleIcon, RightBorderDoubleIcon, RightDoubleDiagonalDoubleIcon, RightInsertColumnDoubleIcon, RightJustifyingIcon, RightRotationFortyFiveDegreesIcon, RightRotationNinetyDegreesIcon, SheetsMultiIcon, ShrinkToFitIcon, SlashDoubleIcon, SlidesMultiIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TruncationIcon, UnderlineIcon, UpBorderDoubleIcon, VerticalBorderDoubleIcon, VerticalCenterIcon, VerticalIntegrationIcon, VerticalTextIcon, WarningIcon, WriteIcon, ZoomInIcon } from "@univerjs/icons";
|
|
16
16
|
|
|
17
17
|
//#region src/basics/editor/get-editor-object.ts
|
|
18
18
|
function getEditorObject(unitId, renderManagerService) {
|
|
@@ -240,7 +240,7 @@ let SHEET_VIEW_KEY = /* @__PURE__ */ function(SHEET_VIEW_KEY) {
|
|
|
240
240
|
}({});
|
|
241
241
|
|
|
242
242
|
//#endregion
|
|
243
|
-
//#region \0@oxc-project+runtime@0.
|
|
243
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
244
244
|
function _typeof(o) {
|
|
245
245
|
"@babel/helpers - typeof";
|
|
246
246
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -251,7 +251,7 @@ function _typeof(o) {
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
//#endregion
|
|
254
|
-
//#region \0@oxc-project+runtime@0.
|
|
254
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
|
|
255
255
|
function toPrimitive(t, r) {
|
|
256
256
|
if ("object" != _typeof(t) || !t) return t;
|
|
257
257
|
var e = t[Symbol.toPrimitive];
|
|
@@ -264,14 +264,14 @@ function toPrimitive(t, r) {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
//#endregion
|
|
267
|
-
//#region \0@oxc-project+runtime@0.
|
|
267
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
268
268
|
function toPropertyKey(t) {
|
|
269
269
|
var i = toPrimitive(t, "string");
|
|
270
270
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
//#endregion
|
|
274
|
-
//#region \0@oxc-project+runtime@0.
|
|
274
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
275
275
|
function _defineProperty(e, r, t) {
|
|
276
276
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
277
277
|
value: t,
|
|
@@ -1044,7 +1044,7 @@ function genSelectionByRange(skeleton, range) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
1046
|
//#endregion
|
|
1047
|
-
//#region \0@oxc-project+runtime@0.
|
|
1047
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
1048
1048
|
function __decorateParam(paramIndex, decorator) {
|
|
1049
1049
|
return function(target, key) {
|
|
1050
1050
|
decorator(target, key, paramIndex);
|
|
@@ -1052,7 +1052,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
|
|
1054
1054
|
//#endregion
|
|
1055
|
-
//#region \0@oxc-project+runtime@0.
|
|
1055
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
1056
1056
|
function __decorate(decorators, target, key, desc) {
|
|
1057
1057
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1058
1058
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3105,9 +3105,10 @@ var HtmlToUSMService = class HtmlToUSMService {
|
|
|
3105
3105
|
cellDataStream = `${dataStream.substring(starts[i])}\r\n`;
|
|
3106
3106
|
if (cellDataStream === "\r\n") continue;
|
|
3107
3107
|
} else cellDataStream = `${dataStream.substring(starts[i], starts[i + 1] - 1)}\r\n`;
|
|
3108
|
+
const end = starts[i + 1] ?? dataStream.length;
|
|
3108
3109
|
const cellTextRuns = [];
|
|
3109
3110
|
textRuns === null || textRuns === void 0 || textRuns.forEach((t) => {
|
|
3110
|
-
if (t.st >= starts[i] && t.ed <=
|
|
3111
|
+
if (t.st >= starts[i] && t.ed <= end) cellTextRuns.push({
|
|
3111
3112
|
st: t.st - starts[i],
|
|
3112
3113
|
ed: t.ed - starts[i],
|
|
3113
3114
|
ts: t.ts
|
|
@@ -3115,7 +3116,7 @@ var HtmlToUSMService = class HtmlToUSMService {
|
|
|
3115
3116
|
});
|
|
3116
3117
|
const cellCustomRanges = [];
|
|
3117
3118
|
customRanges === null || customRanges === void 0 || customRanges.forEach((c) => {
|
|
3118
|
-
if (c.startIndex >= starts[i] && c.endIndex <=
|
|
3119
|
+
if (c.startIndex >= starts[i] && c.endIndex <= end) cellCustomRanges.push({
|
|
3119
3120
|
...c,
|
|
3120
3121
|
startIndex: c.startIndex - starts[i],
|
|
3121
3122
|
endIndex: c.endIndex - starts[i]
|
|
@@ -3143,14 +3144,9 @@ var HtmlToUSMService = class HtmlToUSMService {
|
|
|
3143
3144
|
payloads,
|
|
3144
3145
|
customRanges
|
|
3145
3146
|
};
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
valueMatrix.setValue(0, 0, convertToCellStyle({
|
|
3150
|
-
v: dataStream,
|
|
3151
|
-
p
|
|
3152
|
-
}, dataStream, textRuns));
|
|
3153
|
-
}
|
|
3147
|
+
const cell = { v: dataStream };
|
|
3148
|
+
if ((textRuns === null || textRuns === void 0 ? void 0 : textRuns.length) || (customRanges === null || customRanges === void 0 ? void 0 : customRanges.length)) cell.p = this._generateDocumentDataModelSnapshot({ body: singleDocBody });
|
|
3149
|
+
valueMatrix.setValue(0, 0, convertToCellStyle(cell, dataStream, textRuns));
|
|
3154
3150
|
rowProperties.push({});
|
|
3155
3151
|
}
|
|
3156
3152
|
if (tableStrings) tableStrings.forEach((t, index) => {
|
|
@@ -3767,7 +3763,7 @@ const LarkPastePlugin = {
|
|
|
3767
3763
|
const UniverPastePlugin = {
|
|
3768
3764
|
name: "univer-sheet-paste-plugin-univer",
|
|
3769
3765
|
checkPasteType(html) {
|
|
3770
|
-
return
|
|
3766
|
+
return /<p\b[^>]*\sclass\s*=\s*["'](?:[^"']*\s)?UniverNormal(?:\s[^"']*)?["']/i.test(html);
|
|
3771
3767
|
},
|
|
3772
3768
|
stylesRules: [],
|
|
3773
3769
|
afterProcessRules: [{
|
|
@@ -4144,9 +4140,9 @@ function wrapHtmlForExcel(html) {
|
|
|
4144
4140
|
/**
|
|
4145
4141
|
* This service provide hooks for sheet features to supplement content or modify behavior of clipboard.
|
|
4146
4142
|
*/
|
|
4143
|
+
HtmlToUSMService.use(UniverPastePlugin);
|
|
4147
4144
|
HtmlToUSMService.use(WordPastePlugin);
|
|
4148
4145
|
HtmlToUSMService.use(LarkPastePlugin);
|
|
4149
|
-
HtmlToUSMService.use(UniverPastePlugin);
|
|
4150
4146
|
const ISheetClipboardService = createIdentifier("sheet.clipboard-service");
|
|
4151
4147
|
let SheetClipboardService = class SheetClipboardService extends Disposable {
|
|
4152
4148
|
constructor(_logService, _univerInstanceService, _selectionManagerService, _clipboardInterfaceService, _undoRedoService, _commandService, _markSelectionService, _notificationService, _platformService, _renderManagerService, _themeService, _localeService, _errorService, _injector) {
|
|
@@ -6941,7 +6937,7 @@ const SetSelectionFrozenCommand = {
|
|
|
6941
6937
|
if (selectRow === 0) selectRow = 1;
|
|
6942
6938
|
let selectColumn = (primary === null || primary === void 0 ? void 0 : primary.startColumn) ?? range.startColumn;
|
|
6943
6939
|
if (selectColumn === 0) selectColumn = 1;
|
|
6944
|
-
const rangeType = range.rangeType;
|
|
6940
|
+
const rangeType = range.rangeType ?? RANGE_TYPE.NORMAL;
|
|
6945
6941
|
if (rangeType === RANGE_TYPE.ROW || type === 1) {
|
|
6946
6942
|
startRow = selectRow;
|
|
6947
6943
|
freezedRowCount = selectRow - sheetViewStartRow;
|
|
@@ -8240,14 +8236,17 @@ function transformPosition2Offset(x, y, scene, skeleton, worksheet) {
|
|
|
8240
8236
|
const endSheetView = skeleton.getNoMergeCellWithCoordByIndex(startRow, startColumn, false);
|
|
8241
8237
|
const { rowHeaderWidth, columnHeaderHeight } = skeleton;
|
|
8242
8238
|
const freezeWidth = endSheetView.startX - startSheetView.startX;
|
|
8243
|
-
const
|
|
8239
|
+
const freezeStartY = ySplit > 0 && startRow === ySplit ? 0 : startSheetView.startY;
|
|
8240
|
+
const freezeHeight = endSheetView.startY - freezeStartY;
|
|
8244
8241
|
const { top, left, viewportScrollX, viewportScrollY } = viewMain;
|
|
8242
|
+
const viewportLeft = left / scaleX;
|
|
8243
|
+
const viewportTop = top / scaleY;
|
|
8245
8244
|
let offsetX;
|
|
8246
|
-
if (x >
|
|
8247
|
-
else offsetX = (freezeWidth + rowHeaderWidth - (
|
|
8245
|
+
if (x > viewportLeft) offsetX = (x - viewportScrollX) * scaleX;
|
|
8246
|
+
else offsetX = (freezeWidth + rowHeaderWidth - (viewportLeft - x)) * scaleX;
|
|
8248
8247
|
let offsetY;
|
|
8249
|
-
if (y >
|
|
8250
|
-
else offsetY = (freezeHeight + columnHeaderHeight - (
|
|
8248
|
+
if (y > viewportTop) offsetY = (y - viewportScrollY) * scaleY;
|
|
8249
|
+
else offsetY = (freezeHeight + columnHeaderHeight - (viewportTop - y)) * scaleY;
|
|
8251
8250
|
return {
|
|
8252
8251
|
x: offsetX,
|
|
8253
8252
|
y: offsetY
|
|
@@ -10393,6 +10392,18 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10393
10392
|
this._univerInstanceService = _univerInstanceService;
|
|
10394
10393
|
this._configService = _configService;
|
|
10395
10394
|
this._embedFloatingGeometryService = _embedFloatingGeometryService;
|
|
10395
|
+
_defineProperty(this, "_editorWidth", 0);
|
|
10396
|
+
_defineProperty(this, "_editorHeight", 0);
|
|
10397
|
+
_defineProperty(this, "_initialEditorSize", null);
|
|
10398
|
+
_defineProperty(this, "_cellSize", null);
|
|
10399
|
+
this.disposeWithMe(this._editorBridgeService.visible$.subscribe(({ visible }) => {
|
|
10400
|
+
if (!visible) {
|
|
10401
|
+
this._editorWidth = 0;
|
|
10402
|
+
this._editorHeight = 0;
|
|
10403
|
+
this._initialEditorSize = null;
|
|
10404
|
+
this._cellSize = null;
|
|
10405
|
+
}
|
|
10406
|
+
}));
|
|
10396
10407
|
}
|
|
10397
10408
|
get _currentRenderer() {
|
|
10398
10409
|
return getCurrentTypeOfRenderer(UniverInstanceType.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService);
|
|
@@ -10420,10 +10431,13 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10420
10431
|
if (!param) return;
|
|
10421
10432
|
const { position, documentLayoutObject, canvasOffset, scaleX, scaleY } = param;
|
|
10422
10433
|
const { startX, startY, endX, endY } = position;
|
|
10434
|
+
const cellWidth = endX - startX;
|
|
10435
|
+
const cellHeight = endY - startY;
|
|
10423
10436
|
const documentDataModel = this._univerInstanceService.getUnit(DOCS_NORMAL_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
|
|
10424
10437
|
if (documentDataModel == null) return;
|
|
10425
10438
|
const documentSkeleton = this._getEditorSkeleton();
|
|
10426
10439
|
if (!documentSkeleton) return;
|
|
10440
|
+
this._syncCellSize(cellWidth / scaleX, cellHeight / scaleY);
|
|
10427
10441
|
documentSkeleton.resetInitialWidth();
|
|
10428
10442
|
const info = this._predictingSize(position, canvasOffset, documentSkeleton, documentLayoutObject, scaleX, scaleY);
|
|
10429
10443
|
if (!info || info.actualWidth <= 0) return;
|
|
@@ -10431,17 +10445,17 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10431
10445
|
const { verticalAlign, horizontalAlign, paddingData, fill } = documentLayoutObject;
|
|
10432
10446
|
actualWidth = actualWidth + (paddingData.l ?? 0) * scaleX + (paddingData.r ?? 0) * scaleX;
|
|
10433
10447
|
actualHeight = actualHeight + (paddingData.t ?? 0) * scaleY + (paddingData.b ?? 0) * scaleY;
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10448
|
+
const contentWidth = cellWidth < actualWidth ? Math.ceil(actualWidth) : cellWidth;
|
|
10449
|
+
const contentHeight = cellHeight < actualHeight ? Math.ceil(actualHeight) : cellHeight;
|
|
10450
|
+
const editorWidth = Math.max(contentWidth, Math.min(this._editorWidth * scaleX, info.maxSize.width));
|
|
10451
|
+
const editorHeight = Math.max(contentHeight, Math.min(this._editorHeight * scaleY, info.maxSize.height));
|
|
10438
10452
|
let offsetTop = 0;
|
|
10439
10453
|
if (verticalAlign === VerticalAlign.MIDDLE) offsetTop = (editorHeight - actualHeight) / 2 / scaleY;
|
|
10440
10454
|
else if (verticalAlign === VerticalAlign.TOP) offsetTop = paddingData.t || 0;
|
|
10441
10455
|
else offsetTop = (editorHeight - actualHeight) / scaleY;
|
|
10442
10456
|
let offsetLeft = 0;
|
|
10443
|
-
if (horizontalAlign === HorizontalAlign.
|
|
10444
|
-
else offsetLeft = paddingData.l || 0;
|
|
10457
|
+
if (horizontalAlign === HorizontalAlign.RIGHT) offsetLeft = (editorWidth - actualWidth) / scaleX;
|
|
10458
|
+
else if (horizontalAlign !== HorizontalAlign.CENTER) offsetLeft = paddingData.l || 0;
|
|
10445
10459
|
offsetTop = Math.max(offsetTop, paddingData.t || 0);
|
|
10446
10460
|
offsetLeft = Math.max(offsetLeft, paddingData.l || 0);
|
|
10447
10461
|
documentDataModel.updateDocumentDataMargin({
|
|
@@ -10449,7 +10463,22 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10449
10463
|
l: offsetLeft
|
|
10450
10464
|
});
|
|
10451
10465
|
documentSkeleton.calculate();
|
|
10452
|
-
this._editAreaProcessing(
|
|
10466
|
+
this._editAreaProcessing({
|
|
10467
|
+
width: editorWidth,
|
|
10468
|
+
height: editorHeight,
|
|
10469
|
+
contentWidth
|
|
10470
|
+
}, position, canvasOffset, fill, scaleX, scaleY, horizontalAlign, callback);
|
|
10471
|
+
}
|
|
10472
|
+
_syncCellSize(width, height) {
|
|
10473
|
+
if (this._cellSize && (Math.abs(this._cellSize.width - width) > 1e-6 || Math.abs(this._cellSize.height - height) > 1e-6)) {
|
|
10474
|
+
var _this$_initialEditorS, _this$_initialEditorS2;
|
|
10475
|
+
this._editorWidth = ((_this$_initialEditorS = this._initialEditorSize) === null || _this$_initialEditorS === void 0 ? void 0 : _this$_initialEditorS.width) ?? 0;
|
|
10476
|
+
this._editorHeight = ((_this$_initialEditorS2 = this._initialEditorSize) === null || _this$_initialEditorS2 === void 0 ? void 0 : _this$_initialEditorS2.height) ?? 0;
|
|
10477
|
+
}
|
|
10478
|
+
this._cellSize = {
|
|
10479
|
+
width,
|
|
10480
|
+
height
|
|
10481
|
+
};
|
|
10453
10482
|
}
|
|
10454
10483
|
/**
|
|
10455
10484
|
* Mainly used to pre-calculate the width of the editor,
|
|
@@ -10460,25 +10489,26 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10460
10489
|
const { textRotation, wrapStrategy, paddingData } = documentLayoutObject;
|
|
10461
10490
|
const documentDataModel = this._univerInstanceService.getUnit(DOCS_NORMAL_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
|
|
10462
10491
|
const { vertexAngle: angle } = convertTextRotation(textRotation);
|
|
10492
|
+
const maxSize = this._getEditorMaxSize(actualRangeWithCoord, canvasOffset, documentLayoutObject.horizontalAlign);
|
|
10493
|
+
if (!maxSize) return;
|
|
10494
|
+
documentDataModel === null || documentDataModel === void 0 || documentDataModel.updateDocumentDataMargin({
|
|
10495
|
+
l: paddingData.l,
|
|
10496
|
+
t: paddingData.t
|
|
10497
|
+
});
|
|
10463
10498
|
if (wrapStrategy === WrapStrategy.WRAP && angle === 0) {
|
|
10464
10499
|
documentDataModel === null || documentDataModel === void 0 || documentDataModel.updateDocumentDataPageSize((endX - startX) / scaleX);
|
|
10465
|
-
documentDataModel === null || documentDataModel === void 0 || documentDataModel.updateDocumentDataMargin({
|
|
10466
|
-
l: paddingData.l,
|
|
10467
|
-
t: paddingData.t
|
|
10468
|
-
});
|
|
10469
10500
|
documentSkeleton.calculate();
|
|
10470
10501
|
const { actualWidth, actualHeight } = documentSkeleton.getActualSize();
|
|
10471
10502
|
return {
|
|
10472
10503
|
actualWidth: actualWidth * scaleX,
|
|
10473
|
-
actualHeight: actualHeight * scaleY
|
|
10504
|
+
actualHeight: actualHeight * scaleY,
|
|
10505
|
+
maxSize
|
|
10474
10506
|
};
|
|
10475
10507
|
}
|
|
10476
|
-
const maxSize = this._getEditorMaxSize(actualRangeWithCoord, canvasOffset, documentLayoutObject.horizontalAlign);
|
|
10477
|
-
if (!maxSize) return;
|
|
10478
10508
|
documentDataModel === null || documentDataModel === void 0 || documentDataModel.updateDocumentDataPageSize(maxSize.width / scaleX);
|
|
10479
10509
|
documentSkeleton.calculate();
|
|
10480
10510
|
const size = documentSkeleton.getActualSize();
|
|
10481
|
-
let editorWidth = endX - startX;
|
|
10511
|
+
let editorWidth = Math.max(endX - startX, Math.min(this._editorWidth * scaleX, maxSize.width));
|
|
10482
10512
|
if (editorWidth < size.actualWidth * scaleX + EDITOR_INPUT_SELF_EXTEND_GAP * scaleX) editorWidth = size.actualWidth * scaleX + EDITOR_INPUT_SELF_EXTEND_GAP * scaleX;
|
|
10483
10513
|
documentDataModel === null || documentDataModel === void 0 || documentDataModel.updateDocumentDataPageSize(editorWidth / scaleX);
|
|
10484
10514
|
/**
|
|
@@ -10490,7 +10520,8 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10490
10520
|
});
|
|
10491
10521
|
return {
|
|
10492
10522
|
actualWidth: size.actualWidth * scaleX,
|
|
10493
|
-
actualHeight: size.actualHeight * scaleY
|
|
10523
|
+
actualHeight: size.actualHeight * scaleY,
|
|
10524
|
+
maxSize
|
|
10494
10525
|
};
|
|
10495
10526
|
}
|
|
10496
10527
|
_getEditorMaxSize(position, canvasOffset, horizontalAlign) {
|
|
@@ -10536,7 +10567,7 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10536
10567
|
* determine whether a scrollbar appears,
|
|
10537
10568
|
* and calculate the editor's boundaries relative to the browser.
|
|
10538
10569
|
*/
|
|
10539
|
-
_editAreaProcessing(
|
|
10570
|
+
_editAreaProcessing(size, actualRangeWithCoord, canvasOffset, fill, scaleX = 1, scaleY = 1, horizontalAlign, callback) {
|
|
10540
10571
|
const editorObject = this._getEditorObject();
|
|
10541
10572
|
if (editorObject == null) return;
|
|
10542
10573
|
const engine = this.engine;
|
|
@@ -10544,25 +10575,16 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10544
10575
|
const canvasElement = engine.getCanvasElement();
|
|
10545
10576
|
let { startX, startY } = actualRangeWithCoord;
|
|
10546
10577
|
const { document: documentComponent, scene: editorScene, engine: docEngine } = editorObject;
|
|
10547
|
-
const viewportMain = editorScene.getViewport(VIEWPORT_KEY.VIEW_MAIN);
|
|
10548
10578
|
const { height: clientHeight, width: clientWidth, contentScaleX, contentScaleY, scaleAdjustX, scaleAdjustY } = this._getEditorMaxSize(actualRangeWithCoord, canvasOffset, horizontalAlign);
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
physicHeight = clientHeight;
|
|
10559
|
-
} else {
|
|
10560
|
-
var _viewportMain$getScro;
|
|
10561
|
-
scrollBar = null;
|
|
10562
|
-
viewportMain === null || viewportMain === void 0 || (_viewportMain$getScro = viewportMain.getScrollBar()) === null || _viewportMain$getScro === void 0 || _viewportMain$getScro.dispose();
|
|
10563
|
-
}
|
|
10564
|
-
editorWidth += (scrollBar === null || scrollBar === void 0 ? void 0 : scrollBar.barSize) || 0;
|
|
10565
|
-
if (editorWidth > clientWidth) editorWidth = clientWidth;
|
|
10579
|
+
const { physicHeight, scrollBarWidth } = this._fitEditorViewport(editorScene, size.height, clientHeight);
|
|
10580
|
+
const editorWidth = Math.min(Math.max(size.width, size.contentWidth + scrollBarWidth), clientWidth);
|
|
10581
|
+
const editorHeight = size.height;
|
|
10582
|
+
this._editorWidth = Math.max(this._editorWidth, editorWidth / scaleX);
|
|
10583
|
+
this._editorHeight = Math.max(this._editorHeight, physicHeight / scaleY);
|
|
10584
|
+
if (!this._initialEditorSize && this._editorBridgeService.isVisible().visible) this._initialEditorSize = {
|
|
10585
|
+
width: editorWidth / scaleX,
|
|
10586
|
+
height: physicHeight / scaleY
|
|
10587
|
+
};
|
|
10566
10588
|
this._addBackground(editorScene, editorWidth / scaleX, editorHeight / scaleY, fill);
|
|
10567
10589
|
const { scaleX: precisionScaleX, scaleY: precisionScaleY } = editorScene.getPrecisionScale();
|
|
10568
10590
|
editorScene.transformByState({
|
|
@@ -10572,11 +10594,6 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10572
10594
|
scaleY: scaleY * scaleAdjustY
|
|
10573
10595
|
});
|
|
10574
10596
|
documentComponent.resize(editorWidth * scaleAdjustX / scaleX, editorHeight * scaleAdjustY / scaleY);
|
|
10575
|
-
/**
|
|
10576
|
-
* sometimes requestIdleCallback is invalid, so use setTimeout to ensure the successful execution of the resizeBySize method.
|
|
10577
|
-
* resize canvas
|
|
10578
|
-
* When modifying the selection area for a formula, it is necessary to add a setTimeout to ensure successful updating.
|
|
10579
|
-
*/
|
|
10580
10597
|
setTimeout(() => {
|
|
10581
10598
|
docEngine.resizeBySize(fixLineWidthByScale(editorWidth, precisionScaleX), fixLineWidthByScale(physicHeight, precisionScaleY));
|
|
10582
10599
|
callback === null || callback === void 0 || callback();
|
|
@@ -10596,6 +10613,26 @@ let SheetCellEditorResizeService = class SheetCellEditorResizeService extends Di
|
|
|
10596
10613
|
show: true
|
|
10597
10614
|
});
|
|
10598
10615
|
}
|
|
10616
|
+
_fitEditorViewport(editorScene, editorHeight, clientHeight) {
|
|
10617
|
+
const viewportMain = editorScene.getViewport(VIEWPORT_KEY.VIEW_MAIN);
|
|
10618
|
+
let scrollBar = viewportMain === null || viewportMain === void 0 ? void 0 : viewportMain.getScrollBar();
|
|
10619
|
+
if (editorHeight > clientHeight) {
|
|
10620
|
+
if (scrollBar == null) viewportMain && new ScrollBar(viewportMain, {
|
|
10621
|
+
enableHorizontal: false,
|
|
10622
|
+
barSize: 8
|
|
10623
|
+
});
|
|
10624
|
+
else viewportMain === null || viewportMain === void 0 || viewportMain.resetCanvasSizeAndUpdateScroll();
|
|
10625
|
+
viewportMain === null || viewportMain === void 0 || viewportMain.scrollToViewportPos({ viewportScrollY: editorHeight - clientHeight });
|
|
10626
|
+
} else {
|
|
10627
|
+
var _viewportMain$getScro;
|
|
10628
|
+
scrollBar = null;
|
|
10629
|
+
viewportMain === null || viewportMain === void 0 || (_viewportMain$getScro = viewportMain.getScrollBar()) === null || _viewportMain$getScro === void 0 || _viewportMain$getScro.dispose();
|
|
10630
|
+
}
|
|
10631
|
+
return {
|
|
10632
|
+
physicHeight: Math.min(editorHeight, clientHeight),
|
|
10633
|
+
scrollBarWidth: (scrollBar === null || scrollBar === void 0 ? void 0 : scrollBar.barSize) ?? 0
|
|
10634
|
+
};
|
|
10635
|
+
}
|
|
10599
10636
|
_getEditorContentElement() {
|
|
10600
10637
|
var _this$_embedFloatingG;
|
|
10601
10638
|
return ((_this$_embedFloatingG = this._embedFloatingGeometryService) === null || _this$_embedFloatingG === void 0 || (_this$_embedFloatingG = _this$_embedFloatingG.getRegistrationByChildUnitId(this._editingUnitId)) === null || _this$_embedFloatingG === void 0 ? void 0 : _this$_embedFloatingG.contentRoot) ?? this._layoutService.getContentElement();
|
|
@@ -14684,6 +14721,7 @@ let HeaderFreezeRenderController = class HeaderFreezeRenderController extends Di
|
|
|
14684
14721
|
if (row === -1 || row === 0) isTopView = false;
|
|
14685
14722
|
if (column === -1 || column === 0) isLeftView = false;
|
|
14686
14723
|
const startSheetView = skeleton.getNoMergeCellWithCoordByIndex(row - ySplit, column - xSplit, false);
|
|
14724
|
+
if (isTopView && row === ySplit) startSheetView.startY = 0;
|
|
14687
14725
|
const endSheetView = skeleton.getNoMergeCellWithCoordByIndex(row, column, false);
|
|
14688
14726
|
viewMainLeftTop.disable();
|
|
14689
14727
|
viewMainTop.disable();
|
|
@@ -14916,6 +14954,10 @@ let HeaderFreezeRenderController = class HeaderFreezeRenderController extends Di
|
|
|
14916
14954
|
* When switching sheet tabs, it is necessary to update the frozen state of the current view.
|
|
14917
14955
|
*/
|
|
14918
14956
|
_skeletonListener() {
|
|
14957
|
+
this.disposeWithMe(this._sheetSkeletonManagerService.currentSkeleton$.pipe(switchMap((param) => {
|
|
14958
|
+
var _param$skeleton;
|
|
14959
|
+
return (param === null || param === void 0 || (_param$skeleton = param.skeleton) === null || _param$skeleton === void 0 ? void 0 : _param$skeleton.gapConfigChanged$) ?? EMPTY;
|
|
14960
|
+
})).subscribe(() => this._refreshCurrent()));
|
|
14919
14961
|
this.disposeWithMe(toDisposable(this._sheetSkeletonManagerService.currentSkeleton$.subscribe((param) => {
|
|
14920
14962
|
if ([
|
|
14921
14963
|
SetWorksheetActiveOperation.id,
|
|
@@ -17451,51 +17493,51 @@ const BORDER_LINE_CHILDREN = [
|
|
|
17451
17493
|
];
|
|
17452
17494
|
const BORDER_SIZE_CHILDREN = [
|
|
17453
17495
|
{
|
|
17454
|
-
label:
|
|
17496
|
+
label: "sheets-ui.borderStyle.thin",
|
|
17455
17497
|
value: BorderStyleTypes.THIN
|
|
17456
17498
|
},
|
|
17457
17499
|
{
|
|
17458
|
-
label:
|
|
17500
|
+
label: "sheets-ui.borderStyle.hair",
|
|
17459
17501
|
value: BorderStyleTypes.HAIR
|
|
17460
17502
|
},
|
|
17461
17503
|
{
|
|
17462
|
-
label:
|
|
17504
|
+
label: "sheets-ui.borderStyle.dotted",
|
|
17463
17505
|
value: BorderStyleTypes.DOTTED
|
|
17464
17506
|
},
|
|
17465
17507
|
{
|
|
17466
|
-
label:
|
|
17508
|
+
label: "sheets-ui.borderStyle.dashed",
|
|
17467
17509
|
value: BorderStyleTypes.DASHED
|
|
17468
17510
|
},
|
|
17469
17511
|
{
|
|
17470
|
-
label:
|
|
17512
|
+
label: "sheets-ui.borderStyle.dashDot",
|
|
17471
17513
|
value: BorderStyleTypes.DASH_DOT
|
|
17472
17514
|
},
|
|
17473
17515
|
{
|
|
17474
|
-
label:
|
|
17516
|
+
label: "sheets-ui.borderStyle.dashDotDot",
|
|
17475
17517
|
value: BorderStyleTypes.DASH_DOT_DOT
|
|
17476
17518
|
},
|
|
17477
17519
|
{
|
|
17478
|
-
label:
|
|
17520
|
+
label: "sheets-ui.borderStyle.medium",
|
|
17479
17521
|
value: BorderStyleTypes.MEDIUM
|
|
17480
17522
|
},
|
|
17481
17523
|
{
|
|
17482
|
-
label:
|
|
17524
|
+
label: "sheets-ui.borderStyle.mediumDashed",
|
|
17483
17525
|
value: BorderStyleTypes.MEDIUM_DASHED
|
|
17484
17526
|
},
|
|
17485
17527
|
{
|
|
17486
|
-
label:
|
|
17528
|
+
label: "sheets-ui.borderStyle.mediumDashDot",
|
|
17487
17529
|
value: BorderStyleTypes.MEDIUM_DASH_DOT
|
|
17488
17530
|
},
|
|
17489
17531
|
{
|
|
17490
|
-
label:
|
|
17532
|
+
label: "sheets-ui.borderStyle.mediumDashDotDot",
|
|
17491
17533
|
value: BorderStyleTypes.MEDIUM_DASH_DOT_DOT
|
|
17492
17534
|
},
|
|
17493
17535
|
{
|
|
17494
|
-
label:
|
|
17536
|
+
label: "sheets-ui.borderStyle.thick",
|
|
17495
17537
|
value: BorderStyleTypes.THICK
|
|
17496
17538
|
},
|
|
17497
17539
|
{
|
|
17498
|
-
label:
|
|
17540
|
+
label: "sheets-ui.borderStyle.double",
|
|
17499
17541
|
value: BorderStyleTypes.DOUBLE
|
|
17500
17542
|
}
|
|
17501
17543
|
];
|
|
@@ -19525,6 +19567,7 @@ function PasteRibbonMenuItemFactory(accessor) {
|
|
|
19525
19567
|
return {
|
|
19526
19568
|
...PasteSpacialMenuItemFactory(accessor),
|
|
19527
19569
|
id: PASTE_RIBBON_MENU_ID,
|
|
19570
|
+
icon: "DocPasteOptionsIcon",
|
|
19528
19571
|
title: "sheets-ui.rightClick.paste",
|
|
19529
19572
|
hidden$: combineLatest([getObservableWithExclusiveRange$(accessor, getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET)), accessor.get(IContextService).subscribeContextValue$(FOCUSING_SHAPE_TEXT_EDITOR).pipe(startWith(false))]).pipe(map(([hidden, editing]) => hidden || editing))
|
|
19530
19573
|
};
|
|
@@ -19797,6 +19840,9 @@ function SetColWidthMenuItemFactory(accessor) {
|
|
|
19797
19840
|
//#endregion
|
|
19798
19841
|
//#region src/menu/merge.menu.ts
|
|
19799
19842
|
function CellMergeMenuItemFactory(accessor) {
|
|
19843
|
+
const commandService = accessor.get(ICommandService);
|
|
19844
|
+
const instanceService = accessor.get(IUniverInstanceService);
|
|
19845
|
+
const selectionService = accessor.get(SheetsSelectionsService);
|
|
19800
19846
|
const editDisabled$ = getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
19801
19847
|
workbookTypes: [WorkbookEditablePermission],
|
|
19802
19848
|
worksheetTypes: [
|
|
@@ -19812,6 +19858,22 @@ function CellMergeMenuItemFactory(accessor) {
|
|
|
19812
19858
|
icon: "MergeAllIcon",
|
|
19813
19859
|
tooltip: "sheets-ui.toolbar.mergeCell.main",
|
|
19814
19860
|
type: MenuItemType.SUBITEMS,
|
|
19861
|
+
activated$: deriveStateFromActiveSheet$(instanceService, false, ({ worksheet }) => new Observable((subscriber) => {
|
|
19862
|
+
const update = () => {
|
|
19863
|
+
var _selectionService$get;
|
|
19864
|
+
const primary = (_selectionService$get = selectionService.getCurrentLastSelection()) === null || _selectionService$get === void 0 ? void 0 : _selectionService$get.primary;
|
|
19865
|
+
subscriber.next(!!primary && !!worksheet.getMergedCell(primary.actualRow, primary.actualColumn));
|
|
19866
|
+
};
|
|
19867
|
+
const selectionSubscription = selectionService.selectionChanged$.subscribe(update);
|
|
19868
|
+
const commandDisposable = commandService.onCommandExecuted((command) => {
|
|
19869
|
+
if (command.id === AddWorksheetMergeMutation.id || command.id === RemoveWorksheetMergeMutation.id) update();
|
|
19870
|
+
});
|
|
19871
|
+
update();
|
|
19872
|
+
return () => {
|
|
19873
|
+
selectionSubscription.unsubscribe();
|
|
19874
|
+
commandDisposable.dispose();
|
|
19875
|
+
};
|
|
19876
|
+
})).pipe(distinctUntilChanged()),
|
|
19815
19877
|
hidden$: combineLatest([getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET), accessor.get(IContextService).subscribeContextValue$(FOCUSING_COMMON_DRAWINGS).pipe(startWith(false))]).pipe(map(([hidden, focusingDrawing]) => hidden || focusingDrawing)),
|
|
19816
19878
|
disabled$: editDisabled$.pipe(combineLatestWith(selectionsHasCross$), map(([disable, hasCross]) => disable || hasCross))
|
|
19817
19879
|
};
|
|
@@ -20395,18 +20457,6 @@ function Text2NumberContextMenuItemFactory(accessor) {
|
|
|
20395
20457
|
};
|
|
20396
20458
|
}
|
|
20397
20459
|
|
|
20398
|
-
//#endregion
|
|
20399
|
-
//#region src/views/sheet-slider/SheetZoomInput.tsx
|
|
20400
|
-
const SHEET_ZOOM_INPUT_COMPONENT = "SHEET_ZOOM_INPUT_COMPONENT";
|
|
20401
|
-
function SheetZoomInput({ className, ...props }) {
|
|
20402
|
-
const commandService = useDependency(ICommandService);
|
|
20403
|
-
return /* @__PURE__ */ jsx(ZoomInput, {
|
|
20404
|
-
...props,
|
|
20405
|
-
className: clsx("!univer-bg-transparent dark:!univer-bg-transparent", className),
|
|
20406
|
-
onChange: (value) => commandService.executeCommand(SetZoomRatioFromToolbarCommand.id, { value })
|
|
20407
|
-
});
|
|
20408
|
-
}
|
|
20409
|
-
|
|
20410
20460
|
//#endregion
|
|
20411
20461
|
//#region src/menu/zoom.menu.ts
|
|
20412
20462
|
const ZOOM_RATIO_MENU_ID = "sheet.menu.zoom-ratio";
|
|
@@ -20435,16 +20485,14 @@ function getZoomRatioValue$(accessor) {
|
|
|
20435
20485
|
function ZoomRatioMenuItemFactory(accessor) {
|
|
20436
20486
|
return {
|
|
20437
20487
|
id: ZOOM_RATIO_MENU_ID,
|
|
20438
|
-
|
|
20439
|
-
type: MenuItemType.
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
}
|
|
20447
|
-
},
|
|
20488
|
+
selectionsCommandId: SetZoomRatioFromToolbarCommand.id,
|
|
20489
|
+
type: MenuItemType.SELECTOR,
|
|
20490
|
+
icon: "ZoomInIcon",
|
|
20491
|
+
tooltip: "sheets-ui.toolbar.zoom",
|
|
20492
|
+
selections: ZOOM_RATIO_LIST.map((value) => ({
|
|
20493
|
+
value,
|
|
20494
|
+
label: `${value}%`
|
|
20495
|
+
})),
|
|
20448
20496
|
value$: getZoomRatioValue$(accessor),
|
|
20449
20497
|
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_SHEET)
|
|
20450
20498
|
};
|
|
@@ -20681,31 +20729,29 @@ const menuSchema = {
|
|
|
20681
20729
|
order: 1,
|
|
20682
20730
|
gridLayout: {
|
|
20683
20731
|
row: 1,
|
|
20684
|
-
column: 2
|
|
20685
|
-
width: 112
|
|
20732
|
+
column: 2
|
|
20686
20733
|
},
|
|
20687
20734
|
menuItemFactory: ZoomRatioMenuItemFactory
|
|
20735
|
+
}
|
|
20736
|
+
},
|
|
20737
|
+
[RibbonViewGroup.VISIBILITY]: {
|
|
20738
|
+
[ToggleGridlinesCommand.id]: {
|
|
20739
|
+
order: 0,
|
|
20740
|
+
gridLayout: {
|
|
20741
|
+
row: 1,
|
|
20742
|
+
column: 1
|
|
20743
|
+
},
|
|
20744
|
+
menuItemFactory: ToggleGridlinesMenuFactory
|
|
20688
20745
|
},
|
|
20689
20746
|
[ToggleFullscreenOperation.id]: {
|
|
20690
|
-
order:
|
|
20747
|
+
order: 1,
|
|
20691
20748
|
gridLayout: {
|
|
20692
20749
|
row: 2,
|
|
20693
|
-
column:
|
|
20694
|
-
showLabel: true,
|
|
20695
|
-
width: 112
|
|
20750
|
+
column: 1
|
|
20696
20751
|
},
|
|
20697
20752
|
menuItemFactory: FullscreenMenuItemFactory
|
|
20698
20753
|
}
|
|
20699
|
-
}
|
|
20700
|
-
[RibbonViewGroup.VISIBILITY]: { [ToggleGridlinesCommand.id]: {
|
|
20701
|
-
order: 0,
|
|
20702
|
-
gridLayout: {
|
|
20703
|
-
row: 1,
|
|
20704
|
-
column: 1,
|
|
20705
|
-
showLabel: true
|
|
20706
|
-
},
|
|
20707
|
-
menuItemFactory: ToggleGridlinesMenuFactory
|
|
20708
|
-
} }
|
|
20754
|
+
}
|
|
20709
20755
|
},
|
|
20710
20756
|
[ContextMenuPosition.MAIN_AREA]: {
|
|
20711
20757
|
[ContextMenuGroup.QUICK]: {
|
|
@@ -22120,11 +22166,15 @@ function DefinedName({ disable }) {
|
|
|
22120
22166
|
return /* @__PURE__ */ jsxs("div", {
|
|
22121
22167
|
ref: nameBoxRef,
|
|
22122
22168
|
"data-u-comp": "defined-name",
|
|
22169
|
+
onMouseDown: (e) => {
|
|
22170
|
+
if (disable) e.preventDefault();
|
|
22171
|
+
},
|
|
22123
22172
|
className: "univer-relative univer-box-border univer-flex univer-h-full univer-w-24 univer-border-r-gray-200 univer-py-1.5 univer-transition-all",
|
|
22124
22173
|
children: [/* @__PURE__ */ jsx("input", {
|
|
22125
22174
|
ref: inputRef,
|
|
22126
22175
|
className: clsx("univer-box-border univer-size-full univer-appearance-none univer-bg-transparent univer-pl-1.5 univer-pr-5 univer-text-gray-900 focus:univer-outline-none dark:!univer-border-r-gray-700 dark:!univer-text-gray-0", borderRightClassName, { "univer-cursor-not-allowed": disable }),
|
|
22127
22176
|
type: "text",
|
|
22177
|
+
disabled: disable,
|
|
22128
22178
|
value: inputValue,
|
|
22129
22179
|
onChange: handleChangeSelection,
|
|
22130
22180
|
onKeyDown: handleKeyDown,
|
|
@@ -22141,7 +22191,7 @@ function DefinedName({ disable }) {
|
|
|
22141
22191
|
})
|
|
22142
22192
|
}),
|
|
22143
22193
|
disabled: disable,
|
|
22144
|
-
open,
|
|
22194
|
+
open: !disable && open,
|
|
22145
22195
|
onOpenChange: setOpen,
|
|
22146
22196
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
22147
22197
|
children: /* @__PURE__ */ jsx("a", {
|
|
@@ -22322,7 +22372,7 @@ function FormulaBar(props) {
|
|
|
22322
22372
|
children: [
|
|
22323
22373
|
/* @__PURE__ */ jsx("div", {
|
|
22324
22374
|
className: "univer-relative univer-box-border univer-h-full univer-w-[100px]",
|
|
22325
|
-
children: /* @__PURE__ */ jsx(DefinedName, { disable: disableDefinedName ?? editDisable })
|
|
22375
|
+
children: /* @__PURE__ */ jsx(DefinedName, { disable: iconActivated || (disableDefinedName ?? editDisable) })
|
|
22326
22376
|
}),
|
|
22327
22377
|
/* @__PURE__ */ jsxs("div", {
|
|
22328
22378
|
className: "univer-flex univer-size-full",
|
|
@@ -23513,6 +23563,7 @@ function SheetBarTabs() {
|
|
|
23513
23563
|
const slideTabBarContainerRef = useRef(null);
|
|
23514
23564
|
const activeSheetIdRef = useRef(activeSheetId);
|
|
23515
23565
|
const commandService = useDependency(ICommandService);
|
|
23566
|
+
const layoutService = useDependency(ILayoutService);
|
|
23516
23567
|
const renderManagerService = useDependency(IRenderManagerService);
|
|
23517
23568
|
const sheetBarService = useDependency(ISheetBarService);
|
|
23518
23569
|
const localeService = useDependency(LocaleService);
|
|
@@ -23698,6 +23749,7 @@ function SheetBarTabs() {
|
|
|
23698
23749
|
subUnitId,
|
|
23699
23750
|
unitId: workbookRef.current.getUnitId()
|
|
23700
23751
|
}).then((result) => {
|
|
23752
|
+
requestAnimationFrame(() => layoutService.focus(workbookRef.current.getUnitId()));
|
|
23701
23753
|
if (result !== false) return;
|
|
23702
23754
|
const worksheet = workbookRef.current.getSheetBySheetId(subUnitId);
|
|
23703
23755
|
if (worksheet) {
|
|
@@ -23705,7 +23757,11 @@ function SheetBarTabs() {
|
|
|
23705
23757
|
syncActiveSheetRender(subUnitId);
|
|
23706
23758
|
}
|
|
23707
23759
|
});
|
|
23708
|
-
}, [
|
|
23760
|
+
}, [
|
|
23761
|
+
commandService,
|
|
23762
|
+
layoutService,
|
|
23763
|
+
syncActiveSheetRender
|
|
23764
|
+
]);
|
|
23709
23765
|
const observeResize = useCallback((slideTabBar) => {
|
|
23710
23766
|
var _slideTabBarContainer;
|
|
23711
23767
|
const slideTabBarContainer = (_slideTabBarContainer = slideTabBarContainerRef.current) === null || _slideTabBarContainer === void 0 ? void 0 : _slideTabBarContainer.querySelector("[data-u-comp=slide-tab-bar]");
|
|
@@ -25015,7 +25071,7 @@ const useHighlightRange = (ranges = []) => {
|
|
|
25015
25071
|
//#endregion
|
|
25016
25072
|
//#region package.json
|
|
25017
25073
|
var name = "@univerjs/sheets-ui";
|
|
25018
|
-
var version = "1.0
|
|
25074
|
+
var version = "1.1.0";
|
|
25019
25075
|
|
|
25020
25076
|
//#endregion
|
|
25021
25077
|
//#region src/views/cell-popup/config.ts
|
|
@@ -25348,7 +25404,7 @@ function CellAlert({ popup, DropdownMenuComponent = DropdownMenu }) {
|
|
|
25348
25404
|
const [isHovered, setIsHovered] = useState(false);
|
|
25349
25405
|
const alert = (_popup$extraProps = popup.extraProps) === null || _popup$extraProps === void 0 ? void 0 : _popup$extraProps.alert;
|
|
25350
25406
|
if (!alert) return null;
|
|
25351
|
-
const { type, title, message, menu } = alert;
|
|
25407
|
+
const { type, title, message, menu, action, width } = alert;
|
|
25352
25408
|
if (menu === null || menu === void 0 ? void 0 : menu.length) {
|
|
25353
25409
|
const accessibleLabel = [title, message].filter((value) => typeof value === "string").join(": ");
|
|
25354
25410
|
const showMore = visible || isHovered;
|
|
@@ -25388,14 +25444,24 @@ function CellAlert({ popup, DropdownMenuComponent = DropdownMenu }) {
|
|
|
25388
25444
|
[1]: /* @__PURE__ */ jsx(WarningIcon, { className: "univer-text-yellow-500" })
|
|
25389
25445
|
};
|
|
25390
25446
|
return /* @__PURE__ */ jsxs("div", {
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25447
|
+
style: { width },
|
|
25448
|
+
className: "univer-z-[100] univer-box-border univer-rounded-lg univer-bg-gray-0 univer-px-2 univer-py-1 univer-text-gray-900 univer-shadow dark:!univer-bg-gray-1000 dark:!univer-text-gray-0",
|
|
25449
|
+
children: [
|
|
25450
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25451
|
+
className: "univer-mb-1.5 univer-flex univer-h-5 univer-flex-row univer-items-center univer-gap-x-1.5 univer-text-sm univer-font-medium",
|
|
25452
|
+
children: [type ? iconMap[type] : null, title]
|
|
25453
|
+
}),
|
|
25454
|
+
/* @__PURE__ */ jsx("div", {
|
|
25455
|
+
className: "univer-text-sm",
|
|
25456
|
+
children: message
|
|
25457
|
+
}),
|
|
25458
|
+
action && /* @__PURE__ */ jsx(Button, {
|
|
25459
|
+
className: "univer-mt-2",
|
|
25460
|
+
disabled: action.disabled,
|
|
25461
|
+
onClick: action.onSelect,
|
|
25462
|
+
children: action.label
|
|
25463
|
+
})
|
|
25464
|
+
]
|
|
25399
25465
|
});
|
|
25400
25466
|
}
|
|
25401
25467
|
|
|
@@ -25423,15 +25489,17 @@ let CellAlertManagerService = class CellAlertManagerService extends Disposable {
|
|
|
25423
25489
|
_defineProperty(this, "_currentAlert", /* @__PURE__ */ new Map());
|
|
25424
25490
|
_defineProperty(this, "currentAlert$", this._currentAlert$.asObservable());
|
|
25425
25491
|
this.disposeWithMe(() => {
|
|
25492
|
+
this.clearAlert();
|
|
25426
25493
|
this._currentAlert$.complete();
|
|
25427
25494
|
});
|
|
25428
25495
|
}
|
|
25429
25496
|
showAlert(alert) {
|
|
25430
25497
|
var _alert$menu, _alert$menu2, _alert$menu3;
|
|
25431
25498
|
let lastPopup = this._currentAlert.get(alert.key);
|
|
25432
|
-
if (lastPopup)
|
|
25433
|
-
|
|
25434
|
-
|
|
25499
|
+
if (lastPopup) {
|
|
25500
|
+
lastPopup.dispose.dispose();
|
|
25501
|
+
lastPopup.alert = alert;
|
|
25502
|
+
} else {
|
|
25435
25503
|
lastPopup = {
|
|
25436
25504
|
alert,
|
|
25437
25505
|
dispose: { dispose() {} }
|
|
@@ -25454,13 +25522,7 @@ let CellAlertManagerService = class CellAlertManagerService extends Disposable {
|
|
|
25454
25522
|
extraProps: { alert },
|
|
25455
25523
|
priority: 1
|
|
25456
25524
|
});
|
|
25457
|
-
if (disposable)
|
|
25458
|
-
if (lastPopup) {
|
|
25459
|
-
var _lastPopup$dispose;
|
|
25460
|
-
(_lastPopup$dispose = lastPopup.dispose) === null || _lastPopup$dispose === void 0 || _lastPopup$dispose.dispose();
|
|
25461
|
-
}
|
|
25462
|
-
lastPopup.dispose = disposable;
|
|
25463
|
-
}
|
|
25525
|
+
if (disposable) lastPopup.dispose = disposable;
|
|
25464
25526
|
this._currentAlert$.next(Array.from(this._currentAlert.entries()));
|
|
25465
25527
|
}
|
|
25466
25528
|
removeAlert(key) {
|
|
@@ -26312,8 +26374,8 @@ function SelectList(props) {
|
|
|
26312
26374
|
const filteredOptions = useMemo(() => {
|
|
26313
26375
|
return options.filter((item) => lowerFilter ? item.label.toLowerCase().includes(lowerFilter) : true);
|
|
26314
26376
|
}, [options, lowerFilter]);
|
|
26315
|
-
const handleSearchChange = (
|
|
26316
|
-
setLowerFilter(
|
|
26377
|
+
const handleSearchChange = (value) => {
|
|
26378
|
+
setLowerFilter(value.toLowerCase());
|
|
26317
26379
|
};
|
|
26318
26380
|
const sheetPermissionCheckController = useDependency(SheetPermissionCheckController);
|
|
26319
26381
|
const hasPermission = useMemo(() => sheetPermissionCheckController.permissionCheckWithRanges({
|
|
@@ -26339,9 +26401,8 @@ function SelectList(props) {
|
|
|
26339
26401
|
children: [
|
|
26340
26402
|
showSearchOnDropdown && /* @__PURE__ */ jsx("div", {
|
|
26341
26403
|
className: "univer-box-border univer-flex univer-w-full univer-px-2",
|
|
26342
|
-
children: /* @__PURE__ */ jsx(
|
|
26404
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
26343
26405
|
ref: searchRef,
|
|
26344
|
-
className: clsx("univer-w-full univer-rounded-md univer-bg-gray-0 univer-px-2 univer-py-1 univer-text-sm univer-text-gray-900 focus:univer-border-primary-500 focus:univer-outline-none dark:!univer-bg-gray-1000 dark:!univer-text-gray-0", borderClassName),
|
|
26345
26406
|
type: "text",
|
|
26346
26407
|
value: lowerFilter,
|
|
26347
26408
|
autoFocus: true,
|
|
@@ -26370,14 +26431,16 @@ function SelectList(props) {
|
|
|
26370
26431
|
const index = item.label.toLocaleLowerCase().indexOf(lowerFilter);
|
|
26371
26432
|
const isThemeColor = Boolean(((_item$color = item.color) === null || _item$color === void 0 ? void 0 : _item$color.includes(".")) && themeService.isValidThemeColor(item.color));
|
|
26372
26433
|
const backgroundColor = isThemeColor ? themeService.getColorFromTheme(item.color) : item.color;
|
|
26373
|
-
const
|
|
26434
|
+
const color = new ColorKit(backgroundColor);
|
|
26435
|
+
const hasBackground = Boolean(backgroundColor) && backgroundColor !== "transparent" && color.getAlpha() > 0;
|
|
26436
|
+
const isDark = color.isDark();
|
|
26374
26437
|
return /* @__PURE__ */ jsxs("div", {
|
|
26375
26438
|
className: "univer-flex univer-cursor-pointer univer-flex-row univer-items-center univer-justify-between univer-rounded-md univer-px-1.5 univer-py-1 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700",
|
|
26376
26439
|
onClick: handleClick,
|
|
26377
26440
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26378
26441
|
className: clsx("univer-inline-flex univer-h-4 univer-w-fit univer-items-center univer-truncate univer-rounded-full univer-px-1.5 univer-text-xs", {
|
|
26379
|
-
"univer-text-gray-900": isThemeColor || !isDark,
|
|
26380
|
-
"univer-text-gray-0": !isThemeColor && isDark
|
|
26442
|
+
"univer-text-gray-900": hasBackground && (isThemeColor || !isDark),
|
|
26443
|
+
"univer-text-gray-0": hasBackground && !isThemeColor && isDark
|
|
26381
26444
|
}),
|
|
26382
26445
|
style: { background: backgroundColor },
|
|
26383
26446
|
children: lowerFilter && item.label.toLowerCase().includes(lowerFilter) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -27042,6 +27105,7 @@ function BorderLine(props) {
|
|
|
27042
27105
|
//#endregion
|
|
27043
27106
|
//#region src/views/border-panel/BorderPanel.tsx
|
|
27044
27107
|
function BorderPanel(props) {
|
|
27108
|
+
const localeService = useDependency(LocaleService);
|
|
27045
27109
|
const iconManager = useDependency(IconManager);
|
|
27046
27110
|
const selectionManagerService = useDependency(SheetsSelectionsService);
|
|
27047
27111
|
const { direction } = useContext(ConfigContext);
|
|
@@ -27107,7 +27171,7 @@ function BorderPanel(props) {
|
|
|
27107
27171
|
className: "univer-m-0 univer-grid univer-list-none univer-gap-1 univer-p-0",
|
|
27108
27172
|
children: BORDER_SIZE_CHILDREN.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
|
|
27109
27173
|
type: "button",
|
|
27110
|
-
"aria-label":
|
|
27174
|
+
"aria-label": localeService.t(item.label),
|
|
27111
27175
|
"aria-pressed": item.value === value.style,
|
|
27112
27176
|
className: clsx("univer-flex univer-w-full univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-border-none univer-bg-transparent univer-px-1 univer-py-3 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-200 dark:!univer-bg-gray-600": item.value === value.style }),
|
|
27113
27177
|
onClick: () => handleClick(item.value, "style"),
|
|
@@ -27655,16 +27719,35 @@ function MobileMenuItemInput(props) {
|
|
|
27655
27719
|
const { prefix, suffix, value, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, disabled$, onChange } = props;
|
|
27656
27720
|
const localeService = useDependency(LocaleService);
|
|
27657
27721
|
const disabled = useObservable(disabled$ ?? null, false);
|
|
27658
|
-
const
|
|
27722
|
+
const [draft, setDraft] = useState(null);
|
|
27723
|
+
const inputValue = draft !== null && draft.source === value ? draft.value : Math.min(max, Math.max(min, Number(value)));
|
|
27724
|
+
if (draft !== null && draft.source !== value) setDraft(null);
|
|
27659
27725
|
function handleChange(nextValue) {
|
|
27660
|
-
|
|
27726
|
+
setDraft({
|
|
27727
|
+
source: value,
|
|
27728
|
+
value: nextValue
|
|
27729
|
+
});
|
|
27730
|
+
}
|
|
27731
|
+
function handleConfirm() {
|
|
27732
|
+
if (disabled || inputValue == null || !Number.isFinite(inputValue)) return;
|
|
27733
|
+
const nextValue = Math.min(max, Math.max(min, inputValue));
|
|
27734
|
+
setDraft({
|
|
27735
|
+
source: value,
|
|
27736
|
+
value: nextValue
|
|
27737
|
+
});
|
|
27661
27738
|
onChange(nextValue.toString());
|
|
27662
27739
|
}
|
|
27663
27740
|
function handleKeyDown(event) {
|
|
27741
|
+
if (event.key === "Escape" && !event.nativeEvent.isComposing) return;
|
|
27664
27742
|
event.stopPropagation();
|
|
27743
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
27744
|
+
event.preventDefault();
|
|
27745
|
+
handleConfirm();
|
|
27746
|
+
}
|
|
27665
27747
|
}
|
|
27666
27748
|
return /* @__PURE__ */ jsxs("div", {
|
|
27667
|
-
className: "univer-flex univer-min-w-0 univer-flex-1 univer-items-center univer-gap-2",
|
|
27749
|
+
className: "univer-flex univer-min-w-0 univer-flex-1 univer-flex-wrap univer-items-center univer-gap-2",
|
|
27750
|
+
onClick: (event) => event.stopPropagation(),
|
|
27668
27751
|
children: [
|
|
27669
27752
|
/* @__PURE__ */ jsx("span", {
|
|
27670
27753
|
className: "univer-shrink-0 univer-text-base univer-font-medium",
|
|
@@ -27672,13 +27755,11 @@ function MobileMenuItemInput(props) {
|
|
|
27672
27755
|
}),
|
|
27673
27756
|
/* @__PURE__ */ jsx("div", {
|
|
27674
27757
|
className: "univer-w-20 univer-shrink-0",
|
|
27675
|
-
onClick: (event) => event.stopPropagation(),
|
|
27676
27758
|
children: /* @__PURE__ */ jsx(InputNumber, {
|
|
27677
27759
|
value: inputValue,
|
|
27678
27760
|
size: "small",
|
|
27679
27761
|
precision: 0,
|
|
27680
|
-
|
|
27681
|
-
max,
|
|
27762
|
+
allowEmpty: true,
|
|
27682
27763
|
disabled,
|
|
27683
27764
|
onKeyDown: handleKeyDown,
|
|
27684
27765
|
onChange: handleChange
|
|
@@ -27687,6 +27768,15 @@ function MobileMenuItemInput(props) {
|
|
|
27687
27768
|
/* @__PURE__ */ jsx("span", {
|
|
27688
27769
|
className: "univer-min-w-0 univer-truncate univer-text-base univer-font-medium",
|
|
27689
27770
|
children: localeService.t(suffix)
|
|
27771
|
+
}),
|
|
27772
|
+
/* @__PURE__ */ jsx(Button, {
|
|
27773
|
+
type: "button",
|
|
27774
|
+
variant: "primary",
|
|
27775
|
+
size: "large",
|
|
27776
|
+
className: "univer-shrink-0",
|
|
27777
|
+
disabled: disabled || inputValue == null || !Number.isFinite(inputValue),
|
|
27778
|
+
onClick: handleConfirm,
|
|
27779
|
+
children: localeService.t("sheets-ui.button.confirm")
|
|
27690
27780
|
})
|
|
27691
27781
|
]
|
|
27692
27782
|
});
|
|
@@ -28981,6 +29071,7 @@ const sheetsUIIcons = {
|
|
|
28981
29071
|
DeleteColumnDoubleIcon,
|
|
28982
29072
|
DeleteIcon,
|
|
28983
29073
|
DeleteRowDoubleIcon,
|
|
29074
|
+
DocPasteOptionsIcon,
|
|
28984
29075
|
DownBorderDoubleIcon,
|
|
28985
29076
|
DownloadImageIcon,
|
|
28986
29077
|
EyeIcon,
|
|
@@ -29038,7 +29129,8 @@ const sheetsUIIcons = {
|
|
|
29038
29129
|
VerticalCenterIcon,
|
|
29039
29130
|
VerticalIntegrationIcon,
|
|
29040
29131
|
VerticalTextIcon,
|
|
29041
|
-
WriteIcon
|
|
29132
|
+
WriteIcon,
|
|
29133
|
+
ZoomInIcon
|
|
29042
29134
|
};
|
|
29043
29135
|
|
|
29044
29136
|
//#endregion
|
|
@@ -29054,7 +29146,6 @@ let MobileComponentsController = class MobileComponentsController extends Dispos
|
|
|
29054
29146
|
this.disposeWithMe(componentManager.register(CascaderDropdown.componentKey, CascaderDropdown));
|
|
29055
29147
|
this.disposeWithMe(componentManager.register(MENU_ITEM_INPUT_COMPONENT, MobileMenuItemInput));
|
|
29056
29148
|
this.disposeWithMe(componentManager.register(MENU_ITEM_FROZEN_COMPONENT, MenuItemFrozen));
|
|
29057
|
-
this.disposeWithMe(componentManager.register(SHEET_ZOOM_INPUT_COMPONENT, SheetZoomInput));
|
|
29058
29149
|
this.disposeWithMe(componentManager.register(BORDER_PANEL_COMPONENT, MobileBorderPanel));
|
|
29059
29150
|
this.disposeWithMe(componentManager.register(DEFINED_NAME_CONTAINER, MobileDefinedNameContainer));
|
|
29060
29151
|
this.disposeWithMe(componentManager.register(CELL_POPUP_COMPONENT_KEY, CellPopup));
|
|
@@ -30718,6 +30809,7 @@ function MobileBorderColorView(props) {
|
|
|
30718
30809
|
}
|
|
30719
30810
|
function MobileBorderStyleView(props) {
|
|
30720
30811
|
const { value, onExecute } = props;
|
|
30812
|
+
const localeService = useDependency(LocaleService);
|
|
30721
30813
|
return /* @__PURE__ */ jsx("div", {
|
|
30722
30814
|
className: "univer-overflow-hidden univer-rounded-xl univer-bg-gray-0 dark:!univer-bg-gray-800",
|
|
30723
30815
|
children: BORDER_SIZE_CHILDREN.map((option, index) => /* @__PURE__ */ jsxs("button", {
|
|
@@ -30737,7 +30829,7 @@ function MobileBorderStyleView(props) {
|
|
|
30737
30829
|
}),
|
|
30738
30830
|
/* @__PURE__ */ jsx("span", {
|
|
30739
30831
|
className: "univer-flex-1 univer-text-left univer-text-sm",
|
|
30740
|
-
children: option.
|
|
30832
|
+
children: localeService.t(option.label)
|
|
30741
30833
|
}),
|
|
30742
30834
|
value.style === option.value && /* @__PURE__ */ jsx(CheckMarkIcon, { className: "univer-text-primary-600 dark:!univer-text-primary-400" })
|
|
30743
30835
|
]
|
|
@@ -31282,7 +31374,11 @@ function MobileFormulaBar() {
|
|
|
31282
31374
|
let cursorFrame;
|
|
31283
31375
|
const contentFrame = requestAnimationFrame(() => {
|
|
31284
31376
|
editorBridgeService.refreshEditCellState();
|
|
31285
|
-
editorService.focus(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
|
|
31377
|
+
if (editorService.getFocusId() !== DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY) editorService.focus(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
|
|
31378
|
+
else {
|
|
31379
|
+
var _editorService$getEdi;
|
|
31380
|
+
(_editorService$getEdi = editorService.getEditor(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY)) === null || _editorService$getEdi === void 0 || _editorService$getEdi.focus();
|
|
31381
|
+
}
|
|
31286
31382
|
cursorFrame = requestAnimationFrame(() => {
|
|
31287
31383
|
var _editor$getDocumentDa;
|
|
31288
31384
|
const editor = editorService.getEditor(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
|
|
@@ -31844,7 +31940,7 @@ const MobileFormulaBarSubmitCommand = {
|
|
|
31844
31940
|
id: MOBILE_FORMULA_BAR_SUBMIT_COMMAND_ID,
|
|
31845
31941
|
type: CommandType.COMMAND,
|
|
31846
31942
|
async handler(accessor) {
|
|
31847
|
-
var _accessor$get$getCurr, _workbook$getActiveSh, _formulaModel$getBody
|
|
31943
|
+
var _accessor$get$getCurr, _workbook$getActiveSh, _formulaModel$getBody;
|
|
31848
31944
|
const instanceService = accessor.get(IUniverInstanceService);
|
|
31849
31945
|
const workbook = instanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_SHEET);
|
|
31850
31946
|
const formulaModel = instanceService.getUnit(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
|
|
@@ -31876,8 +31972,12 @@ const MobileFormulaBarSubmitCommand = {
|
|
|
31876
31972
|
});
|
|
31877
31973
|
editorBridgeService.refreshEditCellState();
|
|
31878
31974
|
editorBridgeService.changeEditorDirty(false);
|
|
31975
|
+
const editorService = accessor.get(IEditorService);
|
|
31976
|
+
const formulaEditor = editorService.getEditor(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
|
|
31977
|
+
if (editorService.getFocusId() !== DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY) editorService.focus(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
|
|
31978
|
+
else formulaEditor === null || formulaEditor === void 0 || formulaEditor.focus();
|
|
31879
31979
|
const endOffset = Math.max(0, (((_formulaModel$getBody = formulaModel.getBody()) === null || _formulaModel$getBody === void 0 ? void 0 : _formulaModel$getBody.dataStream.length) ?? 2) - 2);
|
|
31880
|
-
|
|
31980
|
+
formulaEditor === null || formulaEditor === void 0 || formulaEditor.setSelectionRanges([{
|
|
31881
31981
|
startOffset: endOffset,
|
|
31882
31982
|
endOffset
|
|
31883
31983
|
}], false);
|
|
@@ -31960,6 +32060,7 @@ let SheetUIMobileController = class SheetUIMobileController extends Disposable {
|
|
|
31960
32060
|
ScrollToRangeOperation,
|
|
31961
32061
|
SetUnderlineCommand,
|
|
31962
32062
|
SetZoomRatioCommand,
|
|
32063
|
+
SetZoomRatioFromToolbarCommand,
|
|
31963
32064
|
SetZoomRatioOperation,
|
|
31964
32065
|
ShowMenuListCommand,
|
|
31965
32066
|
InsertRangeMoveDownConfirmCommand,
|
|
@@ -32970,11 +33071,7 @@ let MobileCellEditRenderController = class MobileCellEditRenderController extend
|
|
|
32970
33071
|
this._commandService.syncExecuteCommand(SetCellEditVisibleOperation.id, {
|
|
32971
33072
|
visible: true,
|
|
32972
33073
|
eventType: DeviceInputEventType.Dblclick,
|
|
32973
|
-
unitId: this._context.unitId
|
|
32974
|
-
pointerPosition: {
|
|
32975
|
-
x: cell.event.clientX,
|
|
32976
|
-
y: cell.event.clientY
|
|
32977
|
-
}
|
|
33074
|
+
unitId: this._context.unitId
|
|
32978
33075
|
});
|
|
32979
33076
|
}));
|
|
32980
33077
|
this.disposeWithMe(hoverManagerService.currentPointerDownCell$.subscribe((cell) => {
|
|
@@ -35465,7 +35562,6 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
35465
35562
|
const componentManager = this._componentManager;
|
|
35466
35563
|
this.disposeWithMe(componentManager.register(MENU_ITEM_INPUT_COMPONENT, MenuItemInput));
|
|
35467
35564
|
this.disposeWithMe(componentManager.register(MENU_ITEM_FROZEN_COMPONENT, MenuItemFrozen));
|
|
35468
|
-
this.disposeWithMe(componentManager.register(SHEET_ZOOM_INPUT_COMPONENT, SheetZoomInput));
|
|
35469
35565
|
this.disposeWithMe(componentManager.register(BORDER_PANEL_COMPONENT, BorderPanel));
|
|
35470
35566
|
this.disposeWithMe(componentManager.register(DEFINED_NAME_CONTAINER, DefinedNameContainer));
|
|
35471
35567
|
this.disposeWithMe(componentManager.register(CELL_POPUP_COMPONENT_KEY, CellPopup));
|