@univerjs/sheets-ui 0.1.16 → 0.2.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 +12 -11
- package/lib/es/index.js +21147 -18801
- package/lib/index.css +1 -1
- package/lib/locale/en-US.json +1 -1
- package/lib/locale/ru-RU.json +1 -1
- package/lib/locale/zh-CN.json +1 -1
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +12 -12
- package/lib/types/commands/commands/set-scroll.command.d.ts +5 -5
- package/lib/types/commands/operations/scroll.operation.d.ts +2 -2
- package/lib/types/commands/operations/set-zoom-ratio.operation.d.ts +0 -2
- package/lib/types/controllers/auto-fill.controller.d.ts +2 -1
- package/lib/types/controllers/editor/editing.render-controller.d.ts +72 -0
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +3 -4
- package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +6 -6
- package/lib/types/controllers/menu/menu.d.ts +3 -3
- package/lib/types/controllers/menu/permission.menu.d.ts +1 -1
- package/lib/types/controllers/mobile/mobile-sheet-ui.controller.d.ts +26 -0
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +2 -4
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +2 -4
- package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +4 -13
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +5 -5
- package/lib/types/controllers/render-controllers/header-menu.render-controller.d.ts +2 -1
- package/lib/types/controllers/render-controllers/header-move.render-controller.d.ts +5 -5
- package/lib/types/controllers/render-controllers/header-resize.render-controller.d.ts +8 -10
- package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts +20 -0
- package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +43 -0
- package/lib/types/controllers/render-controllers/mobile/mobile-selection.render-controller.d.ts +40 -0
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +3 -2
- package/lib/types/controllers/render-controllers/selection.render-controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/sheet.render-controller.d.ts +41 -15
- package/lib/types/controllers/render-controllers/skeleton.render-controller.d.ts +10 -0
- package/lib/types/controllers/utils/component-tools.d.ts +3 -0
- package/lib/types/index.d.ts +35 -15
- package/lib/types/mobile-sheets-ui-plugin.d.ts +23 -0
- package/lib/types/services/auto-fill/rules.d.ts +1 -0
- package/lib/types/services/auto-fill/type.d.ts +7 -6
- package/lib/types/services/clipboard/__tests__/clipboard-paste-from-notepad.spec.d.ts +16 -0
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +6 -6
- package/lib/types/services/clipboard/__tests__/constant.d.ts +2 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +1 -0
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +7 -1
- package/lib/types/services/clipboard/html-to-usm/parse-node-style.d.ts +1 -1
- package/lib/types/services/clipboard/html-to-usm/utils.d.ts +1 -1
- package/lib/types/services/clipboard/utils.d.ts +1 -0
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +2 -2
- package/lib/types/services/scroll-manager.service.d.ts +63 -14
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +179 -0
- package/lib/types/services/selection/mobile-selection-shape.d.ts +53 -0
- package/lib/types/services/selection/selection-render-model.d.ts +14 -5
- package/lib/types/services/selection/selection-render.service.d.ts +22 -21
- package/lib/types/services/selection/selection-shape-extension.d.ts +9 -5
- package/lib/types/services/selection/selection-shape.d.ts +96 -39
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +9 -4
- package/lib/types/services/sheets-render.service.d.ts +2 -2
- package/lib/types/sheets-ui-plugin.d.ts +3 -4
- package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +3 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +0 -2
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/animate.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +3 -0
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +1 -1
- package/lib/umd/index.js +12 -11
- package/package.json +25 -25
- package/lib/types/controllers/editor/editing.controller.d.ts +0 -10
- package/lib/types/controllers/editor/end-edit.controller.d.ts +0 -37
- package/lib/types/controllers/editor/start-edit.controller.d.ts +0 -54
- package/lib/types/controllers/render-controllers/sheet-render.controller.d.ts +0 -41
- /package/lib/types/commands/commands/{delete-range-move-left-confirm.command .d.ts → delete-range-move-left-confirm.command.d.ts} +0 -0
package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { IContextMenuService, ILayoutService } from '@univerjs/ui';
|
|
4
|
+
import { SelectionManagerService } from '@univerjs/sheets';
|
|
5
|
+
import { ISelectionRenderService } from '../../../services/selection/selection-render.service';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* On mobile devices, the context menu would popup when
|
|
9
|
+
*
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
export declare class SheetContextMenuMobileRenderController extends Disposable implements IRenderModule {
|
|
13
|
+
private readonly _context;
|
|
14
|
+
private readonly _layoutService;
|
|
15
|
+
private readonly _contextMenuService;
|
|
16
|
+
private readonly _selectionManagerService;
|
|
17
|
+
private readonly _selectionRenderService;
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _contextMenuService: IContextMenuService, _selectionManagerService: SelectionManagerService, _selectionRenderService: ISelectionRenderService);
|
|
19
|
+
private _init;
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IRange, Workbook, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { SelectionManagerService } from '@univerjs/sheets';
|
|
4
|
+
import { ScrollManagerService } from '../../../services/scroll-manager.service';
|
|
5
|
+
import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This controller handles scroll logic in sheet interaction.
|
|
9
|
+
*/
|
|
10
|
+
export declare class MobileSheetsScrollRenderController extends Disposable implements IRenderModule {
|
|
11
|
+
private readonly _context;
|
|
12
|
+
private readonly _sheetSkeletonManagerService;
|
|
13
|
+
private readonly _commandService;
|
|
14
|
+
private readonly _renderManagerService;
|
|
15
|
+
private readonly _selectionManagerService;
|
|
16
|
+
private readonly _scrollManagerService;
|
|
17
|
+
protected readonly _univerInstanceService: IUniverInstanceService;
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
|
|
19
|
+
scrollToRange(range: IRange): boolean;
|
|
20
|
+
private _init;
|
|
21
|
+
private _initCommandListener;
|
|
22
|
+
private _scrollToSelectionForExpand;
|
|
23
|
+
private _getFreeze;
|
|
24
|
+
private _initScrollEventListener;
|
|
25
|
+
/**
|
|
26
|
+
* for row & col selection.
|
|
27
|
+
* x value of row seleciton controlPoints is always half of viewport wide.
|
|
28
|
+
* y value of col selection controlPoints is always half of viewport height.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
private _scrollInfo$Handler;
|
|
32
|
+
private _initSkeletonListener;
|
|
33
|
+
/**
|
|
34
|
+
* for mobile
|
|
35
|
+
*/
|
|
36
|
+
private _initPointerScrollEvent;
|
|
37
|
+
private _updateSceneSize;
|
|
38
|
+
private _getSheetObject;
|
|
39
|
+
private _scrollToSelectionByDirection;
|
|
40
|
+
private _scrollToSelection;
|
|
41
|
+
private _getViewportBounding;
|
|
42
|
+
private _scrollToCell;
|
|
43
|
+
}
|
package/lib/types/controllers/render-controllers/mobile/mobile-selection.render-controller.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Workbook, Disposable, ICommandService, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { SelectionManagerService } from '@univerjs/sheets';
|
|
4
|
+
import { IDefinedNamesService } from '@univerjs/engine-formula';
|
|
5
|
+
import { ISelectionRenderService } from '../../../services/selection/selection-render.service';
|
|
6
|
+
import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
|
|
7
|
+
import { ScrollManagerService } from '../../../services/scroll-manager.service';
|
|
8
|
+
|
|
9
|
+
export declare class MobileSelectionRenderController extends Disposable implements IRenderModule {
|
|
10
|
+
private readonly _context;
|
|
11
|
+
private readonly _sheetSkeletonManagerService;
|
|
12
|
+
private readonly _commandService;
|
|
13
|
+
private readonly _selectionRenderService;
|
|
14
|
+
private readonly _selectionManagerService;
|
|
15
|
+
private readonly _themeService;
|
|
16
|
+
private readonly _definedNamesService;
|
|
17
|
+
private _scrollManagerService;
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService, _themeService: ThemeService, _definedNamesService: IDefinedNamesService, _scrollManagerService: ScrollManagerService);
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private _init;
|
|
21
|
+
private _initDefinedNameListener;
|
|
22
|
+
private _updateControlPointWhenScrolling;
|
|
23
|
+
private _getSelections;
|
|
24
|
+
private _getActiveViewport;
|
|
25
|
+
private _initSpreadsheetEvent;
|
|
26
|
+
private _initThemeChangeListener;
|
|
27
|
+
private _refreshSelection;
|
|
28
|
+
private _initRowHeaderEvent;
|
|
29
|
+
private _initColumnHeaderEvent;
|
|
30
|
+
private _initLeftTop;
|
|
31
|
+
private _initSelectionChangeListener;
|
|
32
|
+
private _syncDefinedNameRange;
|
|
33
|
+
private _initUserActionSyncListener;
|
|
34
|
+
private _move;
|
|
35
|
+
private _getSheetObject;
|
|
36
|
+
private _initCommandListener;
|
|
37
|
+
private _initSkeletonChangeListener;
|
|
38
|
+
private _getAllRange;
|
|
39
|
+
private _getZeroRange;
|
|
40
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange, Workbook, Disposable, ICommandService } from '@univerjs/core';
|
|
1
|
+
import { IRange, Workbook, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
4
4
|
import { ScrollManagerService } from '../../services/scroll-manager.service';
|
|
@@ -14,7 +14,8 @@ export declare class SheetsScrollRenderController extends Disposable implements
|
|
|
14
14
|
private readonly _renderManagerService;
|
|
15
15
|
private readonly _selectionManagerService;
|
|
16
16
|
private readonly _scrollManagerService;
|
|
17
|
-
|
|
17
|
+
protected readonly _univerInstanceService: IUniverInstanceService;
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
|
|
18
19
|
scrollToRange(range: IRange): boolean;
|
|
19
20
|
private _init;
|
|
20
21
|
private _initCommandListener;
|
|
@@ -19,7 +19,7 @@ export declare class SelectionRenderController extends Disposable implements IRe
|
|
|
19
19
|
private _initDefinedNameListener;
|
|
20
20
|
private _getSelections;
|
|
21
21
|
private _getActiveViewport;
|
|
22
|
-
private
|
|
22
|
+
private _initSpreadsheetEvent;
|
|
23
23
|
private _initThemeChangeListener;
|
|
24
24
|
private _refreshSelection;
|
|
25
25
|
private _initRowHeader;
|
|
@@ -1,15 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Workbook, ICommandService, RxDisposable } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
4
|
+
import { SheetsRenderService } from '../../services/sheets-render.service';
|
|
5
|
+
|
|
6
|
+
export declare class SheetRenderController extends RxDisposable implements IRenderModule {
|
|
7
|
+
private readonly _context;
|
|
8
|
+
private readonly _sheetSkeletonManagerService;
|
|
9
|
+
private readonly _sheetRenderService;
|
|
10
|
+
private readonly _commandService;
|
|
11
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _sheetRenderService: SheetsRenderService, _commandService: ICommandService);
|
|
12
|
+
private _addNewRender;
|
|
13
|
+
private _addComponent;
|
|
14
|
+
private _initViewports;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* initViewport & wheel event
|
|
18
|
+
* +-----------------+--------------------+-------------------+
|
|
19
|
+
* | VIEW_LEFT_TOP | VIEW_COLUMN_LEFT | VIEW_COLUMN_RIGHT |
|
|
20
|
+
* +-----------------+--------------------+-------------------+
|
|
21
|
+
* | VIEW_ROW_TOP | VIEW_MAIN_LEFT_TOP | VIEW_MAIN_TOP |
|
|
22
|
+
* +-----------------+--------------------+-------------------+
|
|
23
|
+
* | VIEW_ROW_BOTTOM | VIEW_MAIN_LEFT | VIEW_MAIN |
|
|
24
|
+
* +-----------------+--------------------+-------------------+
|
|
25
|
+
*/
|
|
26
|
+
private _addViewport;
|
|
27
|
+
private _initRerenderScheduler;
|
|
28
|
+
private _initCommandListener;
|
|
29
|
+
private _markUnitDirty;
|
|
30
|
+
/**
|
|
31
|
+
* cellValue data structure:
|
|
32
|
+
* {[row]: { [col]: value}}
|
|
33
|
+
* @param cellValue
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
private _cellValueToRange;
|
|
37
|
+
private _rangeToBounds;
|
|
38
|
+
private _markViewportDirty;
|
|
39
|
+
private _spreadsheetViewports;
|
|
40
|
+
private _initMouseWheel;
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
4
|
+
|
|
5
|
+
export declare class SheetSkeletonRenderController extends Disposable {
|
|
6
|
+
private readonly _context;
|
|
7
|
+
private readonly _sheetSkeletonManagerService;
|
|
8
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
9
|
+
private _initRemoveSheet;
|
|
10
|
+
}
|
|
@@ -5,6 +5,9 @@ export interface ISheetObjectParam {
|
|
|
5
5
|
spreadsheet: Spreadsheet;
|
|
6
6
|
spreadsheetRowHeader: SpreadsheetHeader;
|
|
7
7
|
spreadsheetColumnHeader: SpreadsheetColumnHeader;
|
|
8
|
+
/**
|
|
9
|
+
* sheet corner: a rect which placed on the intersection of rowHeader & columnHeader
|
|
10
|
+
*/
|
|
8
11
|
spreadsheetLeftTopPlaceholder: Rect;
|
|
9
12
|
scene: Scene;
|
|
10
13
|
engine: Engine;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,17 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export * from './basics';
|
|
17
17
|
export { getEditorObject } from './basics/editor/get-editor-object';
|
|
18
|
-
export { AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
19
|
-
export { SheetCopyCommand } from './commands/commands/clipboard.command';
|
|
20
|
-
export { expandToContinuousRange } from './commands/commands/utils/selection-utils';
|
|
21
|
-
export { ExpandSelectionCommand, JumpOver, MoveSelectionCommand } from './commands/commands/set-selection.command';
|
|
22
|
-
export { SetCellEditVisibleArrowOperation, SetCellEditVisibleOperation } from './commands/operations/cell-edit.operation';
|
|
23
|
-
export { SetScrollOperation } from './commands/operations/scroll.operation';
|
|
24
18
|
export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller';
|
|
25
19
|
export { deriveStateFromActiveSheet$, getCurrentRangeDisable$ } from './controllers/menu/menu-util';
|
|
26
20
|
export { SheetsRenderService } from './services/sheets-render.service';
|
|
27
|
-
export { SetZoomRatioOperation } from './commands/operations/set-zoom-ratio.operation';
|
|
28
|
-
export { ResetScrollCommand, ScrollCommand, ScrollToCellCommand, SetScrollRelativeCommand, type IScrollCommandParams, type IScrollToCellCommandParams, type ISetScrollRelativeCommandParams, } from './commands/commands/set-scroll.command';
|
|
29
21
|
export { SHEET_VIEWPORT_KEY as VIEWPORT_KEY } from './common/keys';
|
|
30
22
|
export { AutoFillController } from './controllers/auto-fill.controller';
|
|
31
23
|
export { CellCustomRenderController } from './controllers/cell-custom-render.controller';
|
|
@@ -51,11 +43,11 @@ export { MarkSelectionService } from './services/mark-selection/mark-selection.s
|
|
|
51
43
|
export { IMarkSelectionService } from './services/mark-selection/mark-selection.service';
|
|
52
44
|
export { ISelectionRenderService } from './services/selection/selection-render.service';
|
|
53
45
|
export { SelectionRenderService } from './services/selection/selection-render.service';
|
|
54
|
-
export { SelectionShape } from './services/selection/selection-shape';
|
|
46
|
+
export { SelectionControl as SelectionShape } from './services/selection/selection-shape';
|
|
55
47
|
export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service';
|
|
56
48
|
export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
|
|
57
49
|
export { UniverSheetsUIPlugin } from './sheets-ui-plugin';
|
|
58
|
-
export { SheetRenderController } from './controllers/render-controllers/sheet-
|
|
50
|
+
export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
|
|
59
51
|
export { HoverManagerService } from './services/hover-manager.service';
|
|
60
52
|
export { DragManagerService } from './services/drag-manager.service';
|
|
61
53
|
export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service';
|
|
@@ -74,14 +66,42 @@ export { SheetMenuPosition } from './controllers/menu/menu';
|
|
|
74
66
|
export { useHighlightRange } from './hooks/useHighlightRange';
|
|
75
67
|
export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';
|
|
76
68
|
export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';
|
|
77
|
-
export type { ISheetPasteParams } from './commands/commands/clipboard.command';
|
|
78
|
-
export { SheetCutCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteShortKeyCommand } from './commands/commands/clipboard.command';
|
|
79
|
-
export { SetRangeBoldCommand, SetRangeItalicCommand, SetRangeUnderlineCommand, SetRangeStrickThroughCommand } from './commands/commands/inline-format.command';
|
|
80
|
-
export { ApplyFormatPainterCommand } from './commands/commands/set-format-painter.command';
|
|
81
69
|
export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller';
|
|
82
70
|
export { FormulaEditorController } from './controllers/editor/formula-editor.controller';
|
|
83
71
|
export { StatusBarController } from './controllers/status-bar.controller';
|
|
84
72
|
export { SheetPermissionInterceptorBaseController } from './controllers/permission/sheet-permission-interceptor-base.controller';
|
|
85
73
|
export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render';
|
|
86
|
-
export { ScrollToRangeOperation } from './commands/operations/scroll-to-range.operation';
|
|
87
74
|
export { SheetPrintInterceptorService } from './services/print-interceptor.service';
|
|
75
|
+
export { UniverSheetsMobileUIPlugin } from './mobile-sheets-ui-plugin';
|
|
76
|
+
export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar';
|
|
77
|
+
export { expandToContinuousRange } from './commands/commands/utils/selection-utils';
|
|
78
|
+
export { AddWorksheetMergeCommand, AddWorksheetMergeAllCommand, AddWorksheetMergeVerticalCommand, AddWorksheetMergeHorizontalCommand } from './commands/commands/add-worksheet-merge.command';
|
|
79
|
+
export { AutoFillCommand, AutoClearContentCommand } from './commands/commands/auto-fill.command';
|
|
80
|
+
export { SheetCopyCommand, SheetCutCommand, SheetPasteCommand, SheetPasteValueCommand, SheetPasteShortKeyCommand, SheetPasteColWidthCommand, SheetPasteFormatCommand, SheetPasteBesidesBorderCommand, type ISheetPasteParams, } from './commands/commands/clipboard.command';
|
|
81
|
+
export { DeleteRangeMoveLeftConfirmCommand } from './commands/commands/delete-range-move-left-confirm.command';
|
|
82
|
+
export { DeleteRangeMoveUpConfirmCommand } from './commands/commands/delete-range-move-up-confirm.command';
|
|
83
|
+
export { HideRowConfirmCommand, HideColConfirmCommand } from './commands/commands/hide-row-col-confirm.command';
|
|
84
|
+
export { SetRangeBoldCommand, SetRangeItalicCommand, SetRangeUnderlineCommand, SetRangeStrickThroughCommand, SetRangeSubscriptCommand, SetRangeSuperscriptCommand, SetRangeFontSizeCommand, SetRangeFontFamilyCommand, SetRangeTextColorCommand, } from './commands/commands/inline-format.command';
|
|
85
|
+
export { InsertRangeMoveDownConfirmCommand } from './commands/commands/insert-range-move-down-confirm.command';
|
|
86
|
+
export { InsertRangeMoveRightConfirmCommand } from './commands/commands/insert-range-move-right-confirm.command';
|
|
87
|
+
export { AddRangeProtectionFromToolbarCommand, AddRangeProtectionFromContextMenuCommand, ViewSheetPermissionFromContextMenuCommand, AddRangeProtectionFromSheetBarCommand, ViewSheetPermissionFromSheetBarCommand, AddRangeProtectionCommand, DeleteRangeSelectionCommand, SetRangeProtectionCommand, DeleteRangeProtectionFromContextMenuCommand, SetRangeProtectionFromContextMenuCommand, SetProtectionCommand, } from './commands/commands/range-protection.command';
|
|
88
|
+
export { RefillCommand } from './commands/commands/refill.command';
|
|
89
|
+
export { RemoveRowConfirmCommand, RemoveColConfirmCommand } from './commands/commands/remove-row-col-confirm.command';
|
|
90
|
+
export { RemoveSheetConfirmCommand } from './commands/commands/remove-sheet-confirm.command';
|
|
91
|
+
export { SetInfiniteFormatPainterCommand, SetOnceFormatPainterCommand, ApplyFormatPainterCommand } from './commands/commands/set-format-painter.command';
|
|
92
|
+
export { SetSelectionFrozenCommand, SetRowFrozenCommand, SetColumnFrozenCommand, CancelFrozenCommand } from './commands/commands/set-frozen.command';
|
|
93
|
+
export { ResetScrollCommand, ScrollCommand, ScrollToCellCommand, SetScrollRelativeCommand, type IScrollCommandParams, type IScrollToCellCommandParams, type ISetScrollRelativeCommandParams, } from './commands/commands/set-scroll.command';
|
|
94
|
+
export { JumpOver, MoveSelectionCommand, MoveSelectionEnterAndTabCommand, ExpandSelectionCommand, SelectAllCommand } from './commands/commands/set-selection.command';
|
|
95
|
+
export { ChangeZoomRatioCommand, SetZoomRatioCommand } from './commands/commands/set-zoom-ratio.command';
|
|
96
|
+
export { ShowMenuListCommand } from './commands/commands/unhide.command';
|
|
97
|
+
export { AddWorksheetProtectionCommand, DeleteWorksheetProtectionCommand, SetWorksheetProtectionCommand, DeleteWorksheetProtectionFormSheetBarCommand, ChangeSheetProtectionFromSheetBarCommand } from './commands/commands/worksheet-protection.command';
|
|
98
|
+
export { SetActivateCellEditOperation } from './commands/operations/activate-cell-edit.operation';
|
|
99
|
+
export { SetCellEditVisibleOperation, SetCellEditVisibleWithF2Operation, SetCellEditVisibleArrowOperation } from './commands/operations/cell-edit.operation';
|
|
100
|
+
export { RenameSheetOperation } from './commands/operations/rename-sheet.operation';
|
|
101
|
+
export { ScrollToRangeOperation } from './commands/operations/scroll-to-range.operation';
|
|
102
|
+
export { SetScrollOperation } from './commands/operations/scroll.operation';
|
|
103
|
+
export { SetFormatPainterOperation } from './commands/operations/set-format-painter.operation';
|
|
104
|
+
export { SetZoomRatioOperation } from './commands/operations/set-zoom-ratio.operation';
|
|
105
|
+
export { SheetPermissionOpenDialogOperation } from './commands/operations/sheet-permission-open-dialog.operation';
|
|
106
|
+
export { SheetPermissionOpenPanelOperation } from './commands/operations/sheet-permission-open-panel.operation';
|
|
107
|
+
export { SidebarDefinedNameOperation } from './commands/operations/sidebar-defined-name.operation';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
import { IUniverSheetsUIConfig } from './controllers/sheet-ui.controller';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export declare class UniverSheetsMobileUIPlugin extends Plugin {
|
|
10
|
+
private readonly _config;
|
|
11
|
+
readonly _injector: Injector;
|
|
12
|
+
private readonly _renderManagerService;
|
|
13
|
+
private readonly _univerInstanceService;
|
|
14
|
+
static pluginName: string;
|
|
15
|
+
static type: UniverInstanceType;
|
|
16
|
+
constructor(_config: Partial<IUniverSheetsUIConfig>, _injector: Injector, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService);
|
|
17
|
+
onStarting(injector: Injector): void;
|
|
18
|
+
onReady(): void;
|
|
19
|
+
onRendered(): void;
|
|
20
|
+
private _registerRenderBasics;
|
|
21
|
+
private _registerRenderModules;
|
|
22
|
+
private _markSheetAsFocused;
|
|
23
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Direction, ICellData, IMutationInfo, Nullable } from '@univerjs/core';
|
|
2
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
2
3
|
import { IDiscreteRange } from '../../controllers/utils/range-tools';
|
|
3
4
|
|
|
4
5
|
export declare enum AutoFillHookType {
|
|
@@ -18,7 +19,7 @@ export interface ISheetAutoFillHook {
|
|
|
18
19
|
type?: AutoFillHookType;
|
|
19
20
|
bindUnit?: string;
|
|
20
21
|
disable?: (location: IAutoFillLocation, direction: Direction, applyType: APPLY_TYPE) => boolean;
|
|
21
|
-
onBeforeFillData?(location: IAutoFillLocation, direction: Direction):
|
|
22
|
+
onBeforeFillData?(location: IAutoFillLocation, direction: Direction): APPLY_TYPE | void;
|
|
22
23
|
onFillData?(location: IAutoFillLocation, direction: Direction, applyType: APPLY_TYPE): {
|
|
23
24
|
undos: IMutationInfo[];
|
|
24
25
|
redos: IMutationInfo[];
|
|
@@ -46,7 +47,7 @@ export interface ICopyDataInType {
|
|
|
46
47
|
export type ICopyDataInTypeIndexInfo = number[];
|
|
47
48
|
export interface IAutoFillRule {
|
|
48
49
|
type: string;
|
|
49
|
-
match: (cellData: Nullable<ICellData
|
|
50
|
+
match: (cellData: Nullable<ICellData>, accessor: IAccessor) => boolean;
|
|
50
51
|
isContinue: (prev: IRuleConfirmedData, cur: Nullable<ICellData>) => boolean;
|
|
51
52
|
applyFunctions?: APPLY_FUNCTIONS;
|
|
52
53
|
priority: number;
|
|
@@ -63,8 +64,8 @@ export type APPLY_FUNCTIONS = {
|
|
|
63
64
|
[key in APPLY_TYPE]?: (dataWithIndex: ICopyDataInType, len: number, direction: Direction, copyDataPiece: ICopyDataPiece) => Array<Nullable<ICellData>>;
|
|
64
65
|
};
|
|
65
66
|
export declare enum APPLY_TYPE {
|
|
66
|
-
COPY = "
|
|
67
|
-
SERIES = "
|
|
68
|
-
ONLY_FORMAT = "
|
|
69
|
-
NO_FORMAT = "
|
|
67
|
+
COPY = "COPY",
|
|
68
|
+
SERIES = "SERIES",
|
|
69
|
+
ONLY_FORMAT = "ONLY_FORMAT",
|
|
70
|
+
NO_FORMAT = "NO_FORMAT"
|
|
70
71
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -19,12 +19,12 @@ export declare class testPlatformService {
|
|
|
19
19
|
export declare function clipboardTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
20
20
|
univer: Univer;
|
|
21
21
|
get: {
|
|
22
|
-
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<
|
|
22
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
23
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp): T[];
|
|
24
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp): T | null;
|
|
25
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp): T;
|
|
26
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
27
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
|
|
28
28
|
};
|
|
29
29
|
sheet: import('@univerjs/core').Workbook;
|
|
30
30
|
};
|
|
@@ -21,7 +21,8 @@ export declare const fontSampleByUniver = "<html><head></head><body><google data
|
|
|
21
21
|
export declare const borderSampleByExcel = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"\r\nxmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n\r\n<head>\r\n<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">\r\n<meta name=ProgId content=Excel.Sheet>\r\n<meta name=Generator content=\"Microsoft Excel 15\">\r\n<link id=Main-File rel=Main-File\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip.htm\">\r\n<link rel=File-List\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml\">\r\n<style>\r\n<!--table\r\n\t{mso-displayed-decimal-separator:\"\\.\";\r\n\tmso-displayed-thousand-separator:\"\\,\";}\r\n@page\r\n\t{margin:.75in .7in .75in .7in;\r\n\tmso-header-margin:.3in;\r\n\tmso-footer-margin:.3in;}\r\ntr\r\n\t{mso-height-source:auto;\r\n\tmso-ruby-visibility:none;}\r\ncol\r\n\t{mso-width-source:auto;\r\n\tmso-ruby-visibility:none;}\r\nbr\r\n\t{mso-data-placement:same-cell;}\r\ntd\r\n\t{padding-top:1px;\r\n\tpadding-right:1px;\r\n\tpadding-left:1px;\r\n\tmso-ignore:padding;\r\n\tcolor:black;\r\n\tfont-size:12.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-number-format:General;\r\n\ttext-align:general;\r\n\tvertical-align:middle;\r\n\tborder:none;\r\n\tmso-background-source:auto;\r\n\tmso-pattern:auto;\r\n\tmso-protection:locked visible;\r\n\twhite-space:nowrap;\r\n\tmso-rotate:0;}\r\n.xl65\r\n\t{border:.5pt solid black;}\r\n.xl66\r\n\t{text-align:center;\r\n\tborder:.5pt solid black;}\r\nruby\r\n\t{ruby-align:left;}\r\nrt\r\n\t{color:windowtext;\r\n\tfont-size:9.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-char-type:none;\r\n\tdisplay:none;}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body link=\"#0563C1\" vlink=\"#954F72\">\r\n\r\n<table border=0 cellpadding=0 cellspacing=0 width=348 style='border-collapse:\r\n collapse;width:260pt'>\r\n<!--StartFragment-->\r\n <col width=87 span=4 style='width:65pt'>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 width=87 style='height:16.0pt;width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n <td width=87 style='width:65pt'></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65>\u3000</td>\r\n <td class=xl65 style='border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td class=xl65 style='border-top:none'>\u3000</td>\r\n <td class=xl65 style='border-top:none;border-left:none'>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td colspan=2 rowspan=5 class=xl66>\u3000</td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n </tr>\r\n <tr height=21 style='height:16.0pt'>\r\n <td height=21 style='height:16.0pt'></td>\r\n <td></td>\r\n <td></td>\r\n <td></td>\r\n </tr>\r\n<!--EndFragment-->\r\n</table>\r\n\r\n</body>\r\n\r\n</html>\r\n";
|
|
22
22
|
export declare const borderSampleByGoogle = "<google-sheets-html-origin><style type=\"text/css\"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" border=\"1\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\" data-sheets-root=\"1\"><colgroup><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/></colgroup><tbody><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"border-right:1px solid #000000;border-bottom:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\" rowspan=\"5\" colspan=\"2\"><span><div style=\"max-height:105px\"></div></span></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"border-right:1px solid #000000;overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr><tr style=\"height:21px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;\"></td></tr></tbody></table>";
|
|
23
23
|
export declare const borderSampleByUniver = "<html><head></head><body><google data-copy-id=\"PgwMK9\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td style=\"border-bottom: 0.5pt solid #000000; border-top: 0.5pt solid #000000; border-right: 0.5pt solid #000000; border-left: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td rowspan=\"5\" colspan=\"2\" style=\"border-top: 0.5pt solid #000000; border-left: 0.5pt solid #000000; ;border-bottom: 0.5pt solid #000000; border-right: 0.5pt solid #000000; \"></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td></tr><tr style=\"height: 19px;\"><td></td><td></td><td></td><td></td></tr></tbody></table></google></body></html>";
|
|
24
|
-
export declare const rotateSampleByUniver = "<html><head></head><body><google data-copy-id=\"1rz7ZZ\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td>univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"data-rotate: (-45deg);\">univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"data-rotate: (45deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (0deg ,1);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (-90deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"data-rotate: (90deg);\">univer</td></tr></tbody></table></google></body></html>";
|
|
24
|
+
export declare const rotateSampleByUniver = "<html><head></head><body><google data-copy-id=\"1rz7ZZ\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 19px;\"><td>univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"--data-rotate: (-45deg);\">univer</td></tr><tr style=\"height: 46.67004020088826px;\"><td style=\"--data-rotate: (45deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (0deg ,1);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (-90deg);\">univer</td></tr><tr style=\"height: 48.00140380859375px;\"><td style=\"--data-rotate: (90deg);\">univer</td></tr></tbody></table></google></body></html>";
|
|
25
25
|
export declare const alignmentSampleByExcel = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"\r\nxmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n\r\n<head>\r\n<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">\r\n<meta name=ProgId content=Excel.Sheet>\r\n<meta name=Generator content=\"Microsoft Excel 15\">\r\n<link id=Main-File rel=Main-File\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip.htm\">\r\n<link rel=File-List\r\nhref=\"file:////Users/yuanbin/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml\">\r\n<style>\r\n<!--table\r\n\t{mso-displayed-decimal-separator:\"\\.\";\r\n\tmso-displayed-thousand-separator:\"\\,\";}\r\n@page\r\n\t{margin:.75in .7in .75in .7in;\r\n\tmso-header-margin:.3in;\r\n\tmso-footer-margin:.3in;}\r\ntr\r\n\t{mso-height-source:auto;\r\n\tmso-ruby-visibility:none;}\r\ncol\r\n\t{mso-width-source:auto;\r\n\tmso-ruby-visibility:none;}\r\nbr\r\n\t{mso-data-placement:same-cell;}\r\ntd\r\n\t{padding-top:1px;\r\n\tpadding-right:1px;\r\n\tpadding-left:1px;\r\n\tmso-ignore:padding;\r\n\tcolor:black;\r\n\tfont-size:12.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-number-format:General;\r\n\ttext-align:general;\r\n\tvertical-align:middle;\r\n\tborder:none;\r\n\tmso-background-source:auto;\r\n\tmso-pattern:auto;\r\n\tmso-protection:locked visible;\r\n\twhite-space:nowrap;\r\n\tmso-rotate:0;}\r\n.xl65\r\n\t{text-align:left;\r\n\tvertical-align:bottom;}\r\n.xl66\r\n\t{text-align:right;\r\n\tvertical-align:bottom;}\r\n.xl67\r\n\t{text-align:center;\r\n\tvertical-align:bottom;}\r\n.xl68\r\n\t{vertical-align:top;}\r\n.xl69\r\n\t{color:#44546A;\r\n\tfont-size:11.0pt;\r\n\tfont-weight:700;}\r\n.xl70\r\n\t{vertical-align:bottom;}\r\nruby\r\n\t{ruby-align:left;}\r\nrt\r\n\t{color:windowtext;\r\n\tfont-size:9.0pt;\r\n\tfont-weight:400;\r\n\tfont-style:normal;\r\n\ttext-decoration:none;\r\n\tfont-family:\u7B49\u7EBF;\r\n\tmso-generic-font-family:auto;\r\n\tmso-font-charset:134;\r\n\tmso-char-type:none;\r\n\tdisplay:none;}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body link=\"#0563C1\" vlink=\"#954F72\">\r\n\r\n<table border=0 cellpadding=0 cellspacing=0 width=522 style='border-collapse:\r\n collapse;width:390pt'>\r\n <col width=87 span=6 style='width:65pt'>\r\n <tr height=88 style='mso-height-source:userset;height:66.0pt'>\r\n<!--StartFragment-->\r\n <td height=88 class=xl65 width=87 style='height:66.0pt;width:65pt'>\u5DE6\u5BF9\u9F50</td>\r\n <td class=xl66 width=87 style='width:65pt'>\u53F3\u5BF9\u9F50</td>\r\n <td class=xl67 width=87 style='width:65pt'>\u4E2D\u95F4\u5BF9\u9F50</td>\r\n <td class=xl68 width=87 style='width:65pt'>\u9876\u90E8</td>\r\n <td class=xl70 width=87 style='width:65pt'>\u5E95\u90E8\u5BF9\u9F50</td>\r\n <td class=xl69 width=87 style='width:65pt'>\u5C45\u4E2D\u5BF9\u9F50</td>\r\n<!--EndFragment-->\r\n </tr>\r\n</table>\r\n\r\n</body>\r\n\r\n</html>\r\n";
|
|
26
26
|
export declare const alignmentSampleByGoogle = "<google-sheets-html-origin><style type=\"text/css\"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" border=\"1\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\" data-sheets-root=\"1\"><colgroup><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/><col width=\"100\"/></colgroup><tbody><tr style=\"height:65px;\"><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u5DE6\u5BF9\u9F50"}\">\u5DE6\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;text-align:right;\" data-sheets-value=\"{"1":2,"2":"\u53F3\u5BF9\u9F50"}\">\u53F3\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;text-align:center;\" data-sheets-value=\"{"1":2,"2":"\u4E2D\u95F4\u5BF9\u9F50"}\">\u4E2D\u95F4\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:top;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u9876\u90E8"}\">\u9876\u90E8</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-family:Arial;font-size:12pt;font-weight:normal;\" data-sheets-value=\"{"1":2,"2":"\u5E95\u90E8\u5BF9\u9F50"}\">\u5E95\u90E8\u5BF9\u9F50</td><td style=\"overflow:hidden;padding:2px 3px 2px 3px;vertical-align:middle;font-family:Arial;font-size:11pt;font-weight:bold;color:#44546a;\" data-sheets-value=\"{"1":2,"2":"\u5C45\u4E2D\u5BF9\u9F50"}\">\u5C45\u4E2D\u5BF9\u9F50</td></tr></tbody></table>";
|
|
27
27
|
export declare const alignmentSampleByUniver = "<html><head></head><body><google data-copy-id=\"rJhHMI\" -sheets-html-origin=\"\"><table xmlns=\"http://www.w3.org/1999/xhtml\" cellspacing=\"0\" cellpadding=\"0\" dir=\"ltr\" style=\"table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none\"><colgroup><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"><col width=\"73\"></colgroup>\n<tbody><tr style=\"height: 66px;\"><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: left; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u5DE6\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: right; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u53F3\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; text-align: center; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u4E2D\u95F4\u5BF9\u9F50</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; vertical-align: top; font-family: \u7B49\u7EBF; \">\u9876\u90E8</td><td style=\"color: rgb(0, 0, 0); font-size: 12pt; vertical-align: bottom; font-family: \u7B49\u7EBF; \">\u5E95\u90E8\u5BF9\u9F50</td><td style=\"color: rgb(68, 84, 106); font-size: 11pt; vertical-align: middle; font-weight: bold; font-family: \u7B49\u7EBF; \">\u5C45\u4E2D\u5BF9\u9F50</td></tr></tbody></table></google></body></html>";
|
|
28
|
+
export declare const plainTextByNotepad = "day\t2024\u5E74\u4E94\u4E00\u5047\u671F\uFF1A\u76F8\u8F8323\u5E74\t\u76F8\u8F8319\u5E74\r\n\u516C\u8DEF\u603B\u8BA1\t2.1\t24.4\r\n\u516C\u8DEF\u975E\u8425\u4E1A\t1.4\t39.2\r\n\u94C1\u8DEF\t1.4\t23.3\r\n\u6C11\u822A\t8.1\t11.1\r\n\u516C\u8DEF\u8425\u4E1A\u6027\t6.5\t-25.1\r\n\u6C34\u8FD0\t6\t-31.3\r\n";
|
|
@@ -16,14 +16,20 @@ interface IHtmlToUSMServiceProps {
|
|
|
16
16
|
export declare class HtmlToUSMService {
|
|
17
17
|
private static pluginList;
|
|
18
18
|
static use(plugin: IPastePlugin): void;
|
|
19
|
+
private _styleMap;
|
|
19
20
|
private _styleCache;
|
|
20
21
|
private _styleRules;
|
|
21
22
|
private _afterProcessRules;
|
|
22
|
-
private
|
|
23
|
+
private _dom;
|
|
23
24
|
private _getCurrentSkeleton;
|
|
24
25
|
constructor(props: IHtmlToUSMServiceProps);
|
|
25
26
|
convert(html: string): IUniverSheetCopyDataModel;
|
|
27
|
+
private _getStyleBySelectorText;
|
|
28
|
+
private _getStyle;
|
|
26
29
|
private _parseTable;
|
|
30
|
+
private _parseTableByHtml;
|
|
31
|
+
private _parseCellHtml;
|
|
32
|
+
private _getCellTextAndRichText;
|
|
27
33
|
private _generateDocumentDataModelSnapshot;
|
|
28
34
|
private process;
|
|
29
35
|
dispose(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITextStyle } from '@univerjs/core';
|
|
2
2
|
|
|
3
|
-
export declare function extractNodeStyle(node: HTMLElement, predefinedStyles?:
|
|
3
|
+
export declare function extractNodeStyle(node: HTMLElement, predefinedStyles?: Record<string, string>): ITextStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IParagraph, IParagraphStyle, Nullable } from '@univerjs/core';
|
|
2
2
|
|
|
3
|
-
export default function parseToDom(rawHtml: string):
|
|
3
|
+
export default function parseToDom(rawHtml: string): HTMLBodyElement;
|
|
4
4
|
export declare function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle>;
|
|
5
5
|
export declare function generateParagraphs(dataStream: string, prevParagraph?: IParagraph): IParagraph[];
|
|
@@ -20,3 +20,4 @@ export declare function getRangeValuesMergeable(m1: IMutationInfo<ISetRangeValue
|
|
|
20
20
|
export declare function mergeSetRangeValues(mutations: IMutationInfo[]): IMutationInfo<object>[];
|
|
21
21
|
export declare function rangeIntersectWithDiscreteRange(range: IRange, discrete: IDiscreteRange): true | undefined;
|
|
22
22
|
export declare function discreteRangeContainsRange(discrete: IDiscreteRange, range: IRange): boolean;
|
|
23
|
+
export declare function convertTextToTable(text: string): string;
|
|
@@ -2,7 +2,7 @@ import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core
|
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { ISelectionRenderService } from '../selection/selection-render.service';
|
|
5
|
-
import {
|
|
5
|
+
import { SelectionControl } from '../selection/selection-shape';
|
|
6
6
|
|
|
7
7
|
export interface IMarkSelectionService {
|
|
8
8
|
addShape(selection: ISelectionWithStyle, exits?: string[], zIndex?: number): string | null;
|
|
@@ -16,7 +16,7 @@ interface IMarkSelectionInfo {
|
|
|
16
16
|
subUnitId: string;
|
|
17
17
|
selection: ISelectionWithStyle;
|
|
18
18
|
zIndex: number;
|
|
19
|
-
control:
|
|
19
|
+
control: SelectionControl | null;
|
|
20
20
|
exits: string[];
|
|
21
21
|
}
|
|
22
22
|
export declare const IMarkSelectionService: import('@wendellhu/redi').IdentifierDecorator<IMarkSelectionService>;
|