@univerjs/docs-ui 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +42 -11
- package/lib/cjs/index.js +4487 -1456
- package/lib/cjs/locale/ar-SA.js +124 -0
- package/lib/cjs/locale/ca-ES.js +11 -10
- package/lib/cjs/locale/de-DE.js +124 -0
- package/lib/cjs/locale/en-US.js +11 -10
- package/lib/cjs/locale/es-ES.js +11 -10
- package/lib/cjs/locale/fa-IR.js +11 -10
- package/lib/cjs/locale/fr-FR.js +11 -10
- package/lib/cjs/locale/id-ID.js +124 -0
- package/lib/cjs/locale/it-IT.js +124 -0
- package/lib/cjs/locale/ja-JP.js +11 -10
- package/lib/cjs/locale/ko-KR.js +11 -10
- package/lib/cjs/locale/pl-PL.js +124 -0
- package/lib/cjs/locale/pt-BR.js +124 -0
- package/lib/cjs/locale/ru-RU.js +13 -12
- package/lib/cjs/locale/sk-SK.js +11 -10
- package/lib/cjs/locale/vi-VN.js +22 -21
- package/lib/cjs/locale/zh-CN.js +11 -10
- package/lib/cjs/locale/zh-HK.js +124 -0
- package/lib/cjs/locale/zh-TW.js +22 -21
- package/lib/es/facade.js +42 -11
- package/lib/es/index.js +4476 -1462
- package/lib/es/locale/ar-SA.js +123 -0
- package/lib/es/locale/ca-ES.js +11 -10
- package/lib/es/locale/de-DE.js +123 -0
- package/lib/es/locale/en-US.js +11 -10
- package/lib/es/locale/es-ES.js +11 -10
- package/lib/es/locale/fa-IR.js +11 -10
- package/lib/es/locale/fr-FR.js +11 -10
- package/lib/es/locale/id-ID.js +123 -0
- package/lib/es/locale/it-IT.js +123 -0
- package/lib/es/locale/ja-JP.js +11 -10
- package/lib/es/locale/ko-KR.js +11 -10
- package/lib/es/locale/pl-PL.js +123 -0
- package/lib/es/locale/pt-BR.js +123 -0
- package/lib/es/locale/ru-RU.js +13 -12
- package/lib/es/locale/sk-SK.js +11 -10
- package/lib/es/locale/vi-VN.js +22 -21
- package/lib/es/locale/zh-CN.js +11 -10
- package/lib/es/locale/zh-HK.js +123 -0
- package/lib/es/locale/zh-TW.js +22 -21
- package/lib/facade.js +42 -11
- package/lib/index.css +240 -26
- package/lib/index.js +4476 -1462
- package/lib/locale/ar-SA.js +123 -0
- package/lib/locale/ca-ES.js +11 -10
- package/lib/locale/de-DE.js +123 -0
- package/lib/locale/en-US.js +11 -10
- package/lib/locale/es-ES.js +11 -10
- package/lib/locale/fa-IR.js +11 -10
- package/lib/locale/fr-FR.js +11 -10
- package/lib/locale/id-ID.js +123 -0
- package/lib/locale/it-IT.js +123 -0
- package/lib/locale/ja-JP.js +11 -10
- package/lib/locale/ko-KR.js +11 -10
- package/lib/locale/pl-PL.js +123 -0
- package/lib/locale/pt-BR.js +123 -0
- package/lib/locale/ru-RU.js +13 -12
- package/lib/locale/sk-SK.js +11 -10
- package/lib/locale/vi-VN.js +22 -21
- package/lib/locale/zh-CN.js +11 -10
- package/lib/locale/zh-HK.js +123 -0
- package/lib/locale/zh-TW.js +22 -21
- package/lib/types/commands/commands/doc-block-move.command.d.ts +40 -0
- package/lib/types/commands/commands/doc-delete.command.d.ts +2 -1
- package/lib/types/commands/commands/doc-page-setup.command.d.ts +2 -0
- package/lib/types/commands/commands/list.command.d.ts +1 -0
- package/lib/types/components/paragraph-menu/index.d.ts +23 -1
- package/lib/types/controllers/render-controllers/doc-contextmenu.render-controller.d.ts +8 -2
- package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +8 -2
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +3 -3
- package/lib/types/facade/f-document.d.ts +18 -0
- package/lib/types/index.d.ts +6 -1
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +117 -110
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/menu/menu.d.ts +9 -1
- package/lib/types/menu/paragraph-menu.d.ts +21 -2
- package/lib/types/menu/schema.d.ts +1 -0
- package/lib/types/services/clipboard/clipboard.service.d.ts +5 -1
- package/lib/types/services/clipboard/html-to-udm/converter.d.ts +12 -0
- package/lib/types/services/clipboard/html-to-udm/paste-plugins/type.d.ts +1 -0
- package/lib/types/services/clipboard/internal-fragment.d.ts +30 -0
- package/lib/types/services/doc-content-insert.service.d.ts +28 -0
- package/lib/types/services/doc-event-manager.service.d.ts +19 -1
- package/lib/types/services/doc-paragraph-menu.service.d.ts +51 -3
- package/lib/types/services/doc-popup-manager.service.d.ts +2 -2
- package/lib/types/services/docs-render.service.d.ts +2 -1
- package/lib/types/services/editor/editor.d.ts +1 -0
- package/lib/types/services/selection/convert-text-range.d.ts +1 -0
- package/lib/types/services/selection/doc-selection-render.service.d.ts +4 -0
- package/lib/types/views/page-settings/index.d.ts +4 -2
- package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +2 -1
- package/lib/umd/facade.js +5 -1
- package/lib/umd/index.js +37 -10
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- 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 -0
- package/lib/umd/locale/it-IT.js +1 -0
- 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 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- 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 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +11 -11
|
@@ -14,125 +14,132 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
declare const locale: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
'docs-ui': {
|
|
18
|
+
toolbar: {
|
|
19
|
+
undo: string;
|
|
20
|
+
redo: string;
|
|
21
|
+
font: string;
|
|
22
|
+
fontSize: string;
|
|
23
|
+
bold: string;
|
|
24
|
+
italic: string;
|
|
25
|
+
strikethrough: string;
|
|
26
|
+
subscript: string;
|
|
27
|
+
superscript: string;
|
|
28
|
+
underline: string;
|
|
29
|
+
textColor: {
|
|
30
|
+
main: string;
|
|
31
|
+
};
|
|
32
|
+
fillColor: {
|
|
33
|
+
main: string;
|
|
34
|
+
};
|
|
35
|
+
table: {
|
|
36
|
+
main: string;
|
|
37
|
+
insert: string;
|
|
38
|
+
colCount: string;
|
|
39
|
+
rowCount: string;
|
|
40
|
+
};
|
|
41
|
+
resetColor: string;
|
|
42
|
+
order: string;
|
|
43
|
+
unorder: string;
|
|
44
|
+
checklist: string;
|
|
45
|
+
documentFlavor: string;
|
|
46
|
+
alignLeft: string;
|
|
47
|
+
alignCenter: string;
|
|
48
|
+
alignRight: string;
|
|
49
|
+
alignJustify: string;
|
|
50
|
+
horizontalLine: string;
|
|
51
|
+
headerFooter: string;
|
|
52
|
+
pageSetup: string;
|
|
35
53
|
};
|
|
36
54
|
table: {
|
|
37
|
-
main: string;
|
|
38
55
|
insert: string;
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
insertRowAbove: string;
|
|
57
|
+
insertRowBelow: string;
|
|
58
|
+
insertColumnLeft: string;
|
|
59
|
+
insertColumnRight: string;
|
|
60
|
+
delete: string;
|
|
61
|
+
deleteRows: string;
|
|
62
|
+
deleteColumns: string;
|
|
63
|
+
deleteTable: string;
|
|
41
64
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
closeHeaderFooter: string;
|
|
75
|
-
disableText: string;
|
|
76
|
-
};
|
|
77
|
-
doc: {
|
|
78
|
-
menu: {
|
|
79
|
-
paragraphSetting: string;
|
|
65
|
+
headerFooter: {
|
|
66
|
+
header: string;
|
|
67
|
+
footer: string;
|
|
68
|
+
panel: string;
|
|
69
|
+
firstPageCheckBox: string;
|
|
70
|
+
oddEvenCheckBox: string;
|
|
71
|
+
headerTopMargin: string;
|
|
72
|
+
footerBottomMargin: string;
|
|
73
|
+
closeHeaderFooter: string;
|
|
74
|
+
disableText: string;
|
|
75
|
+
};
|
|
76
|
+
doc: {
|
|
77
|
+
menu: {
|
|
78
|
+
paragraphSetting: string;
|
|
79
|
+
};
|
|
80
|
+
slider: {
|
|
81
|
+
paragraphSetting: string;
|
|
82
|
+
};
|
|
83
|
+
paragraphSetting: {
|
|
84
|
+
alignment: string;
|
|
85
|
+
indentation: string;
|
|
86
|
+
left: string;
|
|
87
|
+
right: string;
|
|
88
|
+
firstLine: string;
|
|
89
|
+
hanging: string;
|
|
90
|
+
spacing: string;
|
|
91
|
+
before: string;
|
|
92
|
+
after: string;
|
|
93
|
+
lineSpace: string;
|
|
94
|
+
multiSpace: string;
|
|
95
|
+
fixedValue: string;
|
|
96
|
+
};
|
|
80
97
|
};
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
rightClick: {
|
|
99
|
+
copy: string;
|
|
100
|
+
cut: string;
|
|
101
|
+
paste: string;
|
|
102
|
+
delete: string;
|
|
103
|
+
bulletList: string;
|
|
104
|
+
orderList: string;
|
|
105
|
+
checkList: string;
|
|
106
|
+
insertBellow: string;
|
|
83
107
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
'page-settings': {
|
|
109
|
+
'document-setting': string;
|
|
110
|
+
mode: string;
|
|
111
|
+
'modern-mode': string;
|
|
112
|
+
'classic-mode': string;
|
|
113
|
+
'modern-width': string;
|
|
114
|
+
'modern-width-narrow': string;
|
|
115
|
+
'modern-width-medium': string;
|
|
116
|
+
'modern-width-wide': string;
|
|
117
|
+
'paper-size': string;
|
|
118
|
+
'page-size': {
|
|
119
|
+
main: string;
|
|
120
|
+
a4: string;
|
|
121
|
+
a3: string;
|
|
122
|
+
a5: string;
|
|
123
|
+
b4: string;
|
|
124
|
+
b5: string;
|
|
125
|
+
letter: string;
|
|
126
|
+
legal: string;
|
|
127
|
+
tabloid: string;
|
|
128
|
+
statement: string;
|
|
129
|
+
executive: string;
|
|
130
|
+
folio: string;
|
|
131
|
+
};
|
|
132
|
+
orientation: string;
|
|
133
|
+
portrait: string;
|
|
134
|
+
landscape: string;
|
|
135
|
+
'custom-paper-size': string;
|
|
136
|
+
top: string;
|
|
137
|
+
bottom: string;
|
|
87
138
|
left: string;
|
|
88
139
|
right: string;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
spacing: string;
|
|
92
|
-
before: string;
|
|
93
|
-
after: string;
|
|
94
|
-
lineSpace: string;
|
|
95
|
-
multiSpace: string;
|
|
96
|
-
fixedValue: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
rightClick: {
|
|
100
|
-
copy: string;
|
|
101
|
-
cut: string;
|
|
102
|
-
paste: string;
|
|
103
|
-
delete: string;
|
|
104
|
-
bulletList: string;
|
|
105
|
-
orderList: string;
|
|
106
|
-
checkList: string;
|
|
107
|
-
insertBellow: string;
|
|
108
|
-
};
|
|
109
|
-
'page-settings': {
|
|
110
|
-
'document-setting': string;
|
|
111
|
-
'paper-size': string;
|
|
112
|
-
'page-size': {
|
|
113
|
-
main: string;
|
|
114
|
-
a4: string;
|
|
115
|
-
a3: string;
|
|
116
|
-
a5: string;
|
|
117
|
-
b4: string;
|
|
118
|
-
b5: string;
|
|
119
|
-
letter: string;
|
|
120
|
-
legal: string;
|
|
121
|
-
tabloid: string;
|
|
122
|
-
statement: string;
|
|
123
|
-
executive: string;
|
|
124
|
-
folio: string;
|
|
140
|
+
cancel: string;
|
|
141
|
+
confirm: string;
|
|
125
142
|
};
|
|
126
|
-
orientation: string;
|
|
127
|
-
portrait: string;
|
|
128
|
-
landscape: string;
|
|
129
|
-
'custom-paper-size': string;
|
|
130
|
-
top: string;
|
|
131
|
-
bottom: string;
|
|
132
|
-
left: string;
|
|
133
|
-
right: string;
|
|
134
|
-
cancel: string;
|
|
135
|
-
confirm: string;
|
|
136
143
|
};
|
|
137
144
|
};
|
|
138
145
|
export default locale;
|
|
@@ -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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
package/lib/types/menu/menu.d.ts
CHANGED
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IAccessor,
|
|
16
|
+
import type { DocumentDataModel, IAccessor, ITextRangeParam, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
18
|
+
import { HorizontalAlign, PresetListType } from '@univerjs/core';
|
|
18
19
|
import { Observable } from 'rxjs';
|
|
19
20
|
export declare function disableMenuWhenNoDocRange(accessor: IAccessor): Observable<boolean>;
|
|
21
|
+
export declare function isTextRangeInAnyBlockRange(document: Nullable<DocumentDataModel>, range: ITextRangeParam): boolean;
|
|
22
|
+
export declare function hideMenuWhenSelectionInBlockRange(accessor: IAccessor): Observable<boolean>;
|
|
20
23
|
export declare function BoldMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
21
24
|
export declare function ItalicMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
22
25
|
export declare function UnderlineMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
@@ -26,16 +29,21 @@ export declare function SuperscriptMenuItemFactory(accessor: IAccessor): IMenuBu
|
|
|
26
29
|
export declare function FontFamilySelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
27
30
|
export declare function FontSizeSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<number>;
|
|
28
31
|
export declare function HeadingSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<number>;
|
|
32
|
+
export declare const FLOAT_TEXT_STYLE_MENU_ID = "doc.menu.float-text-style";
|
|
33
|
+
export declare const FLOAT_TOOLBAR_MENU_POSITION = "doc.menu.float-toolbar";
|
|
34
|
+
export declare function FloatTextStyleMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string | number>;
|
|
29
35
|
export declare function TextColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string, string | undefined>;
|
|
30
36
|
export declare function HeaderFooterMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
31
37
|
export declare const TableIcon = "GridIcon";
|
|
32
38
|
export declare const TABLE_MENU_ID = "doc.menu.table";
|
|
33
39
|
export declare function TableMenuFactory(accessor: IAccessor): IMenuItem;
|
|
34
40
|
export declare function InsertTableMenuFactory(_accessor: IAccessor): IMenuButtonItem;
|
|
41
|
+
export declare function InsertDefaultTableMenuFactory(_accessor: IAccessor): IMenuButtonItem;
|
|
35
42
|
export declare function AlignLeftMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
36
43
|
export declare function AlignCenterMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
37
44
|
export declare function AlignRightMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
38
45
|
export declare function AlignJustifyMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
46
|
+
export declare function AlignMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<HorizontalAlign, HorizontalAlign>;
|
|
39
47
|
export declare function HorizontalLineFactory(accessor: IAccessor): IMenuButtonItem;
|
|
40
48
|
export declare function OrderListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<PresetListType, PresetListType | undefined>;
|
|
41
49
|
export declare function BulletListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<PresetListType, PresetListType | undefined>;
|
|
@@ -14,14 +14,16 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IAccessor } from '@univerjs/core';
|
|
17
|
-
import type { IMenuItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
17
|
+
import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
18
|
+
import type { ComponentType } from 'react';
|
|
18
19
|
import { NamedStyleType } from '@univerjs/core';
|
|
19
20
|
export declare const HEADING_ICON_MAP: Record<NamedStyleType, {
|
|
20
21
|
key: string;
|
|
21
|
-
component:
|
|
22
|
+
component: ComponentType<{
|
|
22
23
|
className: string;
|
|
23
24
|
}>;
|
|
24
25
|
}>;
|
|
26
|
+
export declare function shouldShowParagraphHeadingOption(headingType: NamedStyleType, currentType?: NamedStyleType): boolean;
|
|
25
27
|
export declare const H1HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
26
28
|
export declare const H2HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
27
29
|
export declare const H3HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
@@ -30,6 +32,17 @@ export declare const H5HeadingMenuItemFactory: (accessor: IAccessor) => IMenuIte
|
|
|
30
32
|
export declare const NormalTextHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
31
33
|
export declare const TitleHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
32
34
|
export declare const SubtitleHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
35
|
+
export declare const EMPTY_PARAGRAPH_MENU_ID = "doc.menu.empty-paragraph";
|
|
36
|
+
export declare const EmptyParagraphH1MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
37
|
+
export declare const EmptyParagraphH2MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
38
|
+
export declare const EmptyParagraphH3MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
39
|
+
export declare const EmptyParagraphH4MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
40
|
+
export declare const EmptyParagraphH5MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
41
|
+
export declare const EmptyParagraphNormalTextMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
42
|
+
export declare const EmptyParagraphOrderListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
43
|
+
export declare const EmptyParagraphBulletListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
44
|
+
export declare const EmptyParagraphCheckListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
45
|
+
export declare const EmptyParagraphHorizontalLineMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
|
|
33
46
|
export declare const CopyCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
34
47
|
export declare const CutCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
35
48
|
export declare const DeleteCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
@@ -38,4 +51,10 @@ export declare const InsertOrderListBellowMenuItemFactory: (accessor: IAccessor)
|
|
|
38
51
|
export declare const InsertCheckListBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
39
52
|
export declare const InsertHorizontalLineBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
40
53
|
export declare const INSERT_BELLOW_MENU_ID = "doc.menu.insert-bellow";
|
|
54
|
+
export declare const DOC_CONTENT_INSERT_MENU_ID = "doc.menu.content-insert";
|
|
55
|
+
export declare const DOC_TABLE_BLOCK_MENU_ID = "doc.menu.table-block";
|
|
56
|
+
export declare function getDocBlockRangeMenuId(blockType: string): string;
|
|
57
|
+
export declare const TableBlockCopyMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
58
|
+
export declare const TableBlockPasteMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
59
|
+
export declare const TableBlockDeleteMenuItemFactory: (accessor: IAccessor) => IMenuItem;
|
|
41
60
|
export declare function DocInsertBellowMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IDisposable, IDocumentBody } from '@univerjs/core';
|
|
17
|
-
import type { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
17
|
+
import type { IRectRangeWithStyle, ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
18
18
|
import { Disposable, ICommandService, ILogService, IUniverInstanceService, SliceBodyType } from '@univerjs/core';
|
|
19
19
|
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
20
20
|
import { ImageSourceType } from '@univerjs/drawing';
|
|
@@ -37,10 +37,12 @@ export interface IDocClipboardService {
|
|
|
37
37
|
legacyPaste(options: {
|
|
38
38
|
html?: string;
|
|
39
39
|
text?: string;
|
|
40
|
+
internalJson?: string;
|
|
40
41
|
files: File[];
|
|
41
42
|
}): Promise<boolean>;
|
|
42
43
|
addClipboardHook(hook: IDocClipboardHook): IDisposable;
|
|
43
44
|
}
|
|
45
|
+
export declare function getTableClipboardBodySlice(body: IDocumentBody, range: IRectRangeWithStyle): IDocumentBody;
|
|
44
46
|
export declare const IDocClipboardService: import("@wendellhu/redi").IdentifierDecorator<IDocClipboardService>;
|
|
45
47
|
export declare class DocClipboardService extends Disposable implements IDocClipboardService {
|
|
46
48
|
private readonly _univerInstanceService;
|
|
@@ -57,6 +59,7 @@ export declare class DocClipboardService extends Disposable implements IDocClipb
|
|
|
57
59
|
paste(items: ClipboardItem[]): Promise<boolean>;
|
|
58
60
|
legacyPaste(options: {
|
|
59
61
|
html?: string;
|
|
62
|
+
internalJson?: string;
|
|
60
63
|
text?: string;
|
|
61
64
|
files: File[];
|
|
62
65
|
}): Promise<boolean>;
|
|
@@ -67,5 +70,6 @@ export declare class DocClipboardService extends Disposable implements IDocClipb
|
|
|
67
70
|
private _getDocumentBodyInRanges;
|
|
68
71
|
private _genDocDataFromClipboardItems;
|
|
69
72
|
private _genDocDataFromHtmlAndText;
|
|
73
|
+
private _uploadBase64ImagesInHtml;
|
|
70
74
|
private _createImagePasteHtml;
|
|
71
75
|
}
|
|
@@ -26,10 +26,22 @@ export declare class HtmlToUDMService {
|
|
|
26
26
|
private _styleCache;
|
|
27
27
|
private _styleRules;
|
|
28
28
|
private _afterProcessRules;
|
|
29
|
+
private _listStack;
|
|
30
|
+
private _lastParagraphIndex;
|
|
29
31
|
convert(html: string, metaConfig?: {
|
|
30
32
|
unitId?: string;
|
|
31
33
|
}): Partial<IDocumentData>;
|
|
32
34
|
private _process;
|
|
35
|
+
private _processCodeBlock;
|
|
36
|
+
private _processBeforeStructuredBlock;
|
|
37
|
+
private _processAfterStructuredBlock;
|
|
38
|
+
private _processBeforeList;
|
|
39
|
+
private _processAfterList;
|
|
40
|
+
private _processAfterDefaultBlock;
|
|
41
|
+
private _appendParagraph;
|
|
42
|
+
private _applyListInfo;
|
|
43
|
+
private _processHtmlTable;
|
|
44
|
+
private _appendHtmlTableCell;
|
|
33
45
|
private _processBeforeTable;
|
|
34
46
|
private _processAfterTable;
|
|
35
47
|
private _processBeforeLink;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentData } from '@univerjs/core';
|
|
17
|
+
export declare const DOC_INTERNAL_FRAGMENT_MIME = "application/x-doc-fragment+json";
|
|
18
|
+
export declare const DOC_INTERNAL_FRAGMENT_COMMENT_PREFIX = "univer-doc-fragment:";
|
|
19
|
+
export interface IDocInternalClipboardFragment {
|
|
20
|
+
version: 1;
|
|
21
|
+
kind: 'univer-doc-fragment';
|
|
22
|
+
doc: Partial<IDocumentData>;
|
|
23
|
+
}
|
|
24
|
+
export declare function createInternalClipboardFragment(doc: Partial<IDocumentData>): string;
|
|
25
|
+
export declare function parseInternalClipboardFragment(value?: string): Partial<IDocumentData> | null;
|
|
26
|
+
export declare function createInternalClipboardDocData(doc: IDocumentData): Partial<IDocumentData>;
|
|
27
|
+
export declare function createInternalClipboardDocDataList(docs: IDocumentData[]): Partial<IDocumentData> | null;
|
|
28
|
+
export declare function embedInternalClipboardFragment(html: string, fragmentJson: string): string;
|
|
29
|
+
export declare function extractInternalClipboardFragmentFromHtml(html?: string): Partial<IDocumentData> | null;
|
|
30
|
+
export declare function wrapClipboardHtml(fragmentHtml: string): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { Disposable } from '@univerjs/core';
|
|
17
|
+
export interface IDocContentInsertRange {
|
|
18
|
+
unitId: string;
|
|
19
|
+
startOffset: number;
|
|
20
|
+
endOffset: number;
|
|
21
|
+
segmentId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class DocContentInsertService extends Disposable {
|
|
24
|
+
private _range;
|
|
25
|
+
setInsertRange(range: IDocContentInsertRange): void;
|
|
26
|
+
consumeInsertRange(unitId?: string): IDocContentInsertRange | null;
|
|
27
|
+
clearInsertRange(): void;
|
|
28
|
+
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { DocumentDataModel, ICustomRange, IParagraph, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { Documents, DocumentSkeleton, IBoundRectNoAngle, IDocumentSkeletonGlyph, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
17
|
+
import type { Documents, DocumentSkeleton, IBoundRectNoAngle, IDocsTableRenderViewport, IDocumentSkeletonGlyph, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
18
|
import { Disposable } from '@univerjs/core';
|
|
19
19
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
20
|
export interface ICustomRangeBound {
|
|
@@ -76,6 +76,12 @@ export interface ITableCellBound {
|
|
|
76
76
|
colIndex: number;
|
|
77
77
|
tableId: string;
|
|
78
78
|
}
|
|
79
|
+
export declare function getTableBlockMenuHoverRect(tableRect: IBoundRectNoAngle): IBoundRectNoAngle;
|
|
80
|
+
export declare function getTableHorizontalViewportGeometry(tableLeft: number, tableWidth: number, viewport: Nullable<IDocsTableRenderViewport>): {
|
|
81
|
+
scrollLeft: number;
|
|
82
|
+
visibleLeft: number;
|
|
83
|
+
visibleRight: number;
|
|
84
|
+
};
|
|
79
85
|
export declare class DocEventManagerService extends Disposable implements IRenderModule {
|
|
80
86
|
private _context;
|
|
81
87
|
private readonly _docSkeletonManagerService;
|
|
@@ -87,6 +93,11 @@ export declare class DocEventManagerService extends Disposable implements IRende
|
|
|
87
93
|
readonly hoverBullet$: import("rxjs").Observable<Nullable<IBulletActive>>;
|
|
88
94
|
private readonly _clickBullet$;
|
|
89
95
|
readonly clickBullets$: import("rxjs").Observable<IBulletActive>;
|
|
96
|
+
private readonly _contextMenuBullet$;
|
|
97
|
+
readonly contextMenuBullets$: import("rxjs").Observable<IBulletActive & {
|
|
98
|
+
x: number;
|
|
99
|
+
y: number;
|
|
100
|
+
}>;
|
|
90
101
|
private readonly _hoverParagraph$;
|
|
91
102
|
readonly hoverParagraph$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
92
103
|
readonly hoverParagraphRealTime$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
@@ -122,6 +133,7 @@ export declare class DocEventManagerService extends Disposable implements IRende
|
|
|
122
133
|
private _paragraphLeftBounds;
|
|
123
134
|
private _tableParagraphBounds;
|
|
124
135
|
private _segmentParagraphBounds;
|
|
136
|
+
private _tableViewportSignature;
|
|
125
137
|
private _tableCellBounds;
|
|
126
138
|
private _tableBounds;
|
|
127
139
|
private get _skeleton();
|
|
@@ -131,6 +143,8 @@ export declare class DocEventManagerService extends Disposable implements IRende
|
|
|
131
143
|
private _initPointer;
|
|
132
144
|
private _initResetDirty;
|
|
133
145
|
private _initEvents;
|
|
146
|
+
isPointerOnBullet(offsetX: number, offsetY: number): boolean;
|
|
147
|
+
getBulletBounds(): IBulletBound[];
|
|
134
148
|
private _buildCustomRangeBoundsBySegment;
|
|
135
149
|
private _buildCustomRangeBounds;
|
|
136
150
|
private _calcActiveRanges;
|
|
@@ -142,6 +156,10 @@ export declare class DocEventManagerService extends Disposable implements IRende
|
|
|
142
156
|
private _calcActiveParagraph;
|
|
143
157
|
private _calcActiveParagraphLeft;
|
|
144
158
|
get paragraphBounds(): Map<number, IMutiPageParagraphBound>;
|
|
159
|
+
get tableBounds(): Map<string, ITableBound>;
|
|
145
160
|
findParagraphBoundByIndex(index: number): IMutiPageParagraphBound | ITableParagraphBound | undefined;
|
|
161
|
+
findParagraphBoundsInRange(startIndex: number, endIndex: number): IMutiPageParagraphBound[];
|
|
162
|
+
private _getTableViewportSignature;
|
|
146
163
|
}
|
|
164
|
+
export declare function getPreferredParagraphBoundsInRange(bodyBounds: IMutiPageParagraphBound[], tableBounds: IMutiPageParagraphBound[], startIndex: number, endIndex: number): IMutiPageParagraphBound[];
|
|
147
165
|
export {};
|