@univerjs/ui 1.0.0-alpha.6 → 1.0.0-alpha.7
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/index.js +1092 -349
- package/lib/cjs/locale/ar-SA.js +12 -0
- package/lib/cjs/locale/ca-ES.js +12 -0
- package/lib/cjs/locale/de-DE.js +12 -0
- package/lib/cjs/locale/en-US.js +12 -0
- package/lib/cjs/locale/es-ES.js +12 -0
- package/lib/cjs/locale/fa-IR.js +12 -0
- package/lib/cjs/locale/fr-FR.js +12 -0
- package/lib/cjs/locale/id-ID.js +12 -0
- package/lib/cjs/locale/it-IT.js +12 -0
- package/lib/cjs/locale/ja-JP.js +12 -0
- package/lib/cjs/locale/ko-KR.js +12 -0
- package/lib/cjs/locale/pl-PL.js +12 -0
- package/lib/cjs/locale/pt-BR.js +12 -0
- package/lib/cjs/locale/ru-RU.js +12 -0
- package/lib/cjs/locale/sk-SK.js +12 -0
- package/lib/cjs/locale/vi-VN.js +12 -0
- package/lib/cjs/locale/zh-CN.js +12 -0
- package/lib/cjs/locale/zh-HK.js +12 -0
- package/lib/cjs/locale/zh-TW.js +12 -0
- package/lib/es/index.js +1092 -354
- package/lib/es/locale/ar-SA.js +12 -0
- package/lib/es/locale/ca-ES.js +12 -0
- package/lib/es/locale/de-DE.js +12 -0
- package/lib/es/locale/en-US.js +12 -0
- package/lib/es/locale/es-ES.js +12 -0
- package/lib/es/locale/fa-IR.js +12 -0
- package/lib/es/locale/fr-FR.js +12 -0
- package/lib/es/locale/id-ID.js +12 -0
- package/lib/es/locale/it-IT.js +12 -0
- package/lib/es/locale/ja-JP.js +12 -0
- package/lib/es/locale/ko-KR.js +12 -0
- package/lib/es/locale/pl-PL.js +12 -0
- package/lib/es/locale/pt-BR.js +12 -0
- package/lib/es/locale/ru-RU.js +12 -0
- package/lib/es/locale/sk-SK.js +12 -0
- package/lib/es/locale/vi-VN.js +12 -0
- package/lib/es/locale/zh-CN.js +12 -0
- package/lib/es/locale/zh-HK.js +12 -0
- package/lib/es/locale/zh-TW.js +12 -0
- package/lib/index.css +176 -6
- package/lib/index.js +1092 -354
- package/lib/locale/ar-SA.js +12 -0
- package/lib/locale/ca-ES.js +12 -0
- package/lib/locale/de-DE.js +12 -0
- package/lib/locale/en-US.js +12 -0
- package/lib/locale/es-ES.js +12 -0
- package/lib/locale/fa-IR.js +12 -0
- package/lib/locale/fr-FR.js +12 -0
- package/lib/locale/id-ID.js +12 -0
- package/lib/locale/it-IT.js +12 -0
- package/lib/locale/ja-JP.js +12 -0
- package/lib/locale/ko-KR.js +12 -0
- package/lib/locale/pl-PL.js +12 -0
- package/lib/locale/pt-BR.js +12 -0
- package/lib/locale/ru-RU.js +12 -0
- package/lib/locale/sk-SK.js +12 -0
- package/lib/locale/vi-VN.js +12 -0
- package/lib/locale/zh-CN.js +12 -0
- package/lib/locale/zh-HK.js +12 -0
- package/lib/locale/zh-TW.js +12 -0
- package/lib/types/commands/operations/open-feature-search.operation.d.ts +17 -0
- package/lib/types/controllers/feature-search/feature-search.controller.d.ts +20 -0
- package/lib/types/controllers/ui/ui.controller.d.ts +1 -1
- package/lib/types/index.d.ts +2 -3
- package/lib/types/locale/en-US.d.ts +12 -0
- package/lib/types/menu/feature-search.menu.d.ts +18 -0
- package/lib/types/{controllers/menus/menus.d.ts → menu/history.menu.d.ts} +2 -2
- package/lib/types/{controllers/shortcut-display/menu.d.ts → menu/shortcut-panel.menu.d.ts} +2 -2
- package/lib/types/services/contextmenu/contextmenu-host.service.d.ts +5 -1
- package/lib/types/services/menu/menu-manager.service.d.ts +11 -0
- package/lib/types/services/menu/types.d.ts +1 -0
- package/lib/types/services/shortcut/shortcut.service.d.ts +4 -1
- package/lib/types/utils/embed-boundary.d.ts +2 -0
- package/lib/types/views/components/feature-search/FeatureSearch.d.ts +29 -0
- package/lib/types/views/components/ribbon/RibbonGrid.d.ts +23 -0
- package/lib/types/views/components/ribbon/ToolbarItem.d.ts +10 -1
- package/lib/types/views/components/ribbon/ribbon-grid-layout.d.ts +27 -0
- package/lib/types/views/components/ribbon/ribbon-menu/RibbonGridMenu.d.ts +21 -0
- package/lib/types/views/components/sidebar/Sidebar.d.ts +0 -2
- package/lib/types/views/custom-label/CustomLabel.d.ts +1 -0
- package/lib/types/views/emoji-picker/EmojiPicker.d.ts +7 -3
- package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +1 -1
- package/lib/types/views/emoji-picker/index.d.ts +0 -1
- package/lib/types/views/index.d.ts +1 -0
- package/lib/types/views/symbol-picker/SymbolPicker.d.ts +31 -0
- package/lib/types/views/symbol-picker/index.d.ts +18 -0
- package/lib/types/views/symbol-picker/symbols.d.ts +23 -0
- package/lib/umd/index.js +13 -13
- 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 +7 -7
|
@@ -21,6 +21,15 @@ import { Subject } from 'rxjs';
|
|
|
21
21
|
export declare const IMenuManagerService: import("@wendellhu/redi").IdentifierDecorator<IMenuManagerService>;
|
|
22
22
|
export type ContextMenuQuickLayout = 'icon' | 'tile';
|
|
23
23
|
export type ContextMenuQuickLayoutVariant = 'default' | 'compact';
|
|
24
|
+
export interface IRibbonGridLayout {
|
|
25
|
+
row: number;
|
|
26
|
+
column: number;
|
|
27
|
+
rowSpan?: number;
|
|
28
|
+
columnSpan?: number;
|
|
29
|
+
showLabel?: boolean;
|
|
30
|
+
width?: number;
|
|
31
|
+
iconSize?: number;
|
|
32
|
+
}
|
|
24
33
|
export interface IMenuSchema {
|
|
25
34
|
key: string;
|
|
26
35
|
order: number;
|
|
@@ -33,6 +42,7 @@ export interface IMenuSchema {
|
|
|
33
42
|
quickColumns?: number;
|
|
34
43
|
quickLayoutVariant?: ContextMenuQuickLayoutVariant;
|
|
35
44
|
tiny?: boolean;
|
|
45
|
+
gridLayout?: IRibbonGridLayout;
|
|
36
46
|
}
|
|
37
47
|
export interface IMenuManagerService {
|
|
38
48
|
readonly menuChanged$: Observable<void>;
|
|
@@ -52,6 +62,7 @@ export type MenuSchemaType = {
|
|
|
52
62
|
quickColumns?: number;
|
|
53
63
|
quickLayoutVariant?: ContextMenuQuickLayoutVariant;
|
|
54
64
|
tiny?: boolean;
|
|
65
|
+
gridLayout?: IRibbonGridLayout;
|
|
55
66
|
} | {
|
|
56
67
|
[key: string]: MenuSchemaType;
|
|
57
68
|
};
|
|
@@ -29,6 +29,7 @@ export declare enum RibbonStartGroup {
|
|
|
29
29
|
HISTORY = "ribbon.start.history",
|
|
30
30
|
FORMAT = "ribbon.start.format",
|
|
31
31
|
LAYOUT = "ribbon.start.layout",
|
|
32
|
+
NUMBER = "ribbon.start.number",
|
|
32
33
|
OTHERS = "ribbon.start.others"
|
|
33
34
|
}
|
|
34
35
|
export declare enum RibbonInsertGroup {
|
|
@@ -18,6 +18,7 @@ import type { Observable } from 'rxjs';
|
|
|
18
18
|
import { Disposable, ICommandService, IContextService } from '@univerjs/core';
|
|
19
19
|
import { ILayoutService } from '../layout/layout.service';
|
|
20
20
|
import { IPlatformService } from '../platform/platform.service';
|
|
21
|
+
import { IUIRuntimeScopeService } from '../runtime-scope/ui-runtime-scope.service';
|
|
21
22
|
import { KeyCode } from './keycode';
|
|
22
23
|
/**
|
|
23
24
|
* A shortcut item that could be registered to the {@link IShortcutService}.
|
|
@@ -135,6 +136,7 @@ export declare class ShortcutService extends Disposable implements IShortcutServ
|
|
|
135
136
|
private readonly _commandService;
|
|
136
137
|
private readonly _platformService;
|
|
137
138
|
private readonly _contextService;
|
|
139
|
+
private readonly _runtimeScopeService;
|
|
138
140
|
private readonly _layoutService?;
|
|
139
141
|
private readonly _shortCutMapping;
|
|
140
142
|
private readonly _commandIDMapping;
|
|
@@ -142,7 +144,7 @@ export declare class ShortcutService extends Disposable implements IShortcutServ
|
|
|
142
144
|
readonly shortcutChanged$: Observable<void>;
|
|
143
145
|
private _forceEscaped;
|
|
144
146
|
private _forceDisabled;
|
|
145
|
-
constructor(_commandService: ICommandService, _platformService: IPlatformService, _contextService: IContextService, _layoutService?: ILayoutService | undefined);
|
|
147
|
+
constructor(_commandService: ICommandService, _platformService: IPlatformService, _contextService: IContextService, _runtimeScopeService: IUIRuntimeScopeService, _layoutService?: ILayoutService | undefined);
|
|
146
148
|
getAllShortcuts(): IShortcutItem[];
|
|
147
149
|
registerShortcut(shortcut: IShortcutItem): IDisposable;
|
|
148
150
|
getShortcutDisplayOfCommand(id: string): string | null;
|
|
@@ -155,4 +157,5 @@ export declare class ShortcutService extends Disposable implements IShortcutServ
|
|
|
155
157
|
private _getBindingFromItem;
|
|
156
158
|
private _deriveBindingFromEvent;
|
|
157
159
|
private _shouldLetEmbedTextEditorHandleNativeShortcut;
|
|
160
|
+
private _getRuntimeService;
|
|
158
161
|
}
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export declare const EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
17
|
+
export declare const EMBED_CHILD_UNIT_ID_ATTRIBUTE = "data-embed-child-unit-id";
|
|
17
18
|
export declare function getEmbedBoundaryOwner(target: EventTarget | null): string | undefined;
|
|
18
19
|
export declare function isEmbedBoundaryTarget(target: EventTarget | null): boolean;
|
|
20
|
+
export declare function getEmbedChildUnitId(target: EventTarget | null): string | undefined;
|
|
19
21
|
export declare function keepInteractionInsideSameEmbedBoundary(event: {
|
|
20
22
|
currentTarget: EventTarget | null;
|
|
21
23
|
target: EventTarget | null;
|
|
@@ -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 { IMenuCommandParams } from '../../../services/menu/menu';
|
|
17
|
+
export declare const FEATURE_SEARCH_COMPONENT = "FeatureSearch";
|
|
18
|
+
export declare const FEATURE_SEARCH_DIALOG_ID = "FEATURE_SEARCH_DIALOG";
|
|
19
|
+
export interface IFeatureSearchItem {
|
|
20
|
+
key: string;
|
|
21
|
+
title: string;
|
|
22
|
+
parentTitle?: string;
|
|
23
|
+
description: string;
|
|
24
|
+
path: string;
|
|
25
|
+
commandId: string;
|
|
26
|
+
params?: IMenuCommandParams;
|
|
27
|
+
getParams: () => IMenuCommandParams | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare function FeatureSearch(): import("react").JSX.Element;
|
|
@@ -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
|
+
import type { HTMLAttributes } from 'react';
|
|
17
|
+
import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
|
|
18
|
+
interface IRibbonGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
19
|
+
groups: IMenuSchema[];
|
|
20
|
+
title: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function RibbonGrid({ groups, title, className, ...props }: IRibbonGridProps): import("react").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -15,4 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IDisplayMenuItem, IMenuItem } from '../../../services/menu/menu';
|
|
17
17
|
import type { ITooltipWrapperRef } from './TooltipButtonWrapper';
|
|
18
|
-
|
|
18
|
+
type IToolbarItemProps = IDisplayMenuItem<IMenuItem> & {
|
|
19
|
+
grid?: boolean;
|
|
20
|
+
large?: boolean;
|
|
21
|
+
showLabel?: boolean;
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
iconColor?: string;
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare const ToolbarItem: import("react").ForwardRefExoticComponent<IToolbarItemProps & import("react").RefAttributes<ITooltipWrapperRef>>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { IMenuSchema } from '../../../services/menu/menu-manager.service';
|
|
17
|
+
export interface IRibbonGridPlacement {
|
|
18
|
+
item: IMenuSchema;
|
|
19
|
+
row: number;
|
|
20
|
+
column: number;
|
|
21
|
+
rowSpan: number;
|
|
22
|
+
columnSpan: number;
|
|
23
|
+
showLabel: boolean;
|
|
24
|
+
width?: number;
|
|
25
|
+
iconSize?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function placeRibbonGridItems(items: IMenuSchema[]): IRibbonGridPlacement[];
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { IMenuSchema } from '../../../../services/menu/menu-manager.service';
|
|
17
|
+
export declare function RibbonGridMenu({ ribbon, activatedTab, onSelectTab, }: {
|
|
18
|
+
ribbon: IMenuSchema[];
|
|
19
|
+
activatedTab: string;
|
|
20
|
+
onSelectTab: (tab: IMenuSchema) => void;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -13,13 +13,11 @@
|
|
|
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';
|
|
17
16
|
import type { ICustomLabelProps } from '../../custom-label/CustomLabel';
|
|
18
17
|
export interface ISidebarMethodOptions {
|
|
19
18
|
id?: string;
|
|
20
19
|
header?: ICustomLabelProps;
|
|
21
20
|
children?: ICustomLabelProps;
|
|
22
|
-
bodyStyle?: CSSProperties;
|
|
23
21
|
footer?: ICustomLabelProps;
|
|
24
22
|
visible?: boolean;
|
|
25
23
|
width?: number | string;
|
|
@@ -18,6 +18,7 @@ import type { Observable } from 'rxjs';
|
|
|
18
18
|
import type { IMenuSelectorItem } from '../../services/menu/menu';
|
|
19
19
|
export type ICustomLabelProps<T = undefined> = {
|
|
20
20
|
className?: string;
|
|
21
|
+
iconSize?: number;
|
|
21
22
|
value?: string | number | undefined;
|
|
22
23
|
value$?: Observable<T>;
|
|
23
24
|
onChange?(v: string | number): void;
|
|
@@ -15,13 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IPopup } from '../../services/popup/canvas-popup.service';
|
|
17
17
|
export declare const EMOJI_PICKER_COMPONENT = "ui.emoji-picker";
|
|
18
|
-
|
|
18
|
+
interface IEmojiPickerPopupProps {
|
|
19
19
|
activeEmoji?: string;
|
|
20
20
|
onSelect?: (emoji: string, options?: {
|
|
21
21
|
keepOpen?: boolean;
|
|
22
22
|
}) => void;
|
|
23
23
|
recentStorageKey?: string;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface IEmojiPickerProps {
|
|
26
|
+
embedded?: boolean;
|
|
27
|
+
onChange?: (emoji: string) => void;
|
|
26
28
|
popup?: IPopup<IEmojiPickerPopupProps>;
|
|
27
|
-
}
|
|
29
|
+
}
|
|
30
|
+
export declare function EmojiPicker(props: IEmojiPickerProps): import("react").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -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: "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";
|
|
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.featureSearch.title" | "ui.featureSearch.empty" | "ui.featureSearch.placeholder" | "ui.featureSearch.ribbon" | "ui.featureSearch.contextMenu" | "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.symbolPicker.mathematics" | "ui.symbolPicker.greek" | "ui.symbolPicker.common" | "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[];
|
|
@@ -16,4 +16,3 @@
|
|
|
16
16
|
export { EMOJI_CATEGORIES, EMOJI_RECENT_LIMIT, getAllEmojis, getDefaultRecentEmojis, getEmojiLocaleData, getLocalizedEmojiTitle, getRandomEmoji, parseStoredRecentEmojis, promoteRecentEmoji, searchEmojis, } from './emoji-picker-utils';
|
|
17
17
|
export type { EmojiCategory, IEmojiItem, IEmojiLocaleData } from './emoji-picker-utils';
|
|
18
18
|
export { EMOJI_PICKER_COMPONENT, EmojiPicker } from './EmojiPicker';
|
|
19
|
-
export type { IEmojiPickerPopupProps } from './EmojiPicker';
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { IPopup } from '../../services/popup/canvas-popup.service';
|
|
17
|
+
export declare const SYMBOL_PICKER_COMPONENT = "ui.symbol-picker";
|
|
18
|
+
interface ISymbolPickerPopupProps {
|
|
19
|
+
activeSymbol?: string;
|
|
20
|
+
onSelect?: (symbol: string, options?: {
|
|
21
|
+
keepOpen?: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
}
|
|
24
|
+
interface ISymbolPickerProps {
|
|
25
|
+
className?: string;
|
|
26
|
+
embedded?: boolean;
|
|
27
|
+
onChange?: (symbol: string) => void;
|
|
28
|
+
popup?: IPopup<ISymbolPickerPopupProps>;
|
|
29
|
+
}
|
|
30
|
+
export declare function SymbolPicker(props: ISymbolPickerProps): import("react").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +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
|
+
*/
|
|
16
|
+
export { SYMBOL_PICKER_COMPONENT, SymbolPicker } from './SymbolPicker';
|
|
17
|
+
export { SYMBOL_CATEGORIES } from './symbols';
|
|
18
|
+
export type { ISymbolCategory, SymbolCategory } from './symbols';
|
|
@@ -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
|
+
import type { LocaleKey } from '../../locale/types';
|
|
17
|
+
export type SymbolCategory = 'mathematics' | 'greek' | 'common';
|
|
18
|
+
export interface ISymbolCategory {
|
|
19
|
+
key: SymbolCategory;
|
|
20
|
+
symbols: string[];
|
|
21
|
+
titleKey: LocaleKey;
|
|
22
|
+
}
|
|
23
|
+
export declare const SYMBOL_CATEGORIES: ISymbolCategory[];
|