@univerjs/ui 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (149) hide show
  1. package/LICENSE.txt +178 -0
  2. package/README.md +1 -1
  3. package/lib/cjs/index.js +33 -4671
  4. package/lib/es/index.js +9746 -0
  5. package/lib/index.css +1 -474
  6. package/lib/types/BaseComponent.d.ts +13 -2
  7. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +15 -1
  8. package/lib/types/common/component-manager.d.ts +15 -1
  9. package/lib/types/common/index.d.ts +15 -1
  10. package/lib/types/common/lifecycle.d.ts +15 -1
  11. package/lib/types/common/z-index-manager.d.ts +15 -1
  12. package/lib/types/components/custom-label/CustomLabel.d.ts +15 -1
  13. package/lib/types/components/custom-label/index.d.ts +15 -1
  14. package/lib/types/components/hooks/observable.d.ts +15 -1
  15. package/lib/types/components/index.d.ts +15 -1
  16. package/lib/types/components/menu/Menu.d.ts +15 -1
  17. package/lib/types/components/menu/index.d.ts +15 -1
  18. package/lib/types/components/notification/Notification.d.ts +15 -1
  19. package/lib/types/components/notification/Notification.stories.d.ts +23 -0
  20. package/lib/types/controllers/error/error.controller.d.ts +15 -1
  21. package/lib/types/controllers/menus/menus.d.ts +15 -1
  22. package/lib/types/controllers/shared-shortcut.controller.d.ts +15 -1
  23. package/lib/types/controllers/shortcut-display/menu.d.ts +15 -1
  24. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +15 -1
  25. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +18 -2
  26. package/lib/types/controllers/ui/ui.controller.d.ts +15 -1
  27. package/lib/types/index.d.ts +19 -2
  28. package/lib/types/locale/en-US.d.ts +16 -1
  29. package/lib/types/locale/index.d.ts +15 -1
  30. package/lib/types/locale/zh-CN.d.ts +27 -1
  31. package/lib/types/services/before-close/before-close.service.d.ts +24 -2
  32. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +15 -1
  33. package/lib/types/services/clipboard/clipboard.command.d.ts +15 -1
  34. package/lib/types/services/confirm/confirm.service.d.ts +17 -2
  35. package/lib/types/services/confirm/desktop-confirm.service.d.ts +18 -4
  36. package/lib/types/services/contextmenu/contextmenu.service.d.ts +15 -1
  37. package/lib/types/services/dialog/desktop-dialog.service.d.ts +15 -1
  38. package/lib/types/services/dialog/dialog.service.d.ts +15 -1
  39. package/lib/types/services/focus/focus.service.d.ts +15 -1
  40. package/lib/types/services/layout/layout.service.d.ts +25 -0
  41. package/lib/types/services/local-storage/local-storage.service.d.ts +15 -1
  42. package/lib/types/services/menu/menu.d.ts +15 -1
  43. package/lib/types/services/menu/menu.service.d.ts +17 -3
  44. package/lib/types/services/message/desktop-message.service.d.ts +15 -1
  45. package/lib/types/services/message/message.service.d.ts +15 -1
  46. package/lib/types/services/notification/desktop-notification.service.d.ts +15 -1
  47. package/lib/types/services/notification/notification.service.d.ts +15 -1
  48. package/lib/types/services/platform/platform.service.d.ts +15 -1
  49. package/lib/types/services/shortcut/keycode.d.ts +15 -1
  50. package/lib/types/services/shortcut/shortcut-experience.service.d.ts +15 -1
  51. package/lib/types/services/shortcut/shortcut-panel.service.d.ts +15 -1
  52. package/lib/types/services/shortcut/shortcut.service.d.ts +21 -2
  53. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +19 -5
  54. package/lib/types/services/sidebar/sidebar.service.d.ts +18 -3
  55. package/lib/types/ui-plugin.d.ts +18 -4
  56. package/lib/types/utils/cell.d.ts +15 -1
  57. package/lib/types/utils/index.d.ts +15 -1
  58. package/lib/types/utils/util.d.ts +15 -1
  59. package/lib/types/views/App.d.ts +15 -1
  60. package/lib/types/views/components/ComponentContainer.d.ts +15 -1
  61. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +15 -1
  62. package/lib/types/views/components/confirm-part/interface.d.ts +15 -1
  63. package/lib/types/views/components/context-menu/ContextMenu.d.ts +15 -1
  64. package/lib/types/views/components/dialog-part/DialogPart.d.ts +15 -1
  65. package/lib/types/views/components/dialog-part/interface.d.ts +15 -1
  66. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +15 -1
  67. package/lib/types/views/components/doc-bars/Toolbar.d.ts +22 -2
  68. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +16 -2
  69. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +15 -1
  70. package/lib/types/views/components/sidebar/Sidebar.d.ts +15 -1
  71. package/lib/types/views/components/sidebar/interface.d.ts +15 -1
  72. package/lib/types/views/parts.d.ts +15 -1
  73. package/lib/umd/index.js +33 -0
  74. package/package.json +32 -28
  75. package/LICENSE +0 -21
  76. package/lib/cjs/locale/en-US.js +0 -46
  77. package/lib/cjs/locale/zh-CN.js +0 -35
  78. package/lib/esm/index.js +0 -4507
  79. package/lib/esm/locale/en-US.js +0 -25
  80. package/lib/esm/locale/zh-CN.js +0 -14
  81. package/lib/types/BaseComponent.d.ts.map +0 -1
  82. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts.map +0 -1
  83. package/lib/types/common/component-manager.d.ts.map +0 -1
  84. package/lib/types/common/index.d.ts.map +0 -1
  85. package/lib/types/common/lifecycle.d.ts.map +0 -1
  86. package/lib/types/common/z-index-manager.d.ts.map +0 -1
  87. package/lib/types/components/custom-label/CustomLabel.d.ts.map +0 -1
  88. package/lib/types/components/custom-label/index.d.ts.map +0 -1
  89. package/lib/types/components/hooks/observable.d.ts.map +0 -1
  90. package/lib/types/components/index.d.ts.map +0 -1
  91. package/lib/types/components/menu/Menu.d.ts.map +0 -1
  92. package/lib/types/components/menu/index.d.ts.map +0 -1
  93. package/lib/types/components/notification/Notification.d.ts.map +0 -1
  94. package/lib/types/controllers/error/error.controller.d.ts.map +0 -1
  95. package/lib/types/controllers/menus/menus.d.ts.map +0 -1
  96. package/lib/types/controllers/shared-shortcut.controller.d.ts.map +0 -1
  97. package/lib/types/controllers/shortcut-display/menu.d.ts.map +0 -1
  98. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts.map +0 -1
  99. package/lib/types/controllers/ui/ui-desktop.controller.d.ts.map +0 -1
  100. package/lib/types/controllers/ui/ui.controller.d.ts.map +0 -1
  101. package/lib/types/index.d.ts.map +0 -1
  102. package/lib/types/locale/en-US.d.ts.map +0 -1
  103. package/lib/types/locale/index.d.ts.map +0 -1
  104. package/lib/types/locale/zh-CN.d.ts.map +0 -1
  105. package/lib/types/services/before-close/before-close.service.d.ts.map +0 -1
  106. package/lib/types/services/clipboard/clipboard-interface.service.d.ts.map +0 -1
  107. package/lib/types/services/clipboard/clipboard.command.d.ts.map +0 -1
  108. package/lib/types/services/confirm/confirm.service.d.ts.map +0 -1
  109. package/lib/types/services/confirm/desktop-confirm.service.d.ts.map +0 -1
  110. package/lib/types/services/contextmenu/contextmenu.service.d.ts.map +0 -1
  111. package/lib/types/services/dialog/desktop-dialog.service.d.ts.map +0 -1
  112. package/lib/types/services/dialog/dialog.service.d.ts.map +0 -1
  113. package/lib/types/services/focus/focus.service.d.ts.map +0 -1
  114. package/lib/types/services/local-storage/local-storage.service.d.ts.map +0 -1
  115. package/lib/types/services/menu/menu.d.ts.map +0 -1
  116. package/lib/types/services/menu/menu.service.d.ts.map +0 -1
  117. package/lib/types/services/message/desktop-message.service.d.ts.map +0 -1
  118. package/lib/types/services/message/message.service.d.ts.map +0 -1
  119. package/lib/types/services/notification/desktop-notification.service.d.ts.map +0 -1
  120. package/lib/types/services/notification/notification.service.d.ts.map +0 -1
  121. package/lib/types/services/platform/platform.service.d.ts.map +0 -1
  122. package/lib/types/services/shortcut/keycode.d.ts.map +0 -1
  123. package/lib/types/services/shortcut/shortcut-experience.service.d.ts.map +0 -1
  124. package/lib/types/services/shortcut/shortcut-panel.service.d.ts.map +0 -1
  125. package/lib/types/services/shortcut/shortcut.service.d.ts.map +0 -1
  126. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts.map +0 -1
  127. package/lib/types/services/sidebar/sidebar.service.d.ts.map +0 -1
  128. package/lib/types/ui-plugin.d.ts.map +0 -1
  129. package/lib/types/utils/cell.d.ts.map +0 -1
  130. package/lib/types/utils/index.d.ts.map +0 -1
  131. package/lib/types/utils/util.d.ts.map +0 -1
  132. package/lib/types/views/App.d.ts.map +0 -1
  133. package/lib/types/views/components/ComponentContainer.d.ts.map +0 -1
  134. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts.map +0 -1
  135. package/lib/types/views/components/confirm-part/interface.d.ts.map +0 -1
  136. package/lib/types/views/components/context-menu/ContextMenu.d.ts.map +0 -1
  137. package/lib/types/views/components/dialog-part/DialogPart.d.ts.map +0 -1
  138. package/lib/types/views/components/dialog-part/interface.d.ts.map +0 -1
  139. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts.map +0 -1
  140. package/lib/types/views/components/doc-bars/MenuBar.d.ts +0 -7
  141. package/lib/types/views/components/doc-bars/MenuBar.d.ts.map +0 -1
  142. package/lib/types/views/components/doc-bars/Toolbar.d.ts.map +0 -1
  143. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts.map +0 -1
  144. package/lib/types/views/components/doc-bars/hooks/menu.d.ts +0 -10
  145. package/lib/types/views/components/doc-bars/hooks/menu.d.ts.map +0 -1
  146. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts.map +0 -1
  147. package/lib/types/views/components/sidebar/Sidebar.d.ts.map +0 -1
  148. package/lib/types/views/components/sidebar/interface.d.ts.map +0 -1
  149. package/lib/types/views/parts.d.ts.map +0 -1
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { ContextService } from '@univerjs/core';
2
17
  import { Disposable } from '@univerjs/core';
