@univerjs/docs-quick-insert-ui 0.6.6-experimental.20250317-28d180b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/lib/cjs/index.js +9 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +582 -0
- package/lib/es/locale/en-US.js +18 -0
- package/lib/es/locale/fa-IR.js +18 -0
- package/lib/es/locale/fr-FR.js +18 -0
- package/lib/es/locale/ru-RU.js +18 -0
- package/lib/es/locale/vi-VN.js +18 -0
- package/lib/es/locale/zh-CN.js +18 -0
- package/lib/es/locale/zh-TW.js +18 -0
- package/lib/index.css +1 -0
- package/lib/types/commands/commands/doc-quick-insert.command.d.ts +7 -0
- package/lib/types/commands/operations/quick-insert-popup.operation.d.ts +9 -0
- package/lib/types/controllers/built-in-menus.d.ts +11 -0
- package/lib/types/controllers/doc-quick-insert-trigger.controller.d.ts +13 -0
- package/lib/types/controllers/doc-quick-insert-ui.controller.d.ts +12 -0
- package/lib/types/index.d.ts +21 -0
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +31 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/plugin.d.ts +9 -0
- package/lib/types/services/doc-quick-insert-popup.service.d.ts +69 -0
- package/lib/types/views/KeywordInputPlaceholder.d.ts +20 -0
- package/lib/types/views/QuickInsertPlaceholder.d.ts +16 -0
- package/lib/types/views/QuickInsertPopup.d.ts +20 -0
- package/lib/umd/index.js +9 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
docQuickInsert: {
|
|
3
|
+
menu: {
|
|
4
|
+
numberedList: "有序列表",
|
|
5
|
+
bulletedList: "無序列表",
|
|
6
|
+
divider: "分隔線",
|
|
7
|
+
text: "文本"
|
|
8
|
+
},
|
|
9
|
+
group: {
|
|
10
|
+
basics: "基礎"
|
|
11
|
+
},
|
|
12
|
+
placeholder: "無結果",
|
|
13
|
+
keywordInputPlaceholder: "輸入關鍵詞"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
e as default
|
|
18
|
+
};
|
package/lib/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.univer-mb-2{margin-bottom:.5rem}.univer-mr-2{margin-right:.5rem}.univer-flex{display:flex}.univer-inline-flex{display:inline-flex}.univer-h-full{height:100%}.univer-max-h-\[360px\]{max-height:360px}.univer-w-\[220px\]{width:220px}.univer-translate-y-1\.5{--tw-translate-y: .375rem;transform:translate(var(--tw-translate-x),.375rem) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-overflow-y-auto{overflow-y:auto}.univer-rounded-lg{border-radius:.5rem}.univer-border{border-width:1px}.univer-border-solid{border-style:solid}.univer-border-gray-100{--tw-border-opacity: 1;border-color:#eeeff1;border-color:rgba(238,239,241,var(--tw-border-opacity, 1))}.univer-bg-gray-100{--tw-bg-opacity: 1;background-color:#eeeff1;background-color:rgba(238,239,241,var(--tw-bg-opacity, 1))}.univer-bg-transparent{background-color:transparent}.univer-bg-white{--tw-bg-opacity: 1;background-color:#fff;background-color:rgba(255,255,255,var(--tw-bg-opacity, 1))}.univer-px-1{padding-left:.25rem;padding-right:.25rem}.univer-px-12{padding-left:3rem;padding-right:3rem}.univer-py-6{padding-top:1.5rem;padding-bottom:1.5rem}.univer-text-base{font-size:1rem;line-height:1.5rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-xs{font-size:.75rem;line-height:1rem}.univer-text-gray-400{--tw-text-opacity: 1;color:#979dac;color:rgba(151,157,172,var(--tw-text-opacity, 1))}.univer-text-gray-500{--tw-text-opacity: 1;color:#5f6574;color:rgba(95,101,116,var(--tw-text-opacity, 1))}.univer-shadow-\[0_0_10px_0_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow: 0 0 10px 0 rgba(0,0,0,.1);--tw-shadow-colored: 0 0 10px 0 var(--tw-shadow-color);box-shadow:0 0 #0000,0 0 #0000,0 0 10px #0000001a;box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0,0,0,0)),var(--tw-ring-shadow, 0 0 rgba(0,0,0,0)),var(--tw-shadow)}.hover\:univer-bg-transparent:hover{background-color:transparent}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICommand } from '@univerjs/core';
|
|
2
|
+
import { IDocPopup } from '../../services/doc-quick-insert-popup.service';
|
|
3
|
+
export interface IShowQuickInsertPopupOperationParams {
|
|
4
|
+
unitId: string;
|
|
5
|
+
index: number;
|
|
6
|
+
popup: IDocPopup;
|
|
7
|
+
}
|
|
8
|
+
export declare const ShowQuickInsertPopupOperation: ICommand<IShowQuickInsertPopupOperationParams>;
|
|
9
|
+
export declare const CloseQuickInsertPopupOperation: ICommand;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DocPopupMenu, IDocPopupMenuItem } from '../services/doc-quick-insert-popup.service';
|
|
2
|
+
export declare enum QuickInsertMenuGroup {
|
|
3
|
+
Basic = "quick.insert.group.basic",
|
|
4
|
+
Media = "quick.insert.group.media"
|
|
5
|
+
}
|
|
6
|
+
export declare const textMenu: IDocPopupMenuItem;
|
|
7
|
+
export declare const numberedListMenu: IDocPopupMenuItem;
|
|
8
|
+
export declare const bulletedListMenu: IDocPopupMenuItem;
|
|
9
|
+
export declare const dividerMenu: IDocPopupMenuItem;
|
|
10
|
+
export declare const builtInMenus: DocPopupMenu[];
|
|
11
|
+
export declare const builtInMenuCommandIds: Set<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
3
|
+
import { IShortcutService } from '@univerjs/ui';
|
|
4
|
+
import { DocQuickInsertPopupService } from '../services/doc-quick-insert-popup.service';
|
|
5
|
+
export declare class DocQuickInsertTriggerController extends Disposable {
|
|
6
|
+
private readonly _commandService;
|
|
7
|
+
private readonly _textSelectionManagerService;
|
|
8
|
+
private readonly _docQuickInsertPopupService;
|
|
9
|
+
private readonly _shortcutService;
|
|
10
|
+
constructor(_commandService: ICommandService, _textSelectionManagerService: DocSelectionManagerService, _docQuickInsertPopupService: DocQuickInsertPopupService, _shortcutService: IShortcutService);
|
|
11
|
+
private _initTrigger;
|
|
12
|
+
private _initMenuHandler;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
3
|
+
import { DocQuickInsertPopupService } from '../services/doc-quick-insert-popup.service';
|
|
4
|
+
export declare class DocQuickInsertUIController extends Disposable {
|
|
5
|
+
private readonly _commandService;
|
|
6
|
+
private readonly _docQuickInsertPopupService;
|
|
7
|
+
private readonly _componentManager;
|
|
8
|
+
constructor(_commandService: ICommandService, _docQuickInsertPopupService: DocQuickInsertPopupService, _componentManager: ComponentManager);
|
|
9
|
+
private _initCommands;
|
|
10
|
+
private _initComponents;
|
|
11
|
+
private _initMenus;
|
|
12
|
+
}
|
|
@@ -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 './global.css';
|
|
17
|
+
export { UniverDocsQuickInsertUIPlugin } from './plugin';
|
|
18
|
+
export type { DocPopupMenu, IDocPopup, IDocPopupGroupItem, IDocPopupMenuItem, } from './services/doc-quick-insert-popup.service';
|
|
19
|
+
export { DocQuickInsertPopupService } from './services/doc-quick-insert-popup.service';
|
|
20
|
+
export { DocQuickInsertTriggerController } from './controllers/doc-quick-insert-trigger.controller';
|
|
21
|
+
export { DocQuickInsertUIController } from './controllers/doc-quick-insert-ui.controller';
|
|
@@ -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
|
+
declare const locale: {
|
|
17
|
+
docQuickInsert: {
|
|
18
|
+
menu: {
|
|
19
|
+
numberedList: string;
|
|
20
|
+
bulletedList: string;
|
|
21
|
+
divider: string;
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
group: {
|
|
25
|
+
basics: string;
|
|
26
|
+
};
|
|
27
|
+
placeholder: string;
|
|
28
|
+
keywordInputPlaceholder: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default locale;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
export declare class UniverDocsQuickInsertUIPlugin extends Plugin {
|
|
3
|
+
protected _injector: Injector;
|
|
4
|
+
static type: UniverInstanceType;
|
|
5
|
+
static pluginName: string;
|
|
6
|
+
constructor(_injector: Injector);
|
|
7
|
+
onStarting(): void;
|
|
8
|
+
onRendered(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IDisposable, Nullable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IInsertCommandParams, DocCanvasPopManagerService } from '@univerjs/docs-ui';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export interface IDocPopupGroupItem {
|
|
5
|
+
id: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
children?: IDocPopupMenuItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface IDocPopupMenuItem {
|
|
11
|
+
id: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
title: string;
|
|
14
|
+
keywords?: string[];
|
|
15
|
+
}
|
|
16
|
+
export type DocPopupMenu = IDocPopupGroupItem | IDocPopupMenuItem;
|
|
17
|
+
export interface IDocPopup {
|
|
18
|
+
keyword: string;
|
|
19
|
+
menus$: Observable<DocPopupMenu[]>;
|
|
20
|
+
Placeholder?: React.ComponentType;
|
|
21
|
+
preconditions?: (params: IInsertCommandParams) => boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class DocQuickInsertPopupService extends Disposable {
|
|
24
|
+
private readonly _docCanvasPopupManagerService;
|
|
25
|
+
private readonly _univerInstanceService;
|
|
26
|
+
private readonly _commandService;
|
|
27
|
+
private readonly _popups;
|
|
28
|
+
private readonly _editPopup$;
|
|
29
|
+
readonly editPopup$: Observable<Nullable<{
|
|
30
|
+
popup: IDocPopup;
|
|
31
|
+
anchor: number;
|
|
32
|
+
disposable: IDisposable;
|
|
33
|
+
unitId: string;
|
|
34
|
+
}>>;
|
|
35
|
+
get editPopup(): Nullable<{
|
|
36
|
+
popup: IDocPopup;
|
|
37
|
+
anchor: number;
|
|
38
|
+
disposable: IDisposable;
|
|
39
|
+
unitId: string;
|
|
40
|
+
}>;
|
|
41
|
+
private readonly _inputOffset$;
|
|
42
|
+
readonly inputOffset$: Observable<{
|
|
43
|
+
start: number;
|
|
44
|
+
end: number;
|
|
45
|
+
}>;
|
|
46
|
+
get inputOffset(): {
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
49
|
+
};
|
|
50
|
+
setInputOffset(offset: {
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
}): void;
|
|
54
|
+
readonly filterKeyword$: Observable<string>;
|
|
55
|
+
private _menuSelectedCallbacks;
|
|
56
|
+
private _inputPlaceholderRenderRoot;
|
|
57
|
+
constructor(_docCanvasPopupManagerService: DocCanvasPopManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
|
|
58
|
+
resolvePopup(keyword: string): IDocPopup | undefined;
|
|
59
|
+
registerPopup(popup: IDocPopup): () => void;
|
|
60
|
+
private _createInputPlaceholderRenderRoot;
|
|
61
|
+
showPopup(options: {
|
|
62
|
+
popup: IDocPopup;
|
|
63
|
+
index: number;
|
|
64
|
+
unitId: string;
|
|
65
|
+
}): void;
|
|
66
|
+
closePopup(): void;
|
|
67
|
+
onMenuSelected(callback: (menu: IDocPopupMenuItem) => void): () => void;
|
|
68
|
+
emitMenuSelected(menu: IDocPopupMenuItem): void;
|
|
69
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
declare const KeywordInputPlaceholder: {
|
|
17
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
componentKey: string;
|
|
19
|
+
};
|
|
20
|
+
export { KeywordInputPlaceholder };
|
|
@@ -0,0 +1,16 @@
|
|
|
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 QuickInsertPlaceholder: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
declare const QuickInsertPopup: {
|
|
17
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
componentKey: string;
|
|
19
|
+
};
|
|
20
|
+
export { QuickInsertPopup };
|
package/lib/umd/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("@univerjs/core"),require("@univerjs/docs-drawing"),require("@univerjs/drawing"),require("@univerjs/drawing-ui"),require("@univerjs/ui"),require("@univerjs/docs"),require("@univerjs/docs-ui"),require("rxjs"),require("react/jsx-runtime"),require("@univerjs/design"),require("react")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/docs-drawing","@univerjs/drawing","@univerjs/drawing-ui","@univerjs/ui","@univerjs/docs","@univerjs/docs-ui","rxjs","react/jsx-runtime","@univerjs/design","react"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o.UniverDocsQuickInsertUi={},o.UniverCore,o.UniverDocsDrawing,o.UniverDrawing,o.UniverDrawingUi,o.UniverUi,o.UniverDocs,o.UniverDocsUi,o.rxjs,o.React,o.UniverDesign,o.React))})(this,function(o,s,k,ne,ie,l,H,C,S,f,b,v){"use strict";var we=Object.defineProperty;var xe=(o,s,k)=>s in o?we(o,s,{enumerable:!0,configurable:!0,writable:!0,value:k}):o[s]=k;var _=(o,s,k)=>xe(o,typeof s!="symbol"?s+"":s,k);const K={id:"doc.command.delete-search-key",type:s.CommandType.COMMAND,handler:(i,n)=>{const e=i.get(s.ICommandService),{start:t,end:r}=n;return e.syncExecuteCommand(C.CutContentCommand.id,{segmentId:"",textRanges:[{startOffset:t,endOffset:t,collapsed:!0}],selections:[{startOffset:t,endOffset:r,collapsed:!1,direction:s.RANGE_DIRECTION.FORWARD}]})}},Q=()=>{const i=l.useDependency(s.LocaleService);return f.jsx("div",{className:"univer-translate-y-1.5 univer-text-sm univer-text-gray-500",children:i.t("docQuickInsert.keywordInputPlaceholder")})};Q.componentKey="KeywordInputPlaceholder";const re=()=>{const i=l.useDependency(s.LocaleService);return f.jsx("div",{className:`
|
|
2
|
+
univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white
|
|
3
|
+
univer-px-12 univer-py-6 univer-text-gray-400
|
|
4
|
+
`,children:f.jsx("span",{children:i.t("docQuickInsert.placeholder")})})};function q(i,n){return i.map(e=>({...e})).filter(e=>{if("children"in e)return e.children=q(e.children,n),e.children.length>0;const t=e.keywords;return t?t.some(r=>r.includes(n)):e.title.toLowerCase().includes(n)})}function A(i,n){return i.map(e=>{const t={...e};return"children"in t&&(t.children=A(t.children,n)),t.title=n.t(t.title),"keywords"in t&&(t.keywords=t.keywords.concat(t.title).map(r=>r.toLowerCase())),t})}const se=[l.KeyCode.ARROW_UP,l.KeyCode.ARROW_DOWN,l.KeyCode.ENTER],j=()=>{const i=l.useDependency(s.LocaleService),n=l.useDependency(o.DocQuickInsertPopupService),e=l.useDependency(l.ComponentManager),t=l.useDependency(l.IShortcutService),r=l.useDependency(s.ICommandService),c=v.useMemo(()=>s.generateRandomId(),[]),[d,a]=v.useState(0),u=v.useRef(null),p=v.useRef(0);p.current=0;const y=l.useObservable(n.filterKeyword$,""),P=l.useObservable(n.editPopup$),X=l.useObservable(P==null?void 0:P.popup.menus$,[]),[E,ke]=v.useState([]),Y=v.useMemo(()=>A(X,i),[X]);v.useEffect(()=>{const h=requestIdleCallback(()=>{ke(q(Y,y.toLowerCase()))});return()=>{cancelIdleCallback(h)}},[Y,y]);const ee=h=>{n.emitMenuSelected(h),r.executeCommand(w.id)};v.useEffect(()=>{const h=new s.DisposableCollection;t.getAllShortcuts().filter(m=>m.binding&&se.includes(m.binding)).forEach(m=>{const D=m.preconditions;m.preconditions=()=>!1,h.add(s.toDisposable(()=>{m.preconditions=D}))});const O={id:`quick.insert.popup.enter.${c}`,type:s.CommandType.OPERATION,handler:()=>{const m=u.current;m&&ee(m)}},x={id:`quick.insert.popup.move.cursor.up.${c}`,type:s.CommandType.OPERATION,handler:()=>{a(m=>{const D=m-1;return D>=0?D:p.current-1})}},M={id:`quick.insert.popup.move.cursor.down.${c}`,type:s.CommandType.OPERATION,handler:()=>{a(m=>{const D=m+1;return D<=p.current-1?D:0})}};return h.add(r.registerCommand(x)),h.add(r.registerCommand(M)),h.add(r.registerCommand(O)),h.add(t.registerShortcut({priority:1e3,id:x.id,binding:l.KeyCode.ARROW_UP,preconditions:()=>!0,staticParameters:{direction:s.Direction.UP}})),h.add(t.registerShortcut({priority:1e3,id:M.id,binding:l.KeyCode.ARROW_DOWN,preconditions:()=>!0,staticParameters:{direction:s.Direction.DOWN}})),h.add(t.registerShortcut({priority:1e3,id:O.id,binding:l.KeyCode.ENTER,preconditions:()=>!0})),()=>{h.dispose()}},[]),v.useEffect(()=>{a(0)},[E]);function te(h){return h.map(I=>{const $=I.icon,O=$?e.get($):null;if("children"in I)return f.jsx(b.MenuItemGroup,{title:f.jsxs("div",{className:`
|
|
5
|
+
univer-mb-2 univer-flex univer-items-center univer-text-xs univer-text-gray-400
|
|
6
|
+
`,children:[O&&f.jsx("span",{className:"univer-mr-2 univer-inline-flex univer-text-base",children:f.jsx(O,{})}),f.jsx("span",{children:I.title})]}),children:te(I.children)},I.id);const x=p.current,M=d===x;return M&&(u.current=I),p.current++,f.jsx(b.MenuItem,{onMouseEnter:()=>a(x),onMouseLeave:()=>a(Number.NaN),className:b.clsx("univer-text-sm",{"hover:univer-bg-transparent":!M,"univer-bg-gray-100":M}),onClick:()=>{ee(I)},children:f.jsxs("div",{className:"univer-flex univer-items-center univer-px-1",children:[O&&f.jsx("span",{className:"univer-mr-2 univer-inline-flex univer-text-base",children:f.jsx(O,{})}),f.jsx("span",{children:I.title})]})},I.id)})}const Me=E.length>0,be=(P==null?void 0:P.popup.Placeholder)||re;return f.jsx("div",{className:b.clsx(`
|
|
7
|
+
univer-rounded-lg univer-border univer-border-solid univer-border-gray-100
|
|
8
|
+
univer-shadow-[0_0_10px_0_rgba(0,0,0,0.1)]
|
|
9
|
+
`),children:Me?f.jsx("div",{className:"univer-max-h-[360px] univer-w-[220px] univer-overflow-y-auto",children:f.jsx(b.Menu,{children:te(E)})}):f.jsx(be,{})})};j.componentKey="doc.quick-insert-popup";var oe=Object.getOwnPropertyDescriptor,ce=(i,n,e,t)=>{for(var r=t>1?void 0:t?oe(n,e):n,c=i.length-1,d;c>=0;c--)(d=i[c])&&(r=d(r)||r);return r},U=(i,n)=>(e,t)=>n(e,t,i);o.DocQuickInsertPopupService=class extends s.Disposable{constructor(e,t,r){super();_(this,"_popups",new Set);_(this,"_editPopup$",new S.BehaviorSubject(void 0));_(this,"editPopup$",this._editPopup$.asObservable());_(this,"_inputOffset$",new S.BehaviorSubject({start:0,end:0}));_(this,"inputOffset$",this._inputOffset$.asObservable());_(this,"filterKeyword$");_(this,"_menuSelectedCallbacks",new Set);_(this,"_inputPlaceholderRenderRoot",null);this._docCanvasPopupManagerService=e,this._univerInstanceService=t,this._commandService=r,this.disposeWithMe(this._editPopup$);const c=(d,a)=>{var u,p;return(p=(u=this._univerInstanceService.getCurrentUnitOfType(s.UniverInstanceType.UNIVER_DOC))==null?void 0:u.getBody())==null?void 0:p.dataStream.slice(d,a)};this.filterKeyword$=this._inputOffset$.pipe(S.map(d=>{var u;const a=c(d.start,d.end);return(u=a==null?void 0:a.slice(1))!=null?u:""}),S.distinctUntilChanged()),this.disposeWithMe(S.combineLatest([this.filterKeyword$.pipe(S.tap(d=>{var a,u,p;d.length>0?(u=(a=this._inputPlaceholderRenderRoot)==null?void 0:a.unmount)==null||u.dispose():(p=this._inputPlaceholderRenderRoot)==null||p.mount()})),this.editPopup$.pipe(S.tap(d=>{var a,u;d||(u=(a=this._inputPlaceholderRenderRoot)==null?void 0:a.unmount)==null||u.dispose()}))]).subscribe())}get editPopup(){return this._editPopup$.value}get inputOffset(){return this._inputOffset$.value}setInputOffset(e){this._inputOffset$.next(e)}resolvePopup(e){return Array.from(this._popups).find(t=>t.keyword===e)}registerPopup(e){return this._popups.add(e),()=>{this._popups.delete(e)}}_createInputPlaceholderRenderRoot(e){return{mount(){this.unmount=e()}}}showPopup(e){const{popup:t,index:r,unitId:c}=e;this.closePopup();const d=this._docCanvasPopupManagerService.attachPopupToRange({startOffset:r,endOffset:r,collapsed:!0},{componentKey:j.componentKey,onClickOutside:()=>{this.closePopup()},direction:"bottom"},c);this._inputPlaceholderRenderRoot=this._createInputPlaceholderRenderRoot(()=>{const a=this._docCanvasPopupManagerService.attachPopupToRange({startOffset:r+1,endOffset:r+1,collapsed:!1},{componentKey:Q.componentKey,onClickOutside:()=>{a.dispose()},direction:"horizontal"},c);return a}),this._inputPlaceholderRenderRoot.mount(),this._editPopup$.next({disposable:d,popup:t,anchor:r,unitId:c})}closePopup(){this.editPopup&&(this.editPopup.disposable.dispose(),this._editPopup$.next(null))}onMenuSelected(e){return this._menuSelectedCallbacks.add(e),()=>{this._menuSelectedCallbacks.delete(e)}}emitMenuSelected(e){const{start:t,end:r}=this.inputOffset;this._commandService.syncExecuteCommand(K.id,{start:t,end:r}),setTimeout(()=>{this._menuSelectedCallbacks.forEach(c=>c(e))},0)}},o.DocQuickInsertPopupService=ce([U(0,s.Inject(C.DocCanvasPopManagerService)),U(1,s.Inject(s.IUniverInstanceService)),U(2,s.Inject(s.ICommandService))],o.DocQuickInsertPopupService);const L={type:s.CommandType.OPERATION,id:"doc.operation.show-quick-insert-popup",handler(i,n){const e=i.get(o.DocQuickInsertPopupService);return n?(e.showPopup(n),!0):!1}},w={type:s.CommandType.OPERATION,id:"doc.operation.close-quick-insert-popup",handler(i){return i.get(o.DocQuickInsertPopupService).closePopup(),!0}},W={id:"quick-insert.text.menu",title:"docQuickInsert.menu.text",icon:"TextSingle",keywords:["text"]},z={id:C.OrderListCommand.id,title:"docQuickInsert.menu.numberedList",icon:"OrderSingle",keywords:["numbered","list","ordered"]},B={id:C.BulletListCommand.id,title:"docQuickInsert.menu.bulletedList",icon:"UnorderSingle",keywords:["bulleted","list","unordered"]},V={id:C.HorizontalLineCommand.id,title:"docQuickInsert.menu.divider",icon:"DividerSingle",keywords:["divider","line","separate"]},de=[{title:"docQuickInsert.group.basics",id:"quick.insert.group.basic",children:[W,z,B,V]}],ue=new Set([z.id,B.id,V.id]);var ae=Object.getOwnPropertyDescriptor,le=(i,n,e,t)=>{for(var r=t>1?void 0:t?ae(n,e):n,c=i.length-1,d;c>=0;c--)(d=i[c])&&(r=d(r)||r);return r},R=(i,n)=>(e,t)=>n(e,t,i);o.DocQuickInsertTriggerController=class extends s.Disposable{constructor(n,e,t,r){super(),this._commandService=n,this._textSelectionManagerService=e,this._docQuickInsertPopupService=t,this._shortcutService=r,this.disposeWithMe(this._shortcutService.registerShortcut({id:w.id,binding:l.KeyCode.ESC,preconditions:()=>!!this._docQuickInsertPopupService.editPopup,priority:1e3})),this._initTrigger(),this._initMenuHandler()}_initTrigger(){this.disposeWithMe(this._commandService.onCommandExecuted(n=>{var c,d,a;const{_docQuickInsertPopupService:e,_textSelectionManagerService:t,_commandService:r}=this;if(n.id===C.InsertCommand.id){const u=n.params;if(e.editPopup){e.setInputOffset({start:e.inputOffset.start,end:u.range.endOffset+1});return}const p=t.getActiveTextRange();if(!p)return;const y=e.resolvePopup(u.body.dataStream);if(!y||!(y.preconditions?y.preconditions(u):!0))return;e.setInputOffset({start:p.startOffset-1,end:p.startOffset}),setTimeout(()=>{r.executeCommand(L.id,{index:p.startOffset-1,unitId:u.unitId,popup:y})},100)}if(n.id===H.RichTextEditingMutation.id){const u=n.params;if(u.isCompositionEnd){const p=(d=(c=u.textRanges)==null?void 0:c[0])==null?void 0:d.endOffset;p&&e.setInputOffset({start:e.inputOffset.start,end:p})}}if(n.id===C.DeleteCommand.id){const u=n.params;if(e.editPopup&&u.direction===s.DeleteDirection.LEFT){const p=(a=u.len)!=null?a:0;e.setInputOffset({start:e.inputOffset.start,end:u.range.endOffset-p})}}if(n.id===C.MoveCursorOperation.id){const u=n.params;(u.direction===s.Direction.LEFT||u.direction===s.Direction.RIGHT)&&e.editPopup&&r.executeCommand(w.id)}if(n.id===C.DeleteLeftCommand.id){const u=t.getActiveTextRange();if(!e.editPopup||!u)return;u.endOffset<=e.editPopup.anchor&&r.executeCommand(w.id)}}))}_initMenuHandler(){this.disposeWithMe(this._docQuickInsertPopupService.onMenuSelected(n=>{n.id!==W.id&&ue.has(n.id)&&this._commandService.executeCommand(n.id)}))}},o.DocQuickInsertTriggerController=le([R(0,s.ICommandService),R(1,s.Inject(H.DocSelectionManagerService)),R(2,s.Inject(o.DocQuickInsertPopupService)),R(3,s.Inject(l.IShortcutService))],o.DocQuickInsertTriggerController);var g=function(){return g=Object.assign||function(i){for(var n,e=1,t=arguments.length;e<t;e++){n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n[r])}return i},g.apply(this,arguments)},pe=function(i,n){var e={};for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&n.indexOf(t)<0&&(e[t]=i[t]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(i);r<t.length;r++)n.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(i,t[r])&&(e[t[r]]=i[t[r]]);return e},T=v.forwardRef(function(i,n){var e=i.icon,t=i.id,r=i.className,c=i.extend,d=pe(i,["icon","id","className","extend"]),a="univerjs-icon univerjs-icon-".concat(t," ").concat(r||"").trim(),u=v.useRef("_".concat(he()));return F(e,"".concat(t),{defIds:e.defIds,idSuffix:u.current},g({ref:n,className:a},d),c)});function F(i,n,e,t,r){return v.createElement(i.tag,g(g({key:n},fe(i,e,r)),t),(ve(i,e).children||[]).map(function(c,d){return F(c,"".concat(n,"-").concat(i.tag,"-").concat(d),e,void 0,r)}))}function fe(i,n,e){var t=g({},i.attrs);e!=null&&e.colorChannel1&&t.fill==="colorChannel1"&&(t.fill=e.colorChannel1),i.tag==="mask"&&t.id&&(t.id=t.id+n.idSuffix),Object.entries(t).forEach(function(c){var d=c[0],a=c[1];d==="mask"&&typeof a=="string"&&(t[d]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(n.idSuffix,")")))});var r=n.defIds;return!r||r.length===0||(i.tag==="use"&&t["xlink:href"]&&(t["xlink:href"]=t["xlink:href"]+n.idSuffix),Object.entries(t).forEach(function(c){var d=c[0],a=c[1];typeof a=="string"&&(t[d]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(n.idSuffix,")")))})),t}function ve(i,n){var e,t=n.defIds;return!t||t.length===0?i:i.tag==="defs"&&(!((e=i.children)===null||e===void 0)&&e.length)?g(g({},i),{children:i.children.map(function(r){return typeof r.attrs.id=="string"&&t&&t.indexOf(r.attrs.id)>-1?g(g({},r),{attrs:g(g({},r.attrs),{id:r.attrs.id+n.idSuffix})}):r})}):i}function he(){return Math.random().toString(36).substring(2,8)}T.displayName="UniverIcon";var me={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M1.01953 3.13985C1.01953 2.77258 1.31726 2.47485 1.68453 2.47485H2.73713C3.1044 2.47485 3.40213 2.77258 3.40213 3.13985 3.40213 3.50712 3.1044 3.80485 2.73713 3.80485H1.68453C1.31726 3.80485 1.01953 3.50712 1.01953 3.13985zM4.17734 3.13985C4.17734 2.77258 4.47507 2.47485 4.84234 2.47485H6.94754C7.31481 2.47485 7.61254 2.77258 7.61254 3.13985 7.61254 3.50712 7.31481 3.80485 6.94754 3.80485H4.84234C4.47507 3.80485 4.17734 3.50712 4.17734 3.13985zM8.38775 3.13985C8.38775 2.77258 8.68548 2.47485 9.05275 2.47485H11.158C11.5252 2.47485 11.823 2.77258 11.823 3.13985 11.823 3.50712 11.5252 3.80485 11.158 3.80485H9.05275C8.68548 3.80485 8.38775 3.50712 8.38775 3.13985zM12.5982 3.13985C12.5982 2.77258 12.8959 2.47485 13.2632 2.47485H14.3158C14.683 2.47485 14.9808 2.77258 14.9808 3.13985 14.9808 3.50712 14.683 3.80485 14.3158 3.80485H13.2632C12.8959 3.80485 12.5982 3.50712 12.5982 3.13985zM1.01953 7.99972C1.01953 7.63245 1.31726 7.33472 1.68453 7.33472H14.3158C14.683 7.33472 14.9808 7.63245 14.9808 7.99972 14.9808 8.36699 14.683 8.66472 14.3158 8.66472H1.68453C1.31726 8.66472 1.01953 8.36699 1.01953 7.99972zM1.68453 12.1951C1.31726 12.1951 1.01953 12.4928 1.01953 12.8601 1.01953 13.2273 1.31726 13.5251 1.68453 13.5251H2.73713C3.1044 13.5251 3.40213 13.2273 3.40213 12.8601 3.40213 12.4928 3.1044 12.1951 2.73713 12.1951H1.68453zM4.84234 12.1951C4.47507 12.1951 4.17734 12.4928 4.17734 12.8601 4.17734 13.2273 4.47507 13.5251 4.84234 13.5251H6.94754C7.31481 13.5251 7.61254 13.2273 7.61254 12.8601 7.61254 12.4928 7.31481 12.1951 6.94754 12.1951H4.84234zM9.05275 12.1951C8.68548 12.1951 8.38775 12.4928 8.38775 12.8601 8.38775 13.2273 8.68548 13.5251 9.05275 13.5251H11.158C11.5252 13.5251 11.823 13.2273 11.823 12.8601 11.823 12.4928 11.5252 12.1951 11.158 12.1951H9.05275zM13.2632 12.1951C12.8959 12.1951 12.5982 12.4928 12.5982 12.8601 12.5982 13.2273 12.8959 13.5251 13.2632 13.5251H14.3158C14.683 13.5251 14.9808 13.2273 14.9808 12.8601 14.9808 12.4928 14.683 12.1951 14.3158 12.1951H13.2632z"}}]},G=v.forwardRef(function(i,n){return v.createElement(T,Object.assign({},i,{id:"divider-single",ref:n,icon:me}))});G.displayName="DividerSingle";var ge={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.66695 1.33496C2.29968 1.33496 2.00195 1.63269 2.00195 1.99996V3.64439C2.00195 4.01166 2.29968 4.30939 2.66695 4.30939C3.03422 4.30939 3.33195 4.01166 3.33195 3.64439V2.66496H7.33521V13.335H5.3337C4.96643 13.335 4.6687 13.6327 4.6687 14C4.6687 14.3672 4.96643 14.665 5.3337 14.665H10.667C11.0343 14.665 11.332 14.3672 11.332 14C11.332 13.6327 11.0343 13.335 10.667 13.335H8.66521V2.66496H12.6686V3.64439C12.6686 4.01166 12.9664 4.30939 13.3336 4.30939C13.7009 4.30939 13.9986 4.01166 13.9986 3.64439V1.99996C13.9986 1.63269 13.7009 1.33496 13.3336 1.33496H2.66695Z"}}]},Z=v.forwardRef(function(i,n){return v.createElement(T,Object.assign({},i,{id:"text-single",ref:n,icon:ge}))});Z.displayName="TextSingle";var Ie=Object.getOwnPropertyDescriptor,Ce=(i,n,e,t)=>{for(var r=t>1?void 0:t?Ie(n,e):n,c=i.length-1,d;c>=0;c--)(d=i[c])&&(r=d(r)||r);return r},N=(i,n)=>(e,t)=>n(e,t,i);o.DocQuickInsertUIController=class extends s.Disposable{constructor(n,e,t){super(),this._commandService=n,this._docQuickInsertPopupService=e,this._componentManager=t,this._initCommands(),this._initComponents(),this._initMenus()}_initCommands(){[K,L,w].forEach(n=>{this.disposeWithMe(this._commandService.registerCommand(n))})}_initComponents(){this.disposeWithMe(this._componentManager.register(j.componentKey,j)),this.disposeWithMe(this._componentManager.register(Q.componentKey,Q)),this.disposeWithMe(this._componentManager.register("DividerSingle",G)),this.disposeWithMe(this._componentManager.register("TextSingle",Z)),[{keyword:"/",menus$:S.of(de),preconditions:e=>{var t;return((t=e.range.startNodePosition)==null?void 0:t.glyph)===0}}].forEach(e=>{this.disposeWithMe(this._docQuickInsertPopupService.registerPopup(e))})}_initMenus(){}},o.DocQuickInsertUIController=Ce([N(0,s.ICommandService),N(1,s.Inject(o.DocQuickInsertPopupService)),N(2,s.Inject(l.ComponentManager))],o.DocQuickInsertUIController);var _e=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,ye=(i,n,e)=>n in i?_e(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e,Pe=(i,n,e,t)=>{for(var r=t>1?void 0:t?Se(n,e):n,c=i.length-1,d;c>=0;c--)(d=i[c])&&(r=d(r)||r);return r},Oe=(i,n)=>(e,t)=>n(e,t,i),J=(i,n,e)=>ye(i,typeof n!="symbol"?n+"":n,e);const De="DOC_QUICK_INSERT_UI_PLUGIN";o.UniverDocsQuickInsertUIPlugin=class extends s.Plugin{constructor(n){super(),this._injector=n}onStarting(){[[o.DocQuickInsertUIController],[o.DocQuickInsertTriggerController],[o.DocQuickInsertPopupService]].forEach(e=>this._injector.add(e)),this._injector.get(o.DocQuickInsertUIController)}onRendered(){this._injector.get(o.DocQuickInsertTriggerController),this._injector.get(o.DocQuickInsertPopupService)}},J(o.UniverDocsQuickInsertUIPlugin,"type",s.UniverInstanceType.UNIVER_DOC),J(o.UniverDocsQuickInsertUIPlugin,"pluginName",De),o.UniverDocsQuickInsertUIPlugin=Pe([s.DependentOn(ie.UniverDrawingUIPlugin,ne.UniverDrawingPlugin,k.UniverDocsDrawingPlugin,l.UniverUIPlugin),Oe(0,s.Inject(s.Injector))],o.UniverDocsQuickInsertUIPlugin),Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiEnUS=t())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"Numbered List",bulletedList:"Bulleted List",divider:"Divider",text:"Text"},group:{basics:"Basics"},placeholder:"No results found",keywordInputPlaceholder:"Enter keywords"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiFaIR=i())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"لیست شمارهدار",bulletedList:"لیست نقطهدار",divider:"خط تقسیم",text:"متن"},group:{basics:"بنیادی"},placeholder:"هیچ نتیجهای یافت نشد",keywordInputPlaceholder:"وارد کلمات کلیدی"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiFrFR=t())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"Liste numérotée",bulletedList:"Liste à puces",divider:"Ligne de séparation",text:"Texte"},group:{basics:"Basiques"},placeholder:"Aucun résultat",keywordInputPlaceholder:"Entrez des mots clés"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiRuRU=i())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"Список с нумерацией",bulletedList:"Маркированный список",divider:"Разделительная линия",text:"Текст"},group:{basics:"Основные"},placeholder:"Нет результатов",keywordInputPlaceholder:"Введите ключевые слова"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiViVN=n())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"Danh sách được đánh số",bulletedList:"Danh sách không được đánh số",divider:"Đường phân cách",text:"Văn bản"},group:{basics:"Cơ bản"},placeholder:"Không có kết quả",keywordInputPlaceholder:"Nhập từ khóa"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiZhCN=i())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"有序列表",bulletedList:"无序列表",divider:"分隔线",text:"文本"},group:{basics:"基础"},placeholder:"暂无结果",keywordInputPlaceholder:"输入关键词"}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverDocsQuickInsertUiZhTW=i())})(this,function(){"use strict";return{docQuickInsert:{menu:{numberedList:"有序列表",bulletedList:"無序列表",divider:"分隔線",text:"文本"},group:{basics:"基礎"},placeholder:"無結果",keywordInputPlaceholder:"輸入關鍵詞"}}});
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@univerjs/docs-quick-insert-ui",
|
|
3
|
+
"version": "0.6.6-experimental.20250317-28d180b",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "DreamNum <developer@univer.ai>",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/univer"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://univer.ai",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/dream-num/univer"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/dream-num/univer/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./lib/es/index.js",
|
|
24
|
+
"require": "./lib/cjs/index.js",
|
|
25
|
+
"types": "./lib/types/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./*": {
|
|
28
|
+
"import": "./lib/es/*",
|
|
29
|
+
"require": "./lib/cjs/*",
|
|
30
|
+
"types": "./lib/types/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./locale/*": {
|
|
33
|
+
"import": "./lib/es/locale/*.js",
|
|
34
|
+
"require": "./lib/cjs/locale/*.js",
|
|
35
|
+
"types": "./lib/types/locale/*.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./lib/*": "./lib/*"
|
|
38
|
+
},
|
|
39
|
+
"main": "./lib/es/index.js",
|
|
40
|
+
"types": "./lib/types/index.d.ts",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"directories": {
|
|
45
|
+
"lib": "lib"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"lib"
|
|
49
|
+
],
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"react": ">=16.9.0",
|
|
52
|
+
"rxjs": ">=7.0.0"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@univerjs/icons": "^0.2.22",
|
|
56
|
+
"@univerjs/design": "0.6.6-experimental.20250317-28d180b",
|
|
57
|
+
"@univerjs/core": "0.6.6-experimental.20250317-28d180b",
|
|
58
|
+
"@univerjs/docs": "0.6.6-experimental.20250317-28d180b",
|
|
59
|
+
"@univerjs/docs-drawing": "0.6.6-experimental.20250317-28d180b",
|
|
60
|
+
"@univerjs/drawing": "0.6.6-experimental.20250317-28d180b",
|
|
61
|
+
"@univerjs/drawing-ui": "0.6.6-experimental.20250317-28d180b",
|
|
62
|
+
"@univerjs/docs-ui": "0.6.6-experimental.20250317-28d180b",
|
|
63
|
+
"@univerjs/ui": "0.6.6-experimental.20250317-28d180b"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"less": "^4.2.2",
|
|
67
|
+
"postcss": "^8.5.3",
|
|
68
|
+
"react": "18.3.1",
|
|
69
|
+
"rxjs": "^7.8.1",
|
|
70
|
+
"tailwindcss": "^3.4.17",
|
|
71
|
+
"typescript": "^5.8.2",
|
|
72
|
+
"vite": "^6.2.1",
|
|
73
|
+
"vitest": "^3.0.8",
|
|
74
|
+
"@univerjs-infra/shared": "0.6.6"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"test": "vitest run",
|
|
78
|
+
"test:watch": "vitest",
|
|
79
|
+
"coverage": "vitest run --coverage",
|
|
80
|
+
"lint:types": "tsc --noEmit",
|
|
81
|
+
"build": "univer-cli build"
|
|
82
|
+
},
|
|
83
|
+
"module": "./lib/es/index.js"
|
|
84
|
+
}
|