@univerjs/docs-ui 0.6.10 → 0.7.0-nightly.202504291607
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 +33 -22
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +4410 -4046
- package/lib/es/locale/en-US.js +30 -1
- package/lib/es/locale/fa-IR.js +30 -1
- package/lib/es/locale/fr-FR.js +30 -1
- package/lib/es/locale/ru-RU.js +33 -4
- package/lib/es/locale/vi-VN.js +32 -3
- package/lib/es/locale/zh-CN.js +30 -1
- package/lib/es/locale/zh-TW.js +30 -1
- package/lib/index.css +1 -1
- package/lib/index.js +4410 -4046
- package/lib/locale/en-US.js +30 -1
- package/lib/locale/fa-IR.js +30 -1
- package/lib/locale/fr-FR.js +30 -1
- package/lib/locale/ru-RU.js +33 -4
- package/lib/locale/vi-VN.js +32 -3
- package/lib/locale/zh-CN.js +30 -1
- package/lib/locale/zh-TW.js +30 -1
- package/lib/types/commands/commands/doc-page-setup.command.d.ts +10 -0
- package/lib/types/commands/operations/open-page-setting.operation.d.ts +2 -0
- package/lib/types/components/side-menu/SideMenu.stories.d.ts +16 -0
- package/lib/types/components/side-menu/index.d.ts +41 -0
- package/lib/types/controllers/menu/menu.d.ts +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +29 -0
- package/lib/types/services/doc-print-interceptor-service.d.ts +29 -0
- package/lib/types/views/doc-footer/DocFooter.d.ts +1 -1
- package/lib/types/views/page-settings/index.d.ts +18 -0
- package/lib/umd/index.js +33 -22
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +12 -12
- package/LICENSE +0 -176
package/lib/locale/en-US.js
CHANGED
|
@@ -34,7 +34,8 @@ const e = {
|
|
|
34
34
|
alignRight: "Align Right",
|
|
35
35
|
alignJustify: "Justify",
|
|
36
36
|
horizontalLine: "Horizontal line",
|
|
37
|
-
headerFooter: "Header & Footer"
|
|
37
|
+
headerFooter: "Header & Footer",
|
|
38
|
+
pageSetup: "Page Setup"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "Insert",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "Ordered list",
|
|
86
87
|
checkList: "Task list",
|
|
87
88
|
insertBellow: "Insert below"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "Document Setting",
|
|
92
|
+
"paper-size": "Paper size",
|
|
93
|
+
"page-size": {
|
|
94
|
+
main: "Paper size",
|
|
95
|
+
a4: "A4",
|
|
96
|
+
a3: "A3",
|
|
97
|
+
a5: "A5",
|
|
98
|
+
b4: "B4",
|
|
99
|
+
b5: "B5",
|
|
100
|
+
letter: "Letter",
|
|
101
|
+
legal: "Legal",
|
|
102
|
+
tabloid: "Tabloid",
|
|
103
|
+
statement: "Statement",
|
|
104
|
+
executive: "Executive",
|
|
105
|
+
folio: "Folio"
|
|
106
|
+
},
|
|
107
|
+
orientation: "Orientation",
|
|
108
|
+
portrait: "Portrait",
|
|
109
|
+
landscape: "Landscape",
|
|
110
|
+
"custom-paper-size": "Custom Paper size",
|
|
111
|
+
top: "Top",
|
|
112
|
+
bottom: "Bottom",
|
|
113
|
+
left: "Left",
|
|
114
|
+
right: "Right",
|
|
115
|
+
cancel: "Cancel",
|
|
116
|
+
confirm: "Confirm"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -34,7 +34,8 @@ const e = {
|
|
|
34
34
|
alignRight: "تراز راست",
|
|
35
35
|
alignJustify: "توجیه",
|
|
36
36
|
horizontalLine: "Horizontal line",
|
|
37
|
-
headerFooter: "هدر و فوتر"
|
|
37
|
+
headerFooter: "هدر و فوتر",
|
|
38
|
+
pageSetup: "تنظیمات صفحه"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "درج",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "لیست شمارهدار",
|
|
86
87
|
checkList: "لیست وظیفه",
|
|
87
88
|
insertBellow: "درج در پایین"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "تنظیمات سند",
|
|
92
|
+
"page-size": {
|
|
93
|
+
main: "اندازه کاغذ",
|
|
94
|
+
a4: "A4",
|
|
95
|
+
a3: "A3",
|
|
96
|
+
a5: "A5",
|
|
97
|
+
b4: "B4",
|
|
98
|
+
b5: "B5",
|
|
99
|
+
letter: "نامه آمریکایی",
|
|
100
|
+
legal: "نامه حقوقی",
|
|
101
|
+
tabloid: "روزنامه",
|
|
102
|
+
statement: "کاغذ اظهارنامه",
|
|
103
|
+
executive: "کاغذ اجرایی",
|
|
104
|
+
folio: "کاغذ فولیو"
|
|
105
|
+
},
|
|
106
|
+
"paper-size": "اندازه کاغذ",
|
|
107
|
+
orientation: "جهت",
|
|
108
|
+
portrait: "عمودی",
|
|
109
|
+
landscape: "افقی",
|
|
110
|
+
"custom-paper-size": "اندازه کاغذ سفارشی",
|
|
111
|
+
top: "بالا",
|
|
112
|
+
bottom: "پایین",
|
|
113
|
+
left: "چپ",
|
|
114
|
+
right: "راست",
|
|
115
|
+
cancel: "لغو",
|
|
116
|
+
confirm: "تایید"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -34,7 +34,8 @@ const e = {
|
|
|
34
34
|
alignRight: "Aligner à droite",
|
|
35
35
|
alignJustify: "Justifier",
|
|
36
36
|
horizontalLine: "Horizontal line",
|
|
37
|
-
headerFooter: "En-tête et pied de page"
|
|
37
|
+
headerFooter: "En-tête et pied de page",
|
|
38
|
+
pageSetup: "Paramètres de page"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "Insérer",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "Liste ordonnée",
|
|
86
87
|
checkList: "Liste de tâches",
|
|
87
88
|
insertBellow: "Insérer dans le bas"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "Paramètres du document",
|
|
92
|
+
"paper-size": "Format du papier",
|
|
93
|
+
"page-size": {
|
|
94
|
+
main: "Format du papier",
|
|
95
|
+
a4: "A4",
|
|
96
|
+
a3: "A3",
|
|
97
|
+
a5: "A5",
|
|
98
|
+
b4: "B4",
|
|
99
|
+
b5: "B5",
|
|
100
|
+
letter: "Format Lettre US",
|
|
101
|
+
legal: "Format Légal US",
|
|
102
|
+
tabloid: "Format Tabloïd",
|
|
103
|
+
statement: "Format Déclaration",
|
|
104
|
+
executive: "Format Exécutif",
|
|
105
|
+
folio: "Format Folio"
|
|
106
|
+
},
|
|
107
|
+
orientation: "Orientation",
|
|
108
|
+
portrait: "Portrait",
|
|
109
|
+
landscape: "Paysage",
|
|
110
|
+
"custom-paper-size": "Format de papier personnalisé",
|
|
111
|
+
top: "Haut",
|
|
112
|
+
bottom: "Bas",
|
|
113
|
+
left: "Gauche",
|
|
114
|
+
right: "Droite",
|
|
115
|
+
cancel: "Annuler",
|
|
116
|
+
confirm: "Confirmer"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -31,10 +31,11 @@ const e = {
|
|
|
31
31
|
alignCenter: "Выровнять по центру",
|
|
32
32
|
alignRight: "Выровнять по правому краю",
|
|
33
33
|
alignJustify: "Выровнять по ширине",
|
|
34
|
-
horizontalLine: "
|
|
35
|
-
headerFooter: "
|
|
36
|
-
checklist: "
|
|
37
|
-
documentFlavor: "
|
|
34
|
+
horizontalLine: "Горизонтальная линия",
|
|
35
|
+
headerFooter: "Шапка и подвал",
|
|
36
|
+
checklist: "Список задач",
|
|
37
|
+
documentFlavor: "Современный режим",
|
|
38
|
+
pageSetup: "Настройки страницы"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "Insert",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "Упорядоченный список",
|
|
86
87
|
checkList: "Список задач",
|
|
87
88
|
insertBellow: "Вставить ниже"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "Настройки документа",
|
|
92
|
+
"page-size": {
|
|
93
|
+
main: "Размер бумаги",
|
|
94
|
+
a4: "A4",
|
|
95
|
+
a3: "A3",
|
|
96
|
+
a5: "A5",
|
|
97
|
+
b4: "B4",
|
|
98
|
+
b5: "B5",
|
|
99
|
+
letter: "Американский формат",
|
|
100
|
+
legal: "Юридический формат",
|
|
101
|
+
tabloid: "Таблоидный формат",
|
|
102
|
+
statement: "Формат заявления",
|
|
103
|
+
executive: "Исполнительный формат",
|
|
104
|
+
folio: "Формат фолио"
|
|
105
|
+
},
|
|
106
|
+
"paper-size": "Размер бумаги",
|
|
107
|
+
orientation: "Ориентация",
|
|
108
|
+
portrait: "Книжная",
|
|
109
|
+
landscape: "Альбомная",
|
|
110
|
+
"custom-paper-size": "Пользовательский размер бумаги",
|
|
111
|
+
top: "Верх",
|
|
112
|
+
bottom: "Низ",
|
|
113
|
+
left: "Слева",
|
|
114
|
+
right: "Справа",
|
|
115
|
+
cancel: "Отмена",
|
|
116
|
+
confirm: "Подтвердить"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
toolbar: {
|
|
3
3
|
undo: "Hoàn tác",
|
|
4
4
|
redo: "Làm lại",
|
|
@@ -34,7 +34,8 @@ const n = {
|
|
|
34
34
|
horizontalLine: "Horizontal line",
|
|
35
35
|
headerFooter: "Đầu trang và chân trang",
|
|
36
36
|
checklist: "Task list",
|
|
37
|
-
documentFlavor: "Modern Mode"
|
|
37
|
+
documentFlavor: "Modern Mode",
|
|
38
|
+
pageSetup: "Cài đặt trang"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "Insert",
|
|
@@ -85,8 +86,36 @@ const n = {
|
|
|
85
86
|
orderList: "Danh sách có thứ tự",
|
|
86
87
|
checkList: "Danh sách công việc",
|
|
87
88
|
insertBellow: "Chèn dưới"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "Cài đặt tài liệu",
|
|
92
|
+
"paper-size": "Kích thước giấy",
|
|
93
|
+
"page-size": {
|
|
94
|
+
main: "Kích thước giấy",
|
|
95
|
+
a4: "A4",
|
|
96
|
+
a3: "A3",
|
|
97
|
+
a5: "A5",
|
|
98
|
+
b4: "B4",
|
|
99
|
+
b5: "B5",
|
|
100
|
+
letter: "Giấy thư Mỹ",
|
|
101
|
+
legal: "Giấy pháp lý Mỹ",
|
|
102
|
+
tabloid: "Khổ báo",
|
|
103
|
+
statement: "Giấy tuyên bố",
|
|
104
|
+
executive: "Giấy hành chính",
|
|
105
|
+
folio: "Giấy folio"
|
|
106
|
+
},
|
|
107
|
+
orientation: "Hướng",
|
|
108
|
+
portrait: "Dọc",
|
|
109
|
+
landscape: "Ngang",
|
|
110
|
+
"custom-paper-size": "Kích thước giấy tùy chỉnh",
|
|
111
|
+
top: "Trên",
|
|
112
|
+
bottom: "Dưới",
|
|
113
|
+
left: "Trái",
|
|
114
|
+
right: "Phải",
|
|
115
|
+
cancel: "Hủy",
|
|
116
|
+
confirm: "Xác nhận"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
|
91
|
-
|
|
120
|
+
t as default
|
|
92
121
|
};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -34,7 +34,8 @@ const e = {
|
|
|
34
34
|
alignRight: "右对齐",
|
|
35
35
|
alignJustify: "两端对齐",
|
|
36
36
|
horizontalLine: "水平分割线",
|
|
37
|
-
headerFooter: "页眉页脚"
|
|
37
|
+
headerFooter: "页眉页脚",
|
|
38
|
+
pageSetup: "页面设置"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "插入",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "有序列表",
|
|
86
87
|
checkList: "任务列表",
|
|
87
88
|
insertBellow: "在下方插入"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "文档设置",
|
|
92
|
+
"page-size": {
|
|
93
|
+
main: "纸张大小",
|
|
94
|
+
a4: "A4",
|
|
95
|
+
a3: "A3",
|
|
96
|
+
a5: "A5",
|
|
97
|
+
b4: "B4",
|
|
98
|
+
b5: "B5",
|
|
99
|
+
letter: "美式信纸",
|
|
100
|
+
legal: "美式法律用纸",
|
|
101
|
+
tabloid: "小报尺寸",
|
|
102
|
+
statement: "声明用纸",
|
|
103
|
+
executive: "行政用纸",
|
|
104
|
+
folio: "对开纸"
|
|
105
|
+
},
|
|
106
|
+
"paper-size": "纸张大小",
|
|
107
|
+
orientation: "方向",
|
|
108
|
+
portrait: "纵向",
|
|
109
|
+
landscape: "横向",
|
|
110
|
+
"custom-paper-size": "自定义纸张大小",
|
|
111
|
+
top: "上",
|
|
112
|
+
bottom: "下",
|
|
113
|
+
left: "左",
|
|
114
|
+
right: "右",
|
|
115
|
+
cancel: "取消",
|
|
116
|
+
confirm: "确认"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -34,7 +34,8 @@ const e = {
|
|
|
34
34
|
horizontalLine: "Horizontal line",
|
|
35
35
|
headerFooter: "頁眉頁腳",
|
|
36
36
|
checklist: "任務列表",
|
|
37
|
-
documentFlavor: "现代模式"
|
|
37
|
+
documentFlavor: "现代模式",
|
|
38
|
+
pageSetup: "頁面設置"
|
|
38
39
|
},
|
|
39
40
|
table: {
|
|
40
41
|
insert: "Insert",
|
|
@@ -85,6 +86,34 @@ const e = {
|
|
|
85
86
|
orderList: "有序列表",
|
|
86
87
|
checkList: "任務列表",
|
|
87
88
|
insertBellow: "在下方插入"
|
|
89
|
+
},
|
|
90
|
+
"page-settings": {
|
|
91
|
+
"document-setting": "文檔設置",
|
|
92
|
+
"page-size": {
|
|
93
|
+
main: "紙張大小",
|
|
94
|
+
a4: "A4",
|
|
95
|
+
a3: "A3",
|
|
96
|
+
a5: "A5",
|
|
97
|
+
b4: "B4",
|
|
98
|
+
b5: "B5",
|
|
99
|
+
letter: "美式信紙",
|
|
100
|
+
legal: "美式法律用紙",
|
|
101
|
+
tabloid: "小報尺寸",
|
|
102
|
+
statement: "聲明用紙",
|
|
103
|
+
executive: "行政用紙",
|
|
104
|
+
folio: "對開紙"
|
|
105
|
+
},
|
|
106
|
+
"paper-size": "紙張大小",
|
|
107
|
+
orientation: "方向",
|
|
108
|
+
portrait: "縱向",
|
|
109
|
+
landscape: "橫向",
|
|
110
|
+
"custom-paper-size": "自定義紙張大小",
|
|
111
|
+
top: "上",
|
|
112
|
+
bottom: "下",
|
|
113
|
+
left: "左",
|
|
114
|
+
right: "右",
|
|
115
|
+
cancel: "取消",
|
|
116
|
+
confirm: "確認"
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
export {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICommand, ISize, PageOrientType } from '@univerjs/core';
|
|
2
|
+
export interface IDocPageSetupCommandParams {
|
|
3
|
+
pageSize: ISize;
|
|
4
|
+
pageOrient: PageOrientType;
|
|
5
|
+
marginTop: number;
|
|
6
|
+
marginBottom: number;
|
|
7
|
+
marginLeft: number;
|
|
8
|
+
marginRight: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const DocPageSetupCommand: ICommand<IDocPageSetupCommandParams>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { SideMenu } from './index';
|
|
3
|
+
declare const meta: Meta<typeof SideMenu>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const SideMenuBasic: {
|
|
6
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export declare const EmptySideMenu: {
|
|
9
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const CustomStyledSideMenu: {
|
|
12
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export declare const MultiLevelSideMenu: {
|
|
15
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface ISideMenuItem {
|
|
17
|
+
text: string;
|
|
18
|
+
level: number;
|
|
19
|
+
id: string;
|
|
20
|
+
isTitle?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ISideMenuProps {
|
|
23
|
+
menus?: ISideMenuItem[];
|
|
24
|
+
onClick?: (menu: ISideMenuItem) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
mode?: 'float' | 'side-bar';
|
|
28
|
+
maxHeight: number;
|
|
29
|
+
activeId?: string;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
onOpenChange?: (open: boolean) => void;
|
|
32
|
+
maxWidth?: number;
|
|
33
|
+
wrapperClass?: string;
|
|
34
|
+
wrapperStyle?: React.CSSProperties;
|
|
35
|
+
iconClass?: string;
|
|
36
|
+
iconStyle?: React.CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
export interface ISideMenuInstance {
|
|
39
|
+
scrollTo: (id: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const SideMenu: import('react').ForwardRefExoticComponent<ISideMenuProps & import('react').RefAttributes<ISideMenuInstance>>;
|
|
@@ -29,3 +29,4 @@ export declare function DocSwitchModeMenuItemFactory(accessor: IAccessor): IMenu
|
|
|
29
29
|
export declare function ResetBackgroundColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
30
30
|
export declare function BackgroundColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
31
31
|
export declare function getParagraphStyleAtCursor(accessor: IAccessor): import('@univerjs/core').IParagraph | null | undefined;
|
|
32
|
+
export declare function PageSettingMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { DocsRenderService } from './services/docs-render.service';
|
|
|
41
41
|
export { Editor } from './services/editor/editor';
|
|
42
42
|
export { EditorService, IEditorService } from './services/editor/editor-manager.service';
|
|
43
43
|
export { isInSameTableCell, isValidRectRange, NodePositionConvertToRectRange } from './services/selection/convert-rect-range';
|
|
44
|
+
export { DocPrintInterceptorService, type IDocPrintComponentContext, type IDocPrintContext } from './services/doc-print-interceptor-service';
|
|
44
45
|
export { NodePositionConvertToCursor } from './services/selection/convert-text-range';
|
|
45
46
|
export { getOneTextSelectionRange } from './services/selection/convert-text-range';
|
|
46
47
|
export type { IEditorInputConfig } from './services/selection/doc-selection-render.service';
|
|
@@ -51,6 +52,7 @@ export { getCanvasOffsetByEngine } from './services/selection/selection-utils';
|
|
|
51
52
|
export { getAnchorBounding, getLineBounding, TEXT_RANGE_LAYER_INDEX, TextRange } from './services/selection/text-range';
|
|
52
53
|
export { whenDocAndEditorFocused } from './shortcuts/utils';
|
|
53
54
|
export { DOC_VERTICAL_PADDING } from './types/const/padding';
|
|
55
|
+
export { SwitchDocModeCommand } from './commands/commands/switch-doc-mode.command';
|
|
54
56
|
export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';
|
|
55
57
|
export { AfterSpaceCommand, EnterCommand, type ITabCommandParams, TabCommand } from './commands/commands/auto-format.command';
|
|
56
58
|
export { BreakLineCommand } from './commands/commands/break-line.command';
|
|
@@ -85,3 +87,4 @@ export { MoveCursorOperation } from './commands/operations/doc-cursor.operation'
|
|
|
85
87
|
export { DocSelectAllCommand } from './commands/commands/doc-select-all.command';
|
|
86
88
|
export { type ISetDocZoomRatioOperationParams, SetDocZoomRatioOperation } from './commands/operations/set-doc-zoom-ratio.operation';
|
|
87
89
|
export { SetParagraphNamedStyleCommand } from './commands/commands/set-heading.command';
|
|
90
|
+
export { convertBodyToHtml } from './services/clipboard/udm-to-html/convertor';
|
|
@@ -50,6 +50,7 @@ declare const locale: {
|
|
|
50
50
|
alignJustify: string;
|
|
51
51
|
horizontalLine: string;
|
|
52
52
|
headerFooter: string;
|
|
53
|
+
pageSetup: string;
|
|
53
54
|
};
|
|
54
55
|
table: {
|
|
55
56
|
insert: string;
|
|
@@ -101,5 +102,33 @@ declare const locale: {
|
|
|
101
102
|
checkList: string;
|
|
102
103
|
insertBellow: string;
|
|
103
104
|
};
|
|
105
|
+
'page-settings': {
|
|
106
|
+
'document-setting': string;
|
|
107
|
+
'page-size': {
|
|
108
|
+
main: string;
|
|
109
|
+
a4: string;
|
|
110
|
+
a3: string;
|
|
111
|
+
a5: string;
|
|
112
|
+
b4: string;
|
|
113
|
+
b5: string;
|
|
114
|
+
letter: string;
|
|
115
|
+
legal: string;
|
|
116
|
+
tabloid: string;
|
|
117
|
+
statement: string;
|
|
118
|
+
executive: string;
|
|
119
|
+
folio: string;
|
|
120
|
+
};
|
|
121
|
+
'paper-size': string;
|
|
122
|
+
orientation: string;
|
|
123
|
+
portrait: string;
|
|
124
|
+
landscape: string;
|
|
125
|
+
'custom-paper-size': string;
|
|
126
|
+
top: string;
|
|
127
|
+
bottom: string;
|
|
128
|
+
left: string;
|
|
129
|
+
right: string;
|
|
130
|
+
cancel: string;
|
|
131
|
+
confirm: string;
|
|
132
|
+
};
|
|
104
133
|
};
|
|
105
134
|
export default locale;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DisposableCollection, Disposable, InterceptorManager } from '@univerjs/core';
|
|
2
|
+
import { Documents, DocumentSkeleton, Engine, IBoundRectNoAngle, Scene } from '@univerjs/engine-render';
|
|
3
|
+
export interface IDocPrintContext {
|
|
4
|
+
unitId: string;
|
|
5
|
+
scene: Scene;
|
|
6
|
+
engine: Engine;
|
|
7
|
+
root: HTMLElement;
|
|
8
|
+
skeleton: DocumentSkeleton;
|
|
9
|
+
}
|
|
10
|
+
export interface IDocPrintDomtContext extends IDocPrintContext {
|
|
11
|
+
offset: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
bound: IBoundRectNoAngle;
|
|
16
|
+
}
|
|
17
|
+
export interface IDocPrintComponentContext extends IDocPrintContext {
|
|
18
|
+
documents: Documents;
|
|
19
|
+
}
|
|
20
|
+
export declare class DocPrintInterceptorService extends Disposable {
|
|
21
|
+
private _printComponentMap;
|
|
22
|
+
readonly interceptor: InterceptorManager<{
|
|
23
|
+
PRINTING_COMPONENT_COLLECT: import('@univerjs/core').IInterceptor<undefined, IDocPrintComponentContext>;
|
|
24
|
+
PRINTING_DOM_COLLECT: import('@univerjs/core').IInterceptor<DisposableCollection, IDocPrintDomtContext>;
|
|
25
|
+
}>;
|
|
26
|
+
constructor();
|
|
27
|
+
registerPrintComponent(componentKey: string, printingComponentKey: string): void;
|
|
28
|
+
getPrintComponent(componentKey: string): string | undefined;
|
|
29
|
+
}
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export declare function DocFooter(): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare function DocFooter(): false | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IConfirmChildrenProps } from '@univerjs/ui';
|
|
2
|
+
import { PageOrientType } from '@univerjs/core';
|
|
3
|
+
export interface IPageSettingsProps {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: (settings: IPageSettings) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface IPageSettings {
|
|
8
|
+
paperSize: string;
|
|
9
|
+
orientation: PageOrientType;
|
|
10
|
+
margins: {
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
left: number;
|
|
14
|
+
right: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare function PageSettings(props: IConfirmChildrenProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const PAGE_SETTING_COMPONENT_ID = "docs.component.page-setting";
|