3
18
  /**
@@ -19,4 +34,3 @@ export declare class DesktopFocusService extends Disposable implements IFocusSer
19
34
  setContainerElement(container: HTMLElement): void;
20
35
  private _initFocusListener;
21
36
  }
22
- //# sourceMappingURL=focus.service.d.ts.map
@@ -0,0 +1,25 @@
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
+ /**
18
+ * This service is responsible for storing layout information of the current
19
+ * Univer application instance
20
+ */
21
+ export declare class LayoutService {
22
+ private _containers;
23
+ registerContainer(container: HTMLElement): IDisposable;
24
+ checkElementInCurrentApplicationScope(element: HTMLElement): boolean;
25
+ }
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { ILocalStorageService } from '@univerjs/core';
2
17
  export declare class DesktopLocalStorageService implements ILocalStorageService {
3
18
  getItem<T>(key: string): Promise<T | null>;
@@ -8,4 +23,3 @@ export declare class DesktopLocalStorageService implements ILocalStorageService
8
23
  keys(): Promise<string[]>;
9
24
  iterate<T, U>(iteratee: (value: T, key: string, iterationNumber: number) => U): Promise<U>;
10
25
  }
11
- //# sourceMappingURL=local-storage.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { IAccessor } from '@wendellhu/redi';
2
17
  import type { Observable } from 'rxjs';
