@univerjs/docs-ui 0.17.0 → 0.18.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.
Files changed (199) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +53 -19
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +1 -1
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/ja-JP.js +1 -1
  9. package/lib/cjs/locale/ko-KR.js +1 -1
  10. package/lib/cjs/locale/ru-RU.js +1 -1
  11. package/lib/cjs/locale/sk-SK.js +1 -1
  12. package/lib/cjs/locale/vi-VN.js +1 -1
  13. package/lib/cjs/locale/zh-CN.js +1 -1
  14. package/lib/cjs/locale/zh-TW.js +1 -1
  15. package/lib/es/facade.js +1 -105
  16. package/lib/es/index.js +53 -13499
  17. package/lib/es/locale/ca-ES.js +1 -125
  18. package/lib/es/locale/en-US.js +1 -125
  19. package/lib/es/locale/es-ES.js +1 -125
  20. package/lib/es/locale/fa-IR.js +1 -125
  21. package/lib/es/locale/fr-FR.js +1 -125
  22. package/lib/es/locale/ja-JP.js +1 -125
  23. package/lib/es/locale/ko-KR.js +1 -125
  24. package/lib/es/locale/ru-RU.js +1 -125
  25. package/lib/es/locale/sk-SK.js +1 -125
  26. package/lib/es/locale/vi-VN.js +1 -125
  27. package/lib/es/locale/zh-CN.js +1 -125
  28. package/lib/es/locale/zh-TW.js +1 -125
  29. package/lib/facade.js +1 -105
  30. package/lib/index.css +478 -1
  31. package/lib/index.js +53 -13499
  32. package/lib/locale/ca-ES.js +1 -125
  33. package/lib/locale/en-US.js +1 -125
  34. package/lib/locale/es-ES.js +1 -125
  35. package/lib/locale/fa-IR.js +1 -125
  36. package/lib/locale/fr-FR.js +1 -125
  37. package/lib/locale/ja-JP.js +1 -125
  38. package/lib/locale/ko-KR.js +1 -125
  39. package/lib/locale/ru-RU.js +1 -125
  40. package/lib/locale/sk-SK.js +1 -125
  41. package/lib/locale/vi-VN.js +1 -125
  42. package/lib/locale/zh-CN.js +1 -125
  43. package/lib/locale/zh-TW.js +1 -125
  44. package/lib/types/basics/component-tools.d.ts +17 -2
  45. package/lib/types/basics/custom-decoration-factory.d.ts +18 -3
  46. package/lib/types/basics/paragraph.d.ts +16 -1
  47. package/lib/types/basics/selection.d.ts +16 -1
  48. package/lib/types/basics/table.d.ts +17 -2
  49. package/lib/types/basics/transform-position.d.ts +16 -1
  50. package/lib/types/commands/commands/auto-format.command.d.ts +16 -1
  51. package/lib/types/commands/commands/break-line.command.d.ts +16 -1
  52. package/lib/types/commands/commands/clipboard.command.d.ts +17 -1
  53. package/lib/types/commands/commands/clipboard.inner.command.d.ts +17 -2
  54. package/lib/types/commands/commands/core-editing.command.d.ts +17 -2
  55. package/lib/types/commands/commands/doc-delete.command.d.ts +17 -2
  56. package/lib/types/commands/commands/doc-header-footer.command.d.ts +17 -1
  57. package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +16 -1
  58. package/lib/types/commands/commands/doc-page-setup.command.d.ts +16 -1
  59. package/lib/types/commands/commands/doc-paragraph-setting.command.d.ts +16 -1
  60. package/lib/types/commands/commands/doc-select-all.command.d.ts +16 -1
  61. package/lib/types/commands/commands/ime-input.command.d.ts +16 -1
  62. package/lib/types/commands/commands/inline-format.command.d.ts +17 -2
  63. package/lib/types/commands/commands/insert-below/insert-bullet-below.command.d.ts +16 -1
  64. package/lib/types/commands/commands/insert-custom-range.command.d.ts +17 -2
  65. package/lib/types/commands/commands/list.command.d.ts +18 -2
  66. package/lib/types/commands/commands/paragraph-align.command.d.ts +17 -1
  67. package/lib/types/commands/commands/replace-content.command.d.ts +17 -2
  68. package/lib/types/commands/commands/set-doc-zoom-ratio.command.d.ts +16 -1
  69. package/lib/types/commands/commands/set-heading.command.d.ts +17 -1
  70. package/lib/types/commands/commands/switch-doc-mode.command.d.ts +16 -1
  71. package/lib/types/commands/commands/table/doc-table-create.command.d.ts +16 -1
  72. package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +16 -1
  73. package/lib/types/commands/commands/table/doc-table-insert.command.d.ts +16 -1
  74. package/lib/types/commands/commands/table/doc-table-tab.command.d.ts +16 -1
  75. package/lib/types/commands/commands/table/table.d.ts +17 -2
  76. package/lib/types/commands/commands/util.d.ts +17 -2
  77. package/lib/types/commands/operations/doc-create-table.operation.d.ts +16 -1
  78. package/lib/types/commands/operations/doc-cursor.operation.d.ts +16 -1
  79. package/lib/types/commands/operations/doc-header-footer-panel.operation.d.ts +16 -1
  80. package/lib/types/commands/operations/doc-paragraph-setting-panel.operation.d.ts +16 -1
  81. package/lib/types/commands/operations/open-page-setting.operation.d.ts +16 -1
  82. package/lib/types/commands/operations/set-doc-zoom-ratio.operation.d.ts +16 -1
  83. package/lib/types/commands/util.d.ts +16 -1
  84. package/lib/types/components/editor/utils.d.ts +16 -1
  85. package/lib/types/components/float-toolbar/FloatToolbar.stories.d.ts +16 -1
  86. package/lib/types/components/list-type-picker/picker.d.ts +15 -0
  87. package/lib/types/components/paragraph-menu/index.d.ts +16 -1
  88. package/lib/types/components/side-menu/SideMenu.stories.d.ts +16 -1
  89. package/lib/types/components/side-menu/index.d.ts +1 -1
  90. package/lib/types/config/config.d.ts +19 -4
  91. package/lib/types/controllers/doc-auto-format.controller.d.ts +15 -0
  92. package/lib/types/controllers/doc-header-footer.controller.d.ts +19 -2
  93. package/lib/types/controllers/doc-move-cursor.controller.d.ts +15 -0
  94. package/lib/types/controllers/doc-paragraph-setting.controller.d.ts +15 -0
  95. package/lib/types/controllers/doc-table.controller.d.ts +15 -0
  96. package/lib/types/controllers/doc-ui.controller.d.ts +15 -0
  97. package/lib/types/controllers/render-controllers/back-scroll.render-controller.d.ts +18 -2
  98. package/lib/types/controllers/render-controllers/doc-checklist.render-controller.d.ts +18 -2
  99. package/lib/types/controllers/render-controllers/doc-clipboard.controller.d.ts +18 -2
  100. package/lib/types/controllers/render-controllers/doc-contextmenu.render-controller.d.ts +18 -2
  101. package/lib/types/controllers/render-controllers/doc-editor-bridge.controller.d.ts +19 -2
  102. package/lib/types/controllers/render-controllers/doc-ime-input.controller.d.ts +18 -2
  103. package/lib/types/controllers/render-controllers/doc-input.controller.d.ts +18 -2
  104. package/lib/types/controllers/render-controllers/doc-resize.render-controller.d.ts +16 -1
  105. package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +18 -2
  106. package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +19 -2
  107. package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +19 -2
  108. package/lib/types/facade/f-document.d.ts +17 -1
  109. package/lib/types/facade/f-univer.d.ts +16 -1
  110. package/lib/types/index.d.ts +0 -1
  111. package/lib/types/locale/ca-ES.d.ts +16 -1
  112. package/lib/types/locale/es-ES.d.ts +16 -1
  113. package/lib/types/locale/fa-IR.d.ts +16 -1
  114. package/lib/types/locale/fr-FR.d.ts +16 -1
  115. package/lib/types/locale/ja-JP.d.ts +16 -1
  116. package/lib/types/locale/ko-KR.d.ts +16 -1
  117. package/lib/types/locale/ru-RU.d.ts +16 -1
  118. package/lib/types/locale/sk-SK.d.ts +16 -1
  119. package/lib/types/locale/vi-VN.d.ts +16 -1
  120. package/lib/types/locale/zh-CN.d.ts +16 -1
  121. package/lib/types/locale/zh-TW.d.ts +16 -1
  122. package/lib/types/menu/context-menu.d.ts +17 -2
  123. package/lib/types/menu/menu.d.ts +18 -3
  124. package/lib/types/menu/paragraph-menu.d.ts +18 -2
  125. package/lib/types/menu/schema.d.ts +16 -1
  126. package/lib/types/plugin.d.ts +16 -2
  127. package/lib/types/services/clipboard/clipboard.service.d.ts +19 -3
  128. package/lib/types/services/clipboard/copy-content-cache.d.ts +16 -1
  129. package/lib/types/services/clipboard/html-to-udm/converter.d.ts +17 -2
  130. package/lib/types/services/clipboard/html-to-udm/parse-node-style.d.ts +16 -1
  131. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-lark.d.ts +16 -1
  132. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-univer.d.ts +16 -1
  133. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-word.d.ts +16 -1
  134. package/lib/types/services/clipboard/html-to-udm/paste-plugins/type.d.ts +16 -1
  135. package/lib/types/services/clipboard/html-to-udm/utils.d.ts +16 -1
  136. package/lib/types/services/clipboard/udm-to-html/convertor.d.ts +16 -1
  137. package/lib/types/services/doc-auto-format.service.d.ts +18 -2
  138. package/lib/types/services/doc-event-manager.service.d.ts +30 -14
  139. package/lib/types/services/doc-ime-input-manager.service.d.ts +19 -3
  140. package/lib/types/services/doc-menu-style.service.d.ts +17 -1
  141. package/lib/types/services/doc-page-layout.service.d.ts +18 -2
  142. package/lib/types/services/doc-paragraph-menu.service.d.ts +20 -3
  143. package/lib/types/services/doc-popup-manager.service.d.ts +21 -3
  144. package/lib/types/services/doc-print-interceptor-service.d.ts +20 -4
  145. package/lib/types/services/doc-state-change-manager.service.d.ts +20 -3
  146. package/lib/types/services/docs-render.service.d.ts +15 -0
  147. package/lib/types/services/editor/editor-manager.service.d.ts +23 -5
  148. package/lib/types/services/editor/editor.d.ts +24 -7
  149. package/lib/types/services/float-menu.service.d.ts +18 -2
  150. package/lib/types/services/selection/convert-rect-range.d.ts +17 -2
  151. package/lib/types/services/selection/convert-text-range.d.ts +17 -2
  152. package/lib/types/services/selection/doc-selection-render.service.d.ts +33 -17
  153. package/lib/types/services/selection/range-interface.d.ts +17 -2
  154. package/lib/types/services/selection/rect-range.d.ts +19 -3
  155. package/lib/types/services/selection/selection-utils.d.ts +33 -3
  156. package/lib/types/services/selection/text-range.d.ts +21 -4
  157. package/lib/types/shortcuts/core-editing.shortcut.d.ts +16 -1
  158. package/lib/types/shortcuts/cursor.shortcut.d.ts +16 -1
  159. package/lib/types/shortcuts/format.shortcut.d.ts +16 -1
  160. package/lib/types/shortcuts/toolbar.shortcut.d.ts +16 -1
  161. package/lib/types/shortcuts/utils.d.ts +16 -1
  162. package/lib/types/views/doc-footer/DocFooter.d.ts +1 -1
  163. package/lib/types/views/header-footer/text-bubble.d.ts +17 -1
  164. package/lib/types/views/page-settings/index.d.ts +16 -1
  165. package/lib/types/views/paragraph-setting/hook/utils.d.ts +18 -2
  166. package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +18 -3
  167. package/lib/types/views/rich-text-editor/hooks/use-keyboard-event.d.ts +17 -2
  168. package/lib/types/views/rich-text-editor/hooks/use-left-and-right-arrow.d.ts +16 -1
  169. package/lib/types/views/rich-text-editor/hooks/use-on-change.d.ts +17 -2
  170. package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +16 -1
  171. package/lib/types/views/rich-text-editor/index.d.ts +19 -4
  172. package/lib/umd/facade.js +1 -1
  173. package/lib/umd/index.js +53 -19
  174. package/lib/umd/locale/ca-ES.js +1 -1
  175. package/lib/umd/locale/en-US.js +1 -1
  176. package/lib/umd/locale/es-ES.js +1 -1
  177. package/lib/umd/locale/fa-IR.js +1 -1
  178. package/lib/umd/locale/fr-FR.js +1 -1
  179. package/lib/umd/locale/ja-JP.js +1 -1
  180. package/lib/umd/locale/ko-KR.js +1 -1
  181. package/lib/umd/locale/ru-RU.js +1 -1
  182. package/lib/umd/locale/sk-SK.js +1 -1
  183. package/lib/umd/locale/vi-VN.js +1 -1
  184. package/lib/umd/locale/zh-CN.js +1 -1
  185. package/lib/umd/locale/zh-TW.js +1 -1
  186. package/package.json +13 -12
  187. package/lib/types/basics/const/default-univer-doc-config.d.ts +0 -45
  188. package/lib/types/basics/const/index.d.ts +0 -17
  189. package/lib/types/basics/const/plugin-name.d.ts +0 -16
  190. package/lib/types/basics/index.d.ts +0 -17
  191. package/lib/types/basics/interfaces/component-config/i-doc-ui-plugin-config.d.ts +0 -59
  192. package/lib/types/basics/interfaces/component-config/index.d.ts +0 -16
  193. package/lib/types/basics/interfaces/index.d.ts +0 -16
  194. package/lib/types/controllers/app-ui-controller.d.ts +0 -6
  195. package/lib/types/controllers/doc-container-ui-controller.d.ts +0 -28
  196. package/lib/types/controllers/index.d.ts +0 -17
  197. package/lib/types/services/clipboard/__test__/html-and-udm-convert.spec.d.ts +0 -16
  198. package/lib/types/services/clipboard/udm-to-html/__test__/convertor.spec.d.ts +0 -16
  199. package/lib/types/views/doc-container/DocContainer.d.ts +0 -57
