@univerjs/ui 0.1.10 → 0.1.11

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.
Files changed (60) hide show
  1. package/lib/cjs/index.js +14 -14
  2. package/lib/es/index.js +3548 -3446
  3. package/lib/types/common/component-manager.d.ts +2 -2
  4. package/lib/types/common/menu-hidden-observable.d.ts +2 -2
  5. package/lib/types/components/custom-label/CustomLabel.d.ts +2 -2
  6. package/lib/types/components/editor/TextEditor.d.ts +2 -2
  7. package/lib/types/components/font-family/FontFamily.d.ts +1 -1
  8. package/lib/types/components/font-family/FontFamilyItem.d.ts +1 -1
  9. package/lib/types/components/font-size/FontSize.d.ts +1 -1
  10. package/lib/types/components/font-size/interface.d.ts +1 -1
  11. package/lib/types/components/hooks/layout.d.ts +14 -0
  12. package/lib/types/components/hooks/observable.d.ts +2 -2
  13. package/lib/types/components/menu/Menu.d.ts +6 -1
  14. package/lib/types/components/notification/Notification.d.ts +2 -2
  15. package/lib/types/components/notification/Notification.stories.d.ts +2 -2
  16. package/lib/types/components/range-selector/RangeSelector.d.ts +1 -1
  17. package/lib/types/controllers/error/error.controller.d.ts +1 -1
  18. package/lib/types/controllers/menus/menus.d.ts +1 -1
  19. package/lib/types/controllers/shared-shortcut.controller.d.ts +3 -3
  20. package/lib/types/controllers/shortcut-display/menu.d.ts +1 -1
  21. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +4 -4
  22. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +6 -6
  23. package/lib/types/index.d.ts +1 -2
  24. package/lib/types/locale/index.d.ts +1 -0
  25. package/lib/types/locale/ru-RU.d.ts +4 -0
  26. package/lib/types/services/before-close/before-close.service.d.ts +1 -1
  27. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +1 -1
  28. package/lib/types/services/confirm/confirm.service.d.ts +2 -2
  29. package/lib/types/services/confirm/desktop-confirm.service.d.ts +3 -3
  30. package/lib/types/services/contextmenu/contextmenu.service.d.ts +2 -2
  31. package/lib/types/services/dialog/desktop-dialog.service.d.ts +7 -7
  32. package/lib/types/services/dialog/dialog.service.d.ts +2 -2
  33. package/lib/types/services/editor/editor.service.d.ts +4 -4
  34. package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +4 -4
  35. package/lib/types/services/global-zone/global-zone.service.d.ts +1 -1
  36. package/lib/types/services/layout/layout.service.d.ts +4 -2
  37. package/lib/types/services/menu/menu.d.ts +1 -1
  38. package/lib/types/services/menu/menu.service.d.ts +4 -4
  39. package/lib/types/services/message/__testing__/mock-message.service.d.ts +2 -2
  40. package/lib/types/services/message/desktop-message.service.d.ts +2 -2
  41. package/lib/types/services/message/message.service.d.ts +1 -1
  42. package/lib/types/services/notification/desktop-notification.service.d.ts +2 -2
  43. package/lib/types/services/notification/notification.service.d.ts +1 -1
  44. package/lib/types/services/popup/canvas-popup.service.d.ts +1 -1
  45. package/lib/types/services/progress/progress.service.d.ts +2 -2
  46. package/lib/types/services/range-selector/range-selector.service.d.ts +2 -2
  47. package/lib/types/services/shortcut/shortcut.service.d.ts +4 -4
  48. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +3 -4
  49. package/lib/types/services/sidebar/sidebar.service.d.ts +2 -3
  50. package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +4 -4
  51. package/lib/types/services/zen-zone/zen-zone.service.d.ts +1 -1
  52. package/lib/types/ui-plugin.d.ts +2 -2
  53. package/lib/types/views/App.d.ts +1 -1
  54. package/lib/types/views/components/confirm-part/interface.d.ts +1 -1
  55. package/lib/types/views/components/dialog-part/interface.d.ts +1 -1
  56. package/lib/types/views/components/doc-bars/Toolbar.d.ts +1 -1
  57. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +1 -1
  58. package/lib/umd/index.js +14 -14
  59. package/package.json +18 -18
  60. package/lib/types/views/hooks/active.d.ts +0 -10