3
18
  export type OneOrMany<T> = T | T[];
@@ -100,4 +115,3 @@ export type IDisplayMenuItem<T extends IMenuItem> = T & {
100
115
  };
101
116
  export type IMenuItemFactory = (accessor: IAccessor) => IMenuItem;
102
117
  export {};
103
- //# sourceMappingURL=menu.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import { Disposable } from '@univerjs/core';
2
17
  import type { IDisposable } from '@wendellhu/redi';
3
18
  import type { Observable } from 'rxjs';
@@ -22,7 +37,6 @@ export declare class DesktopMenuService extends Disposable implements IMenuServi
22
37
  addMenuItem(item: IMenuItem): IDisposable;
23
38
  getMenuItems(positions: MenuPosition | string): Array<IDisplayMenuItem<IMenuItem>>;
24
39
  getMenuItem(id: string): IMenuItem | null;
25
- private getDisplayMenuItems;
26
- private appendMenuToPosition;
40
+ private _getDisplayMenuItems;
41
+ private _appendMenuToPosition;
27
42
  }
28
- //# sourceMappingURL=menu.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { IMessageMethodOptions, IMessageProps } from '@univerjs/design';
2
17
  import { Message } from '@univerjs/design';
3
18
  import type { IDisposable } from '@wendellhu/redi';
