@univerjs/ui 0.1.17 → 0.2.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.
@@ -21,7 +21,7 @@ export declare class ComponentManager {
21
21
  constructor();
22
22
  register(name: string, component: ComponentType, options?: IComponentOptions): IDisposable;
23
23
  get(name: string): React.ForwardRefExoticComponent<any> | ((props: any) => React.FunctionComponentElement<{
24
- component: any;
24
+ component: ReturnType<typeof defineComponent>;
25
25
  props: Record<string, any>;
26
26
  }>) | undefined;
27
27
  delete(name: string): void;
@@ -3,3 +3,4 @@ import { IAccessor } from '@wendellhu/redi';
3
3
  import { Observable } from 'rxjs';
4
4
 
5
5
  export declare function getMenuHiddenObservable(accessor: IAccessor, targetUniverType: UniverInstanceType): Observable<boolean>;
6
+ export declare function getHeaderFooterMenuHiddenObservable(accessor: IAccessor): Observable<boolean>;
@@ -1,4 +1,4 @@
1
- import { Disposable, LifecycleService } from '@univerjs/core';
1
+ import { Disposable, IConfigService, LifecycleService } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { Injector } from '@wendellhu/redi';
4
4
  import { ILayoutService } from '../../services/layout/layout.service';
@@ -11,8 +11,9 @@ export declare class DesktopUIController extends Disposable {
11
11
  private readonly _injector;
12
12
  private readonly _lifecycleService;
13
13
  private readonly _uiPartsService;
14
+ private readonly _configService;
14
15
  private readonly _layoutService?;
15
- constructor(_config: IUniverUIConfig, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _uiPartsService: IUIPartsService, _layoutService?: ILayoutService | undefined);
16
+ constructor(_config: IUniverUIConfig, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _uiPartsService: IUIPartsService, _configService: IConfigService, _layoutService?: ILayoutService | undefined);
16
17
  private _bootstrapWorkbench;
17
18
  private _initBuiltinComponents;
18
19
  }
@@ -4,6 +4,7 @@ import { MenuConfig } from '../../services/menu/menu';
4
4
  export interface IWorkbenchOptions {
5
5
  container?: string | HTMLElement;
6
6
  header?: boolean;
7
+ toolbar?: boolean;
7
8
  footer?: boolean;
8
9
  contextMenu?: boolean;
9
10
  }
@@ -16,3 +17,4 @@ export interface IUniverUIConfig extends IWorkbenchOptions {
16
17
  override?: DependencyOverride;
17
18
  menu?: MenuConfig;
18
19
  }
20
+ export declare const UI_CONFIG_KEY = "UNIVER_UI_CONFIG_KEY";
@@ -14,13 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export * from './common';
17
- export { getMenuHiddenObservable } from './common/menu-hidden-observable';
17
+ export { getMenuHiddenObservable, getHeaderFooterMenuHiddenObservable } from './common/menu-hidden-observable';
18
18
  export * from './components';
19
19
  export { t } from './components/hooks/locale';
20
20
  export { useObservable } from './components/hooks/observable';
21
21
  export { useEvent } from './components/hooks/event';
22
22
  export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
23
- export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
23
+ export { UI_CONFIG_KEY, IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
24
24
  export { DesktopUIController } from './controllers/ui/ui-desktop.controller';
25
25
  export { IUIPartsService, BuiltInUIPart, UIPartsService } from './services/parts/parts.service';
26
26
  export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
@@ -56,7 +56,6 @@ export { type IConfirmPartMethodOptions } from './views/components/confirm-part/
56
56
  export { ComponentContainer, useComponentsOfPart, type IComponentContainerProps } from './views/components/ComponentContainer';
57
57
  export { IEditorService, EditorService } from './services/editor/editor.service';
58
58
  export { TextEditor } from './components/editor/TextEditor';
59
- export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';
60
59
  export { RangeSelector } from './components/range-selector/RangeSelector';
61
60
  export { IRangeSelectorService } from './services/range-selector/range-selector.service';
62
61
  export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
@@ -75,3 +74,5 @@ export { CanvasPopup } from './views/components/popup/CanvasPopup';
75
74
  export { CanvasFloatDomService, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
76
75
  export { FloatDom } from './views/components/dom/FloatDom';
77
76
  export { MobileContextMenu } from './views/components/context-menu/MobileContextMenu';
77
+ export { ToggleShortcutPanelOperation } from './commands/operations/toggle-shortcut-panel.operation';
78
+ export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';
@@ -6,6 +6,8 @@ import { Observable } from 'rxjs';
6
6
  export interface IPopup extends Pick<IRectPopupProps, 'closeOnSelfTarget' | 'direction' | 'excludeOutside' | 'onClickOutside'> {
7
7
  anchorRect: IBoundRectNoAngle;
8
8
  anchorRect$: Observable<IBoundRectNoAngle>;
9
+ excludeRects?: IBoundRectNoAngle[];
10
+ excludeRects$?: Observable<IBoundRectNoAngle[]>;
9
11
  componentKey: string;
10
12
  unitId: string;
11
13
  subUnitId: string;
@@ -14,4 +14,4 @@ export declare function ComponentContainer(props: IComponentContainerProps): str
14
14
  * @param injector The injector to get the service. It is optional. However, you should not change this prop in a given
15
15
  * component.
16
16
  */
17
- export declare function useComponentsOfPart(part: string, injector?: Injector): Set<() => any>;
17
+ export declare function useComponentsOfPart(part: string, injector?: Injector): Set<() => import('../..').ComponentType>;