@univerjs/ui 0.1.3 → 0.1.5
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/README.md +4 -0
- package/lib/cjs/index.js +14 -14
- package/lib/es/index.js +3481 -3408
- package/lib/index.css +1 -1
- package/lib/types/commands/operations/editor/set-editor-resize.operation.d.ts +2 -16
- package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +2 -16
- package/lib/types/common/component-manager.d.ts +4 -18
- package/lib/types/common/lifecycle.d.ts +2 -16
- package/lib/types/common/menu-hidden-observable.d.ts +3 -17
- package/lib/types/components/custom-label/CustomLabel.d.ts +3 -18
- package/lib/types/components/editor/TextEditor.d.ts +4 -18
- package/lib/types/components/font-family/FontFamily.d.ts +3 -17
- package/lib/types/components/font-family/FontFamilyItem.d.ts +3 -17
- package/lib/types/components/font-family/interface.d.ts +2 -16
- package/lib/types/components/font-size/FontSize.d.ts +3 -17
- package/lib/types/components/font-size/interface.d.ts +3 -17
- package/lib/types/components/hooks/__tests__/observable.spec.d.ts +16 -0
- package/lib/types/components/hooks/locale.d.ts +1 -15
- package/lib/types/components/hooks/observable.d.ts +8 -19
- package/lib/types/components/menu/Menu.d.ts +3 -17
- package/lib/types/components/notification/Notification.d.ts +3 -17
- package/lib/types/components/notification/Notification.stories.d.ts +3 -17
- package/lib/types/components/range-selector/RangeSelector.d.ts +3 -17
- package/lib/types/controllers/error/error.controller.d.ts +2 -16
- package/lib/types/controllers/menus/menus.d.ts +3 -17
- package/lib/types/controllers/shared-shortcut.controller.d.ts +4 -19
- package/lib/types/controllers/shortcut-display/menu.d.ts +3 -17
- package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +5 -19
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +15 -50
- package/lib/types/controllers/ui/ui.controller.d.ts +1 -5
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +2 -16
- package/lib/types/locale/zh-CN.d.ts +1 -0
- package/lib/types/services/before-close/before-close.service.d.ts +3 -17
- package/lib/types/services/clipboard/clipboard-interface.service.d.ts +3 -17
- package/lib/types/services/clipboard/clipboard.command.d.ts +2 -16
- package/lib/types/services/confirm/confirm.service.d.ts +5 -19
- package/lib/types/services/confirm/desktop-confirm.service.d.ts +4 -18
- package/lib/types/services/contextmenu/contextmenu.service.d.ts +4 -18
- package/lib/types/services/dialog/desktop-dialog.service.d.ts +5 -19
- package/lib/types/services/dialog/dialog.service.d.ts +5 -19
- package/lib/types/services/editor/editor.service.d.ts +10 -22
- package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +5 -19
- package/lib/types/services/global-zone/global-zone.service.d.ts +4 -18
- package/lib/types/services/layout/layout.service.d.ts +4 -19
- package/lib/types/services/local-storage/local-storage.service.d.ts +2 -16
- package/lib/types/services/menu/menu.d.ts +3 -17
- package/lib/types/services/menu/menu.service.d.ts +6 -20
- package/lib/types/services/message/desktop-message.service.d.ts +4 -19
- package/lib/types/services/message/message.service.d.ts +4 -18
- package/lib/types/services/notification/desktop-notification.service.d.ts +4 -18
- package/lib/types/services/notification/notification.service.d.ts +4 -18
- package/lib/types/services/platform/platform.service.d.ts +1 -1
- package/lib/types/services/popup/canvas-popup.service.d.ts +31 -0
- package/lib/types/services/range-selector/range-selector.service.d.ts +5 -20
- package/lib/types/services/shortcut/shortcut-panel.service.d.ts +2 -16
- package/lib/types/services/shortcut/shortcut.service.d.ts +6 -20
- package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +4 -18
- package/lib/types/services/sidebar/sidebar.service.d.ts +5 -19
- package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +5 -19
- package/lib/types/services/zen-zone/zen-zone.service.d.ts +4 -18
- package/lib/types/ui-plugin.d.ts +3 -17
- package/lib/types/utils/cell.d.ts +2 -16
- package/lib/types/views/App.d.ts +4 -18
- package/lib/types/views/components/ComponentContainer.d.ts +2 -17
- package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +2 -16
- package/lib/types/views/components/confirm-part/interface.d.ts +3 -17
- package/lib/types/views/components/context-menu/ContextMenu.d.ts +2 -16
- package/lib/types/views/components/dialog-part/DialogPart.d.ts +2 -16
- package/lib/types/views/components/dialog-part/interface.d.ts +3 -17
- package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +2 -16
- package/lib/types/views/components/doc-bars/Toolbar.d.ts +2 -17
- package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +3 -17
- package/lib/types/views/components/global-zone/GlobalZone.d.ts +2 -16
- package/lib/types/views/components/popup/CanvasPopup.d.ts +3 -0
- package/lib/types/views/components/popup/index.d.ts +16 -0
- package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +2 -16
- package/lib/types/views/components/sidebar/Sidebar.d.ts +2 -16
- package/lib/types/views/components/sidebar/interface.d.ts +2 -16
- package/lib/types/views/components/zen-zone/ZenZone.d.ts +2 -16
- package/lib/types/views/hooks/active.d.ts +2 -16
- package/lib/types/views/parts.d.ts +2 -16
- package/lib/umd/index.js +14 -14
- package/package.json +22 -17
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Disposable, ICommandService } from '@univerjs/core';
|
|
17
|
-
import { Injector } from '@wendellhu/redi';
|
|
18
|
-
import { ComponentManager } from '../../common/component-manager';
|
|
19
|
-
import { IMenuService } from '../../services/menu/menu.service';
|
|
20
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
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
6
|
+
|
|
21
7
|
/**
|
|
22
8
|
* This controller add a side panel to the application to display the shortcuts.
|
|
23
9
|
*/
|
|
@@ -1,69 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Disposable, LifecycleService } from '@univerjs/core';
|
|
17
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
19
|
-
import { Injector } from '@wendellhu/redi';
|
|
20
|
-
import type { ComponentType } from 'react';
|
|
21
|
-
import React from 'react';
|
|
22
|
-
import type { Observable } from 'rxjs';
|
|
1
|
+
import { IWorkbenchOptions, IUIController } from './ui.controller';
|
|
23
2
|
import { ILayoutService } from '../../services/layout/layout.service';
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
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
|
+
import { Disposable, LifecycleService } from '@univerjs/core';
|
|
8
|
+
|
|
26
9
|
export declare enum DesktopUIPart {
|
|
27
10
|
HEADER = "header",
|
|
28
11
|
HEADER_MENU = "header-menu",
|
|
29
12
|
CONTENT = "content",
|
|
30
|
-
FOOTER = "footer"
|
|
13
|
+
FOOTER = "footer",
|
|
14
|
+
LEFT_SIDEBAR = "left-sidebar"
|
|
31
15
|
}
|
|
32
|
-
/**
|
|
33
|
-
* IDesktopUIController
|
|
34
|
-
*/
|
|
35
16
|
export interface IDesktopUIController extends IUIController {
|
|
36
17
|
componentRegistered$: Observable<void>;
|
|
37
18
|
registerComponent(part: DesktopUIPart, component: () => ComponentType): IDisposable;
|
|
38
|
-
|
|
39
|
-
registerHeaderComponent(component: () => ComponentType): IDisposable;
|
|
40
|
-
getHeaderComponents(): Set<() => ComponentType>;
|
|
41
|
-
registerContentComponent(component: () => ComponentType): IDisposable;
|
|
42
|
-
getContentComponents(): Set<() => ComponentType>;
|
|
43
|
-
registerFooterComponent(component: () => ComponentType): IDisposable;
|
|
44
|
-
getFooterComponents(): Set<() => ComponentType>;
|
|
19
|
+
getComponents(part: DesktopUIPart): Set<() => ComponentType>;
|
|
45
20
|
}
|
|
46
21
|
export declare class DesktopUIController extends Disposable implements IDesktopUIController {
|
|
47
22
|
private readonly _injector;
|
|
48
23
|
private readonly _lifecycleService;
|
|
49
24
|
private readonly _renderManagerService;
|
|
50
25
|
private readonly _layoutService?;
|
|
51
|
-
private
|
|
52
|
-
private
|
|
53
|
-
|
|
54
|
-
private _footerComponents;
|
|
55
|
-
private _componentRegistered$;
|
|
56
|
-
componentRegistered$: Observable<void>;
|
|
26
|
+
private _componentsByPart;
|
|
27
|
+
private readonly _componentRegistered$;
|
|
28
|
+
readonly componentRegistered$: Observable<void>;
|
|
57
29
|
constructor(_injector: Injector, _lifecycleService: LifecycleService, _renderManagerService: IRenderManagerService, _layoutService?: ILayoutService | undefined);
|
|
58
30
|
bootstrapWorkbench(options: IWorkbenchOptions): void;
|
|
59
|
-
private _initializeEngine;
|
|
60
31
|
registerComponent(part: DesktopUIPart, component: () => React.ComponentType): IDisposable;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
registerHeaderComponent(component: () => ComponentType): IDisposable;
|
|
64
|
-
getHeaderComponents(): Set<() => ComponentType>;
|
|
65
|
-
registerContentComponent(component: () => ComponentType): IDisposable;
|
|
66
|
-
getContentComponents(): Set<() => ComponentType>;
|
|
67
|
-
registerFooterComponent(component: () => ComponentType): IDisposable;
|
|
68
|
-
getFooterComponents(): Set<() => ComponentType>;
|
|
32
|
+
getComponents(part: DesktopUIPart): Set<() => ComponentType>;
|
|
33
|
+
private _initializeEngine;
|
|
69
34
|
}
|
|
@@ -15,14 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export interface IWorkbenchOptions {
|
|
17
17
|
container?: string | HTMLElement;
|
|
18
|
-
outerLeft?: boolean;
|
|
19
|
-
innerLeft?: boolean;
|
|
20
18
|
header?: boolean;
|
|
21
|
-
infoBar?: boolean;
|
|
22
|
-
toolbar?: boolean;
|
|
23
19
|
footer?: boolean;
|
|
24
20
|
}
|
|
25
21
|
export interface IUIController {
|
|
26
22
|
bootstrapWorkbench(options: IWorkbenchOptions): void;
|
|
27
23
|
}
|
|
28
|
-
export declare const IUIController: import(
|
|
24
|
+
export declare const IUIController: import('@wendellhu/redi').IdentifierDecorator<IUIController>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -55,3 +55,4 @@ export { RangeSelector } from './components/range-selector/RangeSelector';
|
|
|
55
55
|
export { IRangeSelectorService } from './services/range-selector/range-selector.service';
|
|
56
56
|
export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
|
|
57
57
|
export { useActiveWorkbook, useActiveWorksheet } from './views/hooks/active';
|
|
58
|
+
export { CanvasPopupService, ICanvasPopupService } from './services/popup/canvas-popup.service';
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type zhCN from './zh-CN';
|
|
1
|
+
import { default as zhCN } from './zh-CN';
|
|
2
|
+
|
|
17
3
|
declare const locale: typeof zhCN;
|
|
18
4
|
export default locale;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
1
|
import { INotificationService } from '../notification/notification.service';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
+
|
|
18
4
|
export interface IBeforeCloseService {
|
|
19
5
|
/**
|
|
20
6
|
* Provide a callback to check if the web page could be closed safely.
|
|
@@ -31,7 +17,7 @@ export interface IBeforeCloseService {
|
|
|
31
17
|
*/
|
|
32
18
|
registerOnClose(callback: () => void): IDisposable;
|
|
33
19
|
}
|
|
34
|
-
export declare const IBeforeCloseService: import(
|
|
20
|
+
export declare const IBeforeCloseService: import('@wendellhu/redi').IdentifierDecorator<IBeforeCloseService>;
|
|
35
21
|
export declare class DesktopBeforeCloseService implements IBeforeCloseService {
|
|
36
22
|
private readonly _notificationService;
|
|
37
23
|
private _beforeUnloadCallbacks;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Disposable, ILogService, LocaleService } from '@univerjs/core';
|
|
17
1
|
import { INotificationService } from '../notification/notification.service';
|
|
2
|
+
import { Disposable, ILogService, LocaleService } from '@univerjs/core';
|
|
3
|
+
|
|
18
4
|
export declare const PLAIN_TEXT_CLIPBOARD_MIME_TYPE = "text/plain";
|
|
19
5
|
export declare const HTML_CLIPBOARD_MIME_TYPE = "text/html";
|
|
20
6
|
/**
|
|
@@ -46,7 +32,7 @@ export interface IClipboardInterfaceService {
|
|
|
46
32
|
*/
|
|
47
33
|
readonly supportClipboard: boolean;
|
|
48
34
|
}
|
|
49
|
-
export declare const IClipboardInterfaceService: import(
|
|
35
|
+
export declare const IClipboardInterfaceService: import('@wendellhu/redi').IdentifierDecorator<IClipboardInterfaceService>;
|
|
50
36
|
export declare class BrowserClipboardService extends Disposable implements IClipboardInterfaceService {
|
|
51
37
|
private readonly _localeService;
|
|
52
38
|
private readonly _logService;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IMultiCommand } from '@univerjs/core';
|
|
1
|
+
import { IMultiCommand } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare const CopyCommand: IMultiCommand;
|
|
18
4
|
export declare const CutCommand: IMultiCommand;
|
|
19
5
|
export declare const PasteCommand: IMultiCommand;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import type { Subject } from 'rxjs';
|
|
18
|
-
import type { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
|
|
19
|
-
export declare const IConfirmService: import("@wendellhu/redi").IdentifierDecorator<IConfirmService>;
|
|
1
|
+
import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
4
|
+
|
|
5
|
+
export declare const IConfirmService: import('@wendellhu/redi').IdentifierDecorator<IConfirmService>;
|
|
20
6
|
export interface IConfirmService {
|
|
21
7
|
readonly confirmOptions$: Subject<IConfirmPartMethodOptions[]>;
|
|
22
8
|
open(params: IConfirmPartMethodOptions): IDisposable;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IConfirmService } from './confirm.service';
|
|
2
|
+
import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
|
|
17
3
|
import { Subject } from 'rxjs';
|
|
18
|
-
import
|
|
19
|
-
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
|
|
20
6
|
export declare class DesktopConfirmService implements IConfirmService {
|
|
21
7
|
private _confirmOptions;
|
|
22
8
|
readonly confirmOptions$: Subject<IConfirmPartMethodOptions[]>;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
|
|
16
3
|
import { Disposable } from '@univerjs/core';
|
|
17
|
-
|
|
18
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
4
|
+
|
|
19
5
|
export interface IContextMenuHandler {
|
|
20
6
|
/** A callback to open context menu with given position and menu type. */
|
|
21
7
|
handleContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
|
|
@@ -27,7 +13,7 @@ export interface IContextMenuService {
|
|
|
27
13
|
triggerContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
|
|
28
14
|
registerContextMenuHandler(handler: IContextMenuHandler): IDisposable;
|
|
29
15
|
}
|
|
30
|
-
export declare const IContextMenuService: import(
|
|
16
|
+
export declare const IContextMenuService: import('@wendellhu/redi').IdentifierDecorator<IContextMenuService>;
|
|
31
17
|
export declare class DesktopContextMenuService extends Disposable implements IContextMenuService {
|
|
32
18
|
private _currentHandler;
|
|
33
19
|
disabled: boolean;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Disposable } from '@univerjs/core';
|
|
17
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDialogService } from './dialog.service';
|
|
2
|
+
import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
|
|
18
3
|
import { Subject } from 'rxjs';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
import { Disposable } from '@univerjs/core';
|
|
6
|
+
|
|
21
7
|
export declare class DesktopDialogService extends Disposable implements IDialogService {
|
|
22
8
|
private _dialogOptions;
|
|
23
9
|
private readonly _dialogOptions$;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import type { Subject } from 'rxjs';
|
|
18
|
-
import type { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
|
|
19
|
-
export declare const IDialogService: import("@wendellhu/redi").IdentifierDecorator<IDialogService>;
|
|
1
|
+
import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
4
|
+
|
|
5
|
+
export declare const IDialogService: import('@wendellhu/redi').IdentifierDecorator<IDialogService>;
|
|
20
6
|
export interface IDialogService {
|
|
21
7
|
open(params: IDialogPartMethodOptions): IDisposable;
|
|
22
8
|
close(id: string): void;
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable } from '@univerjs/core';
|
|
17
|
-
import { Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
18
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
19
|
-
import type { Observable } from 'rxjs';
|
|
20
|
-
import type { IRender, ISuccinctTextRangeParam } from '@univerjs/engine-render';
|
|
21
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
22
1
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
2
|
+
import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
6
|
+
|
|
23
7
|
export interface IEditorStateParam extends Partial<IPosition> {
|
|
24
8
|
visible?: boolean;
|
|
25
9
|
}
|
|
@@ -120,6 +104,7 @@ export interface IEditorService {
|
|
|
120
104
|
setValue$: Observable<IEditorSetValueParam>;
|
|
121
105
|
valueChange$: Observable<Readonly<Editor>>;
|
|
122
106
|
setValue(val: string, editorUnitId?: string): void;
|
|
107
|
+
setValueNoRefresh(val: string, editorUnitId?: string): void;
|
|
123
108
|
setRichValue(body: IDocumentBody, editorUnitId?: string): void;
|
|
124
109
|
getFirstEditor(): Editor;
|
|
125
110
|
focusStyle$: Observable<Nullable<string>>;
|
|
@@ -135,6 +120,7 @@ export interface IEditorService {
|
|
|
135
120
|
singleSelection(state: boolean): void;
|
|
136
121
|
setFocusId(id: Nullable<string>): void;
|
|
137
122
|
getFocusId(): Nullable<string>;
|
|
123
|
+
getFocusEditor(): Readonly<Nullable<Editor>>;
|
|
138
124
|
}
|
|
139
125
|
export declare class EditorService extends Disposable implements IEditorService, IDisposable {
|
|
140
126
|
private readonly _currentUniverService;
|
|
@@ -169,6 +155,7 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
169
155
|
constructor(_currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService);
|
|
170
156
|
setFocusId(id: Nullable<string>): void;
|
|
171
157
|
getFocusId(): Nullable<string>;
|
|
158
|
+
getFocusEditor(): Readonly<Nullable<Editor>>;
|
|
172
159
|
isEditor(editorUnitId: string): boolean;
|
|
173
160
|
isSheetEditor(editorUnitId: string): boolean;
|
|
174
161
|
closeRangePrompt(): void;
|
|
@@ -181,6 +168,7 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
181
168
|
focus(editorUnitId?: string): void;
|
|
182
169
|
setFormula(formulaString: string, editorUnitId?: string): void;
|
|
183
170
|
setValue(val: string, editorUnitId?: string): void;
|
|
171
|
+
setValueNoRefresh(val: string, editorUnitId: string): void;
|
|
184
172
|
getValue(id: string): string | undefined;
|
|
185
173
|
setRichValue(body: IDocumentBody, editorUnitId?: string): void;
|
|
186
174
|
getRichValue(id: string): IDocumentBody | undefined;
|
|
@@ -203,4 +191,4 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
203
191
|
private _refresh;
|
|
204
192
|
private _getBlank;
|
|
205
193
|
}
|
|
206
|
-
export declare const IEditorService: import(
|
|
194
|
+
export declare const IEditorService: import('@wendellhu/redi').IdentifierDecorator<IEditorService>;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { type IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import type { ForwardRefExoticComponent } from 'react';
|
|
18
|
-
import { Subject } from 'rxjs';
|
|
1
|
+
import { IGlobalZoneService } from './global-zone.service';
|
|
19
2
|
import { ComponentManager } from '../../common/component-manager';
|
|
20
|
-
import
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
5
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
6
|
+
|
|
21
7
|
export declare class DesktopGlobalZoneService implements IGlobalZoneService {
|
|
22
8
|
private readonly _componentManager;
|
|
23
9
|
readonly visible$: Subject<boolean>;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import type { Subject } from 'rxjs';
|
|
18
|
-
export declare const IGlobalZoneService: import("@wendellhu/redi").IdentifierDecorator<IGlobalZoneService>;
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
+
|
|
4
|
+
export declare const IGlobalZoneService: import('@wendellhu/redi').IdentifierDecorator<IGlobalZoneService>;
|
|
19
5
|
export interface IGlobalZoneService {
|
|
20
6
|
readonly visible$: Subject<boolean>;
|
|
21
7
|
readonly componentKey$: Subject<string>;
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { ContextService } from '@univerjs/core';
|
|
17
|
-
import { Disposable, ILogService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
18
|
-
import { type IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { ContextService, Disposable, ILogService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
|
|
19
4
|
type FocusHandlerFn = (unitId: string) => void;
|
|
20
5
|
export declare const FOCUSING_UNIVER = "FOCUSING_UNIVER";
|
|
21
6
|
export interface ILayoutService {
|
|
@@ -33,7 +18,7 @@ export interface ILayoutService {
|
|
|
33
18
|
checkElementInCurrentContainers(element: HTMLElement): boolean;
|
|
34
19
|
checkCanvasIsFocused(): boolean;
|
|
35
20
|
}
|
|
36
|
-
export declare const ILayoutService: import(
|
|
21
|
+
export declare const ILayoutService: import('@wendellhu/redi').IdentifierDecorator<ILayoutService>;
|
|
37
22
|
/**
|
|
38
23
|
* This service is responsible for storing layout information of the current
|
|
39
24
|
* Univer application instance.
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { ILocalStorageService } from '@univerjs/core';
|
|
1
|
+
import { ILocalStorageService } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare class DesktopLocalStorageService implements ILocalStorageService {
|
|
18
4
|
getItem<T>(key: string): Promise<T | null>;
|
|
19
5
|
setItem<T>(key: string, value: T): Promise<T>;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IAccessor } from '@wendellhu/redi';
|
|
17
|
-
import type { Observable } from 'rxjs';
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
3
|
+
|
|
18
4
|
export type OneOrMany<T> = T | T[];
|
|
19
5
|
export declare const enum MenuPosition {
|
|
20
6
|
VOID = "void",
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Disposable } from '@univerjs/core';
|
|
17
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
18
|
-
import type { Observable } from 'rxjs';
|
|
1
|
+
import { IDisplayMenuItem, IMenuItem, MenuPosition } from './menu';
|
|
19
2
|
import { IShortcutService } from '../shortcut/shortcut.service';
|
|
20
|
-
import
|
|
21
|
-
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
import { Disposable } from '@univerjs/core';
|
|
6
|
+
|
|
7
|
+
export declare const IMenuService: import('@wendellhu/redi').IdentifierDecorator<IMenuService>;
|
|
22
8
|
export interface IMenuService {
|
|
23
9
|
menuChanged$: Observable<void>;
|
|
24
10
|
addMenuItem(item: IMenuItem): IDisposable;
|