@@ -8,4 +23,3 @@ export declare class DesktopMessageService implements IMessageService {
8
23
  setContainer(container: HTMLElement): void;
9
24
  show(options: IMessageMethodOptions & Omit<IMessageProps, 'key'>): IDisposable;
10
25
  }
11
- //# sourceMappingURL=desktop-message.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { IMessageMethodOptions, IMessageProps } from '@univerjs/design';
2
17
  import type { IDisposable } from '@wendellhu/redi';
3
18
  export declare const IMessageService: import("@wendellhu/redi").IdentifierDecorator<IMessageService>;
@@ -5,4 +20,3 @@ export interface IMessageService {
5
20
  show(options: IMessageMethodOptions & Omit<IMessageProps, 'key'>): IDisposable;
6
21
  setContainer(container: HTMLElement): void;
7
22
  }
8
- //# sourceMappingURL=message.service.d.ts.map
@@ -1,7 +1,21 @@
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
+ */
1
16
  import type { IDisposable } from '@wendellhu/redi';
2
17
  import type { INotificationMethodOptions } from '../../components/notification/Notification';
3
18
  import type { INotificationService } from './notification.service';
4
19
  export declare class DesktopNotificationService implements INotificationService {
5
20
  show(params: INotificationMethodOptions): IDisposable;
6
21
  }
7
- //# sourceMappingURL=desktop-notification.service.d.ts.map
@@ -1,7 +1,21 @@
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
+ */
1
16
  import type { IDisposable } from '@wendellhu/redi';
2
17
  import type { INotificationMethodOptions } from '../../components/notification/Notification';
3
18
  export declare const INotificationService: import("@wendellhu/redi").IdentifierDecorator<INotificationService>;
4
19
  export interface INotificationService {
5
20
  show(params: INotificationMethodOptions): IDisposable;
6
21
  }
7
- //# sourceMappingURL=notification.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * A service to provide context info of the host service.
3
18
  */
@@ -12,4 +27,3 @@ export declare class DesktopPlatformService implements IPlatformService {
12
27
  get isWindows(): boolean;
13
28
  get isLinux(): boolean;
14
29
  }
15
- //# sourceMappingURL=platform.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  export declare const KeyCodeToChar: {
2
17
  [key: number]: string;
3
18
  };
@@ -76,4 +91,3 @@ export declare const enum MetaKeys {
76
91
  CTRL_COMMAND = 4096,
77
92
  MAC_CTRL = 8192
78
93
  }
79
- //# sourceMappingURL=keycode.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { ISelection, ITextRangeParam, Nullable } from '@univerjs/core';
2
17
  import { IUniverInstanceService, LocaleService } from '@univerjs/core';
3
18
  import type { IDisposable } from '@wendellhu/redi';
@@ -28,4 +43,3 @@ export declare class ShortcutExperienceService implements IDisposable {
28
43
  remove(searchParm: Nullable<IShortcutExperienceSearch>): Nullable<IShortcutExperienceParam>;
29
44
  private _getCurrentBySearch;
30
45
  }
