@univerjs/sheets-ui 0.6.10 → 0.7.0-nightly.202504291607
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 +83 -41
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/es/index.js +9927 -9781
- package/lib/es/locale/en-US.js +4 -4
- package/lib/index.css +1 -1
- package/lib/index.js +9927 -9781
- package/lib/locale/en-US.js +4 -4
- package/lib/types/controllers/config.schema.d.ts +49 -1
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +0 -1
- package/lib/types/controllers/shortcuts/editor.shortcut.d.ts +1 -0
- package/lib/types/controllers/shortcuts/value.shortcut.d.ts +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/plugin.d.ts +3 -1
- package/lib/types/services/editor-bridge.service.d.ts +2 -3
- package/lib/types/services/print-interceptor.service.d.ts +3 -0
- package/lib/types/views/dropdown/list-dropdown/index.d.ts +1 -0
- package/lib/types/views/editor-container/index.d.ts +1 -0
- package/lib/types/views/permission/panel-detail/PermissionDetailUserPart.d.ts +1 -2
- package/lib/umd/index.js +80 -38
- package/lib/umd/locale/en-US.js +1 -1
- package/package.json +15 -15
- package/LICENSE +0 -176
package/lib/locale/en-US.js
CHANGED
|
@@ -192,16 +192,16 @@ const e = {
|
|
|
192
192
|
toBottomAdd: "Towards Bottom Add",
|
|
193
193
|
toLeftAdd: "Towards Left Add",
|
|
194
194
|
toRightAdd: "Towards Right Add",
|
|
195
|
-
deleteSelectedRow: "Delete Selected
|
|
196
|
-
deleteSelectedColumn: "Delete Selected
|
|
195
|
+
deleteSelectedRow: "Delete Selected Row",
|
|
196
|
+
deleteSelectedColumn: "Delete Selected Column",
|
|
197
197
|
hideSelectedRow: "Hide Selected Row",
|
|
198
|
-
showHideRow: "Show
|
|
198
|
+
showHideRow: "Show Hide Row",
|
|
199
199
|
rowHeight: "Row Height",
|
|
200
200
|
hideSelectedColumn: "Hide Selected Column",
|
|
201
201
|
showHideColumn: "Show Hide Column",
|
|
202
202
|
columnWidth: "Column Width",
|
|
203
203
|
moveLeft: "Move Left",
|
|
204
|
-
moveUp: "Move
|
|
204
|
+
moveUp: "Move Up",
|
|
205
205
|
moveRight: "Move Right",
|
|
206
206
|
moveDown: "Move Down",
|
|
207
207
|
add: "Add",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DependencyOverride } from '@univerjs/core';
|
|
2
2
|
import { IScrollBarProps } from '@univerjs/engine-render';
|
|
3
|
-
import { MenuConfig } from '@univerjs/ui';
|
|
3
|
+
import { ComponentType, MenuConfig } from '@univerjs/ui';
|
|
4
|
+
import { IPermissionDetailUserPartProps } from '../views/permission/panel-detail/PermissionDetailUserPart';
|
|
4
5
|
export declare const SHEETS_UI_PLUGIN_CONFIG_KEY = "sheets-ui.config";
|
|
5
6
|
export declare const configSymbol: unique symbol;
|
|
6
7
|
export interface IUniverSheetsUIConfig {
|
|
@@ -17,10 +18,57 @@ export interface IUniverSheetsUIConfig {
|
|
|
17
18
|
* Whether to show the formula bar.
|
|
18
19
|
*/
|
|
19
20
|
formulaBar?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The config of the footer.
|
|
23
|
+
* @default {}
|
|
24
|
+
*/
|
|
25
|
+
footer?: false | {
|
|
26
|
+
/**
|
|
27
|
+
* Sheet bar is the manager of sub sheets, including add/switch/delete sub sheets.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
sheetBar?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* statistic bar including statistic info current selections, such as count, sum, average, etc.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
statisticBar?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Including the menus in the footer. such as highlight, gridlines, etc.
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
menus?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Zoom slider is the zoom slider in the footer.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
zoomSlider?: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Use `footer.statisticBar` instead.
|
|
49
|
+
*/
|
|
20
50
|
statusBarStatistic?: boolean;
|
|
21
51
|
clipboardConfig?: {
|
|
22
52
|
hidePasteOptions?: boolean;
|
|
23
53
|
};
|
|
24
54
|
scrollConfig?: IScrollBarProps;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show the protected range shadow.
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
protectedRangeShadow?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The custom component of the protected range user selector.
|
|
62
|
+
*/
|
|
63
|
+
protectedRangeUserSelector?: {
|
|
64
|
+
/**
|
|
65
|
+
* custom component, should implement the `IPermissionDetailUserPartProps` interface.
|
|
66
|
+
*/
|
|
67
|
+
component: ComponentType<IPermissionDetailUserPartProps>;
|
|
68
|
+
/**
|
|
69
|
+
* The framework of the component. Must be passed correctly.
|
|
70
|
+
*/
|
|
71
|
+
framework: 'react' | 'vue3';
|
|
72
|
+
};
|
|
25
73
|
}
|
|
26
74
|
export declare const defaultPluginConfig: IUniverSheetsUIConfig;
|
|
@@ -9,5 +9,6 @@ export declare const EditorCursorEscShortcut: IShortcutItem;
|
|
|
9
9
|
export declare const EditorCursorCtrlEnterShortcut: IShortcutItem;
|
|
10
10
|
export declare const EditorBreakLineShortcut: IShortcutItem;
|
|
11
11
|
export declare const EditorDeleteLeftShortcut: IShortcutItem;
|
|
12
|
+
export declare const EditorDeleteRightShortcut: IShortcutItem;
|
|
12
13
|
export declare const ShiftEditorDeleteLeftShortcut: IShortcutItem;
|
|
13
14
|
export declare const EditorDeleteLeftShortcutInActive: IShortcutItem;
|
|
@@ -2,3 +2,4 @@ import { IShortcutItem } from '@univerjs/ui';
|
|
|
2
2
|
export declare const ClearSelectionValueShortcutItem: IShortcutItem;
|
|
3
3
|
export declare const ClearSelectionValueShortcutItemMac: IShortcutItem;
|
|
4
4
|
export declare const ShiftClearSelectionValueShortcutItem: IShortcutItem;
|
|
5
|
+
export declare const ShiftDeleteSelectionValueShortcutItem: IShortcutItem;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -92,8 +92,10 @@ export { FormatPainterStatus, IFormatPainterService } from './services/format-pa
|
|
|
92
92
|
export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './services/format-painter/format-painter.service';
|
|
93
93
|
export { SELECTION_SHAPE_DEPTH } from './services/selection/const';
|
|
94
94
|
export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem';
|
|
95
|
+
export { useKeyEventConfig } from './views/editor-container';
|
|
95
96
|
export { type IDropdownParam, ISheetCellDropdownManagerService, SheetCellDropdownManagerService } from './services/cell-dropdown-manager.service';
|
|
96
97
|
export { FormulaBar } from './views/formula-bar/FormulaBar';
|
|
98
|
+
export { type IPermissionDetailUserPartProps } from './views/permission/panel-detail/PermissionDetailUserPart';
|
|
97
99
|
export { SetWorksheetColAutoWidthCommand } from './commands/commands/set-worksheet-auto-col-width.command';
|
|
98
100
|
export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
99
101
|
export { type ISheetPasteByShortKeyParams, type ISheetPasteParams, SheetCopyCommand, SheetCutCommand, SheetPasteBesidesBorderCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command';
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
2
2
|
import { IConfigService, Injector, IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
4
5
|
export declare class UniverSheetsUIPlugin extends Plugin {
|
|
5
6
|
private readonly _config;
|
|
6
7
|
readonly _injector: Injector;
|
|
7
8
|
private readonly _renderManagerService;
|
|
8
9
|
private readonly _configService;
|
|
9
10
|
private readonly _univerInstanceService;
|
|
11
|
+
private readonly _componentManager;
|
|
10
12
|
static pluginName: string;
|
|
11
13
|
static type: UniverInstanceType;
|
|
12
14
|
/** @ignore */
|
|
13
|
-
constructor(_config: Partial<IUniverSheetsUIConfig> | undefined, _injector: Injector, _renderManagerService: IRenderManagerService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
|
|
15
|
+
constructor(_config: Partial<IUniverSheetsUIConfig> | undefined, _injector: Injector, _renderManagerService: IRenderManagerService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService, _componentManager: ComponentManager);
|
|
14
16
|
onStarting(): void;
|
|
15
17
|
onReady(): void;
|
|
16
18
|
onRendered(): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IDisposable, IPosition, ISelectionCell, Nullable, Disposable, IContextService, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { SheetsSelectionsService, SheetInterceptorService } from '@univerjs/sheets';
|
|
4
3
|
import { KeyCode } from '@univerjs/ui';
|
|
5
4
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
6
5
|
import { IEditorService } from '@univerjs/docs-ui';
|
|
6
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
7
7
|
export interface IEditorBridgeServiceVisibleParam {
|
|
8
8
|
visible: boolean;
|
|
9
9
|
eventType: DeviceInputEventType;
|
|
@@ -71,7 +71,6 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
71
71
|
private readonly _themeService;
|
|
72
72
|
private readonly _univerInstanceService;
|
|
73
73
|
private readonly _editorService;
|
|
74
|
-
private readonly _refSelectionsService;
|
|
75
74
|
private readonly _contextService;
|
|
76
75
|
private _editorUnitId;
|
|
77
76
|
private _editorIsDirty;
|
|
@@ -106,7 +105,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
106
105
|
readonly afterVisible$: Observable<IEditorBridgeServiceVisibleParam>;
|
|
107
106
|
private readonly _forceKeepVisible$;
|
|
108
107
|
readonly forceKeepVisible$: Observable<boolean>;
|
|
109
|
-
constructor(_sheetInterceptorService: SheetInterceptorService, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService,
|
|
108
|
+
constructor(_sheetInterceptorService: SheetInterceptorService, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _contextService: IContextService);
|
|
110
109
|
refreshEditCellState(): void;
|
|
111
110
|
refreshEditCellPosition(resetSizeOnly?: boolean): void;
|
|
112
111
|
setEditCell(param: ICurrentEditCellParam): void;
|
|
@@ -17,6 +17,7 @@ interface ISheetPrintComponentContext extends ISheetPrintContext {
|
|
|
17
17
|
spreadsheet: Spreadsheet;
|
|
18
18
|
}
|
|
19
19
|
export declare class SheetPrintInterceptorService extends Disposable {
|
|
20
|
+
private _printComponentMap;
|
|
20
21
|
readonly interceptor: InterceptorManager<{
|
|
21
22
|
PRINTING_RANGE: import('@univerjs/core').IInterceptor<IRange, {
|
|
22
23
|
unitId: string;
|
|
@@ -26,5 +27,7 @@ export declare class SheetPrintInterceptorService extends Disposable {
|
|
|
26
27
|
PRINTING_DOM_COLLECT: import('@univerjs/core').IInterceptor<DisposableCollection, ISheetPrintContext>;
|
|
27
28
|
}>;
|
|
28
29
|
constructor();
|
|
30
|
+
registerPrintComponent(componentKey: string, printingComponentKey: string): void;
|
|
31
|
+
getPrintComponent(componentKey: string): string | undefined;
|
|
29
32
|
}
|
|
30
33
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditStateEnum, ViewStateEnum } from '@univerjs/sheets';
|
|
2
|
-
interface IPermissionDetailUserPartProps {
|
|
2
|
+
export interface IPermissionDetailUserPartProps {
|
|
3
3
|
editState: EditStateEnum;
|
|
4
4
|
onEditStateChange: (v: EditStateEnum) => void;
|
|
5
5
|
viewState: ViewStateEnum;
|
|
@@ -7,4 +7,3 @@ interface IPermissionDetailUserPartProps {
|
|
|
7
7
|
permissionId: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const PermissionDetailUserPart: (props: IPermissionDetailUserPartProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
-
export {};
|