@univerjs/ui 0.2.7 → 0.2.9
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 +3 -3
- package/lib/es/index.js +385 -220
- 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 +0 -1
- 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 +0 -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 +2 -1
- 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 +1 -1
- package/lib/types/services/editor/editor.service.d.ts +0 -1
- 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 +0 -1
- package/lib/types/services/local-storage/local-storage.service.d.ts +0 -1
- package/lib/types/services/menu/menu.d.ts +10 -2
- package/lib/types/services/menu/menu.service.d.ts +20 -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 +2 -2
- package/lib/types/services/popup/canvas-popup.service.d.ts +4 -3
- 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 +0 -1
- package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +0 -1
- package/lib/types/services/sidebar/sidebar.service.d.ts +0 -1
- 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 -1
- package/lib/types/views/components/dom/FloatDom.d.ts +3 -2
- 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 +0 -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 +0 -1
- package/lib/umd/index.js +3 -3
- package/package.json +15 -15
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Disposable } from '@univerjs/core';
|
|
1
|
+
import { Nullable, 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
|
-
anchorRect: IBoundRectNoAngle
|
|
6
|
+
anchorRect: Nullable<IBoundRectNoAngle>;
|
|
8
7
|
anchorRect$: Observable<IBoundRectNoAngle>;
|
|
9
8
|
excludeRects?: IBoundRectNoAngle[];
|
|
10
9
|
excludeRects$?: 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;
|
|
@@ -3,7 +3,6 @@ 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
|
-
|
|
7
6
|
export interface IShortcutItem<P extends object = object> {
|
|
8
7
|
/** This should reuse the corresponding command's id. */
|
|
9
8
|
id: string;
|
|
@@ -2,7 +2,6 @@ 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>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IDisposable } from '@univerjs/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
|
|
4
|
-
|
|
5
4
|
export interface ISidebarService {
|
|
6
5
|
readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
|
|
7
6
|
readonly scrollEvent$: Subject<Event>;
|
|
@@ -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;
|
|
@@ -15,6 +14,7 @@ export interface IToolbarRenderHookHandler {
|
|
|
15
14
|
groups: IMenuGroup[];
|
|
16
15
|
groupsByKey: Record<MenuGroup, Array<IDisplayMenuItem<IMenuItem>>>;
|
|
17
16
|
}
|
|
17
|
+
export declare function useSimpleToolbarGroups(category: MenuPositionWithCustom): IDisplayMenuItem<IMenuItem>[];
|
|
18
18
|
/**
|
|
19
19
|
* If your custom toolbar component need to render menu items by their category,
|
|
20
20
|
* you can use this hook to get the toolbar status.
|
|
@@ -1,6 +1,5 @@
|
|
|
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
5
|
onRendered?: (containerElement: HTMLElement) => void;
|