@univerjs/sheets-ui 0.3.0 → 0.4.0-alpha.1
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 +11 -11
- package/lib/es/index.js +3394 -3270
- package/lib/locale/fa-IR.json +613 -0
- package/lib/types/commands/operations/scroll-to-range.operation.d.ts +1 -1
- package/lib/types/common/utils.d.ts +2 -1
- package/lib/types/controllers/auto-height.controller.d.ts +3 -4
- package/lib/types/controllers/cell-alert.controller.d.ts +1 -1
- package/lib/types/controllers/cell-custom-render.controller.d.ts +2 -3
- package/lib/types/controllers/config.schema.d.ts +4 -0
- package/lib/types/controllers/editor/editing.render-controller.d.ts +11 -4
- package/lib/types/controllers/force-string-alert-render.controller.d.ts +1 -1
- package/lib/types/controllers/force-string-render.controller.d.ts +2 -3
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +2 -5
- package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +1 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +4 -3
- package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts +3 -5
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +2 -2
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +2 -2
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +2 -2
- package/lib/types/controllers/render-controllers/sheet.render-controller.d.ts +2 -2
- package/lib/types/controllers/render-controllers/skeleton.render-controller.d.ts +2 -3
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +3 -3
- package/lib/types/controllers/sheet-ui.controller.d.ts +3 -2
- package/lib/types/controllers/status-bar.controller.d.ts +3 -6
- package/lib/types/controllers/utils/char-tools.d.ts +1 -1
- package/lib/types/index.d.ts +3 -1
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/mobile-sheets-ui-plugin.d.ts +1 -1
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +2 -2
- package/lib/types/services/canvas-pop-manager.service.d.ts +1 -1
- package/lib/types/services/editor-bridge.service.d.ts +5 -3
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +2 -2
- package/lib/types/services/selection/base-selection-render.service.d.ts +4 -4
- package/lib/types/services/selection/mobile-selection-shape.d.ts +3 -3
- package/lib/types/services/selection/{selection-shape.d.ts → selection-control.d.ts} +3 -3
- package/lib/types/services/selection/selection-shape-extension.d.ts +1 -1
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +1 -1
- package/lib/types/sheets-ui-plugin.d.ts +3 -2
- package/lib/umd/index.js +9 -9
- package/package.json +17 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
-
import { ComponentManager } from '@univerjs/ui';
|
|
3
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
4
4
|
export declare class CellAlertRenderController extends Disposable implements IRenderModule {
|
|
5
5
|
private readonly _context;
|
|
6
6
|
private _componentManager;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Disposable, IPermissionService
|
|
1
|
+
import { Workbook, Disposable, IPermissionService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, RenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
4
4
|
export declare class CellCustomRenderController extends Disposable implements IRenderModule {
|
|
5
5
|
private readonly _context;
|
|
6
6
|
private readonly _sheetSkeletonManagerService;
|
|
7
7
|
private readonly _renderManagerService;
|
|
8
|
-
private readonly _univerInstanceService;
|
|
9
8
|
private readonly _permissionService;
|
|
10
9
|
private _enterActiveRender;
|
|
11
|
-
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _renderManagerService: RenderManagerService,
|
|
10
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _renderManagerService: RenderManagerService, _permissionService: IPermissionService);
|
|
12
11
|
private _initEventBinding;
|
|
13
12
|
}
|
|
@@ -6,5 +6,9 @@ export interface IUniverSheetsUIConfig {
|
|
|
6
6
|
menu?: MenuConfig;
|
|
7
7
|
disableAutoFocus?: true;
|
|
8
8
|
override?: DependencyOverride;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to show the formula bar.
|
|
11
|
+
*/
|
|
12
|
+
formulaBar?: boolean;
|
|
9
13
|
}
|
|
10
14
|
export declare const defaultPluginConfig: IUniverSheetsUIConfig;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentDataModel, ICellData, IDocumentBody, IDocumentData, IStyleData, Nullable, Workbook, Disposable, ICommandService, IContextService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
2
3
|
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
3
4
|
import { IEditorService } from '@univerjs/docs-ui';
|
|
4
5
|
import { IFunctionService, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
5
|
-
import { IRenderManagerService, IDocumentLayoutObject, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
6
6
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
7
7
|
import { ILayoutService } from '@univerjs/ui';
|
|
8
8
|
import { ICellEditorManagerService } from '../../services/editor/cell-editor-manager.service';
|
|
9
9
|
import { IEditorBridgeService } from '../../services/editor-bridge.service';
|
|
10
|
+
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
10
11
|
export declare class EditingRenderController extends Disposable implements IRenderModule {
|
|
11
12
|
private readonly _context;
|
|
12
13
|
private readonly _layoutService;
|
|
@@ -22,6 +23,7 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
22
23
|
private readonly _commandService;
|
|
23
24
|
protected readonly _localService: LocaleService;
|
|
24
25
|
private readonly _editorService;
|
|
26
|
+
private readonly _sheetSkeletonManagerService;
|
|
25
27
|
/**
|
|
26
28
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
27
29
|
*/
|
|
@@ -31,7 +33,7 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
31
33
|
private _workbookSelections;
|
|
32
34
|
private _d;
|
|
33
35
|
_cursorTimeout: NodeJS.Timeout;
|
|
34
|
-
constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, selectionManagerService: SheetsSelectionsService, _undoRedoService: IUndoRedoService, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _cellEditorManagerService: ICellEditorManagerService, _lexerTreeBuilder: LexerTreeBuilder, _functionService: IFunctionService, _textSelectionManagerService: DocSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService);
|
|
36
|
+
constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, selectionManagerService: SheetsSelectionsService, _undoRedoService: IUndoRedoService, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _cellEditorManagerService: ICellEditorManagerService, _lexerTreeBuilder: LexerTreeBuilder, _functionService: IFunctionService, _textSelectionManagerService: DocSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
35
37
|
dispose(): void;
|
|
36
38
|
private _disposeCurrent;
|
|
37
39
|
private _init;
|
|
@@ -40,6 +42,8 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
40
42
|
private _getEditorSkeleton;
|
|
41
43
|
private _getEditorViewModel;
|
|
42
44
|
private _initialCursorSync;
|
|
45
|
+
private _initSkeletonListener;
|
|
46
|
+
resizeCellEditor(): void;
|
|
43
47
|
/**
|
|
44
48
|
* Should update current editing cell info when selection is changed.
|
|
45
49
|
* @param d DisposableCollection
|
|
@@ -51,6 +55,7 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
51
55
|
* to determine whether it needs to be automatically widened.
|
|
52
56
|
*/
|
|
53
57
|
private _predictingSize;
|
|
58
|
+
private _getEditorMaxSize;
|
|
54
59
|
/**
|
|
55
60
|
* Mainly used to calculate the volume of scenes and objects,
|
|
56
61
|
* determine whether a scrollbar appears,
|
|
@@ -76,6 +81,8 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
76
81
|
private _setOpenForCurrent;
|
|
77
82
|
private _getEditorObject;
|
|
78
83
|
private _handleEditorInvisible;
|
|
84
|
+
submitCellData(documentDataModel: DocumentDataModel): Promise<void>;
|
|
85
|
+
private _submitCellData;
|
|
79
86
|
private _exitInput;
|
|
80
87
|
private _moveCursor;
|
|
81
88
|
/**
|
|
@@ -86,6 +93,6 @@ export declare class EditingRenderController extends Disposable implements IRend
|
|
|
86
93
|
private _moveInEditor;
|
|
87
94
|
private _isCurrentSheetFocused;
|
|
88
95
|
}
|
|
89
|
-
export declare function getCellDataByInput(cellData: ICellData,
|
|
96
|
+
export declare function getCellDataByInput(cellData: ICellData, documentDataModel: Nullable<DocumentDataModel>, lexerTreeBuilder: LexerTreeBuilder, getSnapshot: (data: DocumentDataModel) => IDocumentData, localeService: LocaleService, functionService: IFunctionService): ICellData | null;
|
|
90
97
|
export declare function isRichText(body: IDocumentBody): boolean;
|
|
91
98
|
export declare function getCellStyleBySnapshot(snapshot: IDocumentData): Nullable<IStyleData>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Workbook, Disposable, LocaleService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
-
import { HoverManagerService } from '../services/hover-manager.service';
|
|
4
3
|
import { CellAlertManagerService } from '../services/cell-alert-manager.service';
|
|
4
|
+
import { HoverManagerService } from '../services/hover-manager.service';
|
|
5
5
|
export declare class ForceStringAlertRenderController extends Disposable implements IRenderModule {
|
|
6
6
|
private readonly _context;
|
|
7
7
|
private readonly _hoverManagerService;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
1
|
+
import { Workbook, RxDisposable } from '@univerjs/core';
|
|
3
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
4
4
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
5
5
|
export declare class ForceStringRenderController extends RxDisposable implements IRenderModule {
|
|
6
6
|
private readonly _context;
|
|
7
7
|
private readonly _sheetSkeletonManagerService;
|
|
8
8
|
private readonly _sheetInterceptorService;
|
|
9
9
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _sheetInterceptorService: SheetInterceptorService);
|
|
10
|
-
private _init;
|
|
11
10
|
private _initViewModelIntercept;
|
|
12
11
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Disposable, IAuthzIoService, ICommandService, IPermissionService, IUndoRedoService, IUniverInstanceService, UserManagerService } from '@univerjs/core';
|
|
2
|
-
import { RangeProtectionCache,
|
|
3
|
-
import { IDialogService } from '@univerjs/ui';
|
|
2
|
+
import { RangeProtectionCache, RangeProtectionRuleModel, SheetInterceptorService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';
|
|
4
3
|
export declare class SheetPermissionInitController extends Disposable {
|
|
5
4
|
private readonly _univerInstanceService;
|
|
6
|
-
private readonly _dialogService;
|
|
7
5
|
private _permissionService;
|
|
8
6
|
private _authzIoService;
|
|
9
7
|
private _rangeProtectionRuleModel;
|
|
@@ -11,11 +9,10 @@ export declare class SheetPermissionInitController extends Disposable {
|
|
|
11
9
|
private _userManagerService;
|
|
12
10
|
private _worksheetProtectionPointRuleModel;
|
|
13
11
|
private _sheetInterceptorService;
|
|
14
|
-
private _selectionProtectionRenderModel;
|
|
15
12
|
private _undoRedoService;
|
|
16
13
|
private _commandService;
|
|
17
14
|
private _rangeProtectionCache;
|
|
18
|
-
constructor(_univerInstanceService: IUniverInstanceService,
|
|
15
|
+
constructor(_univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _authzIoService: IAuthzIoService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _userManagerService: UserManagerService, _worksheetProtectionPointRuleModel: WorksheetProtectionPointModel, _sheetInterceptorService: SheetInterceptorService, _undoRedoService: IUndoRedoService, _commandService: ICommandService, _rangeProtectionCache: RangeProtectionCache);
|
|
19
16
|
private _initRangePermissionFromSnapshot;
|
|
20
17
|
private _initRangePermissionChange;
|
|
21
18
|
initWorkbookPermissionChange(_unitId?: string): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, DisposableCollection, ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService
|
|
1
|
+
import { IPermissionTypes, IRange, Disposable, DisposableCollection, ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
2
|
import { IDefinedNamesService, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
3
|
import { RangeProtectionRuleModel, SheetsSelectionsService, WorksheetProtectionRuleModel } from '@univerjs/sheets';
|
|
4
4
|
import { IDialogService } from '@univerjs/ui';
|
package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable
|
|
2
|
-
import { RangeProtectionRuleModel, SheetsSelectionsService } from '@univerjs/sheets';
|
|
1
|
+
import { Workbook, DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
3
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { RangeProtectionCache, RangeProtectionRuleModel, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
|
|
5
5
|
import { HeaderFreezeRenderController } from '../render-controllers/freeze.render-controller';
|
|
6
6
|
import { HeaderMoveRenderController } from '../render-controllers/header-move.render-controller';
|
|
@@ -15,9 +15,10 @@ export declare class SheetPermissionInterceptorCanvasRenderController extends Rx
|
|
|
15
15
|
private _headerMoveRenderController;
|
|
16
16
|
private _selectionRenderService;
|
|
17
17
|
private _headerFreezeRenderController;
|
|
18
|
+
private _rangeProtectionCache;
|
|
18
19
|
private _headerResizeRenderController?;
|
|
19
20
|
disposableCollection: DisposableCollection;
|
|
20
|
-
constructor(_context: IRenderContext<Workbook>, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _headerMoveRenderController: HeaderMoveRenderController, _selectionRenderService: ISheetSelectionRenderService, _headerFreezeRenderController: HeaderFreezeRenderController, _headerResizeRenderController?: HeaderResizeRenderController | undefined);
|
|
21
|
+
constructor(_context: IRenderContext<Workbook>, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _headerMoveRenderController: HeaderMoveRenderController, _selectionRenderService: ISheetSelectionRenderService, _headerFreezeRenderController: HeaderFreezeRenderController, _rangeProtectionCache: RangeProtectionCache, _headerResizeRenderController?: HeaderResizeRenderController | undefined);
|
|
21
22
|
private _initHeaderMovePermissionInterceptor;
|
|
22
23
|
private _initHeaderResizePermissionInterceptor;
|
|
23
24
|
private _initRangeFillPermissionInterceptor;
|
package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { Workbook, DisposableCollection,
|
|
1
|
+
import { Workbook, DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
-
import { RangeProtectionCache
|
|
3
|
+
import { RangeProtectionCache } from '@univerjs/sheets';
|
|
4
4
|
import { StatusBarController } from '../status-bar.controller';
|
|
5
5
|
export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
|
|
6
6
|
export declare class SheetPermissionInterceptorFormulaRenderController extends RxDisposable implements IRenderModule {
|
|
7
7
|
private readonly _context;
|
|
8
|
-
private readonly _injector;
|
|
9
8
|
private readonly _univerInstanceService;
|
|
10
9
|
private readonly _permissionService;
|
|
11
10
|
private readonly _statusBarController;
|
|
12
|
-
private _rangeProtectionRenderModel;
|
|
13
11
|
private _rangeProtectionCache;
|
|
14
12
|
disposableCollection: DisposableCollection;
|
|
15
|
-
constructor(_context: IRenderContext<Workbook>,
|
|
13
|
+
constructor(_context: IRenderContext<Workbook>, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _statusBarController: StatusBarController, _rangeProtectionCache: RangeProtectionCache);
|
|
16
14
|
private _initStatusBarPermissionInterceptor;
|
|
17
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
2
2
|
import { MenuConfig, ComponentManager } from '@univerjs/ui';
|
|
3
|
+
import { Disposable, IPermissionService, IUniverInstanceService } from '@univerjs/core';
|
|
3
4
|
import { RangeProtectionRuleModel, WorksheetProtectionRuleModel } from '@univerjs/sheets';
|
|
4
|
-
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
5
5
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
6
6
|
export interface IUniverSheetsPermissionMenuConfig {
|
|
7
7
|
menu: MenuConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ICommandService, IUniverInstanceService, RxDisposable
|
|
1
|
+
import { Workbook, ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
2
3
|
import { IRangeSelectorService } from '@univerjs/docs-ui';
|
|
3
4
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
|
-
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
5
5
|
import { IEditorBridgeService } from '../../services/editor-bridge.service';
|
|
6
6
|
export declare class EditorBridgeRenderController extends RxDisposable implements IRenderModule {
|
|
7
7
|
private readonly _context;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Disposable, ICommandService, IContextService, Injector
|
|
2
|
-
import {
|
|
1
|
+
import { IRange, Workbook, Disposable, ICommandService, IContextService, Injector } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetScrollManagerService } from '../../services/scroll-manager.service';
|
|
4
4
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ICommandService, IContextService, RxDisposable
|
|
2
|
-
import { ITelemetryService } from '@univerjs/telemetry';
|
|
1
|
+
import { Workbook, ICommandService, IContextService, RxDisposable } from '@univerjs/core';
|
|
3
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { ITelemetryService } from '@univerjs/telemetry';
|
|
4
4
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
5
5
|
import { SheetsRenderService } from '../../services/sheets-render.service';
|
|
6
6
|
export declare class SheetRenderController extends RxDisposable implements IRenderModule {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext } from '@univerjs/engine-render';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
4
|
-
export declare class SheetSkeletonRenderController extends Disposable {
|
|
4
|
+
export declare class SheetSkeletonRenderController extends Disposable implements IRenderModule {
|
|
5
5
|
private readonly _context;
|
|
6
6
|
private readonly _sheetSkeletonManagerService;
|
|
7
7
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
8
|
-
private _initRemoveSheet;
|
|
9
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, ICommandService, IContextService
|
|
1
|
+
import { Workbook, Disposable, ICommandService, IContextService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { IEditorBridgeService } from '../../services/editor-bridge.service';
|
|
4
4
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
@@ -7,8 +7,8 @@ export declare class SheetsZoomRenderController extends Disposable implements IR
|
|
|
7
7
|
private readonly _sheetSkeletonManagerService;
|
|
8
8
|
private readonly _commandService;
|
|
9
9
|
private readonly _contextService;
|
|
10
|
-
private readonly _editorBridgeService
|
|
11
|
-
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _contextService: IContextService, _editorBridgeService
|
|
10
|
+
private readonly _editorBridgeService?;
|
|
11
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _contextService: IContextService, _editorBridgeService?: IEditorBridgeService | undefined);
|
|
12
12
|
updateZoom(worksheetId: string, zoomRatio: number): boolean;
|
|
13
13
|
private _initZoomEventListener;
|
|
14
14
|
private _initSkeletonListener;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
1
|
+
import { Disposable, ICommandService, IConfigService, Injector } from '@univerjs/core';
|
|
2
2
|
import { ComponentManager, ILayoutService, IMenuManagerService, IShortcutService, IUIPartsService } from '@univerjs/ui';
|
|
3
3
|
export declare class SheetUIController extends Disposable {
|
|
4
4
|
protected readonly _injector: Injector;
|
|
@@ -8,7 +8,8 @@ export declare class SheetUIController extends Disposable {
|
|
|
8
8
|
protected readonly _shortcutService: IShortcutService;
|
|
9
9
|
protected readonly _menuManagerService: IMenuManagerService;
|
|
10
10
|
protected readonly _uiPartsService: IUIPartsService;
|
|
11
|
-
|
|
11
|
+
protected readonly _configService: IConfigService;
|
|
12
|
+
constructor(_injector: Injector, _componentManager: ComponentManager, _layoutService: ILayoutService, _commandService: ICommandService, _shortcutService: IShortcutService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService, _configService: IConfigService);
|
|
12
13
|
private _init;
|
|
13
14
|
private _initCustomComponents;
|
|
14
15
|
private _initCommands;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { Disposable, ICommandService, InterceptorManager, IUniverInstanceService
|
|
2
|
-
import {
|
|
1
|
+
import { IRange, Worksheet, Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { ArrayValueObject } from '@univerjs/engine-formula';
|
|
3
3
|
import { INumfmtService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IStatusBarService } from '../services/status-bar.service';
|
|
5
5
|
export declare const STATUS_BAR_PERMISSION_CORRECT: import('@univerjs/core').IInterceptor<ArrayValueObject[], ArrayValueObject[]>;
|
|
6
6
|
export declare class StatusBarController extends Disposable {
|
|
7
7
|
private readonly _univerInstanceService;
|
|
8
8
|
private readonly _selectionManagerService;
|
|
9
|
-
private readonly _functionService;
|
|
10
9
|
private readonly _statusBarService;
|
|
11
10
|
private readonly _commandService;
|
|
12
|
-
private readonly _formulaDataModel;
|
|
13
11
|
private _numfmtService;
|
|
14
|
-
private _calculateTimeout;
|
|
15
12
|
interceptor: InterceptorManager<{
|
|
16
13
|
STATUS_BAR_PERMISSION_CORRECT: import('@univerjs/core').IInterceptor<ArrayValueObject[], ArrayValueObject[]>;
|
|
17
14
|
}>;
|
|
18
|
-
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService,
|
|
15
|
+
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _statusBarService: IStatusBarService, _commandService: ICommandService, _numfmtService: INumfmtService);
|
|
19
16
|
private _init;
|
|
20
17
|
private _registerSelectionListener;
|
|
21
18
|
private _clearResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LocaleType } from '@univerjs/core';
|
|
2
1
|
import { IFunctionService, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
2
|
+
import { LocaleType } from '@univerjs/core';
|
|
3
3
|
export declare function isCJKLocale(locale: LocaleType): boolean;
|
|
4
4
|
/**
|
|
5
5
|
* Convert all full-width characters to half-width characters and try to parse them. If the parsing is successful, apply them. If the parsing is not successful, return them to full-width characters.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService, }
|
|
|
40
40
|
export type { ICellDataWithSpanInfo, ICopyPastePayload, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type';
|
|
41
41
|
export { COPY_TYPE } from './services/clipboard/type';
|
|
42
42
|
export { getRepeatRange } from './services/clipboard/utils';
|
|
43
|
+
export { EditingRenderController } from './controllers/editor/editing.render-controller';
|
|
43
44
|
export { CellEditorManagerService, ICellEditorManagerService } from './services/editor/cell-editor-manager.service';
|
|
44
45
|
export { IFormulaEditorManagerService } from './services/editor/formula-editor-manager.service';
|
|
45
46
|
export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam, } from './services/editor-bridge.service';
|
|
@@ -48,7 +49,7 @@ export { IMarkSelectionService } from './services/mark-selection/mark-selection.
|
|
|
48
49
|
export { SheetSelectionRenderService } from './services/selection/selection-render.service';
|
|
49
50
|
export { getAllSelection, getTopLeftSelection } from './services/selection/base-selection-render.service';
|
|
50
51
|
export { BaseSelectionRenderService, ISheetSelectionRenderService } from './services/selection/base-selection-render.service';
|
|
51
|
-
export { SelectionControl as SelectionShape } from './services/selection/selection-
|
|
52
|
+
export { SelectionControl as SelectionShape } from './services/selection/selection-control';
|
|
52
53
|
export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service';
|
|
53
54
|
export { attachRangeWithCoord, SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
|
|
54
55
|
export { UniverSheetsUIPlugin } from './sheets-ui-plugin';
|
|
@@ -90,6 +91,7 @@ export { FONT_SIZE_COMPONENT } from './components/font-size/interface';
|
|
|
90
91
|
export { attachPrimaryWithCoord, attachSelectionWithCoord } from './services/selection/util';
|
|
91
92
|
export { SELECTION_SHAPE_DEPTH } from './services/selection/const';
|
|
92
93
|
export { menuSchema } from './controllers/menu.schema';
|
|
94
|
+
export { getCellRealRange } from './common/utils';
|
|
93
95
|
export { AddWorksheetMergeAllCommand, AddWorksheetMergeCommand, AddWorksheetMergeHorizontalCommand, AddWorksheetMergeVerticalCommand } from './commands/commands/add-worksheet-merge.command';
|
|
94
96
|
export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
95
97
|
export { type ISheetPasteParams, SheetCopyCommand, SheetCutCommand, SheetPasteBesidesBorderCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
1
2
|
import { Injector, IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IDisposable, Nullable, Direction, Disposable, ICommandService, Injector, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
2
|
import { RenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
5
4
|
import { IAutoFillLocation, IAutoFillRule, ISheetAutoFillHook, APPLY_TYPE } from './type';
|
|
5
|
+
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
6
6
|
export interface IAutoFillService {
|
|
7
7
|
applyType$: Observable<APPLY_TYPE>;
|
|
8
8
|
applyType: APPLY_TYPE;
|
|
@@ -2,7 +2,7 @@ import { INeedCheckDisposable, Nullable, Disposable, ICommandService, IUniverIns
|
|
|
2
2
|
import { BaseObject, IBoundRectNoAngle, Viewport, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { IPopup, ICanvasPopupService } from '@univerjs/ui';
|
|
4
4
|
import { RefRangeService } from '@univerjs/sheets';
|
|
5
|
-
export interface ICanvasPopup extends
|
|
5
|
+
export interface ICanvasPopup extends Omit<IPopup, 'anchorRect' | 'anchorRect$' | 'unitId' | 'subUnitId' | 'canvasElement'> {
|
|
6
6
|
mask?: boolean;
|
|
7
7
|
extraProps?: Record<string, any>;
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DeviceInputEventType, IRenderManagerService, Engine, IDocumentLayoutObject, Scene } from '@univerjs/engine-render';
|
|
1
|
+
import { ICellData, ICellDataForSheetInterceptor, IDisposable, IPosition, ISelectionCell, Nullable, Disposable, IContextService, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
|
|
4
3
|
import { ISheetLocation, SheetsSelectionsService } from '@univerjs/sheets';
|
|
5
4
|
import { KeyCode } from '@univerjs/ui';
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
6
|
+
import { IEditorService } from '@univerjs/docs-ui';
|
|
7
7
|
export interface IEditorBridgeServiceVisibleParam {
|
|
8
8
|
visible: boolean;
|
|
9
9
|
eventType: DeviceInputEventType;
|
|
@@ -49,6 +49,7 @@ export interface IEditorBridgeService {
|
|
|
49
49
|
}>;
|
|
50
50
|
dispose(): void;
|
|
51
51
|
refreshEditCellState(): void;
|
|
52
|
+
refreshEditCellPosition(resetSizeOnly?: boolean): void;
|
|
52
53
|
setEditCell(param: ICurrentEditCellParam): void;
|
|
53
54
|
getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
54
55
|
getLatestEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
@@ -87,6 +88,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
87
88
|
}>;
|
|
88
89
|
constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _refSelectionsService: SheetsSelectionsService, _contextService: IContextService);
|
|
89
90
|
refreshEditCellState(): void;
|
|
91
|
+
refreshEditCellPosition(resetSizeOnly?: boolean): void;
|
|
90
92
|
setEditCell(param: ICurrentEditCellParam): void;
|
|
91
93
|
private _clearCurrentEditCellState;
|
|
92
94
|
getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
1
2
|
import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import {
|
|
4
|
-
import { SelectionControl } from '../selection/selection-shape';
|
|
4
|
+
import { SelectionControl } from '../selection/selection-control';
|
|
5
5
|
export interface IMarkSelectionService {
|
|
6
6
|
addShape(selection: ISelectionWithStyle, exits?: string[], zIndex?: number): string | null;
|
|
7
7
|
removeShape(id: string): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BehaviorSubject, Subject, Observable, Subscription } from 'rxjs';
|
|
1
|
+
import { IFreeze, IInterceptor, Injector, IRange, IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, ThemeService, Disposable, InterceptorManager, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
+
import { IMouseEvent, IPointerEvent, IRenderModule, Scene, SpreadsheetSkeleton, Viewport, ScrollTimer, ScrollTimerType } from '@univerjs/engine-render';
|
|
4
3
|
import { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
5
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
6
|
-
import {
|
|
5
|
+
import { Observable, Subscription, BehaviorSubject, Subject } from 'rxjs';
|
|
7
6
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
7
|
+
import { SelectionControl } from './selection-control';
|
|
8
8
|
export interface IControlFillConfig {
|
|
9
9
|
oldRange: IRange;
|
|
10
10
|
newRange: IRange;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ThemeService, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
+
import { IRectProps, Scene, Rect } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle } from '@univerjs/sheets';
|
|
4
|
-
import { SelectionControl } from './selection-
|
|
4
|
+
import { SelectionControl } from './selection-control';
|
|
5
5
|
export declare class MobileSelectionControl extends SelectionControl {
|
|
6
6
|
protected _scene: Scene;
|
|
7
7
|
protected _zIndex: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Group, Rect
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
1
|
+
import { IRangeWithCoord, ISelectionCellWithMergeInfo, Nullable, ThemeService, Disposable } from '@univerjs/core';
|
|
2
|
+
import { Scene, Group, Rect } from '@univerjs/engine-render';
|
|
4
3
|
import { ISelectionStyle, ISelectionWidgetConfig, ISelectionWithCoordAndStyle } from '@univerjs/sheets';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
5
|
import { SelectionRenderModel } from './selection-render-model';
|
|
6
6
|
export declare enum SELECTION_MANAGER_KEY {
|
|
7
7
|
Selection = "__SpreadsheetSelectionShape__",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Injector, IRangeWithCoord, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
-
import { SelectionControl } from './selection-
|
|
3
|
+
import { SelectionControl } from './selection-control';
|
|
4
4
|
export interface ISelectionShapeTargetSelection {
|
|
5
5
|
originControl: SelectionControl;
|
|
6
6
|
targetSelection: IRangeWithCoord;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
3
|
export interface ISheetSkeletonManagerParam {
|
|
4
|
-
unitId
|
|
4
|
+
unitId: string;
|
|
5
5
|
sheetId: string;
|
|
6
6
|
skeleton: SpreadsheetSkeleton;
|
|
7
7
|
dirty: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
1
2
|
import { IConfigService, Injector, IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
4
4
|
export declare class UniverSheetsUIPlugin extends Plugin {
|
|
5
5
|
private readonly _config;
|
|
6
6
|
readonly _injector: Injector;
|
|
@@ -14,7 +14,8 @@ export declare class UniverSheetsUIPlugin extends Plugin {
|
|
|
14
14
|
onStarting(): void;
|
|
15
15
|
onReady(): void;
|
|
16
16
|
onRendered(): void;
|
|
17
|
+
onSteady(): void;
|
|
17
18
|
private _registerRenderBasics;
|
|
18
19
|
private _registerRenderModules;
|
|
19
|
-
private
|
|
20
|
+
private _initAutoFocus;
|
|
20
21
|
}
|