@univerjs/sheets-ui 1.3.1 → 1.5.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/README.md +9 -5
- package/lib/cjs/facade.js +9 -12
- package/lib/cjs/index.js +2077 -1521
- package/lib/cjs/locale/ar-SA.js +9 -6
- package/lib/cjs/locale/ca-ES.js +9 -6
- package/lib/cjs/locale/de-DE.js +9 -6
- package/lib/cjs/locale/en-US.js +9 -6
- package/lib/cjs/locale/es-ES.js +9 -6
- package/lib/cjs/locale/fa-IR.js +9 -6
- package/lib/cjs/locale/fr-FR.js +9 -6
- package/lib/cjs/locale/id-ID.js +9 -6
- package/lib/cjs/locale/it-IT.js +9 -6
- package/lib/cjs/locale/ja-JP.js +9 -6
- package/lib/cjs/locale/ko-KR.js +9 -6
- package/lib/cjs/locale/pl-PL.js +9 -6
- package/lib/cjs/locale/pt-BR.js +9 -6
- package/lib/cjs/locale/ru-RU.js +9 -6
- package/lib/cjs/locale/sk-SK.js +9 -6
- package/lib/cjs/locale/vi-VN.js +9 -6
- package/lib/cjs/locale/zh-CN.js +9 -6
- package/lib/cjs/locale/zh-HK.js +9 -6
- package/lib/cjs/locale/zh-TW.js +9 -6
- package/lib/es/facade.js +9 -12
- package/lib/es/index.js +2083 -1527
- package/lib/es/locale/ar-SA.js +9 -6
- package/lib/es/locale/ca-ES.js +9 -6
- package/lib/es/locale/de-DE.js +9 -6
- package/lib/es/locale/en-US.js +9 -6
- package/lib/es/locale/es-ES.js +9 -6
- package/lib/es/locale/fa-IR.js +9 -6
- package/lib/es/locale/fr-FR.js +9 -6
- package/lib/es/locale/id-ID.js +9 -6
- package/lib/es/locale/it-IT.js +9 -6
- package/lib/es/locale/ja-JP.js +9 -6
- package/lib/es/locale/ko-KR.js +9 -6
- package/lib/es/locale/pl-PL.js +9 -6
- package/lib/es/locale/pt-BR.js +9 -6
- package/lib/es/locale/ru-RU.js +9 -6
- package/lib/es/locale/sk-SK.js +9 -6
- package/lib/es/locale/vi-VN.js +9 -6
- package/lib/es/locale/zh-CN.js +9 -6
- package/lib/es/locale/zh-HK.js +9 -6
- package/lib/es/locale/zh-TW.js +9 -6
- package/lib/facade.js +9 -12
- package/lib/index.css +50 -32
- package/lib/index.js +2083 -1527
- package/lib/locale/ar-SA.js +9 -6
- package/lib/locale/ca-ES.js +9 -6
- package/lib/locale/de-DE.js +9 -6
- package/lib/locale/en-US.js +9 -6
- package/lib/locale/es-ES.js +9 -6
- package/lib/locale/fa-IR.js +9 -6
- package/lib/locale/fr-FR.js +9 -6
- package/lib/locale/id-ID.js +9 -6
- package/lib/locale/it-IT.js +9 -6
- package/lib/locale/ja-JP.js +9 -6
- package/lib/locale/ko-KR.js +9 -6
- package/lib/locale/pl-PL.js +9 -6
- package/lib/locale/pt-BR.js +9 -6
- package/lib/locale/ru-RU.js +9 -6
- package/lib/locale/sk-SK.js +9 -6
- package/lib/locale/vi-VN.js +9 -6
- package/lib/locale/zh-CN.js +9 -6
- package/lib/locale/zh-HK.js +9 -6
- package/lib/locale/zh-TW.js +9 -6
- package/lib/types/commands/commands/set-zoom-ratio.command.d.ts +3 -1
- package/lib/types/commands/operations/set-zoom-ratio.operation.d.ts +3 -1
- package/lib/types/common/keys.d.ts +1 -0
- package/lib/types/config/config.d.ts +18 -0
- package/lib/types/controllers/cell-custom-render.controller.d.ts +3 -0
- package/lib/types/controllers/components.controller.d.ts +0 -1
- package/lib/types/controllers/editor/data-sync.controller.d.ts +10 -0
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +5 -3
- package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +3 -2
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +3 -0
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +1 -0
- package/lib/types/controllers/render-controllers/header-move.render-controller.d.ts +9 -2
- package/lib/types/controllers/render-controllers/mobile/mobile-header-resize.render-controller.d.ts +7 -3
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +9 -0
- package/lib/types/controllers/render-controllers/sheet.render-controller.d.ts +9 -1
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +3 -3
- package/lib/types/facade/f-worksheet.d.ts +8 -0
- package/lib/types/locale/en-US.d.ts +5 -1
- package/lib/types/menu/menu-util.d.ts +1 -1
- package/lib/types/menu/utils.d.ts +46 -1
- package/lib/types/services/auto-height.service.d.ts +2 -1
- package/lib/types/services/canvas-pop-manager.service.d.ts +4 -1
- package/lib/types/services/cell-dropdown-manager.service.d.ts +1 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +22 -22
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +1 -1
- package/lib/types/services/clipboard/html-to-usm/utils.d.ts +3 -3
- package/lib/types/services/clipboard/type.d.ts +2 -1
- package/lib/types/services/clipboard/utils.d.ts +1 -1
- package/lib/types/services/editor/cell-editor-manager.service.d.ts +1 -1
- package/lib/types/services/editor/formula-editor-manager.service.d.ts +1 -1
- package/lib/types/services/editor-bridge.service.d.ts +13 -8
- package/lib/types/services/format-painter/format-painter.service.d.ts +1 -1
- package/lib/types/services/hover-manager.service.d.ts +1 -0
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +1 -1
- package/lib/types/services/repeat-last-action.service.d.ts +1 -1
- package/lib/types/services/scroll-manager.service.d.ts +1 -1
- package/lib/types/services/selection/base-selection-render.service.d.ts +3 -2
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +7 -2
- package/lib/types/services/selection/mobile-selection-shape.d.ts +5 -2
- package/lib/types/services/selection/selection-render.service.d.ts +3 -0
- package/lib/types/services/selection/selection-shape-extension.d.ts +2 -0
- package/lib/types/services/sheet-bar/sheet-bar.service.d.ts +1 -1
- package/lib/types/services/sheet-embed-integration.service.d.ts +3 -3
- package/lib/types/services/sheet-embed-runtime.service.d.ts +1 -1
- package/lib/types/services/sheet-host-chrome-override.service.d.ts +1 -1
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +8 -0
- package/lib/types/services/sheets-render.service.d.ts +4 -0
- package/lib/types/services/status-bar.service.d.ts +1 -1
- package/lib/types/views/hook.d.ts +1 -1
- package/lib/types/views/mobile/action-panel/MobileStylePanel.d.ts +3 -2
- package/lib/types/views/permission/extensions/range-protection.render.d.ts +6 -4
- package/lib/types/views/permission/extensions/worksheet-permission.render.d.ts +5 -2
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/sheet-tab-name-editor.d.ts +1 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +7 -5
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +9 -9
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +19 -19
- package/lib/types/views/permission/panel-list/constant.d.ts +0 -16
- package/lib/types/views/permission/user-dialog/constant.d.ts +0 -16
|
@@ -27,7 +27,7 @@ export interface IAutoHeightTaskInfo extends IAutoHeightTask {
|
|
|
27
27
|
startTime: number;
|
|
28
28
|
skeleton: SpreadsheetSkeleton;
|
|
29
29
|
}
|
|
30
|
-
export declare const IAutoHeightService: import("@
|
|
30
|
+
export declare const IAutoHeightService: import("@univerjs/core").IdentifierDecorator<unknown>;
|
|
31
31
|
export declare function taskRowsFromRanges(ranges: IRange[], rows: number): {
|
|
32
32
|
result: IRange[];
|
|
33
33
|
lasts: IRange[];
|
|
@@ -40,6 +40,7 @@ export declare class AutoHeightService extends Disposable implements IRenderModu
|
|
|
40
40
|
private _calculateLoopId;
|
|
41
41
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService);
|
|
42
42
|
private _initMarkDirty;
|
|
43
|
+
dispose(): void;
|
|
43
44
|
private _loopTask;
|
|
44
45
|
private _calculateLoop;
|
|
45
46
|
private _initialCalculateLoop;
|
|
@@ -30,6 +30,7 @@ export interface ICanvasPopup extends Omit<IPopup, 'anchorRect' | 'anchorRect$'
|
|
|
30
30
|
}
|
|
31
31
|
interface IPopupMenuItem {
|
|
32
32
|
label: string;
|
|
33
|
+
icon?: string;
|
|
33
34
|
index: number;
|
|
34
35
|
commandId: string;
|
|
35
36
|
commandParams: ICommandInfo['params'];
|
|
@@ -46,6 +47,7 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
46
47
|
private readonly _selectionManagerService;
|
|
47
48
|
private _popupMenuFeatureMap;
|
|
48
49
|
private _popupMenuTitleMap;
|
|
50
|
+
private _popupMenuIconMap;
|
|
49
51
|
private _popupMenuOffsetMap;
|
|
50
52
|
private readonly _popupDisposables;
|
|
51
53
|
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _refRangeService: RefRangeService, _commandService: ICommandService, _refSelectionsService: ISheetSelectionRenderService, _selectionManagerService: SheetsSelectionsService);
|
|
@@ -54,7 +56,7 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
54
56
|
/**
|
|
55
57
|
* Register a feature menu callback for a specific drawing type.such as image, chart, etc.
|
|
56
58
|
*/
|
|
57
|
-
registerFeatureMenu(type: DrawingTypeEnum, getPopupMenuCallBack: getPopupMenuItemCallback, title?: string): void;
|
|
59
|
+
registerFeatureMenu(type: DrawingTypeEnum, getPopupMenuCallBack: getPopupMenuItemCallback, title?: string, icon?: string): void;
|
|
58
60
|
/**
|
|
59
61
|
* Register a feature menu offset for a specific drawing type.
|
|
60
62
|
* @param {DrawingTypeEnum} type the drawing type
|
|
@@ -72,6 +74,7 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
72
74
|
*/
|
|
73
75
|
getFeatureMenu(unitId: string, subUnitId: string, drawingId: string, drawingType: DrawingTypeEnum): Nullable<IPopupMenuItem[]>;
|
|
74
76
|
getFeatureMenuTitle(drawingType: DrawingTypeEnum): Nullable<string>;
|
|
77
|
+
getFeatureMenuIcon(drawingType: DrawingTypeEnum): Nullable<string>;
|
|
75
78
|
dispose(): void;
|
|
76
79
|
private _createHiddenRectObserver;
|
|
77
80
|
private _createPositionObserver;
|
|
@@ -32,7 +32,7 @@ export interface IDropdownComponentProps {
|
|
|
32
32
|
export interface ISheetCellDropdownManagerService {
|
|
33
33
|
showDropdown(param: IDropdownParam): IDisposable;
|
|
34
34
|
}
|
|
35
|
-
export declare const ISheetCellDropdownManagerService: import("@
|
|
35
|
+
export declare const ISheetCellDropdownManagerService: import("@univerjs/core").IdentifierDecorator<ISheetCellDropdownManagerService>;
|
|
36
36
|
export declare class SheetCellDropdownManagerService extends Disposable implements ISheetCellDropdownManagerService {
|
|
37
37
|
private readonly _canvasPopupManagerService;
|
|
38
38
|
private readonly _renderManagerService;
|
|
@@ -16,38 +16,38 @@
|
|
|
16
16
|
import type { ICellDataWithSpanAndDisplay, IDisposable, IRange, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IDiscreteRange, ISheetRangeLocation } from '@univerjs/sheets';
|
|
18
18
|
import type { Observable } from 'rxjs';
|
|
19
|
-
import type { ICopyOptions, IPasteHookKeyType, IPasteOptionCache, ISheetClipboardHook } from './type';
|
|
20
19
|
import { Disposable, ErrorService, ICommandService, ILogService, Injector, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix, ThemeService } from '@univerjs/core';
|
|
21
20
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
22
21
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
23
22
|
import { IClipboardInterfaceService, INotificationService, IPlatformService } from '@univerjs/ui';
|
|
23
|
+
import type { ICopyOptions, IPasteHookKeyType, IPasteOptionCache, ISheetClipboardHook } from './type';
|
|
24
24
|
import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
|
|
25
25
|
import { CopyContentCache } from './copy-content-cache';
|
|
26
26
|
export declare const PREDEFINED_HOOK_NAME_COPY: {
|
|
27
|
-
readonly DEFAULT_COPY:
|
|
28
|
-
readonly SPECIAL_COPY_FORMULA_ONLY:
|
|
27
|
+
readonly DEFAULT_COPY: 'default-copy';
|
|
28
|
+
readonly SPECIAL_COPY_FORMULA_ONLY: 'special-copy-formula-only';
|
|
29
29
|
};
|
|
30
30
|
export declare const PREDEFINED_HOOK_NAME_PASTE: {
|
|
31
|
-
readonly DEFAULT_PASTE:
|
|
32
|
-
readonly DEFAULT_PASTE_ROWS:
|
|
33
|
-
readonly DEFAULT_PASTE_COLUMNS:
|
|
34
|
-
readonly SPECIAL_PASTE_VALUE:
|
|
35
|
-
readonly SPECIAL_PASTE_FORMAT:
|
|
36
|
-
readonly SPECIAL_PASTE_COL_WIDTH:
|
|
37
|
-
readonly SPECIAL_PASTE_BESIDES_BORDER:
|
|
38
|
-
readonly SPECIAL_PASTE_FORMULA:
|
|
31
|
+
readonly DEFAULT_PASTE: 'default-paste';
|
|
32
|
+
readonly DEFAULT_PASTE_ROWS: 'default-paste-rows';
|
|
33
|
+
readonly DEFAULT_PASTE_COLUMNS: 'default-paste-columns';
|
|
34
|
+
readonly SPECIAL_PASTE_VALUE: 'special-paste-value';
|
|
35
|
+
readonly SPECIAL_PASTE_FORMAT: 'special-paste-format';
|
|
36
|
+
readonly SPECIAL_PASTE_COL_WIDTH: 'special-paste-col-width';
|
|
37
|
+
readonly SPECIAL_PASTE_BESIDES_BORDER: 'special-paste-besides-border';
|
|
38
|
+
readonly SPECIAL_PASTE_FORMULA: 'special-paste-formula';
|
|
39
39
|
};
|
|
40
40
|
export declare const PREDEFINED_HOOK_NAME: {
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
41
|
+
readonly DEFAULT_COPY: 'default-copy';
|
|
42
|
+
readonly SPECIAL_COPY_FORMULA_ONLY: 'special-copy-formula-only';
|
|
43
|
+
readonly DEFAULT_PASTE: 'default-paste';
|
|
44
|
+
readonly DEFAULT_PASTE_ROWS: 'default-paste-rows';
|
|
45
|
+
readonly DEFAULT_PASTE_COLUMNS: 'default-paste-columns';
|
|
46
|
+
readonly SPECIAL_PASTE_VALUE: 'special-paste-value';
|
|
47
|
+
readonly SPECIAL_PASTE_FORMAT: 'special-paste-format';
|
|
48
|
+
readonly SPECIAL_PASTE_COL_WIDTH: 'special-paste-col-width';
|
|
49
|
+
readonly SPECIAL_PASTE_BESIDES_BORDER: 'special-paste-besides-border';
|
|
50
|
+
readonly SPECIAL_PASTE_FORMULA: 'special-paste-formula';
|
|
51
51
|
};
|
|
52
52
|
export declare const FORMULA_CLIPBOARD_MIME_TYPE = "web application/x-univer-sheets-formula";
|
|
53
53
|
interface ICopyContent {
|
|
@@ -79,7 +79,7 @@ export interface ISheetClipboardService {
|
|
|
79
79
|
getClipboardHooks(): ISheetClipboardHook[];
|
|
80
80
|
removeMarkSelection(): void;
|
|
81
81
|
}
|
|
82
|
-
export declare const ISheetClipboardService: import("@
|
|
82
|
+
export declare const ISheetClipboardService: import("@univerjs/core").IdentifierDecorator<ISheetClipboardService>;
|
|
83
83
|
export declare class SheetClipboardService extends Disposable implements ISheetClipboardService {
|
|
84
84
|
private readonly _logService;
|
|
85
85
|
private readonly _univerInstanceService;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ITextStyle, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { ISheetSkeletonManagerParam } from '@univerjs/sheets';
|
|
18
|
+
import { getNumfmtParseValueFilter } from '@univerjs/core';
|
|
18
19
|
import type { IClipboardPropertyItem, IUniverSheetCopyDataModel } from '../type';
|
|
19
20
|
import type { IPastePlugin } from './paste-plugins/type';
|
|
20
|
-
import { getNumfmtParseValueFilter } from '@univerjs/core';
|
|
21
21
|
export interface IStyleRule {
|
|
22
22
|
filter: string | string[] | ((node: HTMLElement) => boolean);
|
|
23
23
|
getStyle(node: HTMLElement): ITextStyle;
|
|
@@ -18,8 +18,7 @@ import type { ICellDataWithSpanInfo } from '../type';
|
|
|
18
18
|
export default function parseToDom(rawHtml: string): HTMLElement;
|
|
19
19
|
export declare function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle>;
|
|
20
20
|
export declare function generateParagraphs(dataStream: string, prevParagraph?: IParagraph): IParagraph[];
|
|
21
|
-
export declare function convertToCellStyle(cell: ICellDataWithSpanInfo, dataStream: string, textRuns: ITextRun[] | undefined):
|
|
22
|
-
s: import("@univerjs/core").ITextStyle | undefined;
|
|
21
|
+
export declare function convertToCellStyle(cell: ICellDataWithSpanInfo, dataStream: string, textRuns: ITextRun[] | undefined): {
|
|
23
22
|
p?: Nullable<import("@univerjs/core").IDocumentData>;
|
|
24
23
|
v?: Nullable<import("@univerjs/core").CellValue>;
|
|
25
24
|
t?: Nullable<import("@univerjs/core").CellValueType>;
|
|
@@ -30,7 +29,8 @@ export declare function convertToCellStyle(cell: ICellDataWithSpanInfo, dataStre
|
|
|
30
29
|
xf?: Nullable<string>;
|
|
31
30
|
si?: Nullable<string>;
|
|
32
31
|
custom?: import("@univerjs/core").CustomData;
|
|
32
|
+
s: import("@univerjs/core").ITextStyle | undefined;
|
|
33
33
|
rowSpan?: number;
|
|
34
34
|
colSpan?: number;
|
|
35
35
|
plain?: string;
|
|
36
|
-
};
|
|
36
|
+
} | ICellDataWithSpanInfo;
|
|
@@ -145,9 +145,10 @@ export interface ISheetClipboardHook {
|
|
|
145
145
|
* Features could use this hook to build copying cache or any other pre-copy jobs.
|
|
146
146
|
*
|
|
147
147
|
* @param pasteTo
|
|
148
|
+
* @param payload Paste options and the internal copy ID, when available.
|
|
148
149
|
* @returns if it block copying it should return false
|
|
149
150
|
*/
|
|
150
|
-
onBeforePaste?(pasteTo: ISheetDiscreteRangeLocation): boolean;
|
|
151
|
+
onBeforePaste?(pasteTo: ISheetDiscreteRangeLocation, payload?: ICopyPastePayload): boolean;
|
|
151
152
|
/**
|
|
152
153
|
* Handles pasting cells, it needs to return Undo Mutations & Redo Mutations that handle the cell contents
|
|
153
154
|
*
|
|
@@ -29,7 +29,7 @@ export declare const getRepeatRange: (sourceRange: IRange, targetRange: IRange,
|
|
|
29
29
|
}[];
|
|
30
30
|
export declare function htmlIsFromExcel(html: string): boolean;
|
|
31
31
|
export declare function htmlContainsImage(html: string): boolean;
|
|
32
|
-
export declare function mergeCellValues(...cellValues: IObjectMatrixPrimitiveType<Nullable<ICellData>>[]): IObjectMatrixPrimitiveType<Nullable<ICellData
|
|
32
|
+
export declare function mergeCellValues(...cellValues: IObjectMatrixPrimitiveType<Nullable<ICellData>>[]): IObjectMatrixPrimitiveType<IObjectMatrixPrimitiveType<Nullable<ICellData>>> | IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
33
33
|
export declare function getRangeValuesMergeable(m1: IMutationInfo<ISetRangeValuesMutationParams>, m2: IMutationInfo<ISetRangeValuesMutationParams>): boolean;
|
|
34
34
|
export declare function mergeSetRangeValues(mutations: IMutationInfo[]): IMutationInfo<object>[];
|
|
35
35
|
export declare function spilitLargeSetRangeValuesMutations(mutation: IMutationInfo<ISetRangeValuesMutationParams>, options?: {
|
|
@@ -53,4 +53,4 @@ export declare class CellEditorManagerService implements ICellEditorManagerServi
|
|
|
53
53
|
setFocus(param?: boolean): void;
|
|
54
54
|
private _refresh;
|
|
55
55
|
}
|
|
56
|
-
export declare const ICellEditorManagerService: import("@
|
|
56
|
+
export declare const ICellEditorManagerService: import("@univerjs/core").IdentifierDecorator<ICellEditorManagerService>;
|
|
@@ -46,4 +46,4 @@ export declare class FormulaEditorManagerService extends Disposable implements I
|
|
|
46
46
|
handleFoldBtnClick(params: boolean): void;
|
|
47
47
|
private _refresh;
|
|
48
48
|
}
|
|
49
|
-
export declare const IFormulaEditorManagerService: import("@
|
|
49
|
+
export declare const IFormulaEditorManagerService: import("@univerjs/core").IdentifierDecorator<IFormulaEditorManagerService>;
|
|
@@ -81,6 +81,10 @@ export interface IEditorBridgeService {
|
|
|
81
81
|
* Do not use it directly. Use the `SetCellEditVisibleOperation` command instead.
|
|
82
82
|
*/
|
|
83
83
|
changeVisible(param: IEditorBridgeServiceVisibleParam): void;
|
|
84
|
+
/**
|
|
85
|
+
* Mark the open editor content as pending submission. Besides user edits, an external write that
|
|
86
|
+
* replaces the edited cell's content is marked too, so the draft still wins when editing ends.
|
|
87
|
+
*/
|
|
84
88
|
changeEditorDirty(dirtyStatus: boolean): void;
|
|
85
89
|
getEditorDirty(): boolean;
|
|
86
90
|
isVisible(): IEditorBridgeServiceVisibleParam;
|
|
@@ -110,13 +114,6 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
110
114
|
private readonly _currentEditCellLayout$;
|
|
111
115
|
readonly currentEditCellLayout$: Observable<Nullable<ICellEditorLayout>>;
|
|
112
116
|
readonly currentEditCell$: Observable<{
|
|
113
|
-
position: IPosition;
|
|
114
|
-
canvasOffset: {
|
|
115
|
-
left: number;
|
|
116
|
-
top: number;
|
|
117
|
-
};
|
|
118
|
-
scaleX: number;
|
|
119
|
-
scaleY: number;
|
|
120
117
|
unitId: string;
|
|
121
118
|
sheetId: string;
|
|
122
119
|
row: number;
|
|
@@ -125,6 +122,13 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
125
122
|
editorUnitId: string;
|
|
126
123
|
isInArrayFormulaRange?: Nullable<boolean>;
|
|
127
124
|
isPercentFormat?: boolean;
|
|
125
|
+
position: IPosition;
|
|
126
|
+
canvasOffset: {
|
|
127
|
+
left: number;
|
|
128
|
+
top: number;
|
|
129
|
+
};
|
|
130
|
+
scaleX: number;
|
|
131
|
+
scaleY: number;
|
|
128
132
|
} | null>;
|
|
129
133
|
private readonly _visibleParams$;
|
|
130
134
|
readonly visible$: Observable<IEditorBridgeServiceVisibleParam>;
|
|
@@ -163,6 +167,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
163
167
|
isInArrayFormulaRange: Nullable<boolean>;
|
|
164
168
|
isPercentFormat: boolean | undefined;
|
|
165
169
|
} | undefined;
|
|
170
|
+
private _getSheetType;
|
|
166
171
|
private _getWorkbookForEditUnit;
|
|
167
172
|
getCurrentEditorId(): string;
|
|
168
173
|
changeVisible(params: IEditorBridgeServiceVisibleParam): void;
|
|
@@ -173,4 +178,4 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
173
178
|
changeEditorDirty(dirtyStatus: boolean): void;
|
|
174
179
|
getEditorDirty(): boolean;
|
|
175
180
|
}
|
|
176
|
-
export declare const IEditorBridgeService: import("@
|
|
181
|
+
export declare const IEditorBridgeService: import("@univerjs/core").IdentifierDecorator<IEditorBridgeService>;
|
|
@@ -56,7 +56,7 @@ export interface IFormatPainterBeforeApplyHookParams {
|
|
|
56
56
|
undoMutationsInfo: IMutationInfo[];
|
|
57
57
|
format: ISelectionFormatInfo;
|
|
58
58
|
}
|
|
59
|
-
export declare const IFormatPainterService: import("@
|
|
59
|
+
export declare const IFormatPainterService: import("@univerjs/core").IdentifierDecorator<IFormatPainterService>;
|
|
60
60
|
export declare class FormatPainterService extends Disposable implements IFormatPainterService {
|
|
61
61
|
private readonly _selectionManagerService;
|
|
62
62
|
private readonly _themeService;
|
|
@@ -141,6 +141,7 @@ export declare class HoverManagerService extends Disposable {
|
|
|
141
141
|
*/
|
|
142
142
|
triggerClick(unitId: string, offsetX: number, offsetY: number): void;
|
|
143
143
|
triggerDbClick(unitId: string, event: IPointerEvent | IMouseEvent): void;
|
|
144
|
+
triggerMouseLeave(): void;
|
|
144
145
|
triggerScroll(): void;
|
|
145
146
|
triggerRowHeaderClick(unitId: string, offsetX: number, offsetY: number): void;
|
|
146
147
|
triggerColHeaderClick(unitId: string, offsetX: number, offsetY: number): void;
|
|
@@ -34,7 +34,7 @@ interface IMarkSelectionInfo {
|
|
|
34
34
|
control: SelectionControl | null;
|
|
35
35
|
exits: string[];
|
|
36
36
|
}
|
|
37
|
-
export declare const IMarkSelectionService: import("@
|
|
37
|
+
export declare const IMarkSelectionService: import("@univerjs/core").IdentifierDecorator<IMarkSelectionService>;
|
|
38
38
|
/**
|
|
39
39
|
* For copy and cut selection.
|
|
40
40
|
* also for selection when hover on conditional format items in the cf panel on the right.
|
|
@@ -33,7 +33,7 @@ export interface IRepeatLastActionService {
|
|
|
33
33
|
registerRepeatableCommand(commandId: string, handler: RepeatableCommandHandler, permissionType?: RepeatLastActionPermission): IDisposable;
|
|
34
34
|
runWithoutRecording(selections: IRange[]): Promise<boolean>;
|
|
35
35
|
}
|
|
36
|
-
export declare const IRepeatLastActionService: import("@
|
|
36
|
+
export declare const IRepeatLastActionService: import("@univerjs/core").IdentifierDecorator<IRepeatLastActionService>;
|
|
37
37
|
export declare class RepeatLastActionService extends Disposable implements IRepeatLastActionService {
|
|
38
38
|
private readonly _commandService;
|
|
39
39
|
private _action;
|
|
@@ -141,7 +141,7 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
141
141
|
viewportScrollX: number;
|
|
142
142
|
viewportScrollY: number;
|
|
143
143
|
};
|
|
144
|
-
setSearchParam(param: IScrollStateSearchParam): void;
|
|
144
|
+
setSearchParam(param: Nullable<IScrollStateSearchParam>): void;
|
|
145
145
|
getScrollStateByParam(param: IScrollStateSearchParam): Readonly<Nullable<IScrollState>>;
|
|
146
146
|
getCurrentScrollState(): Readonly<IScrollState>;
|
|
147
147
|
setValidScrollState(param: IScrollStateWithSearchParam): void;
|
|
@@ -19,10 +19,10 @@ import type { ISelectionStyle, ISelectionWithCoord, ISelectionWithStyle } from '
|
|
|
19
19
|
import type { Theme } from '@univerjs/themes';
|
|
20
20
|
import type { IShortcutService } from '@univerjs/ui';
|
|
21
21
|
import type { Observable, Subscription } from 'rxjs';
|
|
22
|
-
import type { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
23
22
|
import { Disposable, InterceptorManager, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
24
23
|
import { ScrollTimer, ScrollTimerType } from '@univerjs/engine-render';
|
|
25
24
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
25
|
+
import type { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
26
26
|
import { SelectionControl } from './selection-control';
|
|
27
27
|
export interface IControlFillConfig {
|
|
28
28
|
oldRange: IRange;
|
|
@@ -50,7 +50,7 @@ export interface ISheetSelectionRenderService {
|
|
|
50
50
|
refreshSelectionMoveEnd(): void;
|
|
51
51
|
resetSelectionsByModelData(selectionsWithStyleList: readonly ISelectionWithStyle[]): void;
|
|
52
52
|
}
|
|
53
|
-
export declare const ISheetSelectionRenderService: import("@
|
|
53
|
+
export declare const ISheetSelectionRenderService: import("@univerjs/core").IdentifierDecorator<ISheetSelectionRenderService>;
|
|
54
54
|
/**
|
|
55
55
|
* The basic implementation of selection rendering logics. It is designed to be reused for different purposes.
|
|
56
56
|
*/
|
|
@@ -161,6 +161,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
161
161
|
* @param {ISelectionWithCoord} selectionWithStyle
|
|
162
162
|
*/
|
|
163
163
|
protected _addSelectionControlByModelData(selectionWithStyle: ISelectionWithStyle): SelectionControl;
|
|
164
|
+
protected _clearRuntime(): void;
|
|
164
165
|
protected _clearAllSelectionControls(): void;
|
|
165
166
|
protected _getFreeze(): Nullable<IFreeze>;
|
|
166
167
|
protected _getViewportByCell(row?: number, column?: number): Nullable<Viewport>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import type { Nullable, Workbook } from '@univerjs/core';
|
|
17
17
|
import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, SpreadsheetSkeleton, Viewport } from '@univerjs/engine-render';
|
|
18
18
|
import type { ISelectionWithStyle } from '@univerjs/sheets';
|
|
19
|
-
import { ICommandService, IContextService, ILogService, Injector, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
19
|
+
import { ICommandService, IContextService, ILogService, Injector, IUniverInstanceService, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
20
20
|
import { ScrollTimerType } from '@univerjs/engine-render';
|
|
21
21
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
22
22
|
import { IShortcutService } from '@univerjs/ui';
|
|
@@ -40,14 +40,19 @@ export declare class MobileSheetsSelectionRenderService extends BaseSelectionRen
|
|
|
40
40
|
private readonly _commandService;
|
|
41
41
|
protected readonly _contextService: IContextService;
|
|
42
42
|
private readonly _scrollManagerService;
|
|
43
|
+
private readonly _univerInstanceService;
|
|
43
44
|
private readonly _workbookSelections;
|
|
44
45
|
private _renderDisposable;
|
|
45
46
|
_expandingSelection: boolean;
|
|
46
47
|
protected _selectionControls: MobileSelectionControl[];
|
|
47
48
|
expandingControlMode: ExpandingControl;
|
|
48
49
|
private _anchorCellForExpanding;
|
|
49
|
-
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, selectionManagerService: SheetsSelectionsService, sheetSkeletonManagerService: SheetSkeletonManagerService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _scrollManagerService: SheetScrollManagerService);
|
|
50
|
+
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, selectionManagerService: SheetsSelectionsService, sheetSkeletonManagerService: SheetSkeletonManagerService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _scrollManagerService: SheetScrollManagerService, _univerInstanceService: IUniverInstanceService);
|
|
51
|
+
private _getSheetType;
|
|
50
52
|
private _init;
|
|
53
|
+
endSelection(): void;
|
|
54
|
+
protected _clearRuntime(): void;
|
|
55
|
+
private _clearExpansionState;
|
|
51
56
|
private _initSkeletonChangeListener;
|
|
52
57
|
private _initSelectionChangeListener;
|
|
53
58
|
private _initEventListeners;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ThemeService } from '@univerjs/core';
|
|
17
|
-
import type { IRectProps, Scene } from '@univerjs/engine-render';
|
|
18
|
-
import type { ISelectionStyle } from '@univerjs/sheets';
|
|
17
|
+
import type { IRectProps, Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
18
|
+
import type { ISelectionStyle, ISelectionWithCoord } from '@univerjs/sheets';
|
|
19
19
|
import { RANGE_TYPE } from '@univerjs/core';
|
|
20
20
|
import { Rect } from '@univerjs/engine-render';
|
|
21
21
|
import { SelectionControl } from './selection-control';
|
|
@@ -23,6 +23,7 @@ export declare class MobileSelectionControl extends SelectionControl {
|
|
|
23
23
|
protected _scene: Scene;
|
|
24
24
|
protected _zIndex: number;
|
|
25
25
|
protected readonly _themeService: ThemeService;
|
|
26
|
+
private _skeleton;
|
|
26
27
|
/**
|
|
27
28
|
* topLeft controlPointer, it is not visible, just transparent, for handling event.
|
|
28
29
|
*/
|
|
@@ -47,6 +48,8 @@ export declare class MobileSelectionControl extends SelectionControl {
|
|
|
47
48
|
set expandControlBottomRight(value: Rect);
|
|
48
49
|
get rangeType(): RANGE_TYPE;
|
|
49
50
|
set rangeType(value: RANGE_TYPE);
|
|
51
|
+
updateRangeBySelectionWithCoord(selection: ISelectionWithCoord, skeleton?: SpreadsheetSkeleton, animate?: boolean): void;
|
|
52
|
+
private _isCellWidgetHit;
|
|
50
53
|
dispose(): void;
|
|
51
54
|
protected _updateLayoutOfSelectionControl(style: ISelectionStyle): void;
|
|
52
55
|
getViewportMainScrollInfo(): {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Nullable, Workbook } from '@univerjs/core';
|
|
17
17
|
import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Viewport } from '@univerjs/engine-render';
|
|
18
|
+
import type { ISelectionWithStyle } from '@univerjs/sheets';
|
|
18
19
|
import { ICommandService, IContextService, ILogService, Injector, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
19
20
|
import { ScrollTimerType } from '@univerjs/engine-render';
|
|
20
21
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
@@ -34,6 +35,7 @@ export declare class SheetSelectionRenderService extends BaseSelectionRenderServ
|
|
|
34
35
|
private _renderDisposable;
|
|
35
36
|
private _selectionBeforeModifierClick;
|
|
36
37
|
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, selectionManagerService: SheetsSelectionsService, sheetSkeletonManagerService: SheetSkeletonManagerService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService);
|
|
38
|
+
private _getSheetType;
|
|
37
39
|
private _init;
|
|
38
40
|
dispose(): void;
|
|
39
41
|
private _initEventListeners;
|
|
@@ -63,6 +65,7 @@ export declare class SheetSelectionRenderService extends BaseSelectionRenderServ
|
|
|
63
65
|
private _initSkeletonChangeListener;
|
|
64
66
|
private _getActiveViewport;
|
|
65
67
|
private _getSheetObject;
|
|
68
|
+
resetSelectionsByModelData(selections: readonly ISelectionWithStyle[]): void;
|
|
66
69
|
/**
|
|
67
70
|
* Handle pointer down event, bind pointermove & pointerup handler.
|
|
68
71
|
* then trigger selectionMoveStart$.
|
|
@@ -92,7 +92,9 @@ export declare class SelectionShapeExtension {
|
|
|
92
92
|
private _widgetMoving;
|
|
93
93
|
private _initialAutoFill;
|
|
94
94
|
private _autoFillMoving;
|
|
95
|
+
private _updateAutoFillPreview;
|
|
95
96
|
private _autoFillForPointerdown;
|
|
97
|
+
private _autoFillForPointermove;
|
|
96
98
|
private _viewportMainScrollBarNeedResetPosition;
|
|
97
99
|
private _hasMergeInRange;
|
|
98
100
|
/**
|
|
@@ -34,7 +34,7 @@ export interface ISheetBarService {
|
|
|
34
34
|
triggerSheetBarMenu(): void;
|
|
35
35
|
registerSheetBarMenuHandler(handler: ISheetBarMenuHandler): IDisposable;
|
|
36
36
|
}
|
|
37
|
-
export declare const ISheetBarService: import("@
|
|
37
|
+
export declare const ISheetBarService: import("@univerjs/core").IdentifierDecorator<ISheetBarService>;
|
|
38
38
|
export declare class SheetBarService extends Disposable implements ISheetBarService {
|
|
39
39
|
readonly renameId$: Observable<string>;
|
|
40
40
|
readonly removeId$: Observable<string>;
|
|
@@ -36,7 +36,7 @@ export interface ISheetEmbedRuntimeDomScope {
|
|
|
36
36
|
export interface ISheetEmbedInteractionBoundaryService {
|
|
37
37
|
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
38
38
|
}
|
|
39
|
-
export declare const ISheetEmbedInteractionBoundaryService: import("@
|
|
39
|
+
export declare const ISheetEmbedInteractionBoundaryService: import("@univerjs/core").IdentifierDecorator<ISheetEmbedInteractionBoundaryService>;
|
|
40
40
|
export interface ISheetEmbedRuntimeFocusCoordinator {
|
|
41
41
|
readonly runtimeSessionChanged$: Observable<void>;
|
|
42
42
|
acquireLease(options: {
|
|
@@ -59,7 +59,7 @@ export interface ISheetEmbedRuntimeFocusCoordinator {
|
|
|
59
59
|
isChildUnitInActiveSession(unitId: string | undefined): boolean;
|
|
60
60
|
isChildUnitRuntimeEvent(unitId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
|
|
61
61
|
}
|
|
62
|
-
export declare const ISheetEmbedRuntimeFocusCoordinator: import("@
|
|
62
|
+
export declare const ISheetEmbedRuntimeFocusCoordinator: import("@univerjs/core").IdentifierDecorator<ISheetEmbedRuntimeFocusCoordinator>;
|
|
63
63
|
export interface ISheetEmbedFloatingGeometryService {
|
|
64
64
|
readonly geometryInvalidated$: Observable<unknown>;
|
|
65
65
|
getRegistrationByChildUnitId(childUnitId: string): {
|
|
@@ -68,7 +68,7 @@ export interface ISheetEmbedFloatingGeometryService {
|
|
|
68
68
|
contentRoot?: HTMLElement | null;
|
|
69
69
|
} | undefined;
|
|
70
70
|
}
|
|
71
|
-
export declare const ISheetEmbedFloatingGeometryService: import("@
|
|
71
|
+
export declare const ISheetEmbedFloatingGeometryService: import("@univerjs/core").IdentifierDecorator<ISheetEmbedFloatingGeometryService>;
|
|
72
72
|
export declare class EmbedInteractionBoundaryService implements ISheetEmbedInteractionBoundaryService {
|
|
73
73
|
private readonly _roots;
|
|
74
74
|
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
@@ -24,4 +24,4 @@ export interface ISheetEmbedRuntimeService {
|
|
|
24
24
|
getSheetTabChildType?(params: ISheetEmbedTabMountParams): UniverInstanceType | undefined;
|
|
25
25
|
clearTab(embedId?: string): void;
|
|
26
26
|
}
|
|
27
|
-
export declare const ISheetEmbedRuntimeService: import("@
|
|
27
|
+
export declare const ISheetEmbedRuntimeService: import("@univerjs/core").IdentifierDecorator<ISheetEmbedRuntimeService>;
|
|
@@ -22,4 +22,4 @@ export interface ISheetHostChromeOverrideService {
|
|
|
22
22
|
readonly override$: Observable<ISheetHostChromeOverride | null>;
|
|
23
23
|
getOverride?(): ISheetHostChromeOverride | null;
|
|
24
24
|
}
|
|
25
|
-
export declare const ISheetHostChromeOverrideService: import("@
|
|
25
|
+
export declare const ISheetHostChromeOverrideService: import("@univerjs/core").IdentifierDecorator<ISheetHostChromeOverrideService>;
|
|
@@ -38,6 +38,14 @@ export declare class SheetSkeletonManagerService extends Disposable implements I
|
|
|
38
38
|
readonly currentSkeletonBefore$: import("rxjs").Observable<Nullable<ISheetSkeletonManagerParam>>;
|
|
39
39
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonService: SheetSkeletonService);
|
|
40
40
|
private _initSkeletonsRegisterGetCellHeight;
|
|
41
|
+
/**
|
|
42
|
+
* Keep the tracked skeleton on the active worksheet once the tracked one is gone.
|
|
43
|
+
*
|
|
44
|
+
* Removing a worksheet disposes its skeleton and drops its param immediately, while `_sheetId` is only
|
|
45
|
+
* updated by the next skeleton-change command. That leaves the manager pointing at a dead sheet for the
|
|
46
|
+
* whole `RemoveSheetCommand` redo sequence, so consumers either read a disposed skeleton or nothing at all.
|
|
47
|
+
*/
|
|
48
|
+
private _initActiveSheetSync;
|
|
41
49
|
dispose(): void;
|
|
42
50
|
getCurrentSkeleton(): Nullable<SpreadsheetSkeleton>;
|
|
43
51
|
/**
|
|
@@ -25,6 +25,7 @@ export declare class SheetsRenderService extends RxDisposable {
|
|
|
25
25
|
private readonly _renderManagerService;
|
|
26
26
|
private readonly _themeService;
|
|
27
27
|
private _skeletonChangeMutations;
|
|
28
|
+
private readonly _selfRenderingMutations;
|
|
28
29
|
constructor(_contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
|
29
30
|
/**
|
|
30
31
|
* Register a mutation id that will trigger the skeleton change.
|
|
@@ -37,6 +38,9 @@ export declare class SheetsRenderService extends RxDisposable {
|
|
|
37
38
|
* Examine if a mutation would make the skeleton to change.
|
|
38
39
|
*/
|
|
39
40
|
checkMutationShouldTriggerRerender(id: string): boolean;
|
|
41
|
+
/** The owning plugin must invalidate the affected sheets when its derived view changes. */
|
|
42
|
+
registerSelfRenderingMutations(mutationId: string): IDisposable;
|
|
43
|
+
shouldAutomaticallyRenderMutation(mutationId: string): boolean;
|
|
40
44
|
private _init;
|
|
41
45
|
private _initWorkbookListener;
|
|
42
46
|
private _createRenderer;
|
|
@@ -44,4 +44,4 @@ export declare class StatusBarService implements IStatusBarService, IDisposable
|
|
|
44
44
|
getFunctions(): Readonly<IStatusBarFunction[]>;
|
|
45
45
|
addFunctions(functions: IStatusBarFunction[]): void;
|
|
46
46
|
}
|
|
47
|
-
export declare const IStatusBarService: import("@
|
|
47
|
+
export declare const IStatusBarService: import("@univerjs/core").IdentifierDecorator<IStatusBarService>;
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
import type { Workbook } from '@univerjs/core';
|
|
17
17
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
18
18
|
export declare function useActiveWorkbook(): Workbook | null;
|
|
19
|
-
export declare function useActiveWorksheet(workbook?: Workbook | null): import("@univerjs/core").
|
|
19
|
+
export declare function useActiveWorksheet(workbook?: Workbook | null): void | import("@univerjs/core").Worksheet | null | undefined;
|
|
20
20
|
export declare function useWorkbooks(): Workbook[];
|
|
21
21
|
export declare function useSheetSkeleton(): SheetSkeletonManagerService | null | undefined;
|
|
@@ -81,7 +81,7 @@ export type MobileStyleView = {
|
|
|
81
81
|
item: MobileNumberFormatItem;
|
|
82
82
|
config: IMobileNumberFormatMenuConfig;
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
interface IMobileStylePanelProps {
|
|
85
85
|
groups: IMenuSchema[];
|
|
86
86
|
currentView: MobileStyleView | null;
|
|
87
87
|
recentColors: string[];
|
|
@@ -89,5 +89,6 @@ export declare function MobileStylePanel(props: {
|
|
|
89
89
|
onBack: () => void;
|
|
90
90
|
onExecute: (params: IMobileStyleCommand) => void;
|
|
91
91
|
onUseColor: (color: string) => void;
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
|
+
export declare function MobileStylePanel(props: IMobileStylePanelProps): import("react").JSX.Element | null;
|
|
93
94
|
export {};
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { ICellDataForSheetInterceptor, IRange, IScale } from '@univerjs/core';
|
|
16
|
+
import type { ICellDataForSheetInterceptor, IRange, IScale, ThemeService } from '@univerjs/core';
|
|
17
17
|
import type { SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';
|
|
18
18
|
import type { ICellPermission } from '@univerjs/sheets';
|
|
19
19
|
import { SheetExtension } from '@univerjs/engine-render';
|
|
@@ -23,14 +23,16 @@ export type IRangeProtectionRenderCellData = ICellDataForSheetInterceptor & {
|
|
|
23
23
|
selectionProtection: ICellPermission[];
|
|
24
24
|
};
|
|
25
25
|
export declare abstract class RangeProtectionRenderExtension extends SheetExtension {
|
|
26
|
+
private readonly _themeService;
|
|
26
27
|
abstract uKey: string;
|
|
27
28
|
abstract Z_INDEX: number;
|
|
28
29
|
protected _pattern: CanvasPattern | null;
|
|
29
30
|
protected _img: HTMLImageElement;
|
|
30
31
|
renderCache: Set<string>;
|
|
31
32
|
protected _shadowStrategy: 'always' | 'non-editable' | 'non-viewable' | 'none';
|
|
32
|
-
constructor(shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
33
|
+
constructor(_themeService: ThemeService, shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
33
34
|
clearCache(): void;
|
|
35
|
+
dispose(): void;
|
|
34
36
|
/**
|
|
35
37
|
* Set the shadow strategy for this extension
|
|
36
38
|
* @param strategy The shadow strategy
|
|
@@ -44,14 +46,14 @@ export declare abstract class RangeProtectionRenderExtension extends SheetExtens
|
|
|
44
46
|
draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges?: IRange[]): void;
|
|
45
47
|
}
|
|
46
48
|
export declare class RangeProtectionCanViewRenderExtension extends RangeProtectionRenderExtension {
|
|
49
|
+
readonly viewportCacheReusable: boolean;
|
|
47
50
|
uKey: string;
|
|
48
51
|
Z_INDEX: number;
|
|
49
|
-
constructor(shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
50
52
|
protected shouldRender(config: ICellPermission): boolean;
|
|
51
53
|
}
|
|
52
54
|
export declare class RangeProtectionCanNotViewRenderExtension extends RangeProtectionRenderExtension {
|
|
55
|
+
readonly viewportCacheReusable: boolean;
|
|
53
56
|
uKey: string;
|
|
54
57
|
Z_INDEX: number;
|
|
55
|
-
constructor(shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
56
58
|
protected shouldRender(config: ICellPermission): boolean;
|
|
57
59
|
}
|
|
@@ -13,18 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IScale } from '@univerjs/core';
|
|
16
|
+
import type { IScale, ThemeService } from '@univerjs/core';
|
|
17
17
|
import type { SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';
|
|
18
18
|
import { SheetExtension } from '@univerjs/engine-render';
|
|
19
19
|
export declare const worksheetProtectionKey = "worksheet-protection";
|
|
20
20
|
export declare class WorksheetProtectionRenderExtension extends SheetExtension {
|
|
21
|
+
private readonly _themeService;
|
|
22
|
+
readonly viewportCacheReusable: boolean;
|
|
21
23
|
uKey: string;
|
|
22
24
|
Z_INDEX: number;
|
|
23
25
|
private _pattern;
|
|
24
26
|
private _img;
|
|
25
27
|
protected _shadowStrategy: 'always' | 'non-editable' | 'non-viewable' | 'none';
|
|
26
|
-
constructor(shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
28
|
+
constructor(_themeService: ThemeService, shadowStrategy?: 'always' | 'non-editable' | 'non-viewable' | 'none');
|
|
27
29
|
draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton): false | undefined;
|
|
30
|
+
dispose(): void;
|
|
28
31
|
/**
|
|
29
32
|
* Set the shadow strategy for this extension
|
|
30
33
|
* @param strategy The shadow strategy
|