31
- //# sourceMappingURL=shortcut-experience.service.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import { Disposable } from '@univerjs/core';
2
17
  export declare class ShortcutPanelService extends Disposable {
3
18
  private _open$;
@@ -7,4 +22,3 @@ export declare class ShortcutPanelService extends Disposable {
7
22
  open(): void;
8
23
  close(): void;
9
24
  }
10
- //# sourceMappingURL=shortcut-panel.service.d.ts.map
@@ -1,6 +1,22 @@
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
+ */
1
16
  import { Disposable, ICommandService, IContextService } from '@univerjs/core';
2
17
  import type { IDisposable } from '@wendellhu/redi';
3
18
  import type { Observable } from 'rxjs';
19
+ import { LayoutService } from '../layout/layout.service';
4
20
  import { IPlatformService } from '../platform/platform.service';
5
21
  export interface IShortcutItem<P extends object = object> {
6
22
  /** This should reuse the corresponding command's id. */
@@ -29,18 +45,22 @@ export interface IShortcutService {
29
45
  getShortcutDisplay(shortcut: IShortcutItem): string;
30
46
  getShortcutDisplayOfCommand(id: string): string | null;
31
47
  getAllShortcuts(): IShortcutItem[];
48
+ setDisable(disable: boolean): void;
32
49
  }
33
50
  export declare const IShortcutService: import("@wendellhu/redi").IdentifierDecorator<IShortcutService>;
34
51
  export declare class DesktopShortcutService extends Disposable implements IShortcutService {
35
52
  private readonly _commandService;
36
53
  private readonly _platformService;
37
54
  private readonly _contextService;
55
+ private readonly _layoutService?;
38
56
  private readonly _shortCutMapping;
39
57
  private readonly _commandIDMapping;
40
58
  private readonly _shortcutChanged$;
41
59
  readonly shortcutChanged$: Observable<void>;
42
60
  private _forceEscaped;
43
- constructor(_commandService: ICommandService, _platformService: IPlatformService, _contextService: IContextService);
61
+ private _disable;
62
+ constructor(_commandService: ICommandService, _platformService: IPlatformService, _contextService: IContextService, _layoutService?: LayoutService | undefined);
63
+ setDisable(disable: boolean): void;
44
64
  getAllShortcuts(): IShortcutItem[];
45
65
  registerShortcut(shortcut: IShortcutItem): IDisposable;
46
66
  getShortcutDisplayOfCommand(id: string): string | null;
@@ -52,4 +72,3 @@ export declare class DesktopShortcutService extends Disposable implements IShort
52
72
  private _getBindingFromItem;
53
73
  private _deriveBindingFromEvent;
54
74
  }
55
- //# sourceMappingURL=shortcut.service.d.ts.map
@@ -1,12 +1,26 @@
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
+ */
1
16
  import type { IDisposable } from '@wendellhu/redi';
2
17
  import { Subject } from 'rxjs';
3
18
  import { type ISidebarMethodOptions } from '../../views/components/sidebar/interface';
4
19
  import type { ISidebarService } from './sidebar.service';
5
20
  export declare class DesktopSidebarService implements ISidebarService {
6
- private sidebarOptions;
7
- private readonly sidebarOptions$;
8
- open(option: ISidebarMethodOptions): IDisposable;
21
+ private _sidebarOptions;
22
+ readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
23
+ open(params: ISidebarMethodOptions): IDisposable;
24
+ set(params: ISidebarMethodOptions): void;
9
25
  close(): void;
10
- getObservableSidebar(): Subject<ISidebarMethodOptions>;
11
26
  }
12
- //# sourceMappingURL=desktop-sidebar.service.d.ts.map
@@ -1,10 +1,25 @@
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
+ */
1
16
  import type { IDisposable } from '@wendellhu/redi';
2
- import { type Subject } from 'rxjs';
17
+ import type { Subject } from 'rxjs';
3
18
  import { type ISidebarMethodOptions } from '../../views/components/sidebar/interface';
4
19
  export declare const ISidebarService: import("@wendellhu/redi").IdentifierDecorator<ISidebarService>;
5
20
  export interface ISidebarService {
21
+ readonly sidebarOptions$: Subject<ISidebarMethodOptions>;
6
22
  open(params: ISidebarMethodOptions): IDisposable;
23
+ set(params: ISidebarMethodOptions): void;
7
24
  close(): void;
8
- getObservableSidebar(): Subject<ISidebarMethodOptions>;
9
25
  }
10
- //# sourceMappingURL=sidebar.service.d.ts.map
@@ -1,20 +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
+ */
1
16
  import { LocaleService, Plugin, PluginType } from '@univerjs/core';
2
17
  import { Injector } from '@wendellhu/redi';
3
18
  import type { IWorkbenchOptions } from './controllers/ui/ui.controller';
4
- export interface IUIPluginConfig extends IWorkbenchOptions {
19
+ export interface IUniverUIConfig extends IWorkbenchOptions {
5
20
  }
6
21
  /**
7
22
  * UI plugin provides basic interaction with users. Including workbench (menus, UI parts, notifications etc.), copy paste, shortcut.
8
23
  */
9
- export declare class UIPlugin extends Plugin {
24
+ export declare class UniverUIPlugin extends Plugin {
10
25
  protected readonly _injector: Injector;
11
26
  private readonly _localeService;
12
27
  static type: PluginType;
13
28
  private _config;
14
- constructor(config: Partial<IUIPluginConfig> | undefined, _injector: Injector, _localeService: LocaleService);
29
+ constructor(config: Partial<IUniverUIConfig> | undefined, _injector: Injector, _localeService: LocaleService);
15
30
  onStarting(_injector: Injector): void;
16
31
  onReady(): void;
17
32
  private _initDependencies;
18
33
  private _initUI;
19
34
  }
20
- //# sourceMappingURL=ui-plugin.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { IDocumentData, IRange, IStyleData } from '@univerjs/core';
2
17
  /**
3
18
  * The entire list of DOM spans is parsed into a rich-text JSON style sheet
@@ -31,4 +46,3 @@ export declare function handleTableMergeData(data: any[], selection?: IRange): {
31
46
  }[];
32
47
  };
33
48
  export declare function handelExcelToJson(html: string): any[] | undefined;
34
- //# sourceMappingURL=cell.d.ts.map
@@ -1,3 +1,17 @@
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
+ */
1
16
  export * from './cell';
2
17
  export * from './util';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,16 @@
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
+ */
1
16
  export declare function textTrim(x: string): string;
2
- //# sourceMappingURL=util.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { ComponentType } from 'react';
2
17
  import React from 'react';
3
18
  import type { IWorkbenchOptions } from '../controllers/ui/ui.controller';
@@ -10,4 +25,3 @@ export interface IUniverAppProps extends IWorkbenchOptions {
10
25
  onRendered?: (container: HTMLElement) => void;
11
26
  }
12
27
  export declare function App(props: IUniverAppProps): React.JSX.Element;
13
- //# sourceMappingURL=App.d.ts.map
@@ -1,6 +1,20 @@
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
+ */
1
16
  import type { ComponentType } from 'react';
2
17
  import React from 'react';
3
18
  export declare function ComponentContainer(props: {
4
19
  components?: Set<() => ComponentType>;
5
20
  }): React.ReactElement<{}, string | React.JSXElementConstructor<any>>[] | null;
6
- //# sourceMappingURL=ComponentContainer.d.ts.map
@@ -1,3 +1,17 @@
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
+ */
1
16
  import React from 'react';
2
17
  export declare function ConfirmPart(): React.JSX.Element[];
3
- //# sourceMappingURL=ConfirmPart.d.ts.map
@@ -1,3 +1,18 @@
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
+ */
1
16
  import type { IConfirmProps } from '@univerjs/design';
2
17
  import { type ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
3
18
  export type IConfirmPartMethodOptions = {
@@ -5,4 +20,3 @@ export type IConfirmPartMethodOptions = {
5
20
  children?: ICustomLabelProps;
6
21
  title?: ICustomLabelProps;
7
22
  } & Omit<IConfirmProps, 'children' | 'title'>;
8
- //# sourceMappingURL=interface.d.ts.map
@@ -1,5 +1,19 @@
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
+ */
1
16
  import React from 'react';
2
17
  export interface IProps {
3
18
  }
4
19
  export declare function ContextMenu(): React.JSX.Element;
5
- //# sourceMappingURL=ContextMenu.d.ts.map