@univerjs/ui 0.17.0 → 0.18.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.
Files changed (172) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +377 -43
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +1 -1
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/ja-JP.js +1 -1
  9. package/lib/cjs/locale/ko-KR.js +1 -1
  10. package/lib/cjs/locale/ru-RU.js +1 -1
  11. package/lib/cjs/locale/sk-SK.js +1 -1
  12. package/lib/cjs/locale/vi-VN.js +1 -1
  13. package/lib/cjs/locale/zh-CN.js +1 -1
  14. package/lib/cjs/locale/zh-TW.js +1 -1
  15. package/lib/es/facade.js +1 -391
  16. package/lib/es/index.js +378 -12224
  17. package/lib/es/locale/ca-ES.js +1 -85
  18. package/lib/es/locale/en-US.js +1 -85
  19. package/lib/es/locale/es-ES.js +1 -85
  20. package/lib/es/locale/fa-IR.js +1 -85
  21. package/lib/es/locale/fr-FR.js +1 -85
  22. package/lib/es/locale/ja-JP.js +1 -85
  23. package/lib/es/locale/ko-KR.js +1 -85
  24. package/lib/es/locale/ru-RU.js +1 -85
  25. package/lib/es/locale/sk-SK.js +1 -85
  26. package/lib/es/locale/vi-VN.js +1 -85
  27. package/lib/es/locale/zh-CN.js +1 -85
  28. package/lib/es/locale/zh-TW.js +1 -85
  29. package/lib/facade.js +1 -391
  30. package/lib/index.css +1662 -1
  31. package/lib/index.js +378 -12224
  32. package/lib/locale/ca-ES.js +1 -85
  33. package/lib/locale/en-US.js +1 -85
  34. package/lib/locale/es-ES.js +1 -85
  35. package/lib/locale/fa-IR.js +1 -85
  36. package/lib/locale/fr-FR.js +1 -85
  37. package/lib/locale/ja-JP.js +1 -85
  38. package/lib/locale/ko-KR.js +1 -85
  39. package/lib/locale/ru-RU.js +1 -85
  40. package/lib/locale/sk-SK.js +1 -85
  41. package/lib/locale/vi-VN.js +1 -85
  42. package/lib/locale/zh-CN.js +1 -85
  43. package/lib/locale/zh-TW.js +1 -85
  44. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +16 -1
  45. package/lib/types/common/component-manager.d.ts +17 -1
  46. package/lib/types/common/lifecycle.d.ts +16 -1
  47. package/lib/types/common/menu-hidden-observable.d.ts +16 -1
  48. package/lib/types/common/menu-merge-configs.d.ts +16 -1
  49. package/lib/types/components/custom-label/CustomLabel.d.ts +18 -3
  50. package/lib/types/components/font-family/FontFamily.d.ts +16 -1
  51. package/lib/types/components/font-family/interface.d.ts +17 -2
  52. package/lib/types/components/font-size/FontSize.d.ts +16 -1
  53. package/lib/types/components/font-size/interface.d.ts +17 -2
  54. package/lib/types/components/heading-item/index.d.ts +16 -1
  55. package/lib/types/components/hooks/layout.d.ts +16 -1
  56. package/lib/types/components/hooks/locale.d.ts +15 -0
  57. package/lib/types/components/hooks/update-effect.d.ts +15 -0
  58. package/lib/types/components/hooks/use-click-out-side.d.ts +16 -1
  59. package/lib/types/components/menu/common/hook.d.ts +16 -1
  60. package/lib/types/components/menu/desktop/DesignTinyMenuGroup.d.ts +30 -0
  61. package/lib/types/components/menu/desktop/TinyMenuGroup.d.ts +17 -2
  62. package/lib/types/components/menu/mobile/MobileMenu.d.ts +20 -3
  63. package/lib/types/components/menu/mobile/MobileMenu.stories.d.ts +16 -1
  64. package/lib/types/components/menu/types.d.ts +29 -0
  65. package/lib/types/components/notification/Notification.d.ts +17 -1
  66. package/lib/types/components/notification/Notification.stories.d.ts +16 -1
  67. package/lib/types/components/slider/Slider.stories.d.ts +16 -1
  68. package/lib/types/config/config.d.ts +18 -3
  69. package/lib/types/controllers/error/error.controller.d.ts +15 -0
  70. package/lib/types/controllers/menus/menus.d.ts +17 -2
  71. package/lib/types/controllers/shared-shortcut.controller.d.ts +17 -1
  72. package/lib/types/controllers/shortcut-display/menu.d.ts +16 -1
  73. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +15 -0
  74. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +18 -2
  75. package/lib/types/controllers/ui/ui-mobile.controller.d.ts +25 -4
  76. package/lib/types/controllers/ui/ui-shared.controller.d.ts +19 -3
  77. package/lib/types/controllers/ui/ui.controller.d.ts +17 -2
  78. package/lib/types/facade/f-enum.d.ts +15 -0
  79. package/lib/types/facade/f-hooks.d.ts +16 -1
  80. package/lib/types/facade/f-menu-builder.d.ts +17 -1
  81. package/lib/types/facade/f-shortcut.d.ts +17 -1
  82. package/lib/types/facade/f-univer.d.ts +21 -4
  83. package/lib/types/index.d.ts +1 -2
  84. package/lib/types/locale/ca-ES.d.ts +16 -1
  85. package/lib/types/locale/es-ES.d.ts +16 -1
  86. package/lib/types/locale/fa-IR.d.ts +16 -1
  87. package/lib/types/locale/fr-FR.d.ts +16 -1
  88. package/lib/types/locale/ja-JP.d.ts +16 -1
  89. package/lib/types/locale/ko-KR.d.ts +16 -1
  90. package/lib/types/locale/ru-RU.d.ts +16 -1
  91. package/lib/types/locale/sk-SK.d.ts +16 -1
  92. package/lib/types/locale/vi-VN.d.ts +16 -1
  93. package/lib/types/locale/zh-CN.d.ts +16 -1
  94. package/lib/types/locale/zh-TW.d.ts +16 -1
  95. package/lib/types/menu/schema.d.ts +16 -1
  96. package/lib/types/mobile-plugin.d.ts +16 -1
  97. package/lib/types/plugin.d.ts +16 -1
  98. package/lib/types/services/before-close/before-close.service.d.ts +17 -2
  99. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +16 -1
  100. package/lib/types/services/clipboard/clipboard.command.d.ts +16 -1
  101. package/lib/types/services/confirm/desktop-confirm.service.d.ts +18 -2
  102. package/lib/types/services/contextmenu/contextmenu-host.service.d.ts +18 -2
  103. package/lib/types/services/contextmenu/contextmenu.service.d.ts +19 -3
  104. package/lib/types/services/dialog/desktop-dialog.service.d.ts +20 -4
  105. package/lib/types/services/dialog/dialog.service.d.ts +19 -4
  106. package/lib/types/services/dom/canvas-dom-layer.service.d.ts +17 -2
  107. package/lib/types/services/font.service.d.ts +18 -2
  108. package/lib/types/services/gallery/desktop-gallery.service.d.ts +19 -3
  109. package/lib/types/services/gallery/gallery.service.d.ts +19 -4
  110. package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +18 -3
  111. package/lib/types/services/global-zone/global-zone.service.d.ts +18 -3
  112. package/lib/types/services/layout/layout.service.d.ts +18 -2
  113. package/lib/types/services/local-file/desktop-local-file.service.d.ts +16 -1
  114. package/lib/types/services/local-file/local-file.service.d.ts +1 -1
  115. package/lib/types/services/local-storage/local-storage.service.d.ts +16 -1
  116. package/lib/types/services/menu/menu-manager.service.d.ts +21 -4
  117. package/lib/types/services/menu/menu.d.ts +18 -2
  118. package/lib/types/services/menu/types.d.ts +5 -1
  119. package/lib/types/services/message/__testing__/mock-message.service.d.ts +18 -3
  120. package/lib/types/services/message/desktop-message.service.d.ts +19 -3
  121. package/lib/types/services/message/message.service.d.ts +18 -3
  122. package/lib/types/services/notification/desktop-notification.service.d.ts +19 -3
  123. package/lib/types/services/notification/notification.service.d.ts +18 -3
  124. package/lib/types/services/parts/parts.service.d.ts +20 -4
  125. package/lib/types/services/platform/platform.service.d.ts +1 -1
  126. package/lib/types/services/popup/canvas-popup.service.d.ts +21 -5
  127. package/lib/types/services/ribbon/ribbon.service.d.ts +19 -3
  128. package/lib/types/services/shortcut/shortcut-panel.service.d.ts +16 -1
  129. package/lib/types/services/shortcut/shortcut.service.d.ts +20 -4
  130. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +18 -3
  131. package/lib/types/services/sidebar/sidebar.service.d.ts +20 -5
  132. package/lib/types/services/theme-switcher/theme-switcher.service.d.ts +16 -1
  133. package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +20 -4
  134. package/lib/types/services/zen-zone/zen-zone.service.d.ts +19 -4
  135. package/lib/types/utils/cell.d.ts +16 -1
  136. package/lib/types/utils/di.d.ts +19 -4
  137. package/lib/types/views/components/ComponentContainer.d.ts +18 -3
  138. package/lib/types/views/components/confirm-part/interface.d.ts +17 -2
  139. package/lib/types/views/components/context-menu/AnchoredContextMenu.d.ts +16 -1
  140. package/lib/types/views/components/context-menu/ContextMenuPanel.d.ts +17 -1
  141. package/lib/types/views/components/context-menu/MobileContextMenu.d.ts +1 -1
  142. package/lib/types/views/components/dialog-part/interface.d.ts +17 -2
  143. package/lib/types/views/components/dom/FloatDom.d.ts +17 -2
  144. package/lib/types/views/components/dom/print.d.ts +17 -2
  145. package/lib/types/views/components/popup/CanvasPopup.d.ts +17 -2
  146. package/lib/types/views/components/popup/RectPopup.d.ts +18 -3
  147. package/lib/types/views/components/ribbon/MobileRibbon.d.ts +22 -0
  148. package/lib/types/views/components/ribbon/Ribbon.d.ts +17 -2
  149. package/lib/types/views/components/ribbon/ToolbarItem.d.ts +18 -3
  150. package/lib/types/views/components/ribbon/TooltipButtonWrapper.d.ts +19 -4
  151. package/lib/types/views/components/ribbon/hook.d.ts +16 -1
  152. package/lib/types/views/components/ribbon/ribbon-menu/ClassicMenu.d.ts +16 -1
  153. package/lib/types/views/components/ribbon/ribbon-menu/DefaultMenu.d.ts +16 -1
  154. package/lib/types/views/components/sidebar/Sidebar.d.ts +17 -2
  155. package/lib/types/views/mobile-workbench/MobileWorkbench.d.ts +16 -1
  156. package/lib/types/views/workbench/Workbench.d.ts +16 -1
  157. package/lib/umd/facade.js +1 -1
  158. package/lib/umd/index.js +384 -43
  159. package/lib/umd/locale/ca-ES.js +1 -1
  160. package/lib/umd/locale/en-US.js +1 -1
  161. package/lib/umd/locale/es-ES.js +1 -1
  162. package/lib/umd/locale/fa-IR.js +1 -1
  163. package/lib/umd/locale/fr-FR.js +1 -1
  164. package/lib/umd/locale/ja-JP.js +1 -1
  165. package/lib/umd/locale/ko-KR.js +1 -1
  166. package/lib/umd/locale/ru-RU.js +1 -1
  167. package/lib/umd/locale/sk-SK.js +1 -1
  168. package/lib/umd/locale/vi-VN.js +1 -1
  169. package/lib/umd/locale/zh-CN.js +1 -1
  170. package/lib/umd/locale/zh-TW.js +1 -1
  171. package/package.json +10 -9
  172. package/lib/types/components/menu/desktop/Menu.d.ts +0 -17