@@ -1,125 +1 @@
1
- const e = {
2
- toolbar: {
3
- undo: "撤销",
4
- redo: "重做",
5
- font: "字体",
6
- fontSize: "字号",
7
- bold: "粗体",
8
- italic: "斜体",
9
- strikethrough: "删除线",
10
- subscript: "下标",
11
- superscript: "上标",
12
- underline: "下划线",
13
- textColor: {
14
- main: "文本颜色",
15
- right: "颜色选择"
16
- },
17
- fillColor: {
18
- main: "文本背景色",
19
- right: "背景色选择"
20
- },
21
- table: {
22
- main: "表格",
23
- insert: "插入表格",
24
- colCount: "列数",
25
- rowCount: "行数"
26
- },
27
- resetColor: "重置颜色",
28
- order: "有序列表",
29
- unorder: "无序列表",
30
- checklist: "任务列表",
31
- documentFlavor: "现代模式",
32
- alignLeft: "左对齐",
33
- alignCenter: "居中对齐",
34
- alignRight: "右对齐",
35
- alignJustify: "两端对齐",
36
- horizontalLine: "水平分割线",
37
- headerFooter: "页眉页脚",
38
- pageSetup: "页面设置"
39
- },
40
- table: {
41
- insert: "插入",
42
- insertRowAbove: "上方插入行",
43
- insertRowBelow: "下方插入行",
44
- insertColumnLeft: "左方插入列",
45
- insertColumnRight: "右方插入列",
46
- delete: "表格删除",
47
- deleteRows: "删除行",
48
- deleteColumns: "删除列",
49
- deleteTable: "删除表格"
50
- },
51
- headerFooter: {
52
- header: "页眉",
53
- footer: "页脚",
54
- panel: "页眉页脚设置",
55
- firstPageCheckBox: "首页不同",
56
- oddEvenCheckBox: "奇偶页不同",
57
- headerTopMargin: "页眉顶端距离",
58
- footerBottomMargin: "页脚底端距离",
59
- closeHeaderFooter: "关闭页眉页脚",
60
- disableText: "页眉页脚设置不可用"
61
- },
62
- doc: {
63
- menu: {
64
- paragraphSetting: "段落设置"
65
- },
66
- slider: {
67
- paragraphSetting: "段落设置"
68
- },
69
- paragraphSetting: {
70
- alignment: "对齐方式",
71
- indentation: "缩进",
72
- left: "左边距",
73
- right: "右边距",
74
- firstLine: "首行",
75
- hanging: "悬挂",
76
- spacing: "间距",
77
- before: "段落前",
78
- after: "段落后",
79
- lineSpace: "行距",
80
- multiSpace: "多倍行距",
81
- fixedValue: "固定值(px)"
82
- }
83
- },
84
- rightClick: {
85
- copy: "复制",
86
- cut: "剪切",
87
- paste: "粘贴",
88
- delete: "删除",
89
- bulletList: "无序列表",
90
- orderList: "有序列表",
91
- checkList: "任务列表",
92
- insertBellow: "在下方插入"
93
- },
94
- "page-settings": {
95
- "document-setting": "文档设置",
96
- "page-size": {
97
- main: "纸张大小",
98
- a4: "A4",
99
- a3: "A3",
100
- a5: "A5",
101
- b4: "B4",
102
- b5: "B5",
103
- letter: "美式信纸",
104
- legal: "美式法律用纸",
105
- tabloid: "小报尺寸",
106
- statement: "声明用纸",
107
- executive: "行政用纸",
108
- folio: "对开纸"
109
- },
110
- "paper-size": "纸张大小",
111
- orientation: "方向",
112
- portrait: "纵向",
113
- landscape: "横向",
114
- "custom-paper-size": "自定义纸张大小",
115
- top: "上",
116
- bottom: "下",
117
- left: "左",
118
- right: "右",
119
- cancel: "取消",
120
- confirm: "确认"
121
- }
122
- };
123
- export {
124
- e as default
125
- };
1
+ const e={toolbar:{undo:`撤销`,redo:`重做`,font:`字体`,fontSize:`字号`,bold:`粗体`,italic:`斜体`,strikethrough:`删除线`,subscript:`下标`,superscript:`上标`,underline:`下划线`,textColor:{main:`文本颜色`,right:`颜色选择`},fillColor:{main:`文本背景色`,right:`背景色选择`},table:{main:`表格`,insert:`插入表格`,colCount:`列数`,rowCount:`行数`},resetColor:`重置颜色`,order:`有序列表`,unorder:`无序列表`,checklist:`任务列表`,documentFlavor:`现代模式`,alignLeft:`左对齐`,alignCenter:`居中对齐`,alignRight:`右对齐`,alignJustify:`两端对齐`,horizontalLine:`水平分割线`,headerFooter:`页眉页脚`,pageSetup:`页面设置`},table:{insert:`插入`,insertRowAbove:`上方插入行`,insertRowBelow:`下方插入行`,insertColumnLeft:`左方插入列`,insertColumnRight:`右方插入列`,delete:`表格删除`,deleteRows:`删除行`,deleteColumns:`删除列`,deleteTable:`删除表格`},headerFooter:{header:`页眉`,footer:`页脚`,panel:`页眉页脚设置`,firstPageCheckBox:`首页不同`,oddEvenCheckBox:`奇偶页不同`,headerTopMargin:`页眉顶端距离`,footerBottomMargin:`页脚底端距离`,closeHeaderFooter:`关闭页眉页脚`,disableText:`页眉页脚设置不可用`},doc:{menu:{paragraphSetting:`段落设置`},slider:{paragraphSetting:`段落设置`},paragraphSetting:{alignment:`对齐方式`,indentation:`缩进`,left:`左边距`,right:`右边距`,firstLine:`首行`,hanging:`悬挂`,spacing:`间距`,before:`段落前`,after:`段落后`,lineSpace:`行距`,multiSpace:`多倍行距`,fixedValue:`固定值(px)`}},rightClick:{copy:`复制`,cut:`剪切`,paste:`粘贴`,delete:`删除`,bulletList:`无序列表`,orderList:`有序列表`,checkList:`任务列表`,insertBellow:`在下方插入`},"page-settings":{"document-setting":`文档设置`,"page-size":{main:`纸张大小`,a4:`A4`,a3:`A3`,a5:`A5`,b4:`B4`,b5:`B5`,letter:`美式信纸`,legal:`美式法律用纸`,tabloid:`小报尺寸`,statement:`声明用纸`,executive:`行政用纸`,folio:`对开纸`},"paper-size":`纸张大小`,orientation:`方向`,portrait:`纵向`,landscape:`横向`,"custom-paper-size":`自定义纸张大小`,top:`上`,bottom:`下`,left:`左`,right:`右`,cancel:`取消`,confirm:`确认`}};export{e as default};
@@ -1,125 +1 @@
1
- const e = {
2
- toolbar: {
3
- undo: "撤銷",
4
- redo: "重做",
5
- font: "字體",
6
- fontSize: "字號",
7
- bold: "粗體",
8
- italic: "斜體",
9
- strikethrough: "刪除線",
10
- subscript: "下標",
11
- superscript: "上標",
12
- underline: "底線",
13
- textColor: {
14
- main: "文字顏色",
15
- right: "顏色選擇"
16
- },
17
- fillColor: {
18
- main: "文字背景色",
19
- right: "背景色選擇"
20
- },
21
- table: {
22
- main: "Table",
23
- insert: "Insert Table",
24
- colCount: "Column count",
25
- rowCount: "Row count"
26
- },
27
- resetColor: "重置顏色",
28
- order: "有序列表",
29
- unorder: "無序列表",
30
- alignLeft: "左對齊",
31
- alignCenter: "居中對齊",
32
- alignRight: "右對齊",
33
- alignJustify: "兩端對齊",
34
- horizontalLine: "Horizontal line",
35
- headerFooter: "頁眉頁腳",
36
- checklist: "任務列表",
37
- documentFlavor: "现代模式",
38
- pageSetup: "頁面設置"
39
- },
40
- table: {
41
- insert: "Insert",
42
- insertRowAbove: "Insert row above",
43
- insertRowBelow: "Insert row below",
44
- insertColumnLeft: "Insert column left",
45
- insertColumnRight: "Insert column right",
46
- delete: "Table delete",
47
- deleteRows: "Delete row",
48
- deleteColumns: "Delete column",
49
- deleteTable: "Delete table"
50
- },
51
- headerFooter: {
52
- header: "頁眉",
53
- footer: "頁腳",
54
- panel: "頁眉頁腳設置",
55
- firstPageCheckBox: "首頁不同",
56
- oddEvenCheckBox: "奇偶頁不同",
57
- headerTopMargin: "頁眉頂端距離(px)",
58
- footerBottomMargin: "頁腳底端距離(px)",
59
- closeHeaderFooter: "關閉頁眉頁腳",
60
- disableText: "頁眉頁腳設置不可用"
61
- },
62
- doc: {
63
- menu: {
64
- paragraphSetting: "Paragraph Setting"
65
- },
66
- slider: {
67
- paragraphSetting: "Paragraph Setting"
68
- },
69
- paragraphSetting: {
70
- alignment: "Alignment",
71
- indentation: "Indentation",
72
- left: "Left",
73
- right: "Right",
74
- firstLine: "First Line",
75
- hanging: "Hanging",
76
- spacing: "Spacing",
77
- before: "Before",
78
- after: "After",
79
- lineSpace: "Line Space",
80
- multiSpace: "Multi Space",
81
- fixedValue: "Fixed Value(px)"
82
- }
83
- },
84
- rightClick: {
85
- copy: "複製",
86
- cut: "剪切",
87
- paste: "貼上",
88
- delete: "刪除",
89
- bulletList: "無序列表",
90
- orderList: "有序列表",
91
- checkList: "任務列表",
92
- insertBellow: "在下方插入"
93
- },
94
- "page-settings": {
95
- "document-setting": "文檔設置",
96
- "page-size": {
97
- main: "紙張大小",
98
- a4: "A4",
99
- a3: "A3",
100
- a5: "A5",
101
- b4: "B4",
102
- b5: "B5",
103
- letter: "美式信紙",
104
- legal: "美式法律用紙",
105
- tabloid: "小報尺寸",
106
- statement: "聲明用紙",
107
- executive: "行政用紙",
108
- folio: "對開紙"
109
- },
110
- "paper-size": "紙張大小",
111
- orientation: "方向",
112
- portrait: "縱向",
113
- landscape: "橫向",
114
- "custom-paper-size": "自定義紙張大小",
115
- top: "上",
116
- bottom: "下",
117
- left: "左",
118
- right: "右",
119
- cancel: "取消",
120
- confirm: "確認"
121
- }
122
- };
123
- export {
124
- e as default
125
- };
1
+ const e={toolbar:{undo:`撤銷`,redo:`重做`,font:`字體`,fontSize:`字號`,bold:`粗體`,italic:`斜體`,strikethrough:`刪除線`,subscript:`下標`,superscript:`上標`,underline:`底線`,textColor:{main:`文字顏色`,right:`顏色選擇`},fillColor:{main:`文字背景色`,right:`背景色選擇`},table:{main:`Table`,insert:`Insert Table`,colCount:`Column count`,rowCount:`Row count`},resetColor:`重置顏色`,order:`有序列表`,unorder:`無序列表`,alignLeft:`左對齊`,alignCenter:`居中對齊`,alignRight:`右對齊`,alignJustify:`兩端對齊`,horizontalLine:`Horizontal line`,headerFooter:`頁眉頁腳`,checklist:`任務列表`,documentFlavor:`现代模式`,pageSetup:`頁面設置`},table:{insert:`Insert`,insertRowAbove:`Insert row above`,insertRowBelow:`Insert row below`,insertColumnLeft:`Insert column left`,insertColumnRight:`Insert column right`,delete:`Table delete`,deleteRows:`Delete row`,deleteColumns:`Delete column`,deleteTable:`Delete table`},headerFooter:{header:`頁眉`,footer:`頁腳`,panel:`頁眉頁腳設置`,firstPageCheckBox:`首頁不同`,oddEvenCheckBox:`奇偶頁不同`,headerTopMargin:`頁眉頂端距離(px)`,footerBottomMargin:`頁腳底端距離(px)`,closeHeaderFooter:`關閉頁眉頁腳`,disableText:`頁眉頁腳設置不可用`},doc:{menu:{paragraphSetting:`Paragraph Setting`},slider:{paragraphSetting:`Paragraph Setting`},paragraphSetting:{alignment:`Alignment`,indentation:`Indentation`,left:`Left`,right:`Right`,firstLine:`First Line`,hanging:`Hanging`,spacing:`Spacing`,before:`Before`,after:`After`,lineSpace:`Line Space`,multiSpace:`Multi Space`,fixedValue:`Fixed Value(px)`}},rightClick:{copy:`複製`,cut:`剪切`,paste:`貼上`,delete:`刪除`,bulletList:`無序列表`,orderList:`有序列表`,checkList:`任務列表`,insertBellow:`在下方插入`},"page-settings":{"document-setting":`文檔設置`,"page-size":{main:`紙張大小`,a4:`A4`,a3:`A3`,a5:`A5`,b4:`B4`,b5:`B5`,letter:`美式信紙`,legal:`美式法律用紙`,tabloid:`小報尺寸`,statement:`聲明用紙`,executive:`行政用紙`,folio:`對開紙`},"paper-size":`紙張大小`,orientation:`方向`,portrait:`縱向`,landscape:`橫向`,"custom-paper-size":`自定義紙張大小`,top:`上`,bottom:`下`,left:`左`,right:`右`,cancel:`取消`,confirm:`確認`}};export{e as default};
package/lib/facade.js CHANGED
@@ -1,105 +1 @@
1
- var h = Object.defineProperty;
2
- var v = (n, e, t) => e in n ? h(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var m = (n, e, t) => v(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as _, Injector as g, IUniverInstanceService as I, ICommandService as p, IResourceManagerService as S, UniverInstanceType as a, UndoCommand as l, RedoCommand as D, DOC_RANGE_TYPE as U } from "@univerjs/core";
5
- import { FUniver as u } from "@univerjs/core/facade";
6
- import { InsertCommand as f, DocSelectionRenderService as C } from "@univerjs/docs-ui";
7
- import { IRenderManagerService as y } from "@univerjs/engine-render";
8
- var M = Object.getOwnPropertyDescriptor, R = (n, e, t, r) => {
9
- for (var i = r > 1 ? void 0 : r ? M(e, t) : e, s = n.length - 1, d; s >= 0; s--)
10
- (d = n[s]) && (i = d(i) || i);
11
- return i;
12
- }, c = (n, e) => (t, r) => e(t, r, n);
13
- let o = class {
14
- constructor(n, e, t, r, i, s) {
15
- m(this, "id");
16
- this._documentDataModel = n, this._injector = e, this._univerInstanceService = t, this._commandService = r, this._resourceManagerService = i, this._renderManagerService = s, this.id = this._documentDataModel.getUnitId();
17
- }
18
- getId() {
19
- return this._documentDataModel.getUnitId();
20
- }
21
- getName() {
22
- return this.getSnapshot().title || "";
23
- }
24
- getSnapshot() {
25
- const n = this._resourceManagerService.getResourcesByType(this.id, a.UNIVER_DOC), e = this._documentDataModel.getSnapshot();
26
- return e.resources = n, e;
27
- }
28
- undo() {
29
- return this._univerInstanceService.focusUnit(this.id), this._commandService.executeCommand(l.id);
30
- }
31
- redo() {
32
- return this._univerInstanceService.focusUnit(this.id), this._commandService.executeCommand(D.id);
33
- }
34
- /**
35
- * Adds the specified text to the end of this text region.
36
- * @param text - The text to be added to the end of this text region.
37
- */
38
- appendText(n) {
39
- const e = this.id, { body: t } = this.getSnapshot();
40
- if (!t)
41
- throw new Error("The document body is empty");
42
- const r = t.dataStream.length - 2, i = {
43
- startOffset: r,
44
- endOffset: r,
45
- collapsed: !0,
46
- segmentId: ""
47
- }, { segmentId: s } = i;
48
- return this._commandService.executeCommand(f.id, {
49
- unitId: e,
50
- body: {
51
- dataStream: n
52
- },
53
- range: i,
54
- segmentId: s
55
- });
56
- }
57
- /**
58
- * Sets the selection to a specified text range in the document.
59
- * @param startOffset - The starting offset of the selection in the document.
60
- * @param endOffset - The ending offset of the selection in the document.
61
- * @example
62
- * ```typescript
63
- * document.setSelection(10, 20);
64
- * ```
65
- */
66
- setSelection(n, e) {
67
- var r;
68
- const t = (r = this._renderManagerService.getRenderById(this.getId())) == null ? void 0 : r.with(C);
69
- t == null || t.removeAllRanges(), t == null || t.addDocRanges(
70
- [
71
- {
72
- startOffset: n,
73
- endOffset: e,
74
- rangeType: U.TEXT
75
- }
76
- ],
77
- !0
78
- );
79
- }
80
- };
81
- o = R([
82
- c(1, _(g)),
83
- c(2, I),
84
- c(3, p),
85
- c(4, S),
86
- c(5, y)
87
- ], o);
88
- class O extends u {
89
- createUniverDoc(e) {
90
- const t = this._univerInstanceService.createUnit(a.UNIVER_DOC, e);
91
- return this._injector.createInstance(o, t);
92
- }
93
- getActiveDocument() {
94
- const e = this._univerInstanceService.getCurrentUnitForType(a.UNIVER_DOC);
95
- return e ? this._injector.createInstance(o, e) : null;
96
- }
97
- getUniverDoc(e) {
98
- const t = this._univerInstanceService.getUniverDocInstance(e);
99
- return t ? this._injector.createInstance(o, t) : null;
100
- }
101
- }
102
- u.extend(O);
103
- export {
104
- o as FDocument
105
- };
1
+ import{DOC_RANGE_TYPE as e,ICommandService as t,IResourceManagerService as n,IUniverInstanceService as r,Inject as i,Injector as a,RedoCommand as o,UndoCommand as s,UniverInstanceType as c}from"@univerjs/core";import{FUniver as l}from"@univerjs/core/facade";import{DocSelectionRenderService as u,InsertCommand as d}from"@univerjs/docs-ui";import{IRenderManagerService as f}from"@univerjs/engine-render";function p(e){"@babel/helpers - typeof";return p=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},p(e)}function m(e,t){if(p(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(p(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function h(e){var t=m(e,`string`);return p(t)==`symbol`?t:t+``}function g(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){return function(n,r){t(n,r,e)}}function v(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let y=class{constructor(e,t,n,r,i,a){this._documentDataModel=e,this._injector=t,this._univerInstanceService=n,this._commandService=r,this._resourceManagerService=i,this._renderManagerService=a,g(this,`id`,void 0),this.id=this._documentDataModel.getUnitId()}getId(){return this._documentDataModel.getUnitId()}getName(){return this.getSnapshot().title||``}getSnapshot(){let e=this._resourceManagerService.getResourcesByType(this.id,c.UNIVER_DOC),t=this._documentDataModel.getSnapshot();return t.resources=e,t}undo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(s.id)}redo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(o.id)}appendText(e){let t=this.id,{body:n}=this.getSnapshot();if(!n)throw Error(`The document body is empty`);let r=n.dataStream.length-2,i={startOffset:r,endOffset:r,collapsed:!0,segmentId:``},{segmentId:a}=i;return this._commandService.executeCommand(d.id,{unitId:t,body:{dataStream:e},range:i,segmentId:a})}setSelection(t,n){var r;let i=(r=this._renderManagerService.getRenderById(this.getId()))==null?void 0:r.with(u);i==null||i.removeAllRanges(),i==null||i.addDocRanges([{startOffset:t,endOffset:n,rangeType:e.TEXT}],!0)}};y=v([_(1,i(a)),_(2,r),_(3,t),_(4,n),_(5,f)],y);var b=class extends l{createUniverDoc(e){let t=this._univerInstanceService.createUnit(c.UNIVER_DOC,e);return this._injector.createInstance(y,t)}getActiveDocument(){let e=this._univerInstanceService.getCurrentUnitForType(c.UNIVER_DOC);return e?this._injector.createInstance(y,e):null}getUniverDoc(e){let t=this._univerInstanceService.getUniverDocInstance(e);return t?this._injector.createInstance(y,t):null}};l.extend(b);export{y as FDocument};