@univerjs/ui 1.0.0-alpha.2 → 1.0.0-alpha.4
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/lib/cjs/facade.js +2 -0
- package/lib/cjs/index.js +1174 -798
- package/lib/cjs/locale/ar-SA.js +11 -0
- package/lib/cjs/locale/ca-ES.js +11 -0
- package/lib/cjs/locale/de-DE.js +11 -0
- package/lib/cjs/locale/en-US.js +11 -0
- package/lib/cjs/locale/es-ES.js +11 -0
- package/lib/cjs/locale/fa-IR.js +11 -0
- package/lib/cjs/locale/fr-FR.js +11 -0
- package/lib/cjs/locale/id-ID.js +11 -0
- package/lib/cjs/locale/it-IT.js +11 -0
- package/lib/cjs/locale/ja-JP.js +11 -0
- package/lib/cjs/locale/ko-KR.js +11 -0
- package/lib/cjs/locale/pl-PL.js +11 -0
- package/lib/cjs/locale/pt-BR.js +11 -0
- package/lib/cjs/locale/ru-RU.js +11 -0
- package/lib/cjs/locale/sk-SK.js +11 -0
- package/lib/cjs/locale/vi-VN.js +11 -0
- package/lib/cjs/locale/zh-CN.js +11 -0
- package/lib/cjs/locale/zh-HK.js +11 -0
- package/lib/cjs/locale/zh-TW.js +11 -0
- package/lib/es/facade.js +2 -0
- package/lib/es/index.js +1168 -803
- package/lib/es/locale/ar-SA.js +11 -0
- package/lib/es/locale/ca-ES.js +11 -0
- package/lib/es/locale/de-DE.js +11 -0
- package/lib/es/locale/en-US.js +11 -0
- package/lib/es/locale/es-ES.js +11 -0
- package/lib/es/locale/fa-IR.js +11 -0
- package/lib/es/locale/fr-FR.js +11 -0
- package/lib/es/locale/id-ID.js +11 -0
- package/lib/es/locale/it-IT.js +11 -0
- package/lib/es/locale/ja-JP.js +11 -0
- package/lib/es/locale/ko-KR.js +11 -0
- package/lib/es/locale/pl-PL.js +11 -0
- package/lib/es/locale/pt-BR.js +11 -0
- package/lib/es/locale/ru-RU.js +11 -0
- package/lib/es/locale/sk-SK.js +11 -0
- package/lib/es/locale/vi-VN.js +11 -0
- package/lib/es/locale/zh-CN.js +11 -0
- package/lib/es/locale/zh-HK.js +11 -0
- package/lib/es/locale/zh-TW.js +11 -0
- package/lib/facade.js +2 -0
- package/lib/index.css +5 -12
- package/lib/index.js +1168 -803
- package/lib/locale/ar-SA.js +11 -0
- package/lib/locale/ca-ES.js +11 -0
- package/lib/locale/de-DE.js +11 -0
- package/lib/locale/en-US.js +11 -0
- package/lib/locale/es-ES.js +11 -0
- package/lib/locale/fa-IR.js +11 -0
- package/lib/locale/fr-FR.js +11 -0
- package/lib/locale/id-ID.js +11 -0
- package/lib/locale/it-IT.js +11 -0
- package/lib/locale/ja-JP.js +11 -0
- package/lib/locale/ko-KR.js +11 -0
- package/lib/locale/pl-PL.js +11 -0
- package/lib/locale/pt-BR.js +11 -0
- package/lib/locale/ru-RU.js +11 -0
- package/lib/locale/sk-SK.js +11 -0
- package/lib/locale/vi-VN.js +11 -0
- package/lib/locale/zh-CN.js +11 -0
- package/lib/locale/zh-HK.js +11 -0
- package/lib/locale/zh-TW.js +11 -0
- package/lib/types/commands/operations/toggle-fullscreen.operation.d.ts +17 -0
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +1 -3
- package/lib/types/controllers/ui/ui-mobile.controller.d.ts +1 -3
- package/lib/types/facade/f-menu-builder.d.ts +2 -0
- package/lib/types/index.d.ts +8 -3
- package/lib/types/locale/en-US.d.ts +13 -0
- package/lib/types/services/before-close/before-close.service.d.ts +3 -2
- package/lib/types/services/contextmenu/contextmenu.service.d.ts +6 -3
- package/lib/types/services/dom/canvas-dom-layer.service.d.ts +52 -1
- package/lib/types/services/menu/menu-manager.service.d.ts +1 -0
- package/lib/types/services/menu/menu.d.ts +3 -2
- package/lib/types/services/menu/types.d.ts +1 -0
- package/lib/types/services/popup/canvas-popup.service.d.ts +5 -1
- package/lib/types/services/ribbon/ribbon-override.service.d.ts +42 -0
- package/lib/types/services/runtime-scope/ui-runtime-scope.service.d.ts +32 -0
- package/lib/types/services/shortcut/shortcut.service.d.ts +2 -1
- package/lib/types/utils/embed-boundary.d.ts +23 -0
- package/lib/types/utils/index.d.ts +1 -0
- package/lib/types/views/components/context-menu/AnchoredContextMenu.d.ts +4 -0
- package/lib/types/views/components/context-menu/ContextMenuPanel.d.ts +4 -0
- package/lib/types/views/components/dom/FloatDom.d.ts +12 -1
- package/lib/types/views/components/dom/Print.d.ts +1 -1
- package/lib/types/views/components/dom/float-dom-layout.d.ts +35 -0
- package/lib/types/views/components/ribbon/Ribbon.d.ts +2 -0
- package/lib/types/views/components/ribbon/TooltipButtonWrapper.d.ts +6 -1
- package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +1 -1
- package/lib/types/views/index.d.ts +1 -1
- package/lib/types/views/menu/mobile/MobileMenu.d.ts +2 -0
- package/lib/types/views/slider/ZoomInput.d.ts +25 -0
- package/lib/types/views/slider/index.d.ts +1 -0
- package/lib/umd/index.js +15 -22
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +9 -9
|
@@ -32,6 +32,7 @@ type MenuLabel = string | {
|
|
|
32
32
|
selectable?: boolean;
|
|
33
33
|
props?: Record<string, any>;
|
|
34
34
|
};
|
|
35
|
+
export type IMenuCommandParams = Record<string, unknown>;
|
|
35
36
|
interface IMenuItemBase<TLocaleKey extends string, TValue> {
|
|
36
37
|
/** ID of the menu item. Normally it should be the same as the ID of the command that it would invoke. */
|
|
37
38
|
id: string;
|
|
@@ -53,7 +54,7 @@ interface IMenuItemBase<TLocaleKey extends string, TValue> {
|
|
|
53
54
|
label?: MenuLabel;
|
|
54
55
|
hidden$?: Observable<boolean>;
|
|
55
56
|
disabled$?: Observable<boolean>;
|
|
56
|
-
params?:
|
|
57
|
+
params?: IMenuCommandParams | (() => IMenuCommandParams | undefined);
|
|
57
58
|
/** On observable value that should emit the value of the corresponding selection component. */
|
|
58
59
|
value$?: Observable<TValue>;
|
|
59
60
|
}
|
|
@@ -65,7 +66,7 @@ export interface IValueOption<TLocaleKey extends string = string, TValue = undef
|
|
|
65
66
|
id?: string;
|
|
66
67
|
value?: string | number;
|
|
67
68
|
value$?: Observable<TValue>;
|
|
68
|
-
params?:
|
|
69
|
+
params?: IMenuCommandParams | ((value?: string | number) => IMenuCommandParams | undefined);
|
|
69
70
|
slot?: boolean;
|
|
70
71
|
label?: MenuLabel;
|
|
71
72
|
icon?: string;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { Nullable } from '@univerjs/core';
|
|
16
|
+
import type { Injector, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IBoundRectNoAngle } from '@univerjs/engine-render';
|
|
18
18
|
import type { Observable } from 'rxjs';
|
|
19
19
|
import type { IRectPopupProps } from '../../views/components/popup/RectPopup';
|
|
@@ -24,6 +24,7 @@ export interface IPopup<T = Record<string, unknown>> extends Omit<IRectPopupProp
|
|
|
24
24
|
excludeRects$?: Observable<IBoundRectNoAngle[]>;
|
|
25
25
|
excludeRects?: Nullable<IBoundRectNoAngle[]>;
|
|
26
26
|
componentKey: string;
|
|
27
|
+
connectorInjector?: Injector;
|
|
27
28
|
unitId: string;
|
|
28
29
|
subUnitId: string;
|
|
29
30
|
offset?: [number, number];
|
|
@@ -35,6 +36,9 @@ export interface IPopup<T = Record<string, unknown>> extends Omit<IRectPopupProp
|
|
|
35
36
|
customActive?: boolean;
|
|
36
37
|
onActiveChange?: (active: boolean) => void;
|
|
37
38
|
}
|
|
39
|
+
export type IPopupWithExtraProps<T> = IPopup<T> & {
|
|
40
|
+
extraProps: T;
|
|
41
|
+
};
|
|
38
42
|
export interface ICanvasPopupService {
|
|
39
43
|
addPopup(item: IPopup): string;
|
|
40
44
|
removePopup(id: string): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { Injector } from '@univerjs/core';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
18
|
+
import type { IRibbonService } from './ribbon.service';
|
|
19
|
+
import { Disposable } from '@univerjs/core';
|
|
20
|
+
export interface IRibbonOverride {
|
|
21
|
+
id: string;
|
|
22
|
+
ribbonService: IRibbonService;
|
|
23
|
+
injector?: Pick<Injector, 'get' | 'has' | 'invoke'>;
|
|
24
|
+
portalContainer?: HTMLElement | null;
|
|
25
|
+
placeholderTitle?: string;
|
|
26
|
+
hideToolbar?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface IRibbonOverrideService {
|
|
29
|
+
readonly override$: Observable<IRibbonOverride | null>;
|
|
30
|
+
getOverride(): IRibbonOverride | null;
|
|
31
|
+
activate(override: IRibbonOverride): void;
|
|
32
|
+
clear(id?: string): void;
|
|
33
|
+
}
|
|
34
|
+
export declare const IRibbonOverrideService: import("@wendellhu/redi").IdentifierDecorator<IRibbonOverrideService>;
|
|
35
|
+
export declare class RibbonOverrideService extends Disposable implements IRibbonOverrideService {
|
|
36
|
+
private readonly _override$;
|
|
37
|
+
readonly override$: Observable<IRibbonOverride | null>;
|
|
38
|
+
getOverride(): IRibbonOverride | null;
|
|
39
|
+
activate(override: IRibbonOverride): void;
|
|
40
|
+
clear(id?: string): void;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { Disposable } from '@univerjs/core';
|
|
18
|
+
export interface IUIRuntimeScope {
|
|
19
|
+
unitId: string;
|
|
20
|
+
has(identifier: unknown): boolean;
|
|
21
|
+
get<T = unknown>(identifier: unknown): T;
|
|
22
|
+
}
|
|
23
|
+
export interface IUIRuntimeScopeService {
|
|
24
|
+
register(scope: IUIRuntimeScope): IDisposable;
|
|
25
|
+
get(unitId: string | null | undefined): IUIRuntimeScope | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const IUIRuntimeScopeService: import("@wendellhu/redi").IdentifierDecorator<IUIRuntimeScopeService>;
|
|
28
|
+
export declare class UIRuntimeScopeService extends Disposable implements IUIRuntimeScopeService {
|
|
29
|
+
private readonly _scopes;
|
|
30
|
+
register(scope: IUIRuntimeScope): IDisposable;
|
|
31
|
+
get(unitId: string | null | undefined): IUIRuntimeScope | undefined;
|
|
32
|
+
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IDisposable } from '@univerjs/core';
|
|
17
17
|
import type { Observable } from 'rxjs';
|
|
18
|
-
import type { KeyCode } from './keycode';
|
|
19
18
|
import { Disposable, ICommandService, IContextService } from '@univerjs/core';
|
|
20
19
|
import { ILayoutService } from '../layout/layout.service';
|
|
21
20
|
import { IPlatformService } from '../platform/platform.service';
|
|
21
|
+
import { KeyCode } from './keycode';
|
|
22
22
|
/**
|
|
23
23
|
* A shortcut item that could be registered to the {@link IShortcutService}.
|
|
24
24
|
*/
|
|
@@ -154,4 +154,5 @@ export declare class ShortcutService extends Disposable implements IShortcutServ
|
|
|
154
154
|
dispatch(e: KeyboardEvent): IShortcutItem<object> | undefined;
|
|
155
155
|
private _getBindingFromItem;
|
|
156
156
|
private _deriveBindingFromEvent;
|
|
157
|
+
private _shouldLetEmbedTextEditorHandleNativeShortcut;
|
|
157
158
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export declare const EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
17
|
+
export declare function getEmbedBoundaryOwner(target: EventTarget | null): string | undefined;
|
|
18
|
+
export declare function isEmbedBoundaryTarget(target: EventTarget | null): boolean;
|
|
19
|
+
export declare function keepInteractionInsideSameEmbedBoundary(event: {
|
|
20
|
+
currentTarget: EventTarget | null;
|
|
21
|
+
target: EventTarget | null;
|
|
22
|
+
preventDefault: () => void;
|
|
23
|
+
}): void;
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { ILayoutService } from '../../../services/layout/layout.service';
|
|
16
17
|
import type { IValueOption } from '../../../services/menu/menu';
|
|
18
|
+
import type { IMenuManagerService } from '../../../services/menu/menu-manager.service';
|
|
17
19
|
export interface IContextMenuAnchorRect {
|
|
18
20
|
left: number;
|
|
19
21
|
top: number;
|
|
@@ -26,6 +28,8 @@ export interface IAnchoredContextMenuProps {
|
|
|
26
28
|
menuType: string;
|
|
27
29
|
anchorVertical?: 'top' | 'bottom';
|
|
28
30
|
menuOffset?: number;
|
|
31
|
+
menuManagerService?: IMenuManagerService;
|
|
32
|
+
layoutService?: ILayoutService;
|
|
29
33
|
onRequestClose: () => void;
|
|
30
34
|
onOptionSelect?: (option: IValueOption) => void;
|
|
31
35
|
}
|
|
@@ -15,10 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IValueOption } from '../../../services/menu/menu';
|
|
17
17
|
import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
|
|
18
|
+
import { ILayoutService } from '../../../services/layout/layout.service';
|
|
19
|
+
import { IMenuManagerService } from '../../../services/menu/menu-manager.service';
|
|
18
20
|
type ContextMenuSizeVariant = 'default' | 'paragraph-t';
|
|
19
21
|
type ContextMenuAutoFocusTarget = 'first-item' | 'container';
|
|
20
22
|
interface IContextMenuPanelProps {
|
|
21
23
|
menuType: string;
|
|
24
|
+
menuManagerService?: IMenuManagerService;
|
|
25
|
+
layoutService?: ILayoutService;
|
|
22
26
|
menuSessionVersion?: number;
|
|
23
27
|
className?: string;
|
|
24
28
|
activeItemIds?: string[];
|
|
@@ -13,11 +13,22 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { CSSProperties } from 'react';
|
|
16
17
|
import type { IFloatDom } from '../../../services/dom/canvas-dom-layer.service';
|
|
17
18
|
export declare const FloatDomSingle: import("react").MemoExoticComponent<(props: {
|
|
18
19
|
layer: IFloatDom;
|
|
19
20
|
id: string;
|
|
20
|
-
}) => import("react").JSX.Element
|
|
21
|
+
}) => import("react").JSX.Element>;
|
|
21
22
|
export declare const FloatDom: ({ unitId }: {
|
|
22
23
|
unitId?: string;
|
|
23
24
|
}) => import("react").JSX.Element[] | undefined;
|
|
25
|
+
export declare function resolveFloatDomCurrentUnitId(unitId: string | undefined, focusedUnit: unknown): string | null;
|
|
26
|
+
export declare function resolveFloatDomOverflow(props: {
|
|
27
|
+
customBlockRenderViewport?: {
|
|
28
|
+
bleedLeft?: number;
|
|
29
|
+
bleedWidth?: number;
|
|
30
|
+
};
|
|
31
|
+
}): {
|
|
32
|
+
outerOverflow: CSSProperties['overflow'];
|
|
33
|
+
innerOverflow: CSSProperties['overflow'];
|
|
34
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { IFloatDomContentBoxConfig, IFloatDomLayout } from '../../../services/dom/canvas-dom-layer.service';
|
|
17
|
+
export interface IFloatDomLayoutStyle {
|
|
18
|
+
wrapper: {
|
|
19
|
+
top: number;
|
|
20
|
+
left: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
transform: string;
|
|
24
|
+
opacity: number;
|
|
25
|
+
};
|
|
26
|
+
inner: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
left: number | 'auto';
|
|
30
|
+
top: number | 'auto';
|
|
31
|
+
right: number | 'auto';
|
|
32
|
+
bottom: number | 'auto';
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare function resolveFloatDomLayout(position: IFloatDomLayout, contentBox?: IFloatDomContentBoxConfig): IFloatDomLayoutStyle;
|
|
@@ -19,6 +19,8 @@ interface IRibbonProps {
|
|
|
19
19
|
ribbonType: RibbonType;
|
|
20
20
|
headerMenuComponents?: Set<ComponentType>;
|
|
21
21
|
headerMenu?: boolean;
|
|
22
|
+
toolbarOnly?: boolean;
|
|
23
|
+
headerClassName?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare function Ribbon(props: IRibbonProps): import("react").JSX.Element;
|
|
24
26
|
export {};
|
|
@@ -19,7 +19,12 @@ import type { IMenuItem, IValueOption } from '../../../services/menu/menu';
|
|
|
19
19
|
export interface ITooltipWrapperRef {
|
|
20
20
|
el: HTMLSpanElement | null;
|
|
21
21
|
}
|
|
22
|
-
export declare
|
|
22
|
+
export declare function ToolbarDropdownProvider(props: {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
export declare const TooltipWrapper: import("react").ForwardRefExoticComponent<ITooltipProps & {
|
|
26
|
+
dropdownKey?: string;
|
|
27
|
+
} & import("react").RefAttributes<ITooltipWrapperRef>>;
|
|
23
28
|
export declare function DropdownWrapper(props: Omit<Partial<IDropdownProps>, 'overlay'> & {
|
|
24
29
|
overlay: ReactNode;
|
|
25
30
|
align?: 'start' | 'end' | 'center';
|
|
@@ -27,7 +27,7 @@ export type EmojiCategory = Exclude<keyof typeof emojis, 'frequent'>;
|
|
|
27
27
|
export declare const EMOJI_RECENT_LIMIT = 11;
|
|
28
28
|
export declare const EMOJI_CATEGORIES: {
|
|
29
29
|
key: EmojiCategory;
|
|
30
|
-
titleKey: string;
|
|
30
|
+
titleKey: "ui.row" | "ui.column" | "ui.common-edit" | "ui.toggle-shortcut-panel" | "ui.global-shortcut" | "ui.fontFamily.not-supported" | "ui.fontFamily.arial" | "ui.fontFamily.times-new-roman" | "ui.fontFamily.tahoma" | "ui.fontFamily.verdana" | "ui.fontFamily.microsoft-yahei" | "ui.fontFamily.simsun" | "ui.fontFamily.simhei" | "ui.fontFamily.kaiti" | "ui.fontFamily.fangsong" | "ui.fontFamily.nsimsun" | "ui.fontFamily.stxinwei" | "ui.fontFamily.stxingkai" | "ui.fontFamily.stliti" | "ui.ribbon.start" | "ui.ribbon.view" | "ui.ribbon.insert" | "ui.ribbon.data" | "ui.ribbon.startDesc" | "ui.ribbon.insertDesc" | "ui.ribbon.formulas" | "ui.ribbon.formulasDesc" | "ui.ribbon.dataDesc" | "ui.ribbon.viewDesc" | "ui.ribbon.others" | "ui.ribbon.othersDesc" | "ui.ribbon.more" | "ui.clipboard.authentication.title" | "ui.clipboard.authentication.content" | "ui.emojiPicker.search" | "ui.emojiPicker.objects" | "ui.emojiPicker.random" | "ui.emojiPicker.recents" | "ui.emojiPicker.emojis" | "ui.emojiPicker.animals" | "ui.emojiPicker.food" | "ui.emojiPicker.activities" | "ui.emojiPicker.places" | "ui.emojiPicker.symbols" | "ui.emojiPicker.searchResults" | "ui.emojiPicker.noResults" | `ui.emojiPicker.emojiSearchIndex.${string}` | `ui.emojiPicker.emojiTitles.${string}` | "ui.toolbar.heading.title" | "ui.toolbar.heading.normal" | "ui.toolbar.heading.subTitle" | "ui.toolbar.heading.tooltip" | "ui.shortcut-panel.title" | "ui.shortcut.copy" | "ui.shortcut.cut" | "ui.shortcut.paste" | "ui.shortcut.shortcut-panel" | "ui.shortcut.undo" | "ui.shortcut.redo" | "ui.navigation.next" | "ui.navigation.back" | "ui.navigation.previous" | "ui.sidebar.close" | "ui.sidebar.resize" | "ui.sidebar.panel" | "ui.beforeClose.title" | "ui.textEditor.formulaError" | "ui.textEditor.rangeError" | "ui.rangeSelector.title" | "ui.rangeSelector.cancel" | "ui.rangeSelector.addAnotherRange" | "ui.rangeSelector.buttonTooltip" | "ui.rangeSelector.placeHolder" | "ui.rangeSelector.confirm" | "ui.zoom-slider.resetTo";
|
|
31
31
|
}[];
|
|
32
32
|
export declare function getDefaultRecentEmojis(): IEmojiItem[];
|
|
33
33
|
export declare function getAllEmojis(): IEmojiItem[];
|
|
@@ -18,4 +18,4 @@ export * from './custom-label/index';
|
|
|
18
18
|
export * from './emoji-picker/index';
|
|
19
19
|
export * from './HeadingItem';
|
|
20
20
|
export { useScrollYOverContainer } from './hooks/layout';
|
|
21
|
-
export { type ISliderProps, Slider } from './slider/index';
|
|
21
|
+
export { type ISliderProps, type IZoomInputProps, Slider, ZoomInput } from './slider/index';
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
|
|
17
17
|
import type { IBaseMenuProps } from '../types';
|
|
18
|
+
import { IMenuManagerService } from '../../../services/menu/menu-manager.service';
|
|
18
19
|
interface IMobileMenuProps extends IBaseMenuProps {
|
|
19
20
|
schemas?: IMenuSchema[];
|
|
21
|
+
menuManagerService?: IMenuManagerService;
|
|
20
22
|
}
|
|
21
23
|
export declare function MobileMenu(props: IMobileMenuProps): import("react").JSX.Element | null;
|
|
22
24
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
export interface IZoomInputProps {
|
|
17
|
+
value?: number;
|
|
18
|
+
min?: number;
|
|
19
|
+
max?: number;
|
|
20
|
+
shortcuts: number[];
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
onChange?: (value: number) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function ZoomInput(props: IZoomInputProps): import("react").JSX.Element;
|