@univerjs-pro/sheets-print 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -7
- 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 +5 -4
- 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/controllers/components.controller.d.ts +1 -1
- package/lib/types/controllers/menu.d.ts +1 -1
- package/lib/types/facade/f-range.d.ts +1 -1
- package/lib/types/facade/f-workbook.d.ts +1 -1
- package/lib/types/services/print-grid.service.d.ts +1 -1
- package/lib/types/services/sheet-print-dialog.service.d.ts +4 -1
- package/lib/types/services/sheet-print-manager.service.d.ts +1 -1
- package/lib/types/services/sheet-print.service.d.ts +2 -2
- package/lib/types/services/util.d.ts +5 -5
- package/lib/types/utils/util.d.ts +5 -3
- package/lib/types/views/extensions/print-grid.extension.d.ts +2 -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 +19 -19
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
## Package Overview
|
|
10
10
|
|
|
11
|
-
| Package | UMD global | CSS | Locales | Facade entry |
|
|
12
|
-
| --- | --- | :---: | :---: | :---: |
|
|
13
|
-
| `@univerjs-pro/sheets-print` | `UniverProSheetsPrint` | Yes | Yes | Yes |
|
|
11
|
+
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
|
|
12
|
+
| --- | --- | :---: | :---: | :---: | :---: |
|
|
13
|
+
| `@univerjs-pro/sheets-print` | `UniverProSheetsPrint` | Yes | Yes | Yes | No |
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -20,10 +20,10 @@ pnpm add @univerjs-pro/sheets-print
|
|
|
20
20
|
npm install @univerjs-pro/sheets-print
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
24
|
-
|
|
25
23
|
## Usage
|
|
26
24
|
|
|
25
|
+
Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
|
|
26
|
+
|
|
27
27
|
```ts
|
|
28
28
|
import '@univerjs-pro/sheets-print/lib/index.css';
|
|
29
29
|
import EnUS from '@univerjs-pro/sheets-print/locale/en-US';
|
|
@@ -36,12 +36,21 @@ univer.registerPlugin(UniverSheetsPrintPlugin);
|
|
|
36
36
|
|
|
37
37
|
## Integration Notes
|
|
38
38
|
|
|
39
|
-
- Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
|
|
40
39
|
- Import the package stylesheet once in the application entry before rendering Univer UI.
|
|
41
40
|
- Import locale files only for the languages your application enables.
|
|
42
41
|
- Use the facade entry when integrating through Univer Facade APIs.
|
|
43
42
|
|
|
43
|
+
- Printing, range screenshots and clipboard screenshots are available without a
|
|
44
|
+
paid License grant, including when print points are zero or a License expires.
|
|
45
|
+
Printed pages are not truncated by License limits, and range screenshots have
|
|
46
|
+
no License cooldown. Product authorization still controls the single output
|
|
47
|
+
license watermark; independently configured user watermarks remain intact.
|
|
48
|
+
Update the front-end package combination to receive this behavior. API shapes
|
|
49
|
+
and snapshots need no migration; rendering, document permissions and clipboard
|
|
50
|
+
failures still apply.
|
|
51
|
+
|
|
44
52
|
## Resources
|
|
45
53
|
|
|
46
|
-
- [Documentation](https://docs.univer.ai
|
|
54
|
+
- [Documentation](https://docs.univer.ai)
|
|
47
55
|
- [NPM package](https://npmjs.com/package/@univerjs-pro/sheets-print)
|
|
56
|
+
- [GitHub repository](https://github.com/dream-num/univer-pro)
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x530903=_0x1930;(function(_0x47ed4d,_0x52fbe1){const _0x2c9a25=_0x1930,_0x59dde3=_0x47ed4d();while(!![]){try{const _0x44c14f=parseInt(_0x2c9a25(0x204))/0x1+-parseInt(_0x2c9a25(0x1f2))/0x2+parseInt(_0x2c9a25(0x1eb))/0x3*(parseInt(_0x2c9a25(0x201))/0x4)+-parseInt(_0x2c9a25(0x223))/0x5+parseInt(_0x2c9a25(0x1e1))/0x6*(-parseInt(_0x2c9a25(0x1fd))/0x7)+parseInt(_0x2c9a25(0x220))/0x8+-parseInt(_0x2c9a25(0x20b))/0x9*(-parseInt(_0x2c9a25(0x1ec))/0xa);if(_0x44c14f===_0x52fbe1)break;else _0x59dde3['push'](_0x59dde3['shift']());}catch(_0x1bc386){_0x59dde3['push'](_0x59dde3['shift']());}}}(_0x4a80,0x355d4));function _0x1930(_0x241734,_0x56b74b){_0x241734=_0x241734-0x1e1;const _0x4a801a=_0x4a80();let _0x193021=_0x4a801a[_0x241734];return _0x193021;}let e=require('@univerjs-pro/sheets-print'),t=require('@univerjs/core'),n=require('@univerjs/sheets/facade'),r=require('@univerjs/core/facade'),i=require('@univerjs-pro/print');var a=class extends n[_0x530903(0x1f0)]{[_0x530903(0x1e2)](_0x3ba1b9){const _0x4edbd7=_0x530903;return this['_injector'][_0x4edbd7(0x21f)](e[_0x4edbd7(0x20a)])['updateLayoutConfig'](_0x3ba1b9),this;}[_0x530903(0x1f6)](_0x34675c){const _0x1a73db=_0x530903;return this['_injector'][_0x1a73db(0x21f)](e['ISheetPrintManagerService'])[_0x1a73db(0x1f8)](_0x34675c),this;}[_0x530903(0x20c)](){const _0x53e2d4=_0x530903;return this['_injector']['get'](t['ICommandService'])[_0x53e2d4(0x203)](e[_0x53e2d4(0x1f7)]['id']);}[_0x530903(0x205)](){const _0x4216cf=_0x530903;return this[_0x4216cf(0x21c)][_0x4216cf(0x21f)](t[_0x4216cf(0x1ef)])[_0x4216cf(0x203)](e[_0x4216cf(0x1f5)]['id']);}[_0x530903(0x218)](){const _0x13ccf0=_0x530903;return this[_0x13ccf0(0x21c)][_0x13ccf0(0x21f)](t[_0x13ccf0(0x1ef)])[_0x13ccf0(0x203)](e[_0x13ccf0(0x1f3)]['id']);}async[_0x530903(0x213)](){const _0x17e365=_0x530903;return(0x0,e[_0x17e365(0x1f9)])(this[_0x17e365(0x21c)])?this[_0x17e365(0x21c)][_0x17e365(0x21f)](t[_0x17e365(0x1ef)])['executeCommand'](e['SheetScreenShotOperation']['id']):!0x1;}};n[_0x530903(0x1f0)]['extend'](a);function _0x4a80(){const _0x5694a8=['onCommandExecuted','119xYmePG','BeforeSheetPrintConfirm','_workbook','disposeWithMe','4EynZmq','BeforeSheetPrintOpen','syncExecuteCommand','245776WjJEmN','openPrintDialog','SheetPrintCanceled','layoutConfig','PrintArea','beforeCommandExecuted','ISheetPrintManagerService','69930slXcqq','print','FEnum','PaperType','getActiveWorkbook','extend','PrintAlign','FEventName','saveScreenshotToClipboard','getSheetId','FRange','SheetPrintOpen','PrintScale','closePrintDialog','BeforeSheetPrintCanceled','PrintHeaderFooter','getScreenshot','_injector','PrintFreeze','PrintHeaderFooterSymbol','get','459000JrrzRC','PrintDirection','SheetPrintClientService','1465565lAuUwP','150702HnfEwD','updatePrintConfig','CanceledError','getRangeImage','Event','SheetPrintConfirmed','_range','FUniver','_initialize','cancel','654936sGdiCY','810dCXoAc','fireEvent','getActiveSheet','ICommandService','FWorkbook','renderConfig','424302oucOKv','CancelSheetPrintOperation','registerEventHandler','SheetPrintOpenOperation','updatePrintRenderConfig','ConfirmSheetPrintOperation','updateRenderConfig','hasPrintFacadePermission','_worksheet','PrintPaperMargin'];_0x4a80=function(){return _0x5694a8;};return _0x4a80();}var o=class extends n[_0x530903(0x215)]{[_0x530903(0x21b)](_0x45696d){const _0x5348b3=_0x530903;return(0x0,e[_0x5348b3(0x1f9)])(this['_injector'])?this[_0x5348b3(0x21c)][_0x5348b3(0x21f)](e[_0x5348b3(0x222)])[_0x5348b3(0x1e4)](this[_0x5348b3(0x1ff)]['getUnitId'](),this[_0x5348b3(0x1fa)][_0x5348b3(0x214)](),this[_0x5348b3(0x1e7)],_0x45696d==null?void 0x0:_0x45696d['includeHeaders']):!0x1;}};n[_0x530903(0x215)]['extend'](o);var s=class extends r[_0x530903(0x212)]{get[_0x530903(0x202)](){const _0x13c3a2=_0x530903;return _0x13c3a2(0x202);}get['BeforeSheetPrintConfirm'](){const _0x1c34d3=_0x530903;return _0x1c34d3(0x1fe);}get[_0x530903(0x219)](){return'BeforeSheetPrintCanceled';}get[_0x530903(0x216)](){const _0x5f5883=_0x530903;return _0x5f5883(0x216);}get['SheetPrintConfirmed'](){const _0x4d45c2=_0x530903;return _0x4d45c2(0x1e6);}get[_0x530903(0x206)](){const _0x1e447e=_0x530903;return _0x1e447e(0x206);}};r[_0x530903(0x212)][_0x530903(0x210)](s);var c=class extends r[_0x530903(0x20d)]{get['PrintArea'](){const _0x55bf18=_0x530903;return e[_0x55bf18(0x208)];}get[_0x530903(0x211)](){const _0x17f6ab=_0x530903;return i[_0x17f6ab(0x211)];}get['PrintPaperSize'](){const _0x2a9785=_0x530903;return t[_0x2a9785(0x20e)];}get[_0x530903(0x1fb)](){return i['PrintPaperMargin'];}get['PrintScale'](){const _0x3b80d1=_0x530903;return i[_0x3b80d1(0x217)];}get[_0x530903(0x221)](){const _0x5ccaa9=_0x530903;return i[_0x5ccaa9(0x221)];}get[_0x530903(0x21d)](){const _0x2bd179=_0x530903;return e[_0x2bd179(0x21d)];}get['PrintHeaderFooter'](){const _0x4c06e2=_0x530903;return e[_0x4c06e2(0x21a)];}get[_0x530903(0x21e)](){const _0x3650aa=_0x530903;return e[_0x3650aa(0x21e)];}};r[_0x530903(0x20d)][_0x530903(0x210)](c);var l=class extends r[_0x530903(0x1e8)]{[_0x530903(0x1e9)](_0x348dfa){const _0x1e8a49=_0x530903;let _0x418865=_0x348dfa[_0x1e8a49(0x21f)](t[_0x1e8a49(0x1ef)]);this[_0x1e8a49(0x200)](this[_0x1e8a49(0x1f4)](this['Event'][_0x1e8a49(0x202)],()=>_0x418865[_0x1e8a49(0x209)](_0x3e9833=>{const _0x199b74=_0x1e8a49;if(_0x3e9833['id']===e[_0x199b74(0x1f5)]['id']){let _0x2b1705=this[_0x199b74(0x20f)]();if(!_0x2b1705)return;let _0x200e63={'workbook':_0x2b1705,'worksheet':_0x2b1705['getActiveSheet']()};if(_0x200e63==null)return;if(this[_0x199b74(0x1ed)](this[_0x199b74(0x1e5)]['BeforeSheetPrintOpen'],_0x200e63),_0x200e63[_0x199b74(0x1ea)])throw new t[(_0x199b74(0x1e3))]();}}))),this[_0x1e8a49(0x200)](this[_0x1e8a49(0x1f4)](this['Event'][_0x1e8a49(0x1fe)],()=>_0x418865['beforeCommandExecuted'](_0x1863c6=>{const _0x49ca32=_0x1e8a49;if(_0x1863c6['id']===e[_0x49ca32(0x1f7)]['id']){let _0x295e2c=_0x348dfa[_0x49ca32(0x21f)](e[_0x49ca32(0x20a)]);if(!this[_0x49ca32(0x20f)]())return;let _0x41673e={'layoutConfig':_0x295e2c[_0x49ca32(0x207)],'renderConfig':_0x295e2c[_0x49ca32(0x1f1)]};if(_0x41673e==null)return;if(this[_0x49ca32(0x1ed)](this[_0x49ca32(0x1e5)][_0x49ca32(0x1fe)],_0x41673e),_0x41673e[_0x49ca32(0x1ea)])throw new t[(_0x49ca32(0x1e3))]();}}))),this[_0x1e8a49(0x200)](this[_0x1e8a49(0x1f4)](this['Event']['BeforeSheetPrintCanceled'],()=>_0x418865['beforeCommandExecuted'](_0xf89b25=>{const _0x25247a=_0x1e8a49;if(_0xf89b25['id']===e[_0x25247a(0x1f3)]['id']){let _0x502e04=_0x348dfa[_0x25247a(0x21f)](e[_0x25247a(0x20a)]);if(!this[_0x25247a(0x20f)]())return;let _0x2963bd={'layoutConfig':_0x502e04[_0x25247a(0x207)],'renderConfig':_0x502e04[_0x25247a(0x1f1)]};if(_0x2963bd==null)return;if(this[_0x25247a(0x1ed)](this[_0x25247a(0x1e5)]['BeforeSheetPrintCanceled'],_0x2963bd),_0x2963bd[_0x25247a(0x1ea)])throw new t[(_0x25247a(0x1e3))]();}}))),this[_0x1e8a49(0x200)](this[_0x1e8a49(0x1f4)](this[_0x1e8a49(0x1e5)]['SheetPrintOpen'],()=>_0x418865[_0x1e8a49(0x1fc)](_0x44295a=>{const _0x54f056=_0x1e8a49;if(_0x44295a['id']===e[_0x54f056(0x1f5)]['id']){let _0x3dea2c=this[_0x54f056(0x20f)]();if(!_0x3dea2c)return;let _0x4aac7d={'workbook':_0x3dea2c,'worksheet':_0x3dea2c[_0x54f056(0x1ee)]()};if(_0x4aac7d==null)return;this['fireEvent'](this[_0x54f056(0x1e5)][_0x54f056(0x216)],_0x4aac7d);}}))),this[_0x1e8a49(0x200)](this[_0x1e8a49(0x1f4)](this[_0x1e8a49(0x1e5)][_0x1e8a49(0x1e6)],()=>_0x418865['onCommandExecuted'](_0x262e1c=>{const _0x5b9bca=_0x1e8a49;if(_0x262e1c['id']===e[_0x5b9bca(0x1f7)]['id']){let _0x27cb4f=_0x348dfa[_0x5b9bca(0x21f)](e[_0x5b9bca(0x20a)]);if(!this[_0x5b9bca(0x20f)]())return;let _0x2da3dc={'layoutConfig':_0x27cb4f['layoutConfig'],'renderConfig':_0x27cb4f[_0x5b9bca(0x1f1)]};if(_0x2da3dc==null)return;this['fireEvent'](this[_0x5b9bca(0x1e5)]['SheetPrintConfirmed'],_0x2da3dc);}}))),this[_0x1e8a49(0x200)](this['registerEventHandler'](this[_0x1e8a49(0x1e5)]['SheetPrintCanceled'],()=>_0x418865['onCommandExecuted'](_0x5787f3=>{const _0x2da4ad=_0x1e8a49;if(_0x5787f3['id']===e['CancelSheetPrintOperation']['id']){let _0x35327d=_0x348dfa[_0x2da4ad(0x21f)](e['ISheetPrintManagerService']);if(!this[_0x2da4ad(0x20f)]())return;let _0x23d8c6={'layoutConfig':_0x35327d[_0x2da4ad(0x207)],'renderConfig':_0x35327d[_0x2da4ad(0x1f1)]};if(_0x23d8c6==null)return;this['fireEvent'](this[_0x2da4ad(0x1e5)][_0x2da4ad(0x206)],_0x23d8c6);}})));}};r[_0x530903(0x1e8)]['extend'](l);
|