@@ -1,6 +1,6 @@
1
- import { default as React } from 'react';
2
- import { defineComponent } from 'vue';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { defineComponent } from 'vue';
3
+ import { default as React } from 'react';
4
4
 
5
5
  type ComponentFramework = 'vue3' | 'react';
6
6
  interface IComponentOptions {
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
- import { IAccessor } from '@wendellhu/redi';
3
1
  import { UniverInstanceType } from '@univerjs/core';
2
+ import { IAccessor } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
4
 
5
5
  export declare function getMenuHiddenObservable(accessor: IAccessor, targetUniverType: UniverInstanceType): Observable<boolean>;
@@ -1,6 +1,6 @@
1
- import { IMenuSelectorItem } from '../../services/menu/menu';
2
- import { Observable } from 'rxjs';
3
1
  import { default as React } from 'react';
2
+ import { Observable } from 'rxjs';
3
+ import { IMenuSelectorItem } from '../../services/menu/menu';
4
4
 
5
5
  export type ICustomLabelProps<T = undefined> = {
6
6
  value?: string | number | undefined;
@@ -1,6 +1,6 @@
1
- import { IEditorCanvasStyle } from '../../services/editor/editor.service';
2
- import { default as React } from 'react';
3
1
  import { IDocumentData, Nullable } from '@univerjs/core';
2
+ import { default as React } from 'react';
3
+ import { IEditorCanvasStyle } from '../../services/editor/editor.service';
4
4
 
5
5
  type MyComponentProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
6
6
  export interface ITextEditorProps {
@@ -1,4 +1,4 @@
1
- import { IFontFamilyProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontFamilyProps } from './interface';
3
3
 
4
4
  export declare const FontFamily: (props: IFontFamilyProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IFontFamilyItemProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontFamilyItemProps } from './interface';
3
3
 
4
4
  export declare const FontFamilyItem: (props: IFontFamilyItemProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IFontSizeProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontSizeProps } from './interface';
3
3
 
4
4
  export declare const FontSize: (props: IFontSizeProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
1
  import { ICustomComponentProps } from '@univerjs/ui';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  export interface IFontSizeProps extends ICustomComponentProps<string> {
5
5
  value: string;
@@ -0,0 +1,14 @@
1
+ import { Nullable } from '@univerjs/core';
2
+
3
+ /**
4
+ * These hooks are used for browser layout
5
+ * Prefer to client-side
6
+ */
7
+ /**
8
+ * Allow the element to scroll when its height over the container height
9
+ * @param element
10
+ * Container means the window view that the element displays in.
11
+ * Recommend pass the sheet mountContainer as container
12
+ * @param container
13
+ */
14
+ export declare function useScrollYOverContainer(element: Nullable<HTMLElement>, container: Nullable<HTMLElement>): void;
@@ -1,10 +1,10 @@
1
- import { Observable } from 'rxjs';
2
1
  import { Nullable } from '@univerjs/core';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  type ObservableOrFn<T> = Observable<T> | (() => Observable<T>);
5
5
  export declare function useObservable<T>(observable: ObservableOrFn<T>, defaultValue: T | undefined, shouldHaveSyncValue?: true): T;
6
6
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue: T): T;
7
7
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: undefined): T | undefined;
8
- export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: T, shouldHaveSyncValue?: true, deps?: any[]): T | undefined;
8
+ export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue: undefined, shouldHaveSyncValue: true, deps?: any[]): T;
9
9
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: T, shouldHaveSyncValue?: boolean, deps?: any[]): T | undefined;
10
10
  export {};