@@ -1,5 +1,20 @@
1
- import { Observable } from 'rxjs';
2
- import { ICustomComponentProps } from '../../services/menu/menu';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Observable } from 'rxjs';
17
+ import type { ICustomComponentProps } from '../../services/menu/menu';
3
18
  import { NamedStyleType } from '@univerjs/core';
4
19
  export interface IFontSizeProps extends ICustomComponentProps<number> {
5
20
  value: number;
@@ -1,4 +1,19 @@
1
- import { NamedStyleType } from '@univerjs/core';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { NamedStyleType } from '@univerjs/core';
2
17
  export declare const HeadingItem: (props: {
3
18
  value: NamedStyleType;
4
19
  text: string;
@@ -1,4 +1,19 @@
1
- import { Nullable } from '@univerjs/core';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Nullable } from '@univerjs/core';
2
17
  /**
3
18
  * These hooks are used for browser layout
4
19
  * Prefer to client-side
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 } from '@univerjs/core';
2
17
  export declare function useLocaleService(): LocaleService;
3
18
  export declare function t(localeService: LocaleService, key: string, ...args: Array<number | string>): string;
@@ -1,2 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { useEffect } from 'react';
2
17
  export declare const useUpdateEffect: typeof useEffect;
@@ -1,4 +1,19 @@
1
- import { RefObject } from 'react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { RefObject } from 'react';
2
17
  export interface IUseClickOutSideOptions {
3
18
  handler: () => void;
4
19
  }
@@ -1,2 +1,17 @@
1
- import { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
2
17
  export declare function useMenuItemState(menuItem: IDisplayMenuItem<IMenuItem>): void;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ComponentType } from 'react';
17
+ export interface ITinyMenuItem {
18
+ onClick: () => void;
19
+ className: string;
20
+ Icon: ComponentType<{
21
+ className?: string;
22
+ }>;
23
+ key: string;
24
+ active?: boolean;
25
+ tooltip?: string;
26
+ }
27
+ export interface ITinyMenuGroupProps {
28
+ items: ITinyMenuItem[];
29
+ }
30
+ export declare function DesignTinyMenuGroup({ items }: ITinyMenuGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,20 @@
1
- import { IValueOption } from '../../../services/menu/menu';
2
- import { IMenuSchema } from '../../../services/menu/menu-manager.service';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IValueOption } from '../../../services/menu/menu';
17
+ import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
3
18
  interface IUIQuickMenuGroupProps {
4
19
  item: IMenuSchema;
5
20
  onOptionSelect?: (option: IValueOption) => void;
@@ -1,5 +1,22 @@
1
- import { IBaseMenuProps } from '../desktop/Menu';
2
1
  /**
3
- * The mobile context menu wrapper.
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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.
4
15
  */
5
- export declare function MobileMenu(props: IBaseMenuProps): import("react/jsx-runtime").JSX.Element | null;
16
+ import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
17
+ import type { IBaseMenuProps } from '../types';
18
+ interface IMobileMenuProps extends IBaseMenuProps {
19
+ schemas?: IMenuSchema[];
20
+ }
21
+ export declare function MobileMenu(props: IMobileMenuProps): import("react/jsx-runtime").JSX.Element | null;
22
+ export {};
@@ -1,4 +1,19 @@
1
- import { Meta } from '@storybook/react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Meta } from '@storybook/react';
2
17
  declare const meta: Meta;
3
18
  export default meta;
4
19
  export declare const Playground: {
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IValueOption } from '../../services/menu/menu';
17
+ export interface IBaseMenuProps {
18
+ parentKey?: string | number;
19
+ menuType?: string;
20
+ value?: string | number;
21
+ options?: IValueOption[];
22
+ /**
23
+ * The menu will show scroll on it over viewport height
24
+ * Recommend that you use this prop when displaying menu overlays in Dropdown
25
+ */
26
+ overViewport?: 'scroll';
27
+ onOptionSelect?: (option: IValueOption) => void;
28
+ style?: React.CSSProperties;
29
+ }
@@ -1,4 +1,20 @@
1
- import { IToasterProps, toast } from '@univerjs/design';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IToasterProps } from '@univerjs/design';
17
+ import { toast } from '@univerjs/design';
2
18
  export declare function Notification(): import("react/jsx-runtime").JSX.Element;
3
19
  export interface INotificationOptions {
4
20
  /** The title of the notification */
@@ -1,4 +1,19 @@
1
- import { Meta } from '@storybook/react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Meta } from '@storybook/react';
2
17
  import { Notification } from './Notification';
3
18
  declare const meta: Meta<typeof Notification>;
4
19
  export default meta;
@@ -1,4 +1,19 @@
1
- import { Meta } from '@storybook/react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Meta } from '@storybook/react';
2
17
  import { Slider } from './Slider';
3
18
  declare const meta: Meta<typeof Slider>;
4
19
  export default meta;
@@ -1,6 +1,21 @@
1
- import { DependencyOverride } from '@univerjs/core';
2
- import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
3
- import { MenuConfig } from '../services/menu/menu';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { DependencyOverride } from '@univerjs/core';
17
+ import type { IWorkbenchOptions } from '../controllers/ui/ui.controller';
18
+ import type { MenuConfig } from '../services/menu/menu';
4
19
  export declare const UI_PLUGIN_CONFIG_KEY = "ui.config";
5
20
  export declare const configSymbol: unique symbol;
6
21
  export interface IUniverUIConfig extends IWorkbenchOptions {
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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, ErrorService } from '@univerjs/core';
2
17
  import { IMessageService } from '../../services/message/message.service';
3
18
  export declare class ErrorController extends Disposable {
@@ -1,4 +1,19 @@
1
- import { IAccessor } from '@univerjs/core';
2
- import { IMenuButtonItem } from '../../services/menu/menu';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 '@univerjs/core';
17
+ import type { IMenuButtonItem } from '../../services/menu/menu';
3
18
  export declare function UndoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
4
19
  export declare function RedoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,5 +1,21 @@
1
- import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IShortcutItem } from '../services/shortcut/shortcut.service';
2
17
  import { Disposable, ICommandService } from '@univerjs/core';
18
+ import { IShortcutService } from '../services/shortcut/shortcut.service';
3
19
  export declare const CopyShortcutItem: IShortcutItem;
4
20
  export declare const CutShortcutItem: IShortcutItem;
5
21
  /**
@@ -1,2 +1,17 @@
1
- import { IMenuButtonItem } from '../../services/menu/menu';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IMenuButtonItem } from '../../services/menu/menu';
2
17
  export declare function ShortcutPanelMenuItemFactory(): IMenuButtonItem;
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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, Injector } from '@univerjs/core';
2
17
  import { ComponentManager } from '../../common/component-manager';
3
18
  import { IMenuManagerService } from '../../services/menu/menu-manager.service';
@@ -1,5 +1,21 @@
1
- import { IDisposable, Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
- import { IUniverUIConfig } from '../../config/config';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 '@univerjs/core';
17
+ import type { IUniverUIConfig } from '../../config/config';
18
+ import { Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
3
19
  import { IRenderManagerService } from '@univerjs/engine-render';
4
20
  import { ComponentManager } from '../../common';
5
21
  import { ILayoutService } from '../../services/layout/layout.service';
@@ -1,13 +1,34 @@
1
- import { IDisposable, Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
- import { IUniverUIConfig } from '../../config/config';
3
- import { IUIController } from './ui.controller';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 '@univerjs/core';
17
+ import type { IUniverUIConfig } from '../../config/config';
18
+ import type { IUIController } from './ui.controller';
19
+ import { Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
4
20
  import { IRenderManagerService } from '@univerjs/engine-render';
21
+ import { ComponentManager } from '../../common';
5
22
  import { ILayoutService } from '../../services/layout/layout.service';
23
+ import { IMenuManagerService } from '../../services/menu/menu-manager.service';
6
24
  import { IUIPartsService } from '../../services/parts/parts.service';
7
25
  import { SingleUnitUIController } from './ui-shared.controller';
8
26
  export declare class MobileUIController extends SingleUnitUIController implements IUIController {
9
27
  private readonly _config;
10
- constructor(_config: IUniverUIConfig, injector: Injector, lifecycleService: LifecycleService, renderManagerService: IRenderManagerService, layoutService: ILayoutService, instanceService: IUniverInstanceService, uiPartsService: IUIPartsService);
28
+ private readonly _componentManager;
29
+ constructor(_config: IUniverUIConfig, injector: Injector, lifecycleService: LifecycleService, renderManagerService: IRenderManagerService, layoutService: ILayoutService, instanceService: IUniverInstanceService, menuManagerService: IMenuManagerService, uiPartsService: IUIPartsService, _componentManager: ComponentManager);
30
+ dispose(): void;
11
31
  bootstrap(callback: (contentElement: HTMLElement, containerElement: HTMLElement) => void): IDisposable;
32
+ private _registerComponents;
12
33
  private _initBuiltinComponents;
13
34
  }
@@ -1,6 +1,22 @@
1
- import { IDisposable, Injector, IUniverInstanceService, LifecycleService, Disposable } from '@univerjs/core';
2
- import { IRenderManagerService } from '@univerjs/engine-render';
3
- import { ILayoutService } from '../../services/layout/layout.service';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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, Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
17
+ import type { IRenderManagerService } from '@univerjs/engine-render';
18
+ import type { ILayoutService } from '../../services/layout/layout.service';
19
+ import { Disposable } from '@univerjs/core';
4
20
  /**
5
21
  * @ignore
6
22
  */
@@ -1,4 +1,19 @@
1
- import { IFontConfig } from '../../services/font.service';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IFontConfig } from '../../services/font.service';
2
17
  export type RibbonType = 'collapsed' | 'simple' | 'classic';
3
18
  export interface IWorkbenchOptions {
4
19
  container?: string | HTMLElement;
@@ -36,4 +51,4 @@ export interface IWorkbenchOptions {
36
51
  }
37
52
  export interface IUIController {
38
53
  }
39
- export declare const IUIController: import('@wendellhu/redi').IdentifierDecorator<IUIController>;
54
+ export declare const IUIController: import("@wendellhu/redi").IdentifierDecorator<IUIController>;
@@ -1,3 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { FEnum } from '@univerjs/core/facade';
2
17
  import { BuiltInUIPart, KeyCode } from '@univerjs/ui';
3
18
  /**
@@ -1,4 +1,19 @@
1
- import { IDisposable } from '@univerjs/core';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 '@univerjs/core';
2
17
  import { FHooks } from '@univerjs/core/facade';
3
18
  /**
4
19
  * @ignore