@univerjs/docs-ui 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +1924 -480
- package/lib/cjs/locale/ar-SA.js +40 -19
- package/lib/cjs/locale/ca-ES.js +39 -18
- package/lib/cjs/locale/de-DE.js +40 -19
- package/lib/cjs/locale/en-US.js +23 -2
- package/lib/cjs/locale/es-ES.js +40 -19
- package/lib/cjs/locale/fa-IR.js +40 -19
- package/lib/cjs/locale/fr-FR.js +40 -19
- package/lib/cjs/locale/id-ID.js +39 -18
- package/lib/cjs/locale/it-IT.js +40 -19
- package/lib/cjs/locale/ja-JP.js +40 -19
- package/lib/cjs/locale/ko-KR.js +40 -19
- package/lib/cjs/locale/pl-PL.js +40 -19
- package/lib/cjs/locale/pt-BR.js +39 -18
- package/lib/cjs/locale/ru-RU.js +40 -19
- package/lib/cjs/locale/sk-SK.js +40 -19
- package/lib/cjs/locale/vi-VN.js +40 -19
- package/lib/cjs/locale/zh-CN.js +23 -2
- package/lib/cjs/locale/zh-HK.js +23 -2
- package/lib/cjs/locale/zh-TW.js +23 -2
- package/lib/es/index.js +1845 -476
- package/lib/es/locale/ar-SA.js +40 -19
- package/lib/es/locale/ca-ES.js +39 -18
- package/lib/es/locale/de-DE.js +40 -19
- package/lib/es/locale/en-US.js +23 -2
- package/lib/es/locale/es-ES.js +40 -19
- package/lib/es/locale/fa-IR.js +40 -19
- package/lib/es/locale/fr-FR.js +40 -19
- package/lib/es/locale/id-ID.js +39 -18
- package/lib/es/locale/it-IT.js +40 -19
- package/lib/es/locale/ja-JP.js +40 -19
- package/lib/es/locale/ko-KR.js +40 -19
- package/lib/es/locale/pl-PL.js +40 -19
- package/lib/es/locale/pt-BR.js +39 -18
- package/lib/es/locale/ru-RU.js +40 -19
- package/lib/es/locale/sk-SK.js +40 -19
- package/lib/es/locale/vi-VN.js +40 -19
- package/lib/es/locale/zh-CN.js +23 -2
- package/lib/es/locale/zh-HK.js +23 -2
- package/lib/es/locale/zh-TW.js +23 -2
- package/lib/index.css +8 -0
- package/lib/index.js +1845 -476
- package/lib/locale/ar-SA.js +40 -19
- package/lib/locale/ca-ES.js +39 -18
- package/lib/locale/de-DE.js +40 -19
- package/lib/locale/en-US.js +23 -2
- package/lib/locale/es-ES.js +40 -19
- package/lib/locale/fa-IR.js +40 -19
- package/lib/locale/fr-FR.js +40 -19
- package/lib/locale/id-ID.js +39 -18
- package/lib/locale/it-IT.js +40 -19
- package/lib/locale/ja-JP.js +40 -19
- package/lib/locale/ko-KR.js +40 -19
- package/lib/locale/pl-PL.js +40 -19
- package/lib/locale/pt-BR.js +39 -18
- package/lib/locale/ru-RU.js +40 -19
- package/lib/locale/sk-SK.js +40 -19
- package/lib/locale/vi-VN.js +40 -19
- package/lib/locale/zh-CN.js +23 -2
- package/lib/locale/zh-HK.js +23 -2
- package/lib/locale/zh-TW.js +23 -2
- package/lib/types/commands/commands/break-line.command.d.ts +4 -3
- package/lib/types/commands/commands/doc-block-move.command.d.ts +13 -1
- package/lib/types/commands/commands/doc-header-footer.command.d.ts +1 -0
- package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +1 -0
- package/lib/types/commands/commands/doc-paragraph-setting.command.d.ts +1 -2
- package/lib/types/commands/commands/replace-content.command.d.ts +2 -1
- package/lib/types/commands/operations/doc-section-setting-panel.operation.d.ts +17 -0
- package/lib/types/controllers/doc-section-setting.controller.d.ts +24 -0
- package/lib/types/controllers/render-controllers/doc-input.controller.d.ts +4 -1
- package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +5 -1
- package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +4 -1
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +3 -1
- package/lib/types/controllers/ui.controller.d.ts +4 -1
- package/lib/types/embed-docs-custom-block-bleed.d.ts +30 -0
- package/lib/types/embed-docs-custom-block-refresh.d.ts +28 -0
- package/lib/types/embed-docs-custom-block-scroll.d.ts +19 -0
- package/lib/types/embed-host-anchor.d.ts +45 -0
- package/lib/types/index.d.ts +16 -1
- package/lib/types/locale/en-US.d.ts +17 -0
- package/lib/types/menu/context-menu.d.ts +1 -0
- package/lib/types/menu/menu.d.ts +1 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +7 -3
- package/lib/types/services/clipboard/doc-paste-mutation-adapter.service.d.ts +47 -0
- package/lib/types/services/clipboard/html-to-udm/converter.d.ts +1 -0
- package/lib/types/services/doc-embed-integration.service.d.ts +63 -0
- package/lib/types/services/doc-popup-manager.service.d.ts +2 -0
- package/lib/types/services/docs-render.service.d.ts +1 -1
- package/lib/types/services/float-menu.service.d.ts +1 -0
- package/lib/types/services/selection/convert-text-range.d.ts +3 -0
- package/lib/types/services/selection/doc-selection-render.service.d.ts +18 -4
- package/lib/types/utils/section-header-footer.d.ts +26 -0
- package/lib/types/views/ParagraphMenu.d.ts +7 -3
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +13 -3
- package/lib/types/views/paragraph-setting/line-spacing.d.ts +4 -4
- package/lib/types/views/section-setting/Setting.d.ts +16 -0
- package/lib/types/views/section-setting/component-name.d.ts +16 -0
- package/lib/types/views/section-setting/index.d.ts +16 -0
- package/lib/types/views/section-setting/use-section-setting.d.ts +43 -0
- package/lib/umd/index.js +9 -9
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -11
package/lib/locale/vi-VN.js
CHANGED
|
@@ -55,6 +55,7 @@ const locale = { "docs-ui": {
|
|
|
55
55
|
deleteTable: "Xóa bảng"
|
|
56
56
|
},
|
|
57
57
|
headerFooter: {
|
|
58
|
+
linkToPrevious: "Link to previous",
|
|
58
59
|
header: "Đầu trang",
|
|
59
60
|
footer: "Chân trang",
|
|
60
61
|
panel: "Cài đặt đầu trang và chân trang",
|
|
@@ -66,17 +67,23 @@ const locale = { "docs-ui": {
|
|
|
66
67
|
disableText: "Cài đặt đầu trang và chân trang không khả dụng"
|
|
67
68
|
},
|
|
68
69
|
placeholder: {
|
|
69
|
-
heading1: "
|
|
70
|
-
heading2: "
|
|
71
|
-
heading3: "
|
|
72
|
-
heading4: "
|
|
73
|
-
heading5: "
|
|
74
|
-
normalText: "
|
|
75
|
-
listItem: "
|
|
70
|
+
heading1: "Tiêu đề 1",
|
|
71
|
+
heading2: "Tiêu đề 2",
|
|
72
|
+
heading3: "Tiêu đề 3",
|
|
73
|
+
heading4: "Tiêu đề 4",
|
|
74
|
+
heading5: "Tiêu đề 5",
|
|
75
|
+
normalText: "Nhập văn bản hoặc nhấn \"/\" để dùng lệnh",
|
|
76
|
+
listItem: "Mục"
|
|
76
77
|
},
|
|
77
78
|
doc: {
|
|
78
|
-
menu: {
|
|
79
|
-
|
|
79
|
+
menu: {
|
|
80
|
+
paragraphSetting: "Paragraph Setting",
|
|
81
|
+
sectionSetting: "Section Settings"
|
|
82
|
+
},
|
|
83
|
+
slider: {
|
|
84
|
+
paragraphSetting: "Paragraph Setting",
|
|
85
|
+
sectionSetting: "Section Settings"
|
|
86
|
+
},
|
|
80
87
|
paragraphSetting: {
|
|
81
88
|
alignment: "Alignment",
|
|
82
89
|
indentation: "Indentation",
|
|
@@ -92,6 +99,20 @@ const locale = { "docs-ui": {
|
|
|
92
99
|
atLeast: "At Least (px)",
|
|
93
100
|
exactly: "Exactly (px)",
|
|
94
101
|
fixedValue: "Fixed Value(px)"
|
|
102
|
+
},
|
|
103
|
+
sectionSetting: {
|
|
104
|
+
selectedSections: "{0} sections selected",
|
|
105
|
+
columnCount: "Column count",
|
|
106
|
+
columnGap: "Column gap",
|
|
107
|
+
columnSeparator: "Separator",
|
|
108
|
+
none: "None",
|
|
109
|
+
betweenColumns: "Between columns",
|
|
110
|
+
sectionStart: "Section start",
|
|
111
|
+
unspecified: "Unspecified",
|
|
112
|
+
continuous: "Continuous",
|
|
113
|
+
nextPage: "Next page",
|
|
114
|
+
evenPage: "Even page",
|
|
115
|
+
oddPage: "Odd page"
|
|
95
116
|
}
|
|
96
117
|
},
|
|
97
118
|
rightClick: {
|
|
@@ -105,16 +126,16 @@ const locale = { "docs-ui": {
|
|
|
105
126
|
insertBellow: "Chèn dưới"
|
|
106
127
|
},
|
|
107
128
|
paragraphMenu: {
|
|
108
|
-
alignAndIndent: "
|
|
109
|
-
align: "
|
|
110
|
-
indent: "
|
|
111
|
-
color: "
|
|
112
|
-
increase: "
|
|
113
|
-
decrease: "
|
|
114
|
-
increaseIndent: "
|
|
115
|
-
decreaseIndent: "
|
|
116
|
-
defaultTextColor: "
|
|
117
|
-
noBackground: "
|
|
129
|
+
alignAndIndent: "Căn chỉnh và thụt lề",
|
|
130
|
+
align: "Căn chỉnh",
|
|
131
|
+
indent: "Thụt lề",
|
|
132
|
+
color: "Màu sắc",
|
|
133
|
+
increase: "Tăng",
|
|
134
|
+
decrease: "Giảm",
|
|
135
|
+
increaseIndent: "Tăng thụt lề",
|
|
136
|
+
decreaseIndent: "Giảm thụt lề",
|
|
137
|
+
defaultTextColor: "Màu văn bản mặc định",
|
|
138
|
+
noBackground: "Không có nền"
|
|
118
139
|
},
|
|
119
140
|
"page-settings": {
|
|
120
141
|
"document-setting": "Cài đặt tài liệu",
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -55,6 +55,7 @@ const locale = { "docs-ui": {
|
|
|
55
55
|
deleteTable: "删除表格"
|
|
56
56
|
},
|
|
57
57
|
headerFooter: {
|
|
58
|
+
linkToPrevious: "链接到上一节",
|
|
58
59
|
header: "页眉",
|
|
59
60
|
footer: "页脚",
|
|
60
61
|
panel: "页眉页脚设置",
|
|
@@ -75,8 +76,14 @@ const locale = { "docs-ui": {
|
|
|
75
76
|
listItem: "项目"
|
|
76
77
|
},
|
|
77
78
|
doc: {
|
|
78
|
-
menu: {
|
|
79
|
-
|
|
79
|
+
menu: {
|
|
80
|
+
paragraphSetting: "段落设置",
|
|
81
|
+
sectionSetting: "节设置"
|
|
82
|
+
},
|
|
83
|
+
slider: {
|
|
84
|
+
paragraphSetting: "段落设置",
|
|
85
|
+
sectionSetting: "节设置"
|
|
86
|
+
},
|
|
80
87
|
paragraphSetting: {
|
|
81
88
|
alignment: "对齐方式",
|
|
82
89
|
indentation: "缩进",
|
|
@@ -92,6 +99,20 @@ const locale = { "docs-ui": {
|
|
|
92
99
|
atLeast: "至少值(px)",
|
|
93
100
|
exactly: "固定值(px)",
|
|
94
101
|
fixedValue: "固定值(px)"
|
|
102
|
+
},
|
|
103
|
+
sectionSetting: {
|
|
104
|
+
selectedSections: "已选择 {0} 个节",
|
|
105
|
+
columnCount: "栏数",
|
|
106
|
+
columnGap: "栏间距",
|
|
107
|
+
columnSeparator: "分隔线",
|
|
108
|
+
none: "无",
|
|
109
|
+
betweenColumns: "栏间分隔线",
|
|
110
|
+
sectionStart: "节起始位置",
|
|
111
|
+
unspecified: "未指定",
|
|
112
|
+
continuous: "连续",
|
|
113
|
+
nextPage: "下一页",
|
|
114
|
+
evenPage: "偶数页",
|
|
115
|
+
oddPage: "奇数页"
|
|
95
116
|
}
|
|
96
117
|
},
|
|
97
118
|
rightClick: {
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -55,6 +55,7 @@ const locale = { "docs-ui": {
|
|
|
55
55
|
deleteTable: "Delete table"
|
|
56
56
|
},
|
|
57
57
|
headerFooter: {
|
|
58
|
+
linkToPrevious: "連結到上一節",
|
|
58
59
|
header: "頁眉",
|
|
59
60
|
footer: "頁腳",
|
|
60
61
|
panel: "頁眉頁腳設置",
|
|
@@ -75,8 +76,14 @@ const locale = { "docs-ui": {
|
|
|
75
76
|
listItem: "項目"
|
|
76
77
|
},
|
|
77
78
|
doc: {
|
|
78
|
-
menu: {
|
|
79
|
-
|
|
79
|
+
menu: {
|
|
80
|
+
paragraphSetting: "Paragraph Setting",
|
|
81
|
+
sectionSetting: "Section Settings"
|
|
82
|
+
},
|
|
83
|
+
slider: {
|
|
84
|
+
paragraphSetting: "Paragraph Setting",
|
|
85
|
+
sectionSetting: "Section Settings"
|
|
86
|
+
},
|
|
80
87
|
paragraphSetting: {
|
|
81
88
|
alignment: "Alignment",
|
|
82
89
|
indentation: "Indentation",
|
|
@@ -92,6 +99,20 @@ const locale = { "docs-ui": {
|
|
|
92
99
|
atLeast: "At Least (px)",
|
|
93
100
|
exactly: "Exactly (px)",
|
|
94
101
|
fixedValue: "Fixed Value(px)"
|
|
102
|
+
},
|
|
103
|
+
sectionSetting: {
|
|
104
|
+
selectedSections: "{0} sections selected",
|
|
105
|
+
columnCount: "Column count",
|
|
106
|
+
columnGap: "Column gap",
|
|
107
|
+
columnSeparator: "Separator",
|
|
108
|
+
none: "None",
|
|
109
|
+
betweenColumns: "Between columns",
|
|
110
|
+
sectionStart: "Section start",
|
|
111
|
+
unspecified: "Unspecified",
|
|
112
|
+
continuous: "Continuous",
|
|
113
|
+
nextPage: "Next page",
|
|
114
|
+
evenPage: "Even page",
|
|
115
|
+
oddPage: "Odd page"
|
|
95
116
|
}
|
|
96
117
|
},
|
|
97
118
|
rightClick: {
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -55,6 +55,7 @@ const locale = { "docs-ui": {
|
|
|
55
55
|
deleteTable: "刪除表格"
|
|
56
56
|
},
|
|
57
57
|
headerFooter: {
|
|
58
|
+
linkToPrevious: "連結到上一節",
|
|
58
59
|
header: "頁眉",
|
|
59
60
|
footer: "頁腳",
|
|
60
61
|
panel: "頁眉頁腳設置",
|
|
@@ -75,8 +76,14 @@ const locale = { "docs-ui": {
|
|
|
75
76
|
listItem: "項目"
|
|
76
77
|
},
|
|
77
78
|
doc: {
|
|
78
|
-
menu: {
|
|
79
|
-
|
|
79
|
+
menu: {
|
|
80
|
+
paragraphSetting: "Paragraph Setting",
|
|
81
|
+
sectionSetting: "Section Settings"
|
|
82
|
+
},
|
|
83
|
+
slider: {
|
|
84
|
+
paragraphSetting: "Paragraph Setting",
|
|
85
|
+
sectionSetting: "Section Settings"
|
|
86
|
+
},
|
|
80
87
|
paragraphSetting: {
|
|
81
88
|
alignment: "Alignment",
|
|
82
89
|
indentation: "Indentation",
|
|
@@ -92,6 +99,20 @@ const locale = { "docs-ui": {
|
|
|
92
99
|
atLeast: "At Least (px)",
|
|
93
100
|
exactly: "Exactly (px)",
|
|
94
101
|
fixedValue: "Fixed Value(px)"
|
|
102
|
+
},
|
|
103
|
+
sectionSetting: {
|
|
104
|
+
selectedSections: "{0} sections selected",
|
|
105
|
+
columnCount: "Column count",
|
|
106
|
+
columnGap: "Column gap",
|
|
107
|
+
columnSeparator: "Separator",
|
|
108
|
+
none: "None",
|
|
109
|
+
betweenColumns: "Between columns",
|
|
110
|
+
sectionStart: "Section start",
|
|
111
|
+
unspecified: "Unspecified",
|
|
112
|
+
continuous: "Continuous",
|
|
113
|
+
nextPage: "Next page",
|
|
114
|
+
evenPage: "Even page",
|
|
115
|
+
oddPage: "Odd page"
|
|
95
116
|
}
|
|
96
117
|
},
|
|
97
118
|
rightClick: {
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { ICommand,
|
|
17
|
-
|
|
16
|
+
import type { ICommand, IParagraphBorder, ITextRangeParam } from '@univerjs/core';
|
|
17
|
+
import { generateParagraphs } from '@univerjs/docs';
|
|
18
|
+
export { generateParagraphs };
|
|
18
19
|
interface IBreakLineCommandParams {
|
|
19
20
|
horizontalLine?: IParagraphBorder;
|
|
21
|
+
insertionMode?: 'split-paragraph' | 'insert-gap';
|
|
20
22
|
textRange?: ITextRangeParam;
|
|
21
23
|
}
|
|
22
24
|
export declare const BreakLineCommand: ICommand<IBreakLineCommandParams>;
|
|
23
|
-
export {};
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { ICommand, IDocumentData } from '@univerjs/core';
|
|
16
|
+
import type { ICommand, IDocumentData, JSONXActions } from '@univerjs/core';
|
|
17
17
|
export interface IMoveDocBlockCommandParams {
|
|
18
18
|
unitId?: string;
|
|
19
19
|
sourceRange: {
|
|
@@ -29,6 +29,17 @@ export interface IMoveDocBlockActionResult {
|
|
|
29
29
|
endOffset: number;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
export interface IMoveDocBlockTextChange {
|
|
33
|
+
movedRange: {
|
|
34
|
+
startOffset: number;
|
|
35
|
+
endOffset: number;
|
|
36
|
+
};
|
|
37
|
+
sourceRange: {
|
|
38
|
+
startOffset: number;
|
|
39
|
+
endOffset: number;
|
|
40
|
+
};
|
|
41
|
+
targetOffset: number;
|
|
42
|
+
}
|
|
32
43
|
export declare const MoveDocBlockCommand: ICommand<IMoveDocBlockCommandParams>;
|
|
33
44
|
export declare function buildMoveDocBlockActions(params: {
|
|
34
45
|
documentData: IDocumentData;
|
|
@@ -38,3 +49,4 @@ export declare function buildMoveDocBlockActions(params: {
|
|
|
38
49
|
};
|
|
39
50
|
targetOffset: number;
|
|
40
51
|
}): IMoveDocBlockActionResult;
|
|
52
|
+
export declare function buildReplaceDocumentBodyActions(previousDocumentData: IDocumentData, nextDocumentData: IDocumentData, move?: IMoveDocBlockTextChange): JSONXActions | null;
|
|
@@ -20,6 +20,7 @@ export interface ICoreHeaderFooterParams {
|
|
|
20
20
|
unitId: string;
|
|
21
21
|
createType?: HeaderFooterType;
|
|
22
22
|
segmentId?: string;
|
|
23
|
+
sectionId?: string;
|
|
23
24
|
headerFooterProps?: IHeaderFooterProps;
|
|
24
25
|
}
|
|
25
26
|
export declare const CoreHeaderFooterCommandId = "doc.command.core-header-footer";
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ICommand, ITextRangeParam } from '@univerjs/core';
|
|
17
17
|
interface IHorizontalCommandParams {
|
|
18
|
+
insertionMode?: 'split-paragraph' | 'insert-gap';
|
|
18
19
|
insertRange?: ITextRangeParam;
|
|
19
20
|
}
|
|
20
21
|
export declare const HorizontalLineCommand: ICommand<IHorizontalCommandParams>;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { ICommand, IParagraphStyle } from '@univerjs/core';
|
|
17
17
|
export interface IDocParagraphSettingCommandParams {
|
|
18
|
-
paragraph
|
|
19
|
-
sections?: Record<string, any>;
|
|
18
|
+
paragraph?: Partial<Pick<IParagraphStyle, 'hanging' | 'horizontalAlign' | 'spaceBelow' | 'spaceAbove' | 'indentEnd' | 'indentStart' | 'lineSpacing' | 'indentFirstLine' | 'snapToGrid' | 'spacingRule'>>;
|
|
20
19
|
}
|
|
21
20
|
export declare const DocParagraphSettingCommand: ICommand<IDocParagraphSettingCommandParams>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { ICommand, IDocumentBody, IDocumentData, ITextRange } from '@univerjs/core';
|
|
16
|
+
import type { ICommand, IDocumentBody, IDocumentData, ITextRange, JSONXActions } from '@univerjs/core';
|
|
17
17
|
import type { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
18
18
|
export interface IReplaceSnapshotCommandParams {
|
|
19
19
|
unitId: string;
|
|
@@ -25,6 +25,7 @@ export interface IReplaceSnapshotCommandParams {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export declare const ReplaceSnapshotCommand: ICommand<IReplaceSnapshotCommandParams>;
|
|
28
|
+
export declare function buildReplaceSnapshotActions(previousSnapshot: IDocumentData, snapshot: IDocumentData): JSONXActions | null;
|
|
28
29
|
interface IReplaceContentCommandParams {
|
|
29
30
|
unitId: string;
|
|
30
31
|
body: IDocumentBody;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { ICommand } from '@univerjs/core';
|
|
17
|
+
export declare const DocSectionSettingPanelOperation: ICommand;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { ISidebarService } from '@univerjs/ui';
|
|
18
|
+
export declare class DocSectionSettingController extends Disposable {
|
|
19
|
+
private readonly _sidebarService;
|
|
20
|
+
private readonly _panelId;
|
|
21
|
+
constructor(_sidebarService: ISidebarService);
|
|
22
|
+
openPanel(): void;
|
|
23
|
+
closePanel(): void;
|
|
24
|
+
}
|
|
@@ -18,6 +18,7 @@ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
|
18
18
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
19
19
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
20
|
import { DocMenuStyleService } from '../../services/doc-menu-style.service';
|
|
21
|
+
import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../../services/doc-embed-integration.service';
|
|
21
22
|
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
22
23
|
export declare class DocInputController extends Disposable implements IRenderModule {
|
|
23
24
|
private readonly _context;
|
|
@@ -25,9 +26,11 @@ export declare class DocInputController extends Disposable implements IRenderMod
|
|
|
25
26
|
private readonly _docSkeletonManagerService;
|
|
26
27
|
private readonly _commandService;
|
|
27
28
|
private readonly _docMenuStyleService;
|
|
29
|
+
private readonly _embedRuntimeFocusCoordinator?;
|
|
28
30
|
private _onInputSubscription;
|
|
29
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _commandService: ICommandService, _docMenuStyleService: DocMenuStyleService);
|
|
31
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _commandService: ICommandService, _docMenuStyleService: DocMenuStyleService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
30
32
|
dispose(): void;
|
|
31
33
|
private _init;
|
|
32
34
|
private _initialNormalInput;
|
|
35
|
+
private _isEmbedChildInputActive;
|
|
33
36
|
}
|
|
@@ -17,6 +17,7 @@ import type { DocumentDataModel } from '@univerjs/core';
|
|
|
17
17
|
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
18
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
19
19
|
import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
+
import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../../services/doc-embed-integration.service';
|
|
20
21
|
import { IEditorService } from '../../services/editor/editor-manager.service';
|
|
21
22
|
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
22
23
|
export declare class DocSelectionRenderController extends Disposable implements IRenderModule {
|
|
@@ -27,8 +28,9 @@ export declare class DocSelectionRenderController extends Disposable implements
|
|
|
27
28
|
private readonly _docSelectionRenderService;
|
|
28
29
|
private readonly _docSkeletonManagerService;
|
|
29
30
|
private readonly _docSelectionManagerService;
|
|
31
|
+
private readonly _embedRuntimeFocusCoordinator?;
|
|
30
32
|
private _loadedMap;
|
|
31
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService);
|
|
33
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
32
34
|
private _initialize;
|
|
33
35
|
private _init;
|
|
34
36
|
private _refreshListener;
|
|
@@ -37,6 +39,8 @@ export declare class DocSelectionRenderController extends Disposable implements
|
|
|
37
39
|
private _getTransformCoordForDocumentOffset;
|
|
38
40
|
private _isEditorReadOnly;
|
|
39
41
|
private _setEditorFocus;
|
|
42
|
+
private _isEmbedInteractionEvent;
|
|
43
|
+
private _isEmbedChildInteractionActive;
|
|
40
44
|
private _commandExecutedListener;
|
|
41
45
|
private _skeletonListener;
|
|
42
46
|
}
|
|
@@ -19,6 +19,7 @@ import { ICommandService, IUniverInstanceService, RxDisposable, ThemeService } f
|
|
|
19
19
|
import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
20
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
21
|
import { DocPageLayoutService } from '../../services/doc-page-layout.service';
|
|
22
|
+
import { DocViewScaleService } from '../../services/doc-view-scale';
|
|
22
23
|
import { IEditorService } from '../../services/editor/editor-manager.service';
|
|
23
24
|
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
24
25
|
export declare class DocRenderController extends RxDisposable implements IRenderModule {
|
|
@@ -31,10 +32,12 @@ export declare class DocRenderController extends RxDisposable implements IRender
|
|
|
31
32
|
private readonly _univerInstanceService;
|
|
32
33
|
private readonly _docPageLayoutService;
|
|
33
34
|
private readonly _textSelectionManagerService;
|
|
35
|
+
private readonly _docViewScaleService;
|
|
34
36
|
private readonly _themeService;
|
|
35
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _editorService: IEditorService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _docPageLayoutService: DocPageLayoutService, _textSelectionManagerService: DocSelectionManagerService, _themeService: ThemeService);
|
|
37
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _editorService: IEditorService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _docPageLayoutService: DocPageLayoutService, _textSelectionManagerService: DocSelectionManagerService, _docViewScaleService: DocViewScaleService, _themeService: ThemeService);
|
|
36
38
|
reRender(unitId: string): void;
|
|
37
39
|
private _addNewRender;
|
|
40
|
+
private _shouldEnableHorizontalScrollBar;
|
|
38
41
|
private _addComponent;
|
|
39
42
|
private _initRenderRefresh;
|
|
40
43
|
private _create;
|
|
@@ -19,6 +19,7 @@ import { Disposable, DocumentFlavor, ICommandService, IContextService, IUniverIn
|
|
|
19
19
|
import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
20
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
21
|
import { DocPageLayoutService } from '../../services/doc-page-layout.service';
|
|
22
|
+
import { IDocEmbedInteractionBoundaryService } from '../../services/doc-embed-integration.service';
|
|
22
23
|
import { DocViewScaleService } from '../../services/doc-view-scale';
|
|
23
24
|
import { IEditorService } from '../../services/editor/editor-manager.service';
|
|
24
25
|
export declare function shouldHandleDocWheelZoom(event: Pick<IWheelEvent, 'ctrlKey' | 'metaKey'>, focusingDoc: boolean, _documentFlavor?: DocumentFlavor): boolean;
|
|
@@ -33,10 +34,11 @@ export declare class DocZoomRenderController extends Disposable implements IRend
|
|
|
33
34
|
private readonly _docPageLayoutService;
|
|
34
35
|
private readonly _renderManagerService;
|
|
35
36
|
private readonly _docViewScaleService;
|
|
37
|
+
private readonly _embedInteractionBoundaryService?;
|
|
36
38
|
private _isSheetEditor;
|
|
37
39
|
private _initTimer;
|
|
38
40
|
private _updateTimer;
|
|
39
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _contextService: IContextService, _docSkeletonManagerService: DocSkeletonManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _textSelectionManagerService: DocSelectionManagerService, _editorService: IEditorService, _docPageLayoutService: DocPageLayoutService, _renderManagerService: IRenderManagerService, _docViewScaleService: DocViewScaleService);
|
|
41
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _contextService: IContextService, _docSkeletonManagerService: DocSkeletonManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _textSelectionManagerService: DocSelectionManagerService, _editorService: IEditorService, _docPageLayoutService: DocPageLayoutService, _renderManagerService: IRenderManagerService, _docViewScaleService: DocViewScaleService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService | undefined);
|
|
40
42
|
dispose(): void;
|
|
41
43
|
private _initSkeletonListener;
|
|
42
44
|
private _initCommandExecutedListener;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable, ICommandService, IConfigService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { ILayoutService, IMenuManagerService, IShortcutService, IUIPartsService } from '@univerjs/ui';
|
|
18
|
+
import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../services/doc-embed-integration.service';
|
|
18
19
|
export declare class DocUIController extends Disposable {
|
|
19
20
|
protected readonly _injector: Injector;
|
|
20
21
|
protected readonly _commandService: ICommandService;
|
|
@@ -24,11 +25,13 @@ export declare class DocUIController extends Disposable {
|
|
|
24
25
|
protected readonly _univerInstanceService: IUniverInstanceService;
|
|
25
26
|
protected readonly _shortcutService: IShortcutService;
|
|
26
27
|
protected readonly _configService: IConfigService;
|
|
27
|
-
|
|
28
|
+
protected readonly _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined;
|
|
29
|
+
constructor(_injector: Injector, _commandService: ICommandService, _layoutService: ILayoutService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService, _univerInstanceService: IUniverInstanceService, _shortcutService: IShortcutService, _configService: IConfigService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
28
30
|
private _initUiParts;
|
|
29
31
|
private _initMenus;
|
|
30
32
|
private _initShortCut;
|
|
31
33
|
private _init;
|
|
32
34
|
private _initCommands;
|
|
33
35
|
private _initFocusHandler;
|
|
36
|
+
private _shouldPreserveEmbedFocus;
|
|
34
37
|
}
|
|
@@ -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
|
+
export interface IDocsCustomBlockBleedViewport {
|
|
17
|
+
bleedLeft: number;
|
|
18
|
+
bleedRight: number;
|
|
19
|
+
bleedWidth: number;
|
|
20
|
+
contentWidth: number;
|
|
21
|
+
virtualWidth: number;
|
|
22
|
+
}
|
|
23
|
+
export interface IDocsCustomBlockBleedViewportHint {
|
|
24
|
+
bleedLeft?: number;
|
|
25
|
+
bleedWidth?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function createDefaultDocsTableLikeCustomBlockBleedViewport(): IDocsCustomBlockBleedViewport;
|
|
28
|
+
export declare function resolveDocsTableLikeCustomBlockBleedViewport(root: HTMLElement, contentWidth: number, hint?: IDocsCustomBlockBleedViewportHint): IDocsCustomBlockBleedViewport;
|
|
29
|
+
export declare function resolveDocsTableLikeCustomBlockContentWidth(authoritativeContentWidth: number | undefined, fallbackContentWidth: number): number;
|
|
30
|
+
export declare function resolveDocsTableLikeCustomBlockContentHeight(authoritativeContentHeight: number | undefined, fallbackContentHeight: number): number;
|
|
@@ -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
|
+
export declare function collectDocsTableLikeEmbedChildUnitIds(drawings: Record<string, unknown> | undefined, resolveChildUnitId?: (data: Record<string, unknown>) => string | undefined): Set<string>;
|
|
17
|
+
export declare function getCommandUnitId(commandParams: unknown): string | undefined;
|
|
18
|
+
export declare function shouldRefreshDocsCustomBlockSizeForCommand(params: {
|
|
19
|
+
commandId?: string;
|
|
20
|
+
childUnitIds: Set<string>;
|
|
21
|
+
commandParams: unknown;
|
|
22
|
+
hostUnitId: string;
|
|
23
|
+
}): boolean;
|
|
24
|
+
export interface IDocsCustomBlockSizeRefreshScheduler {
|
|
25
|
+
dispose: () => void;
|
|
26
|
+
schedule: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function createDocsCustomBlockSizeRefreshScheduler(refresh: () => void): IDocsCustomBlockSizeRefreshScheduler;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 IDocsTableLikeCustomBlockScrollOptions {
|
|
17
|
+
maxScrollLeft?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function scrollDocsTableLikeCustomBlockLive(event: WheelEvent, live: HTMLElement, options?: IDocsTableLikeCustomBlockScrollOptions): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { UniverInstanceType } from '@univerjs/core';
|
|
17
|
+
import { DocumentFlavor } from '@univerjs/core';
|
|
18
|
+
export interface IDocsCustomBlockRenderViewportParams {
|
|
19
|
+
childType?: UniverInstanceType;
|
|
20
|
+
contentHeight?: number;
|
|
21
|
+
contentWidth?: number;
|
|
22
|
+
docsLeft?: number;
|
|
23
|
+
documentFlavor?: DocumentFlavor;
|
|
24
|
+
fallbackHeight?: number;
|
|
25
|
+
fallbackWidth?: number;
|
|
26
|
+
pageMarginLeft?: number;
|
|
27
|
+
pageMarginRight?: number;
|
|
28
|
+
pageWidth?: number;
|
|
29
|
+
scale?: number;
|
|
30
|
+
visibleCanvasHeight?: number;
|
|
31
|
+
visibleCanvasLeft?: number;
|
|
32
|
+
visibleCanvasWidth?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface IDocsCustomBlockLayoutViewport {
|
|
35
|
+
bleedLeft?: number;
|
|
36
|
+
bleedWidth?: number;
|
|
37
|
+
contentHeight?: number;
|
|
38
|
+
contentWidth?: number;
|
|
39
|
+
height: number;
|
|
40
|
+
layoutWidth?: number;
|
|
41
|
+
offsetLeft?: number;
|
|
42
|
+
viewportHeight?: number;
|
|
43
|
+
width: number;
|
|
44
|
+
}
|
|
45
|
+
export declare function resolveDocsCustomBlockRenderViewport(params: IDocsCustomBlockRenderViewportParams): IDocsCustomBlockLayoutViewport;
|