@@ -1,11 +1,16 @@
1
- import { IValueOption } from '../../services/menu/menu';
2
1
  import { default as React } from 'react';
2
+ import { IValueOption } from '../../services/menu/menu';
3
3
 
4
4
  export interface IBaseMenuProps {
5
5
  parentKey?: string | number;
6
6
  menuType?: string | string[];
7
7
  value?: string | number;
8
8
  options?: IValueOption[];
9
+ /**
10
+ * The menu will show scroll on it over viewport height
11
+ * Recommend that you use this prop when displaying menu overlays in Dropdown
12
+ */
13
+ overViewport?: 'scroll';
9
14
  onOptionSelect?: (option: IValueOption) => void;
10
15
  }
11
16
  export declare const Menu: (props: IBaseMenuProps) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
- import { Subject } from 'rxjs';
2
- import { default as React } from 'react';
3
1
  import { Placement } from 'rc-notification/es/interface';
2
+ import { default as React } from 'react';
3
+ import { Subject } from 'rxjs';
4
4
 
5
5
  export type NotificationType = 'success' | 'info' | 'warning' | 'error';
6
6
  export interface INotificationMethodOptions {
@@ -1,6 +1,6 @@
1
- import { Notification } from './Notification';
2
- import { default as React } from 'react';
3
1
  import { Meta } from '@storybook/react';
2
+ import { default as React } from 'react';
3
+ import { Notification } from './Notification';
4
4
 
5
5
  declare const meta: Meta<typeof Notification>;
6
6
  export default meta;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IUnitRangeWithName, Nullable } from '@univerjs/core';
2
+ import { default as React } from 'react';
3
3
 
