@univerjs/ui 0.2.6 → 0.2.8
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 +6 -6
- package/lib/es/index.js +335 -185
- package/lib/types/commands/operations/editor/set-editor-resize.operation.d.ts +0 -1
- package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +0 -1
- package/lib/types/common/component-manager.d.ts +0 -1
- package/lib/types/common/lifecycle.d.ts +0 -1
- package/lib/types/common/menu-hidden-observable.d.ts +0 -1
- package/lib/types/common/menu-merge-configs.d.ts +0 -1
- package/lib/types/components/custom-label/CustomLabel.d.ts +0 -1
- package/lib/types/components/editor/TextEditor.d.ts +3 -3
- package/lib/types/components/font-family/FontFamily.d.ts +0 -1
- package/lib/types/components/font-family/FontFamilyItem.d.ts +0 -1
- package/lib/types/components/font-family/interface.d.ts +0 -1
- package/lib/types/components/font-size/FontSize.d.ts +0 -1
- package/lib/types/components/font-size/interface.d.ts +0 -1
- package/lib/types/components/hooks/layout.d.ts +0 -1
- package/lib/types/components/hooks/locale.d.ts +0 -1
- package/lib/types/components/hooks/observable.d.ts +1 -1
- package/lib/types/components/hooks/virtual-list.d.ts +35 -0
- package/lib/types/components/menu/common/hook.d.ts +0 -1
- package/lib/types/components/menu/desktop/Menu.d.ts +0 -1
- package/lib/types/components/menu/mobile/MobileMenu.d.ts +0 -1
- package/lib/types/components/menu/mobile/MobileMenu.stories.d.ts +0 -1
- package/lib/types/components/notification/Notification.d.ts +0 -1
- package/lib/types/components/notification/Notification.stories.d.ts +0 -1
- package/lib/types/components/progress-bar/ProgressBar.d.ts +0 -1
- package/lib/types/components/range-selector/RangeSelector.d.ts +0 -1
- package/lib/types/controllers/error/error.controller.d.ts +0 -1
- package/lib/types/controllers/menus/menus.d.ts +0 -1
- package/lib/types/controllers/shared-shortcut.controller.d.ts +0 -1
- package/lib/types/controllers/shortcut-display/menu.d.ts +0 -1
- package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +0 -1
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +0 -1
- package/lib/types/controllers/ui/ui-mobile.controller.d.ts +0 -1
- package/lib/types/controllers/ui/ui.controller.d.ts +0 -1
- package/lib/types/index.d.ts +6 -2
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/mobile-ui-plugin.d.ts +0 -1
- package/lib/types/services/before-close/before-close.service.d.ts +0 -1
- package/lib/types/services/clipboard/clipboard-interface.service.d.ts +0 -1
- package/lib/types/services/clipboard/clipboard.command.d.ts +0 -1
- package/lib/types/services/confirm/confirm.service.d.ts +0 -1
- package/lib/types/services/confirm/desktop-confirm.service.d.ts +0 -1
- package/lib/types/services/contextmenu/contextmenu.service.d.ts +0 -1
- package/lib/types/services/dialog/desktop-dialog.service.d.ts +0 -1
- package/lib/types/services/dialog/dialog.service.d.ts +0 -1
- package/lib/types/services/dom/canvas-dom-layer.service.d.ts +0 -1
- package/lib/types/services/editor/editor.service.d.ts +10 -5
- package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +0 -1
- package/lib/types/services/global-zone/global-zone.service.d.ts +0 -1
- package/lib/types/services/layout/layout.service.d.ts +8 -9
- package/lib/types/services/local-storage/local-storage.service.d.ts +0 -1
- package/lib/types/services/menu/menu.d.ts +7 -2
- package/lib/types/services/menu/menu.service.d.ts +1 -1
- package/lib/types/services/message/__testing__/mock-message.service.d.ts +0 -1
- package/lib/types/services/message/desktop-message.service.d.ts +0 -1
- package/lib/types/services/message/message.service.d.ts +0 -1
- package/lib/types/services/notification/desktop-notification.service.d.ts +0 -1
- package/lib/types/services/notification/notification.service.d.ts +0 -1
- package/lib/types/services/parts/parts.service.d.ts +0 -1
- package/lib/types/services/popup/canvas-popup.service.d.ts +2 -1
- package/lib/types/services/progress/progress.service.d.ts +0 -1
- package/lib/types/services/range-selector/range-selector.service.d.ts +0 -1
- package/lib/types/services/shortcut/shortcut-panel.service.d.ts +0 -1
- package/lib/types/services/shortcut/shortcut.service.d.ts +2 -2
- package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +3 -2
- package/lib/types/services/sidebar/sidebar.service.d.ts +5 -3
- package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +0 -1
- package/lib/types/services/zen-zone/zen-zone.service.d.ts +0 -1
- package/lib/types/ui-plugin.d.ts +0 -1
- package/lib/types/utils/cell.d.ts +0 -1
- package/lib/types/views/MobileApp.d.ts +0 -1
- package/lib/types/views/components/ComponentContainer.d.ts +0 -1
- package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +0 -1
- package/lib/types/views/components/confirm-part/interface.d.ts +0 -1
- package/lib/types/views/components/context-menu/ContextMenu.d.ts +0 -1
- package/lib/types/views/components/context-menu/MobileContextMenu.d.ts +0 -1
- package/lib/types/views/components/dialog-part/DialogPart.d.ts +0 -1
- package/lib/types/views/components/dialog-part/interface.d.ts +0 -1
- package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +0 -1
- package/lib/types/views/components/doc-bars/Toolbar.d.ts +0 -1
- package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +0 -1
- package/lib/types/views/components/doc-bars/hook.d.ts +1 -2
- package/lib/types/views/components/dom/FloatDom.d.ts +0 -1
- package/lib/types/views/components/global-zone/GlobalZone.d.ts +0 -1
- package/lib/types/views/components/popup/CanvasPopup.d.ts +0 -1
- package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +0 -1
- package/lib/types/views/components/sidebar/Sidebar.d.ts +0 -1
- package/lib/types/views/components/sidebar/interface.d.ts +1 -1
- package/lib/types/views/components/zen-zone/ZenZone.d.ts +0 -1
- package/lib/types/views/parts.d.ts +0 -1
- package/lib/types/views/workbench/Workbench.d.ts +1 -2
- package/lib/umd/index.js +6 -6
- package/package.json +15 -15
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IMessageOptions, IMessageProps, Message } from '@univerjs/design';
|
|
2
2
|
import { IDisposable } from '@univerjs/core';
|
|
3
3
|
import { IMessageService } from './message.service';
|
|
4
|
-
|
|
5
4
|
export declare class DesktopMessageService implements IMessageService, IDisposable {
|
|
6
5
|
protected _portalContainer: HTMLElement | undefined;
|
|
7
6
|
protected _message?: Message;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IMessageOptions } from '@univerjs/design';
|
|
2
2
|
import { IDisposable } from '@univerjs/core';
|
|
3
|
-
|
|
4
3
|
export declare const IMessageService: import('@univerjs/core').IdentifierDecorator<IMessageService>;
|
|
5
4
|
export interface IMessageService {
|
|
6
5
|
show(options: IMessageOptions): IDisposable;
|
|
@@ -2,7 +2,6 @@ import { Disposable, IDisposable, Injector } from '@univerjs/core';
|
|
|
2
2
|
import { INotificationOptions } from '../../components/notification/Notification';
|
|
3
3
|
import { IUIPartsService } from '../parts/parts.service';
|
|
4
4
|
import { INotificationService } from './notification.service';
|
|
5
|
-
|
|
6
5
|
export declare class DesktopNotificationService extends Disposable implements INotificationService {
|
|
7
6
|
private readonly _injector;
|
|
8
7
|
private readonly _uiPartsService;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IDisposable } from '@univerjs/core';
|
|
2
2
|
import { INotificationOptions } from '../../components/notification/Notification';
|
|
3
|
-
|
|
4
3
|
export declare const INotificationService: import('@univerjs/core').IdentifierDecorator<INotificationService>;
|
|
5
4
|
export interface INotificationService {
|
|
6
5
|
show(params: INotificationOptions): IDisposable;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IDisposable, Disposable } from '@univerjs/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ComponentType } from '../../common/component-manager';
|
|
4
|
-
|
|
5
4
|
type ComponentRenderer = () => ComponentType;
|
|
6
5
|
type ComponentPartKey = BuiltInUIPart | string;
|
|
7
6
|
export declare enum BuiltInUIPart {
|
|
@@ -2,7 +2,6 @@ import { Disposable } from '@univerjs/core';
|
|
|
2
2
|
import { IRectPopupProps } from '@univerjs/design';
|
|
3
3
|
import { IBoundRectNoAngle } from '@univerjs/engine-render';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
|
|
6
5
|
export interface IPopup extends Pick<IRectPopupProps, 'closeOnSelfTarget' | 'direction' | 'excludeOutside' | 'onClickOutside'> {
|
|
7
6
|
anchorRect: IBoundRectNoAngle;
|
|
8
7
|
anchorRect$: Observable<IBoundRectNoAngle>;
|
|
@@ -12,6 +11,8 @@ export interface IPopup extends Pick<IRectPopupProps, 'closeOnSelfTarget' | 'dir
|
|
|
12
11
|
unitId: string;
|
|
13
12
|
subUnitId: string;
|
|
14
13
|
offset?: [number, number];
|
|
14
|
+
canvasElement: HTMLCanvasElement;
|
|
15
|
+
hideOnInvisible?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface ICanvasPopupService {
|
|
17
18
|
addPopup(item: IPopup): string;
|
|
@@ -2,7 +2,7 @@ import { Disposable, ICommandService, IContextService, IDisposable } from '@univ
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ILayoutService } from '../layout/layout.service';
|
|
4
4
|
import { IPlatformService } from '../platform/platform.service';
|
|
5
|
-
|
|
5
|
+
import { KeyCode } from './keycode';
|
|
6
6
|
export interface IShortcutItem<P extends object = object> {
|
|
7
7
|
/** This should reuse the corresponding command's id. */
|
|
8
8
|
id: string;
|
|
@@ -13,7 +13,7 @@ export interface IShortcutItem<P extends object = object> {
|
|
|
13
13
|
/** A callback that will be triggered to examine if the shortcut should be invoked. */
|
|
14
14
|
preconditions?: (contextService: IContextService) => boolean;
|
|
15
15
|
/** A command can be bound to several bindings, with different static parameters perhaps. */
|
|
16
|
-
binding: number;
|
|
16
|
+
binding: KeyCode | number;
|
|
17
17
|
mac?: number;
|
|
18
18
|
win?: number;
|
|
19
19
|
linux?: number;
|
|
@@ -2,11 +2,12 @@ import { IDisposable } from '@univerjs/core';
|
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
|
|
4
4
|
import { ISidebarService } from './sidebar.service';
|
|
5
|
-
|
|
6
5
|
export declare class DesktopSidebarService implements ISidebarService {
|
|
7
6
|
private _sidebarOptions;
|
|
8
7
|
readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
|
|
9
8
|
readonly scrollEvent$: Subject<Event>;
|
|
9
|
+
get visible(): boolean;
|
|
10
|
+
get options(): ISidebarMethodOptions;
|
|
10
11
|
open(params: ISidebarMethodOptions): IDisposable;
|
|
11
|
-
close(): void;
|
|
12
|
+
close(id?: string): void;
|
|
12
13
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { IDisposable } from '@univerjs/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
|
|
4
|
-
|
|
5
|
-
export declare const ISidebarService: import('@univerjs/core').IdentifierDecorator<ISidebarService>;
|
|
6
4
|
export interface ISidebarService {
|
|
7
5
|
readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
|
|
8
6
|
readonly scrollEvent$: Subject<Event>;
|
|
9
7
|
open(params: ISidebarMethodOptions): IDisposable;
|
|
10
|
-
close(): void;
|
|
8
|
+
close(id?: string): void;
|
|
9
|
+
get visible(): boolean;
|
|
10
|
+
get options(): ISidebarMethodOptions;
|
|
11
11
|
}
|
|
12
|
+
export declare const ILeftSidebarService: import('@univerjs/core').IdentifierDecorator<ISidebarService>;
|
|
13
|
+
export declare const ISidebarService: import('@univerjs/core').IdentifierDecorator<ISidebarService>;
|
|
@@ -3,7 +3,6 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { ComponentManager } from '../../common/component-manager';
|
|
5
5
|
import { IZenZoneService } from './zen-zone.service';
|
|
6
|
-
|
|
7
6
|
export declare class DesktopZenZoneService implements IZenZoneService {
|
|
8
7
|
private readonly _componentManager;
|
|
9
8
|
readonly visible$: Subject<boolean>;
|
package/lib/types/ui-plugin.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IContextService, Injector, Plugin } from '@univerjs/core';
|
|
2
2
|
import { IUniverUIConfig } from './controllers/ui/ui.controller';
|
|
3
|
-
|
|
4
3
|
export declare const UNIVER_UI_PLUGIN_NAME = "UNIVER_UI_PLUGIN";
|
|
5
4
|
export declare const DISABLE_AUTO_FOCUS_KEY = "DISABLE_AUTO_FOCUS";
|
|
6
5
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IDisplayMenuItem, IMenuItem, MenuGroup, MenuPosition } from '../../../services/menu/menu';
|
|
2
|
-
|
|
3
2
|
type MenuPositionWithCustom = MenuPosition | string;
|
|
4
3
|
export interface IMenuGroup {
|
|
5
4
|
name: MenuPositionWithCustom;
|
|
@@ -20,7 +19,7 @@ export interface IToolbarRenderHookHandler {
|
|
|
20
19
|
* you can use this hook to get the toolbar status.
|
|
21
20
|
* @returns toolbar status
|
|
22
21
|
*/
|
|
23
|
-
export declare function useToolbarGroups(categories: MenuPositionWithCustom[]): IToolbarRenderHookHandler;
|
|
22
|
+
export declare function useToolbarGroups(categories: MenuPositionWithCustom[], initCategory?: string): IToolbarRenderHookHandler;
|
|
24
23
|
export interface IToolbarItemStatus {
|
|
25
24
|
disabled: boolean;
|
|
26
25
|
value: any;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IWorkbenchOptions } from '../../controllers/ui/ui.controller';
|
|
3
|
-
|
|
4
3
|
export interface IUniverWorkbenchProps extends IWorkbenchOptions {
|
|
5
4
|
mountContainer: HTMLElement;
|
|
6
|
-
onRendered?: (
|
|
5
|
+
onRendered?: (containerElement: HTMLElement) => void;
|
|
7
6
|
}
|
|
8
7
|
export declare function DesktopWorkbench(props: IUniverWorkbenchProps): React.JSX.Element;
|