@univerjs-pro/slides-print 1.0.0-beta.0 → 1.0.0-beta.1
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 +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.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/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.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-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.css +159 -0
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/operations/slide-print-dialog.operation.d.ts +4 -0
- package/lib/types/common/types.d.ts +30 -0
- package/lib/types/controllers/ui.controller.d.ts +6 -3
- package/lib/types/facade/f-univer.d.ts +3 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/locale/en-US.d.ts +31 -0
- package/lib/types/services/range-input.d.ts +7 -0
- package/lib/types/services/slide-print-dialog.service.d.ts +25 -0
- package/lib/types/services/slide-print-layout.d.ts +72 -0
- package/lib/types/services/slide-print.service.d.ts +5 -1
- package/lib/types/views/components/SlidePrintView.d.ts +2 -0
- package/lib/types/views/slide-print-canvas-view.d.ts +5 -2
- package/lib/types/views/slide-print-page-view.d.ts +32 -0
- package/lib/types/views/slide-print-style.d.ts +5 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- 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 +18 -9
package/lib/locale/sk-SK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x469e0c=_0x2209;(function(_0x497f97,_0x181148){const _0x2871fa=_0x2209,_0x4eb298=_0x497f97();while(!![]){try{const _0x4cfb25=-parseInt(_0x2871fa(0x196))/0x1*(-parseInt(_0x2871fa(0x191))/0x2)+-parseInt(_0x2871fa(0x19c))/0x3*(-parseInt(_0x2871fa(0x189))/0x4)+parseInt(_0x2871fa(0x19b))/0x5+parseInt(_0x2871fa(0x192))/0x6+-parseInt(_0x2871fa(0x198))/0x7+-parseInt(_0x2871fa(0x19e))/0x8+-parseInt(_0x2871fa(0x1a0))/0x9;if(_0x4cfb25===_0x181148)break;else _0x4eb298['push'](_0x4eb298['shift']());}catch(_0x4576ae){_0x4eb298['push'](_0x4eb298['shift']());}}}(_0x358d,0xdb6d8));function _0x2209(_0x28e6fb,_0x2846b9){_0x28e6fb=_0x28e6fb-0x187;const _0x358d65=_0x358d();let _0x2209d1=_0x358d65[_0x28e6fb];return _0x2209d1;}const e={'slides-print':{'menu':_0x469e0c(0x195),'header':{'pages':_0x469e0c(0x197),'cancel':_0x469e0c(0x1a7),'next':_0x469e0c(0x1a3),'printing':_0x469e0c(0x188)},'settings':{'range':'Rozsah\x20tlače','rangePlaceholder':_0x469e0c(0x18d),'rangeInvalid':_0x469e0c(0x18b),'layout':_0x469e0c(0x19f),'fullPage':_0x469e0c(0x1a6),'notesPage':_0x469e0c(0x19a),'handout':'Podklady','slidesPerPage':_0x469e0c(0x190),'order':_0x469e0c(0x18a),'horizontal':_0x469e0c(0x1a4),'vertical':_0x469e0c(0x199),'paperSize':_0x469e0c(0x187),'orientation':_0x469e0c(0x18c),'portrait':_0x469e0c(0x19d),'landscape':_0x469e0c(0x18e),'margin':_0x469e0c(0x194),'normal':'Normálne','narrow':_0x469e0c(0x1a5),'wide':_0x469e0c(0x18f),'none':_0x469e0c(0x1a2),'formatting':_0x469e0c(0x1a1),'frameSlides':_0x469e0c(0x193),'slideNumber':'Tlačiť\x20čísla\x20snímok'}}};export{e as default};function _0x358d(){const _0x257da7=['Ďalej','Vodorovne','Úzke','Snímky\x20na\x20celú\x20stranu','Zrušiť','Veľkosť\x20papiera','Tlačí\x20sa…','796hASBDe','Poradie\x20strán','Zadajte\x20čísla\x20snímok\x20z\x20prezentácie,\x20napríklad\x201-3,5.','Orientácia','Všetky\x20snímky\x20alebo\x201-3,5','Na\x20šírku','Široké','Snímok\x20na\x20stranu','39562iLOaZj','7611774rqgLeb','Orámovať\x20snímky','Okraje','Tlačiť','86pUBNkt','Celkom:\x20{0}\x20strán','9591498nBrMia','Zvislo','Strany\x20s\x20poznámkami','3582940TXmxji','4107vhNSPI','Na\x20výšku','11851912PViLFA','Rozloženie\x20tlače','1875015ZWWcCj','Formátovanie','Žiadne'];_0x358d=function(){return _0x257da7;};return _0x358d();}
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x2f2e71=_0x1554;function _0x1554(_0x504ce1,_0x6acca7){_0x504ce1=_0x504ce1-0x148;const _0x149599=_0x1495();let _0x15542c=_0x149599[_0x504ce1];return _0x15542c;}(function(_0x43d2ee,_0xc24b6b){const _0x29bc37=_0x1554,_0x4f8069=_0x43d2ee();while(!![]){try{const _0x84d2d8=parseInt(_0x29bc37(0x160))/0x1*(-parseInt(_0x29bc37(0x15a))/0x2)+parseInt(_0x29bc37(0x15d))/0x3*(-parseInt(_0x29bc37(0x150))/0x4)+parseInt(_0x29bc37(0x157))/0x5*(-parseInt(_0x29bc37(0x148))/0x6)+parseInt(_0x29bc37(0x15b))/0x7*(-parseInt(_0x29bc37(0x14c))/0x8)+parseInt(_0x29bc37(0x14b))/0x9+parseInt(_0x29bc37(0x156))/0xa*(-parseInt(_0x29bc37(0x153))/0xb)+parseInt(_0x29bc37(0x154))/0xc*(parseInt(_0x29bc37(0x14a))/0xd);if(_0x84d2d8===_0xc24b6b)break;else _0x4f8069['push'](_0x4f8069['shift']());}catch(_0x1f2e23){_0x4f8069['push'](_0x4f8069['shift']());}}}(_0x1495,0xbebe6));const e={'slides-print':{'menu':'In','header':{'pages':_0x2f2e71(0x158),'cancel':_0x2f2e71(0x151),'next':_0x2f2e71(0x159),'printing':_0x2f2e71(0x15e)},'settings':{'range':'Phạm\x20vi\x20in','rangePlaceholder':_0x2f2e71(0x149),'rangeInvalid':'Nhập\x20số\x20trang\x20chiếu\x20có\x20trong\x20bản\x20trình\x20bày,\x20ví\x20dụ\x201-3,5.','layout':_0x2f2e71(0x14d),'fullPage':_0x2f2e71(0x15c),'notesPage':'Trang\x20ghi\x20chú','handout':'Bản\x20phân\x20phát','slidesPerPage':_0x2f2e71(0x161),'order':'Thứ\x20tự\x20trang','horizontal':'Ngang','vertical':_0x2f2e71(0x14f),'paperSize':'Khổ\x20giấy','orientation':_0x2f2e71(0x162),'portrait':_0x2f2e71(0x14f),'landscape':_0x2f2e71(0x14e),'margin':'Lề','normal':_0x2f2e71(0x152),'narrow':'Hẹp','wide':_0x2f2e71(0x155),'none':'Không\x20có','formatting':_0x2f2e71(0x15f),'frameSlides':'Tạo\x20khung\x20trang\x20chiếu','slideNumber':'In\x20số\x20trang\x20chiếu'}}};export{e as default};function _0x1495(){const _0x33a001=['5448grTybN','Đang\x20in…','Định\x20dạng','2692JRQHSp','Số\x20trang\x20chiếu\x20mỗi\x20trang','Hướng\x20giấy','6889758vmAQkR','Tất\x20cả\x20trang\x20chiếu\x20hoặc\x201-3,5','5681hfkitn','6861078HoWLjK','32GrUVcm','Bố\x20cục\x20in','Ngang','Dọc','3356koDzib','Hủy','Bình\x20thường','78441JTHvqO','147396WEvweK','Rộng','20AozDYv','5FzNSjc','Tổng\x20cộng\x20{0}\x20trang','Tiếp\x20theo','874DsybDr','2600752JklQYc','Trang\x20chiếu\x20toàn\x20trang'];_0x1495=function(){return _0x33a001;};return _0x1495();}
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x1b6234=_0x15f4;function _0x549f(){const _0x4451a1=['整页幻灯片','纸张大小','幻灯片加框','12lZnzsg','232IjPDaV','排列顺序','打印版式','4DaNPwY','282525BUcbcB','5616990YPFxkb','14YiClJz','正在打印…','每页幻灯片数','共\x20{0}\x20页','全部幻灯片,或输入\x201-3,5','1447022rmpsNL','请输入演示文稿范围内的页码,例如\x201-3,5。','20cDzaMv','959190gxcCCo','页边距','288871PRcbbl','打印幻灯片编号','42895788tTbFmW','纸张方向','604143ZJcRKf'];_0x549f=function(){return _0x4451a1;};return _0x549f();}(function(_0x62edc7,_0x35acb4){const _0x4aee02=_0x15f4,_0x5823e4=_0x62edc7();while(!![]){try{const _0x359d77=parseInt(_0x4aee02(0x1fb))/0x1+-parseInt(_0x4aee02(0x1ef))/0x2*(parseInt(_0x4aee02(0x1f4))/0x3)+-parseInt(_0x4aee02(0x1f3))/0x4*(parseInt(_0x4aee02(0x1fe))/0x5)+parseInt(_0x4aee02(0x1f5))/0x6*(parseInt(_0x4aee02(0x1f6))/0x7)+-parseInt(_0x4aee02(0x1f0))/0x8*(-parseInt(_0x4aee02(0x1eb))/0x9)+-parseInt(_0x4aee02(0x1fd))/0xa*(-parseInt(_0x4aee02(0x200))/0xb)+-parseInt(_0x4aee02(0x1e9))/0xc;if(_0x359d77===_0x35acb4)break;else _0x5823e4['push'](_0x5823e4['shift']());}catch(_0x4e4bd2){_0x5823e4['push'](_0x5823e4['shift']());}}}(_0x549f,0xf0f8c));const e={'slides-print':{'menu':'打印','header':{'pages':_0x1b6234(0x1f9),'cancel':'取消','next':'下一步','printing':_0x1b6234(0x1f7)},'settings':{'range':'打印范围','rangePlaceholder':_0x1b6234(0x1fa),'rangeInvalid':_0x1b6234(0x1fc),'layout':_0x1b6234(0x1f2),'fullPage':_0x1b6234(0x1ec),'notesPage':'备注页','handout':'讲义','slidesPerPage':_0x1b6234(0x1f8),'order':_0x1b6234(0x1f1),'horizontal':'横向','vertical':'纵向','paperSize':_0x1b6234(0x1ed),'orientation':_0x1b6234(0x1ea),'portrait':'纵向','landscape':'横向','margin':_0x1b6234(0x1ff),'normal':'普通','narrow':'窄','wide':'宽','none':'无','formatting':'格式','frameSlides':_0x1b6234(0x1ee),'slideNumber':_0x1b6234(0x201)}}};function _0x15f4(_0x233367,_0x4dcdab){_0x233367=_0x233367-0x1e9;const _0x549fa4=_0x549f();let _0x15f452=_0x549fa4[_0x233367];return _0x15f452;}export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0xfc309d=_0x87c2;(function(_0x4b8568,_0x5b01f5){const _0x9b971c=_0x87c2,_0x3bc81b=_0x4b8568();while(!![]){try{const _0x59a98b=-parseInt(_0x9b971c(0x17e))/0x1*(parseInt(_0x9b971c(0x17b))/0x2)+-parseInt(_0x9b971c(0x177))/0x3+parseInt(_0x9b971c(0x175))/0x4*(-parseInt(_0x9b971c(0x17d))/0x5)+parseInt(_0x9b971c(0x178))/0x6+parseInt(_0x9b971c(0x174))/0x7*(-parseInt(_0x9b971c(0x173))/0x8)+parseInt(_0x9b971c(0x17a))/0x9*(-parseInt(_0x9b971c(0x180))/0xa)+parseInt(_0x9b971c(0x171))/0xb;if(_0x59a98b===_0x5b01f5)break;else _0x3bc81b['push'](_0x3bc81b['shift']());}catch(_0x51c7c5){_0x3bc81b['push'](_0x3bc81b['shift']());}}}(_0x2628,0x603eb));function _0x87c2(_0x372ad5,_0x3461cd){_0x372ad5=_0x372ad5-0x16f;const _0x2628e6=_0x2628();let _0x87c233=_0x2628e6[_0x372ad5];return _0x87c233;}function _0x2628(){const _0x22d0dc=['26177mgvxli','下一步','3460XHbZGj','列印投影片編號','整頁投影片','列印版面配置','20745857mOtGzE','紙張大小','1016cKgShv','36512DcXCqr','4zshOlH','共\x20{0}\x20頁','53172HoKYBV','55224YCvhrb','投影片加框','17541LeuFzI','10WUCYiB','請輸入簡報範圍內的頁碼,例如\x201-3,5。','77885LyXEDE'];_0x2628=function(){return _0x22d0dc;};return _0x2628();}const e={'slides-print':{'menu':'列印','header':{'pages':_0xfc309d(0x176),'cancel':'取消','next':_0xfc309d(0x17f),'printing':'正在列印…'},'settings':{'range':'列印範圍','rangePlaceholder':'全部投影片,或輸入\x201-3,5','rangeInvalid':_0xfc309d(0x17c),'layout':_0xfc309d(0x170),'fullPage':_0xfc309d(0x16f),'notesPage':'備忘稿','handout':'講義','slidesPerPage':'每頁投影片數','order':'排列順序','horizontal':'水平','vertical':'垂直','paperSize':_0xfc309d(0x172),'orientation':'紙張方向','portrait':'直向','landscape':'橫向','margin':'邊界','normal':'一般','narrow':'窄','wide':'寬','none':'無','formatting':'格式','frameSlides':_0xfc309d(0x179),'slideNumber':_0xfc309d(0x181)}}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3ba8(_0x40b9c7,_0x10fe96){_0x40b9c7=_0x40b9c7-0xbd;const _0x158459=_0x1584();let _0x3ba874=_0x158459[_0x40b9c7];return _0x3ba874;}const _0xa2d674=_0x3ba8;(function(_0x2e7b33,_0x367cd3){const _0x430ed4=_0x3ba8,_0x2f1227=_0x2e7b33();while(!![]){try{const _0x4f126e=parseInt(_0x430ed4(0xcb))/0x1+-parseInt(_0x430ed4(0xc0))/0x2+-parseInt(_0x430ed4(0xc8))/0x3+parseInt(_0x430ed4(0xbe))/0x4*(parseInt(_0x430ed4(0xc1))/0x5)+parseInt(_0x430ed4(0xcc))/0x6+parseInt(_0x430ed4(0xc3))/0x7+-parseInt(_0x430ed4(0xc6))/0x8;if(_0x4f126e===_0x367cd3)break;else _0x2f1227['push'](_0x2f1227['shift']());}catch(_0x39bd5b){_0x2f1227['push'](_0x2f1227['shift']());}}}(_0x1584,0x865eb));const e={'slides-print':{'menu':'列印','header':{'pages':'共\x20{0}\x20頁','cancel':'取消','next':'下一步','printing':'正在列印…'},'settings':{'range':_0xa2d674(0xbf),'rangePlaceholder':_0xa2d674(0xc9),'rangeInvalid':'請輸入簡報範圍內的頁碼,例如\x201-3,5。','layout':_0xa2d674(0xc2),'fullPage':'整頁投影片','notesPage':_0xa2d674(0xc4),'handout':'講義','slidesPerPage':_0xa2d674(0xca),'order':'排列順序','horizontal':'水平','vertical':'垂直','paperSize':'紙張大小','orientation':_0xa2d674(0xbd),'portrait':'直向','landscape':'橫向','margin':'邊界','normal':'一般','narrow':'窄','wide':'寬','none':'無','formatting':'格式','frameSlides':_0xa2d674(0xc5),'slideNumber':_0xa2d674(0xc7)}}};export{e as default};function _0x1584(){const _0x1a0285=['每頁投影片數','412484tvAAda','619278EJeCRl','紙張方向','511448uonnpK','列印範圍','105064nVKJoR','10CYHdor','列印版面配置','5965715LRejtW','備忘稿','投影片加框','6128640KJjVAU','列印投影片編號','764025pHsnaI','全部投影片,或輸入\x201-3,5'];_0x1584=function(){return _0x1a0285;};return _0x1584();}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { IPrintMargin, PrintDirection, PrintPaperMargin } from '@univerjs-pro/print';
|
|
2
|
+
import type { PaperType } from '@univerjs/core';
|
|
1
3
|
export interface ISlidePrintRange {
|
|
2
4
|
/**
|
|
3
5
|
* 1-based inclusive start page.
|
|
@@ -8,9 +10,37 @@ export interface ISlidePrintRange {
|
|
|
8
10
|
*/
|
|
9
11
|
to: number;
|
|
10
12
|
}
|
|
13
|
+
export declare enum SlidePrintLayoutType {
|
|
14
|
+
FullPage = "FullPage",
|
|
15
|
+
Handout = "Handout",
|
|
16
|
+
NotesPage = "NotesPage"
|
|
17
|
+
}
|
|
18
|
+
export declare enum SlidePrintHandoutOrder {
|
|
19
|
+
Horizontal = "Horizontal",
|
|
20
|
+
Vertical = "Vertical"
|
|
21
|
+
}
|
|
22
|
+
export type SlidePrintSlidesPerPage = 1 | 2 | 3 | 4 | 6 | 9;
|
|
11
23
|
export interface ISlidePrintOptions {
|
|
12
24
|
/**
|
|
13
25
|
* Optional list of 1-based page ranges. If omitted, all slides are printed.
|
|
14
26
|
*/
|
|
15
27
|
range?: ISlidePrintRange[];
|
|
28
|
+
/** Print layout. Omitted options preserve the legacy full-slide page behavior. */
|
|
29
|
+
layout?: SlidePrintLayoutType;
|
|
30
|
+
/** Number of slides on each handout page. Only used by the handout layout. */
|
|
31
|
+
slidesPerPage?: SlidePrintSlidesPerPage;
|
|
32
|
+
/** Fill direction for 4, 6, and 9 slide handouts. */
|
|
33
|
+
handoutOrder?: SlidePrintHandoutOrder;
|
|
34
|
+
/** Physical paper size. When omitted for full-page printing, the slide size is used. */
|
|
35
|
+
paperSize?: PaperType;
|
|
36
|
+
/** Physical paper orientation. */
|
|
37
|
+
direction?: PrintDirection;
|
|
38
|
+
/** Physical paper margin preset. */
|
|
39
|
+
margin?: PrintPaperMargin;
|
|
40
|
+
/** Custom margins, used when `margin` is `PrintPaperMargin.Custom`. */
|
|
41
|
+
marginCustom?: IPrintMargin;
|
|
42
|
+
/** Draw a thin frame around each rendered slide. */
|
|
43
|
+
frameSlides?: boolean;
|
|
44
|
+
/** Print the source slide number next to each slide. */
|
|
45
|
+
showSlideNumber?: boolean;
|
|
16
46
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
-
import { IMenuManagerService } from '@univerjs/ui';
|
|
1
|
+
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
|
+
import { IMenuManagerService, IUIPartsService } from '@univerjs/ui';
|
|
3
3
|
export declare class SlidesPrintUIController extends Disposable {
|
|
4
4
|
private readonly _commandService;
|
|
5
5
|
private readonly _menuManagerService;
|
|
6
|
-
|
|
6
|
+
private readonly _uiPartsService;
|
|
7
|
+
private readonly _injector;
|
|
8
|
+
constructor(_commandService: ICommandService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService, _injector: Injector);
|
|
7
9
|
private _initCommands;
|
|
10
|
+
private _initUIParts;
|
|
8
11
|
private _initMenus;
|
|
9
12
|
}
|
|
@@ -9,9 +9,12 @@ export interface IFUniverSlidesPrintMixin {
|
|
|
9
9
|
* @returns Whether the print operation was started.
|
|
10
10
|
*/
|
|
11
11
|
printSlidesAsync(options?: ISlidePrintOptions): Promise<boolean>;
|
|
12
|
+
/** Open the Univer Slides print settings and preview. */
|
|
13
|
+
openSlidesPrintDialog(options?: ISlidePrintOptions): boolean;
|
|
12
14
|
}
|
|
13
15
|
export declare class FUniverSlidesPrintMixin extends FUniver implements IFUniverSlidesPrintMixin {
|
|
14
16
|
printSlidesAsync(options?: ISlidePrintOptions): Promise<boolean>;
|
|
17
|
+
openSlidesPrintDialog(options?: ISlidePrintOptions): boolean;
|
|
15
18
|
}
|
|
16
19
|
declare module '@univerjs/core/facade' {
|
|
17
20
|
interface FUniver extends IFUniverSlidesPrintMixin {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import './global.css';
|
|
2
|
+
export { OpenSlidePrintDialogOperation } from './commands/operations/slide-print-dialog.operation';
|
|
1
3
|
export { SlidePrintOperation } from './commands/operations/slide-print.operation';
|
|
2
|
-
export type { ISlidePrintOptions } from './common/types';
|
|
4
|
+
export type { ISlidePrintOptions, ISlidePrintRange, SlidePrintSlidesPerPage } from './common/types';
|
|
5
|
+
export { SlidePrintHandoutOrder, SlidePrintLayoutType } from './common/types';
|
|
3
6
|
export { menuSchema as SlidesPrintMenuSchema } from './menu/schema';
|
|
4
7
|
export { UniverSlidesPrintPlugin } from './plugin';
|
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
declare const locale: {
|
|
2
2
|
'slides-print': {
|
|
3
3
|
menu: string;
|
|
4
|
+
header: {
|
|
5
|
+
pages: string;
|
|
6
|
+
cancel: string;
|
|
7
|
+
next: string;
|
|
8
|
+
printing: string;
|
|
9
|
+
};
|
|
10
|
+
settings: {
|
|
11
|
+
range: string;
|
|
12
|
+
rangePlaceholder: string;
|
|
13
|
+
rangeInvalid: string;
|
|
14
|
+
layout: string;
|
|
15
|
+
fullPage: string;
|
|
16
|
+
notesPage: string;
|
|
17
|
+
handout: string;
|
|
18
|
+
slidesPerPage: string;
|
|
19
|
+
order: string;
|
|
20
|
+
horizontal: string;
|
|
21
|
+
vertical: string;
|
|
22
|
+
paperSize: string;
|
|
23
|
+
orientation: string;
|
|
24
|
+
portrait: string;
|
|
25
|
+
landscape: string;
|
|
26
|
+
margin: string;
|
|
27
|
+
normal: string;
|
|
28
|
+
narrow: string;
|
|
29
|
+
wide: string;
|
|
30
|
+
none: string;
|
|
31
|
+
formatting: string;
|
|
32
|
+
frameSlides: string;
|
|
33
|
+
slideNumber: string;
|
|
34
|
+
};
|
|
4
35
|
};
|
|
5
36
|
};
|
|
6
37
|
export default locale;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ISlidePrintRange } from '../common/types';
|
|
2
|
+
export interface ISlidePrintRangeInputResult {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
range?: ISlidePrintRange[];
|
|
5
|
+
}
|
|
6
|
+
export declare function parseSlidePrintRangeInput(value: string, totalSlides: number): ISlidePrintRangeInputResult;
|
|
7
|
+
export declare function formatSlidePrintRangeInput(range?: ISlidePrintRange[]): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Observable } from 'rxjs';
|
|
2
|
+
import type { ISlidePrintOptions } from '../common/types';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
export interface ISlidePrintDialogService {
|
|
5
|
+
readonly visible$: Observable<boolean>;
|
|
6
|
+
readonly options$: Observable<ISlidePrintOptions>;
|
|
7
|
+
readonly visible: boolean;
|
|
8
|
+
readonly options: ISlidePrintOptions;
|
|
9
|
+
open(options?: ISlidePrintOptions): void;
|
|
10
|
+
close(): void;
|
|
11
|
+
updateOptions(options: Partial<ISlidePrintOptions>): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ISlidePrintDialogService: import("@wendellhu/redi").IdentifierDecorator<ISlidePrintDialogService>;
|
|
14
|
+
export declare class SlidePrintDialogService extends Disposable implements ISlidePrintDialogService {
|
|
15
|
+
private readonly _visible$;
|
|
16
|
+
private readonly _options$;
|
|
17
|
+
readonly visible$: Observable<boolean>;
|
|
18
|
+
readonly options$: Observable<ISlidePrintOptions>;
|
|
19
|
+
get visible(): boolean;
|
|
20
|
+
get options(): ISlidePrintOptions;
|
|
21
|
+
open(options?: ISlidePrintOptions): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
updateOptions(options: Partial<ISlidePrintOptions>): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { IPrintMargin } from '@univerjs-pro/print';
|
|
2
|
+
import type { SlidePage } from '@univerjs-pro/slides';
|
|
3
|
+
import type { ISlidePrintOptions, SlidePrintSlidesPerPage } from '../common/types';
|
|
4
|
+
import { PrintDirection, PrintPaperMargin } from '@univerjs-pro/print';
|
|
5
|
+
import { PaperType } from '@univerjs/core';
|
|
6
|
+
import { SlidePrintHandoutOrder, SlidePrintLayoutType } from '../common/types';
|
|
7
|
+
export declare const SLIDE_PRINT_NOTE_FONT_SIZE = 14;
|
|
8
|
+
export declare const SLIDE_PRINT_NOTE_LINE_HEIGHT = 21;
|
|
9
|
+
export interface ISlidePrintSourcePage {
|
|
10
|
+
index: number;
|
|
11
|
+
page: SlidePage;
|
|
12
|
+
pageId: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
speakerNotes: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ISlidePrintRect {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ISlidePrintSlotPlan {
|
|
24
|
+
source: ISlidePrintSourcePage;
|
|
25
|
+
rect: ISlidePrintRect;
|
|
26
|
+
noteLinesRect?: ISlidePrintRect;
|
|
27
|
+
}
|
|
28
|
+
export interface ISlidePrintPhysicalPagePlan {
|
|
29
|
+
key: string;
|
|
30
|
+
slots: ISlidePrintSlotPlan[];
|
|
31
|
+
notes?: {
|
|
32
|
+
lines: string[];
|
|
33
|
+
rect: ISlidePrintRect;
|
|
34
|
+
continuation: boolean;
|
|
35
|
+
source: ISlidePrintSourcePage;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface IResolvedSlidePrintOptions {
|
|
39
|
+
layout: SlidePrintLayoutType;
|
|
40
|
+
slidesPerPage: SlidePrintSlidesPerPage;
|
|
41
|
+
handoutOrder: SlidePrintHandoutOrder;
|
|
42
|
+
paperSize?: PaperType;
|
|
43
|
+
direction: PrintDirection;
|
|
44
|
+
margin: PrintPaperMargin;
|
|
45
|
+
marginCustom: IPrintMargin;
|
|
46
|
+
frameSlides: boolean;
|
|
47
|
+
showSlideNumber: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface ISlidePrintPlan {
|
|
50
|
+
pageSize: {
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
};
|
|
54
|
+
margin: IPrintMargin;
|
|
55
|
+
options: IResolvedSlidePrintOptions;
|
|
56
|
+
pages: ISlidePrintPhysicalPagePlan[];
|
|
57
|
+
}
|
|
58
|
+
export type SlidePrintTextMeasurer = (text: string) => number;
|
|
59
|
+
export declare function resolveSlidePrintOptions(options?: ISlidePrintOptions): IResolvedSlidePrintOptions;
|
|
60
|
+
export declare function createSlidePrintPlan(sourcePages: ISlidePrintSourcePage[], defaultSlideSize: {
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
}, options?: ISlidePrintOptions, measureText?: SlidePrintTextMeasurer): ISlidePrintPlan;
|
|
64
|
+
export declare function createSlidePrintSourcePages(pages: Array<{
|
|
65
|
+
page: SlidePage;
|
|
66
|
+
index: number;
|
|
67
|
+
}>, defaultSlideSize: {
|
|
68
|
+
width: number;
|
|
69
|
+
height: number;
|
|
70
|
+
}): ISlidePrintSourcePage[];
|
|
71
|
+
export declare function wrapSpeakerNotes(text: string, width: number, measureText: SlidePrintTextMeasurer): string[];
|
|
72
|
+
export declare function createDefaultSlidePrintDialogOptions(): ISlidePrintOptions;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ISlidePrintOptions } from '../common/types';
|
|
2
|
+
import { ISlideDrawingService } from '@univerjs-pro/slides';
|
|
2
3
|
import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
3
4
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
5
|
export declare class SlidePrintService extends Disposable {
|
|
5
6
|
private readonly _univerInstanceService;
|
|
6
7
|
private readonly _injector;
|
|
8
|
+
private readonly _slideDrawingService;
|
|
7
9
|
private readonly _renderManagerService;
|
|
8
10
|
private _printing;
|
|
9
|
-
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _renderManagerService: IRenderManagerService);
|
|
11
|
+
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _slideDrawingService: ISlideDrawingService, _renderManagerService: IRenderManagerService);
|
|
10
12
|
print(unitId: string, options?: ISlidePrintOptions): Promise<boolean>;
|
|
13
|
+
private _preparePrintResources;
|
|
14
|
+
private _printPreparedPages;
|
|
11
15
|
private _createPrintFrame;
|
|
12
16
|
private _restoreThumbnailRenders;
|
|
13
17
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { SlideModel, SlidePage } from '@univerjs-pro/slides';
|
|
1
|
+
import type { ISlideDrawingService, SlideModel, SlidePage } from '@univerjs-pro/slides';
|
|
2
2
|
import type { Injector } from '@univerjs/core';
|
|
3
3
|
import { Disposable } from '@univerjs/core';
|
|
4
4
|
export declare class SlidePrintCanvasView extends Disposable {
|
|
5
5
|
private readonly _injector;
|
|
6
|
+
private readonly _slideDrawingService;
|
|
6
7
|
private readonly _slideModel;
|
|
7
8
|
private readonly _slidePage;
|
|
9
|
+
private readonly _autoRender;
|
|
8
10
|
private _container;
|
|
9
11
|
private _root;
|
|
10
12
|
private _engine;
|
|
@@ -14,9 +16,10 @@ export declare class SlidePrintCanvasView extends Disposable {
|
|
|
14
16
|
get container(): HTMLDivElement;
|
|
15
17
|
get root(): HTMLDivElement;
|
|
16
18
|
private get _pageSize();
|
|
17
|
-
constructor(_injector: Injector, _slideModel: SlideModel, _slidePage: SlidePage);
|
|
19
|
+
constructor(_injector: Injector, _slideDrawingService: ISlideDrawingService, _slideModel: SlideModel, _slidePage: SlidePage, _autoRender?: boolean);
|
|
18
20
|
private _initRenderer;
|
|
19
21
|
private _renderSlidePage;
|
|
20
22
|
prepare(): void;
|
|
21
23
|
render(): void;
|
|
24
|
+
private _requestRender;
|
|
22
25
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ISlideDrawingService, SlideModel } from '@univerjs-pro/slides';
|
|
2
|
+
import type { IDisposable, Injector } from '@univerjs/core';
|
|
3
|
+
import type { ISlidePrintPhysicalPagePlan } from '../services/slide-print-layout';
|
|
4
|
+
import { Disposable } from '@univerjs/core';
|
|
5
|
+
export declare const SLIDE_PRINT_PAGE_CLASS = "univer-slide-print-page";
|
|
6
|
+
export declare const SLIDE_PRINT_SLOT_CLASS = "univer-slide-print-slot";
|
|
7
|
+
export declare const SLIDE_PRINT_SURFACE_CLASS = "univer-slide-print-surface";
|
|
8
|
+
export interface ISlidePrintPageViewOptions {
|
|
9
|
+
frameSlides: boolean;
|
|
10
|
+
showSlideNumber: boolean;
|
|
11
|
+
preview?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class SlidePrintPageView extends Disposable implements IDisposable {
|
|
14
|
+
private readonly _document;
|
|
15
|
+
private readonly _injector;
|
|
16
|
+
private readonly _slideDrawingService;
|
|
17
|
+
private readonly _slideModel;
|
|
18
|
+
private readonly _plan;
|
|
19
|
+
private readonly _pageSize;
|
|
20
|
+
private readonly _options;
|
|
21
|
+
readonly container: HTMLDivElement;
|
|
22
|
+
private readonly _slideViews;
|
|
23
|
+
constructor(_document: Document, _injector: Injector, _slideDrawingService: ISlideDrawingService, _slideModel: SlideModel, _plan: ISlidePrintPhysicalPagePlan, _pageSize: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}, _options: ISlidePrintPageViewOptions);
|
|
27
|
+
render(): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
private _mountSlides;
|
|
30
|
+
private _mountHandoutLines;
|
|
31
|
+
private _mountNotes;
|
|
32
|
+
}
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x10ba(_0x618647,_0xce79dd){_0x618647=_0x618647-0x1a8;var _0x827f71=_0x827f();var _0x10ba47=_0x827f71[_0x618647];return _0x10ba47;}(function(_0x203743,_0xb66e2a){var _0x48f382=_0x10ba,_0x1ce0a2=_0x203743();while(!![]){try{var _0x5e8e80=parseInt(_0x48f382(0x1b3))/0x1*(parseInt(_0x48f382(0x1ba))/0x2)+parseInt(_0x48f382(0x1b1))/0x3*(parseInt(_0x48f382(0x1ac))/0x4)+parseInt(_0x48f382(0x1ad))/0x5+parseInt(_0x48f382(0x1a8))/0x6*(parseInt(_0x48f382(0x1ae))/0x7)+-parseInt(_0x48f382(0x1af))/0x8+parseInt(_0x48f382(0x1b0))/0x9+-parseInt(_0x48f382(0x1ab))/0xa;if(_0x5e8e80===_0xb66e2a)break;else _0x1ce0a2['push'](_0x1ce0a2['shift']());}catch(_0x1a55f6){_0x1ce0a2['push'](_0x1ce0a2['shift']());}}}(_0x827f,0x49867),function(_0xfc4856,_0x9d273d){var _0x58f2ad=_0x10ba;typeof exports==_0x58f2ad(0x1a9)&&typeof module<'u'?_0x9d273d(require('@univerjs-pro/slides-print'),require('@univerjs/core/facade')):typeof define==_0x58f2ad(0x1b7)&&define[_0x58f2ad(0x1aa)]?define(['@univerjs-pro/slides-print','@univerjs/core/facade'],_0x9d273d):(_0xfc4856=typeof globalThis<'u'?globalThis:_0xfc4856||self,_0x9d273d(_0xfc4856[_0x58f2ad(0x1b8)],_0xfc4856['UniverCoreFacade']));}(this,function(_0x27b083,_0x548ee7){var _0x1f3516=_0x10ba,_0x2c7a58=class extends _0x548ee7['FUniver']{['printSlidesAsync'](_0x3f3f33){var _0x211c9e=_0x10ba;return this[_0x211c9e(0x1b6)][_0x211c9e(0x1bb)](_0x27b083[_0x211c9e(0x1b2)]['id'],_0x3f3f33);}[_0x1f3516(0x1b4)](_0x401b92){var _0x475e78=_0x1f3516;return this[_0x475e78(0x1b6)]['syncExecuteCommand'](_0x27b083[_0x475e78(0x1b9)]['id'],_0x401b92);}};_0x548ee7['FUniver'][_0x1f3516(0x1b5)](_0x2c7a58);}));function _0x827f(){var _0x4fd49d=['3889968FvUMFZ','1779210FCHTRs','3PxKWpY','SlidePrintOperation','4xQyQLS','openSlidesPrintDialog','extend','_commandService','function','UniverProSlidesPrint','OpenSlidePrintDialogOperation','66378dhFRaN','executeCommand','3543378vDuugM','object','amd','4892080AhasSR','215612PhvrWX','1508505xwUkWi','7iLwBlo'];_0x827f=function(){return _0x4fd49d;};return _0x827f();}
|