4
4
  export interface IRangeSelectorProps {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
- import { IMessageService } from '../../services/message/message.service';
2
1
  import { Disposable, ErrorService } from '@univerjs/core';
2
+ import { IMessageService } from '../../services/message/message.service';
3
3
 
4
4
  export declare class ErrorController extends Disposable {
5
5
  private readonly _errorService;
@@ -1,5 +1,5 @@
1
- import { IMenuButtonItem } from '../../services/menu/menu';
2
1
  import { IAccessor } from '@wendellhu/redi';
2
+ import { IMenuButtonItem } from '../../services/menu/menu';
3
3
 
4
4
  export declare function UndoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
5
5
  export declare function RedoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,7 +1,7 @@
1
- import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
2
- import { IMenuService } from '../services/menu/menu.service';
3
- import { Injector } from '@wendellhu/redi';
4
1
  import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { IMenuService } from '../services/menu/menu.service';
4
+ import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
5
5
 
6
6
  export declare const CopyShortcutItem: IShortcutItem;
7
7
  export declare const CutShortcutItem: IShortcutItem;
@@ -1,4 +1,4 @@
1
- import { IMenuButtonItem } from '../../services/menu/menu';
2
1
  import { IAccessor } from '@wendellhu/redi';
2
+ import { IMenuButtonItem } from '../../services/menu/menu';
3
3
 
4
4
  export declare function ShortcutPanelMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,8 +1,8 @@
1
- import { IShortcutService } from '../../services/shortcut/shortcut.service';
2
- import { IMenuService } from '../../services/menu/menu.service';
3
- import { ComponentManager } from '../../common/component-manager';
4
- import { Injector } from '@wendellhu/redi';
5
1
  import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { ComponentManager } from '../../common/component-manager';
4
+ import { IMenuService } from '../../services/menu/menu.service';
5
+ import { IShortcutService } from '../../services/shortcut/shortcut.service';
6
6
 
7
7
  /**
8
8
  * This controller add a side panel to the application to display the shortcuts.
@@ -1,10 +1,10 @@
1
- import { IWorkbenchOptions, IUIController } from './ui.controller';
2
- import { ILayoutService } from '../../services/layout/layout.service';
3
- import { Observable } from 'rxjs';
4
- import { ComponentType, default as React } from 'react';
5
- import { IDisposable, Injector } from '@wendellhu/redi';
6
- import { IRenderManagerService } from '@univerjs/engine-render';
7
1
  import { Disposable, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ import { IDisposable, Injector } from '@wendellhu/redi';
4
+ import { ComponentType, default as React } from 'react';
5
+ import { Observable } from 'rxjs';
6
+ import { ILayoutService } from '../../services/layout/layout.service';
7
+ import { IWorkbenchOptions, IUIController } from './ui.controller';
8
8
 
9
9
  export declare enum DesktopUIPart {
10
10
  HEADER = "header",
@@ -22,7 +22,7 @@ export { useEvent } from './components/hooks/event';
22
22
  export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
23
23
  export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
24
24
  export { DesktopUIController, DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
25
- export { enUS, zhCN } from './locale';
25
+ export { enUS, zhCN, ruRU } from './locale';
26
26
  export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
27
27
  export { CopyCommand, CutCommand, PasteCommand } from './services/clipboard/clipboard.command';
28
28
  export { BrowserClipboardService, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
@@ -56,7 +56,6 @@ export { SetEditorResizeOperation } from './commands/operations/editor/set-edito
56
56
  export { RangeSelector } from './components/range-selector/RangeSelector';
57
57
  export { IRangeSelectorService } from './services/range-selector/range-selector.service';
58
58
  export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
59
- export { useActiveWorkbook, useActiveWorksheet } from './views/hooks/active';
60
59
  export { CanvasPopupService, ICanvasPopupService } from './services/popup/canvas-popup.service';
61
60
  export { ProgressBar } from './components/progress-bar/ProgressBar';
62
61
  export { IProgressService } from './services/progress/progress.service';
@@ -15,3 +15,4 @@
15
15
  */
16
16
  export { default as enUS } from './en-US';
17
17
  export { default as zhCN } from './zh-CN';
18
+ export { default as ruRU } from './ru-RU';
@@ -0,0 +1,4 @@
1
+ import { default as zhCN } from './zh-CN';
2
+
3
+ declare const locale: typeof zhCN;
4
+ export default locale;
@@ -1,5 +1,5 @@
1
- import { INotificationService } from '../notification/notification.service';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { INotificationService } from '../notification/notification.service';
3
3
 
4
4
  export interface IBeforeCloseService {
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { INotificationService } from '../notification/notification.service';
2
1
  import { Disposable, ILogService, LocaleService } from '@univerjs/core';
2
+ import { INotificationService } from '../notification/notification.service';
3
3
 
4
4
  export declare const PLAIN_TEXT_CLIPBOARD_MIME_TYPE = "text/plain";
5
5
  export declare const HTML_CLIPBOARD_MIME_TYPE = "text/html";
@@ -1,6 +1,6 @@
1
- import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
2
- import { Subject } from 'rxjs';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
4
4
 
5
5
  export declare const IConfirmService: import('@wendellhu/redi').IdentifierDecorator<IConfirmService>;
6
6
  export interface IConfirmService {
@@ -1,7 +1,7 @@
1
- import { IConfirmService } from './confirm.service';
2
- import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
3
- import { Subject } from 'rxjs';
4
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
4
+ import { IConfirmService } from './confirm.service';
5
5
 
6
6
  export declare class DesktopConfirmService implements IConfirmService {
7
7
  private _confirmOptions;
@@ -1,6 +1,6 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
- import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
3
1
  import { Disposable } from '@univerjs/core';
2
+ import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
3
+ import { IDisposable } from '@wendellhu/redi';
4
4
 
5
5
  export interface IContextMenuHandler {
6
6
  /** A callback to open context menu with given position and menu type. */
@@ -1,14 +1,14 @@
1
- import { IDialogService } from './dialog.service';
2
- import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
3
- import { Subject } from 'rxjs';
4
- import { IDisposable } from '@wendellhu/redi';
5
1
  import { Disposable } from '@univerjs/core';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { Subject } from 'rxjs';
4
+ import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
5
+ import { IDialogService } from './dialog.service';
6
6
 
7
7
  export declare class DesktopDialogService extends Disposable implements IDialogService {
8
- private _dialogOptions;
9
- private readonly _dialogOptions$;
8
+ protected _dialogOptions: IDialogPartMethodOptions[];
9
+ protected readonly _dialogOptions$: Subject<IDialogPartMethodOptions[]>;
10
10
  dispose(): void;
11
11
  open(option: IDialogPartMethodOptions): IDisposable;
12
12
  close(id: string): void;
13
- getDialogs$(): Subject<IDialogPartMethodOptions[]>;
13
+ getDialogs$(): import('rxjs').Observable<IDialogPartMethodOptions[]>;
14
14
  }
@@ -1,6 +1,6 @@
1
- import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
2
- import { Observable } from 'rxjs';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Observable } from 'rxjs';
3
+ import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
4
4
 
5
5
  export declare const IDialogService: import('@wendellhu/redi').IdentifierDecorator<IDialogService>;
6
6
  export interface IDialogService {
@@ -1,8 +1,8 @@
1
- import { LexerTreeBuilder } from '@univerjs/engine-formula';
2
- import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
3
- import { Observable } from 'rxjs';
4
- import { IDisposable, Injector } from '@wendellhu/redi';
5
1
  import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
2
+ import { IDisposable, Injector } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
+ import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
5
+ import { LexerTreeBuilder } from '@univerjs/engine-formula';
6
6
 
7
7
  export interface IEditorStateParam extends Partial<IPosition> {
8
8
  visible?: boolean;
@@ -1,8 +1,8 @@
1
- import { IGlobalZoneService } from './global-zone.service';
2
- import { ComponentManager } from '../../common/component-manager';
3
- import { Subject } from 'rxjs';
4
- import { ForwardRefExoticComponent } from 'react';
5
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { ForwardRefExoticComponent } from 'react';
3
+ import { Subject } from 'rxjs';
4
+ import { ComponentManager } from '../../common/component-manager';
5
+ import { IGlobalZoneService } from './global-zone.service';
6
6
 
7
7
  export declare class DesktopGlobalZoneService implements IGlobalZoneService {
8
8
  private readonly _componentManager;
@@ -1,5 +1,5 @@
1
- import { Subject } from 'rxjs';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
3
 
4
4
  export declare const IGlobalZoneService: import('@wendellhu/redi').IdentifierDecorator<IGlobalZoneService>;
5
5
  export interface IGlobalZoneService {
@@ -1,11 +1,12 @@
1
- import { IEditorService } from '../editor/editor.service';
1
+ import { ContextService, Nullable, Disposable, ILogService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
2
2
  import { IDisposable } from '@wendellhu/redi';
3
- import { ContextService, Disposable, ILogService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
3
+ import { IEditorService } from '../editor/editor.service';
4
4
 
5
5
  type FocusHandlerFn = (unitId: string) => void;
6
6
  export declare const FOCUSING_UNIVER = "FOCUSING_UNIVER";
7
7
  export interface ILayoutService {
8
8
  readonly isFocused: boolean;
9
+ get rootContainerElement(): Nullable<HTMLElement>;
9
10
  /** Re-focus the currently focused Univer business instance. */
10
11
  focus(): void;
11
12
  /** Register a focus handler to focus on certain type of Univer unit. */
@@ -36,6 +37,7 @@ export declare class DesktopLayoutService extends Disposable implements ILayoutS
36
37
  private _canvasContainers;
37
38
  private _allContainers;
38
39
  constructor(_contextService: ContextService, _univerInstanceService: IUniverInstanceService, _logService: ILogService, _editorService: IEditorService);
40
+ get rootContainerElement(): Nullable<HTMLElement>;
39
41
  focus(): void;
40
42
  registerFocusHandler(type: UniverInstanceType, handler: FocusHandlerFn): IDisposable;
41
43
  registerCanvasElement(container: HTMLCanvasElement): IDisposable;
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
1
  import { IAccessor } from '@wendellhu/redi';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  export type OneOrMany<T> = T | T[];
5
5
  export declare enum MenuPosition {
@@ -1,8 +1,8 @@
1
- import { IDisplayMenuItem, IMenuItem, MenuPosition } from './menu';
2
- import { IShortcutService } from '../shortcut/shortcut.service';
3
- import { Observable } from 'rxjs';
4
- import { IDisposable } from '@wendellhu/redi';
5
1
  import { Disposable } from '@univerjs/core';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
+ import { IShortcutService } from '../shortcut/shortcut.service';
5
+ import { IDisplayMenuItem, IMenuItem, MenuPosition } from './menu';
6
6
 
7
7
  export declare const IMenuService: import('@wendellhu/redi').IdentifierDecorator<IMenuService>;
8
8
  export interface IMenuService {
@@ -1,6 +1,6 @@
1
- import { IMessageService } from '../message.service';
2
- import { IDisposable } from '@wendellhu/redi';
3
1
  import { IMessageMethodOptions, IMessageProps } from '@univerjs/design';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { IMessageService } from '../message.service';
4
4
 
5
5
  /**
6
6
  * This is a mocked message service for testing purposes.
@@ -1,6 +1,6 @@
1
- import { IMessageService } from './message.service';
2
- import { IDisposable } from '@wendellhu/redi';
3
1
  import { IMessageMethodOptions, IMessageProps, Message } from '@univerjs/design';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { IMessageService } from './message.service';
4
4
 
5
5
  export declare class DesktopMessageService implements IMessageService {
6
6
  portalContainer: HTMLElement;
@@ -1,5 +1,5 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
1
  import { IMessageMethodOptions, IMessageProps } from '@univerjs/design';
2
+ import { IDisposable } from '@wendellhu/redi';
3
3
 
4
4
  export declare const IMessageService: import('@wendellhu/redi').IdentifierDecorator<IMessageService>;
5
5
  export interface IMessageService {
@@ -1,6 +1,6 @@
1
- import { INotificationService } from './notification.service';
2
- import { INotificationMethodOptions } from '../../components/notification/Notification';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { INotificationMethodOptions } from '../../components/notification/Notification';
3
+ import { INotificationService } from './notification.service';
4
4
 
5
5
  export declare class DesktopNotificationService implements INotificationService {
6
6
  show(params: INotificationMethodOptions): IDisposable;
@@ -1,5 +1,5 @@
1
- import { INotificationMethodOptions } from '../../components/notification/Notification';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { INotificationMethodOptions } from '../../components/notification/Notification';
3
3
 
4
4
  export declare const INotificationService: import('@wendellhu/redi').IdentifierDecorator<INotificationService>;
5
5
  export interface INotificationService {
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
1
  import { IBoundRectNoAngle } from '@univerjs/engine-render';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  export interface IPopup {
5
5
  anchorRect: IBoundRectNoAngle;
@@ -1,6 +1,6 @@
1
- import { Observable } from 'rxjs';
2
- import { IDisposable } from '@wendellhu/redi';
3
1
  import { Disposable } from '@univerjs/core';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
4
 
5
5
  export interface IProgressCount {
6
6
  count: number;
@@ -1,6 +1,6 @@
1
- import { Observable } from 'rxjs';
2
- import { IDisposable } from '@wendellhu/redi';
3
1
  import { IUnitRange, Nullable, Disposable } from '@univerjs/core';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
4
 
5
5
  export interface IRangeSelectorRange extends IUnitRange {
6
6
  sheetName: string;
@@ -1,8 +1,8 @@
1
- import { IPlatformService } from '../platform/platform.service';
2
- import { ILayoutService } from '../layout/layout.service';
3
- import { Observable } from 'rxjs';
4
- import { IDisposable } from '@wendellhu/redi';
5
1
  import { Disposable, ICommandService, IContextService } from '@univerjs/core';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
+ import { ILayoutService } from '../layout/layout.service';
5
+ import { IPlatformService } from '../platform/platform.service';
6
6
 
7
7
  export interface IShortcutItem<P extends object = object> {
8
8
  /** This should reuse the corresponding command's id. */
@@ -1,12 +1,11 @@
1
- import { ISidebarService } from './sidebar.service';
2
- import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
3
- import { Subject } from 'rxjs';
4
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
4
+ import { ISidebarService } from './sidebar.service';
5
5
 
6
6
  export declare class DesktopSidebarService implements ISidebarService {
7
7
  private _sidebarOptions;
8
8
  readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
9
9
  open(params: ISidebarMethodOptions): IDisposable;
10
- set(params: ISidebarMethodOptions): void;
11
10
  close(): void;
12
11
  }
@@ -1,11 +1,10 @@
1
- import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
2
- import { Subject } from 'rxjs';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { ISidebarMethodOptions } from '../../views/components/sidebar/interface';
4
4
 
5
5
  export declare const ISidebarService: import('@wendellhu/redi').IdentifierDecorator<ISidebarService>;
6
6
  export interface ISidebarService {
7
7
  readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
8
8
  open(params: ISidebarMethodOptions): IDisposable;
9
- set(params: ISidebarMethodOptions): void;
10
9
  close(): void;
11
10
  }
@@ -1,8 +1,8 @@
1
- import { IZenZoneService } from './zen-zone.service';
2
- import { ComponentManager } from '../../common/component-manager';
3
- import { Subject } from 'rxjs';
4
- import { ForwardRefExoticComponent } from 'react';
5
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { ForwardRefExoticComponent } from 'react';
3
+ import { Subject } from 'rxjs';
4
+ import { ComponentManager } from '../../common/component-manager';
5
+ import { IZenZoneService } from './zen-zone.service';
6
6
 
7
7
  export declare class DesktopZenZoneService implements IZenZoneService {
8
8
  private readonly _componentManager;
@@ -1,5 +1,5 @@
1
- import { Subject } from 'rxjs';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
3
 
4
4
  export declare const IZenZoneService: import('@wendellhu/redi').IdentifierDecorator<IZenZoneService>;
5
5
  export interface IZenZoneService {
@@ -1,6 +1,6 @@
1
- import { IWorkbenchOptions } from './controllers/ui/ui.controller';
2
- import { Injector } from '@wendellhu/redi';
3
1
  import { DependencyOverride, IContextService, LocaleService, Plugin } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { IWorkbenchOptions } from './controllers/ui/ui.controller';
4
4
 
5
5
  export interface IUniverUIConfig extends IWorkbenchOptions {
6
6
  /** Disable auto focus when Univer bootstraps. */
@@ -1,5 +1,5 @@
1
- import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
2
1
  import { ComponentType, default as React } from 'react';
2
+ import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
3
3
 
4
4
  export interface IUniverAppProps extends IWorkbenchOptions {
5
5
  mountContainer: HTMLElement;
@@ -1,5 +1,5 @@
1
- import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
2
1
  import { IConfirmProps } from '@univerjs/design';
2
+ import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
3
3
 
4
4
  export type IConfirmPartMethodOptions = {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
- import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
2
1
  import { IDialogProps } from '@univerjs/design';
2
+ import { ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
3
3
 
4
4
  export type IDialogPartMethodOptions = {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
- import { MenuPosition } from '../../../services/menu/menu';
2
1
  import { ComponentType, default as React } from 'react';
2
+ import { MenuPosition } from '../../../services/menu/menu';
3
3
 
4
4
  export declare const positions: MenuPosition[];
5
5
  export interface IToolbarProps {
@@ -1,4 +1,4 @@
1
- import { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
2
1
  import { default as React } from 'react';
2
+ import { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
3
3
 
4
4
  export declare const ToolbarItem: React.ForwardRefExoticComponent<IDisplayMenuItem<IMenuItem> & React.RefAttributes<any>>;