@univerjs-pro/sheets-print 0.21.1 → 0.22.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 +35 -7
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.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-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.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-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/locale/ko-KR.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-TW.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.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-TW.js +1 -1
- package/package.json +23 -17
package/README.md
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
1
|
# @univerjs-pro/sheets-print
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.
|
|
4
|
-
[](https://npmjs.com/package/@univerjs-pro/sheets-print)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/sheets-print)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`@univerjs-pro/sheets-print` provides print integration for Univer Sheets.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Package Overview
|
|
9
|
+
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/sheets-print` | `UniverProSheetsPrint` | Yes | Yes | Yes |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/sheets-print
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/sheets-print
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
9
23
|
|
|
10
24
|
## Usage
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
```ts
|
|
27
|
+
import '@univerjs-pro/sheets-print/lib/index.css';
|
|
28
|
+
import EnUS from '@univerjs-pro/sheets-print/locale/en-US';
|
|
29
|
+
import { UniverSheetsPrintPlugin } from '@univerjs-pro/sheets-print';
|
|
30
|
+
|
|
31
|
+
univer.registerPlugin(UniverSheetsPrintPlugin);
|
|
13
32
|
|
|
14
|
-
|
|
15
|
-
npm i @univerjs-pro/sheets-print
|
|
33
|
+
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
16
34
|
```
|
|
35
|
+
|
|
36
|
+
## Integration Notes
|
|
37
|
+
|
|
38
|
+
Use this package with `@univerjs-pro/print` and the Univer Sheets UI packages.
|
|
39
|
+
|
|
40
|
+
## Resources
|
|
41
|
+
|
|
42
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
43
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/sheets-print)
|
|
44
|
+
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x29e380=_0x3fa6;function _0x3fa6(_0x17b947,_0x2c0275){_0x17b947=_0x17b947-0x10f;const _0x2c3a32=_0x2c3a();let _0x3fa66e=_0x2c3a32[_0x17b947];return _0x3fa66e;}(function(_0x589314,_0xdb6913){const _0x3c8ae=_0x3fa6,_0x22d6fe=_0x589314();while(!![]){try{const _0x556a83=-parseInt(_0x3c8ae(0x14c))/0x1*(-parseInt(_0x3c8ae(0x135))/0x2)+parseInt(_0x3c8ae(0x11d))/0x3*(parseInt(_0x3c8ae(0x110))/0x4)+parseInt(_0x3c8ae(0x149))/0x5+parseInt(_0x3c8ae(0x136))/0x6+parseInt(_0x3c8ae(0x13e))/0x7+parseInt(_0x3c8ae(0x142))/0x8*(parseInt(_0x3c8ae(0x144))/0x9)+-parseInt(_0x3c8ae(0x112))/0xa*(parseInt(_0x3c8ae(0x12d))/0xb);if(_0x556a83===_0xdb6913)break;else _0x22d6fe['push'](_0x22d6fe['shift']());}catch(_0x446578){_0x22d6fe['push'](_0x22d6fe['shift']());}}}(_0x2c3a,0x7fcb5));let _univerjs_pro_sheets_print=require('@univerjs-pro/sheets-print'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets_facade=require('@univerjs/sheets/facade'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_print=require('@univerjs-pro/print');var FWorkbookSheetsPrintMixin=class extends _univerjs_sheets_facade[_0x29e380(0x114)]{[_0x29e380(0x128)](_0x5846f1){const _0x5002a0=_0x29e380;return this[_0x5002a0(0x124)][_0x5002a0(0x123)](_univerjs_pro_sheets_print['ISheetPrintManagerService'])[_0x5002a0(0x12a)](_0x5846f1),this;}[_0x29e380(0x13a)](_0x22ed2e){const _0xcb9bee=_0x29e380;return this['_injector'][_0xcb9bee(0x123)](_univerjs_pro_sheets_print['ISheetPrintManagerService'])[_0xcb9bee(0x14b)](_0x22ed2e),this;}[_0x29e380(0x13c)](){return this['_injector']['get'](_univerjs_core['ICommandService'])['syncExecuteCommand'](_univerjs_pro_sheets_print['ConfirmSheetPrintOperation']['id']);}['openPrintDialog'](){const _0x2ee85f=_0x29e380;return this[_0x2ee85f(0x124)][_0x2ee85f(0x123)](_univerjs_core[_0x2ee85f(0x134)])['syncExecuteCommand'](_univerjs_pro_sheets_print[_0x2ee85f(0x153)]['id']);}[_0x29e380(0x11b)](){const _0x395eed=_0x29e380;return this[_0x395eed(0x124)][_0x395eed(0x123)](_univerjs_core[_0x395eed(0x134)])[_0x395eed(0x139)](_univerjs_pro_sheets_print['CancelSheetPrintOperation']['id']);}async[_0x29e380(0x120)](){const _0x57c622=_0x29e380;if(!(0x0,_univerjs_pro_sheets_print[_0x57c622(0x133)])(this[_0x57c622(0x124)]))return![];return this['_injector'][_0x57c622(0x123)](_univerjs_core[_0x57c622(0x134)])[_0x57c622(0x130)](_univerjs_pro_sheets_print[_0x57c622(0x129)]['id']);}};_univerjs_sheets_facade[_0x29e380(0x114)][_0x29e380(0x150)](FWorkbookSheetsPrintMixin);var FRangeSheetsPrint=class extends _univerjs_sheets_facade['FRange']{[_0x29e380(0x152)](_0x24ed0d){const _0x26aeda=_0x29e380;if(!(0x0,_univerjs_pro_sheets_print[_0x26aeda(0x133)])(this[_0x26aeda(0x124)]))return![];return this[_0x26aeda(0x124)][_0x26aeda(0x123)](_univerjs_pro_sheets_print[_0x26aeda(0x12f)])[_0x26aeda(0x141)](this[_0x26aeda(0x154)][_0x26aeda(0x111)](),this[_0x26aeda(0x151)][_0x26aeda(0x11f)](),this[_0x26aeda(0x118)],_0x24ed0d===null||_0x24ed0d===void 0x0?void 0x0:_0x24ed0d['includeHeaders']);}};_univerjs_sheets_facade['FRange'][_0x29e380(0x150)](FRangeSheetsPrint);var FSheetsPrintEventNameMixin=class extends _univerjs_core_facade[_0x29e380(0x14e)]{get[_0x29e380(0x12c)](){const _0x33e027=_0x29e380;return _0x33e027(0x12c);}get['BeforeSheetPrintConfirm'](){return'BeforeSheetPrintConfirm';}get[_0x29e380(0x119)](){const _0x1db436=_0x29e380;return _0x1db436(0x119);}get[_0x29e380(0x113)](){const _0x2697b8=_0x29e380;return _0x2697b8(0x113);}get[_0x29e380(0x13f)](){const _0x36095d=_0x29e380;return _0x36095d(0x13f);}get[_0x29e380(0x122)](){const _0x500535=_0x29e380;return _0x500535(0x122);}};_univerjs_core_facade[_0x29e380(0x14e)]['extend'](FSheetsPrintEventNameMixin);var FSheetsPrintEnumMixin=class extends _univerjs_core_facade['FEnum']{get['PrintArea'](){const _0x238f6c=_0x29e380;return _univerjs_pro_sheets_print[_0x238f6c(0x10f)];}get[_0x29e380(0x14a)](){return _univerjs_pro_print['PrintAlign'];}get[_0x29e380(0x11e)](){const _0x9b0793=_0x29e380;return _univerjs_core[_0x9b0793(0x147)];}get[_0x29e380(0x14d)](){return _univerjs_pro_print['PrintPaperMargin'];}get[_0x29e380(0x121)](){return _univerjs_pro_print['PrintScale'];}get[_0x29e380(0x140)](){const _0x1a1038=_0x29e380;return _univerjs_pro_print[_0x1a1038(0x140)];}get[_0x29e380(0x143)](){const _0x440442=_0x29e380;return _univerjs_pro_sheets_print[_0x440442(0x143)];}get[_0x29e380(0x115)](){const _0x4975e3=_0x29e380;return _univerjs_pro_sheets_print[_0x4975e3(0x115)];}get['PrintHeaderFooterSymbol'](){const _0x122901=_0x29e380;return _univerjs_pro_sheets_print[_0x122901(0x116)];}};function _0x2c3a(){const _0x205605=['fireEvent','FUniver','syncExecuteCommand','updatePrintRenderConfig','_initialize','print','disposeWithMe','6167707SasHmk','SheetPrintConfirmed','PrintDirection','getRangeImage','28328wDjJTk','PrintFreeze','306hrdPgm','layoutConfig','onCommandExecuted','PaperType','getActiveSheet','1976355ITtrco','PrintAlign','updateRenderConfig','266549yBakIY','PrintPaperMargin','FEventName','CanceledError','extend','_worksheet','getScreenshot','SheetPrintOpenOperation','_workbook','PrintArea','911732HGrIvo','getUnitId','462430auNmdc','SheetPrintOpen','FWorkbook','PrintHeaderFooter','PrintHeaderFooterSymbol','registerEventHandler','_range','BeforeSheetPrintCanceled','ISheetPrintManagerService','closePrintDialog','getActiveUniverSheet','6FEackt','PrintPaperSize','getSheetId','saveScreenshotToClipboard','PrintScale','SheetPrintCanceled','get','_injector','FEnum','beforeCommandExecuted','CancelSheetPrintOperation','updatePrintConfig','SheetScreenShotOperation','updateLayoutConfig','BeforeSheetPrintConfirm','BeforeSheetPrintOpen','583MDSnjW','Event','SheetPrintClientService','executeCommand','cancel','renderConfig','hasPrintFacadePermission','ICommandService','6iwaKor','1932270nyEqXE'];_0x2c3a=function(){return _0x205605;};return _0x2c3a();}_univerjs_core_facade[_0x29e380(0x125)]['extend'](FSheetsPrintEnumMixin);var FUniverSheetsPrintMixin=class extends _univerjs_core_facade[_0x29e380(0x138)]{[_0x29e380(0x13b)](_0x224fc2){const _0x25dfae=_0x29e380,_0x20eb69=_0x224fc2[_0x25dfae(0x123)](_univerjs_core['ICommandService']);this[_0x25dfae(0x13d)](this[_0x25dfae(0x117)](this[_0x25dfae(0x12e)]['BeforeSheetPrintOpen'],()=>_0x20eb69[_0x25dfae(0x126)](_0x2a7ebc=>{const _0x5535df=_0x25dfae;if(_0x2a7ebc['id']===_univerjs_pro_sheets_print[_0x5535df(0x153)]['id']){const _0x239391=this[_0x5535df(0x11c)]();if(!_0x239391)return;const _0x2c823d={'workbook':_0x239391,'worksheet':_0x239391[_0x5535df(0x148)]()};if(_0x2c823d==null)return;this[_0x5535df(0x137)](this[_0x5535df(0x12e)]['BeforeSheetPrintOpen'],_0x2c823d);if(_0x2c823d[_0x5535df(0x131)])throw new _univerjs_core['CanceledError']();}}))),this[_0x25dfae(0x13d)](this[_0x25dfae(0x117)](this[_0x25dfae(0x12e)][_0x25dfae(0x12b)],()=>_0x20eb69[_0x25dfae(0x126)](_0x423441=>{const _0x27d156=_0x25dfae;if(_0x423441['id']===_univerjs_pro_sheets_print['ConfirmSheetPrintOperation']['id']){const _0x514e8c=_0x224fc2[_0x27d156(0x123)](_univerjs_pro_sheets_print[_0x27d156(0x11a)]);if(!this['getActiveUniverSheet']())return;const _0x1345e6={'layoutConfig':_0x514e8c[_0x27d156(0x145)],'renderConfig':_0x514e8c['renderConfig']};if(_0x1345e6==null)return;this[_0x27d156(0x137)](this[_0x27d156(0x12e)][_0x27d156(0x12b)],_0x1345e6);if(_0x1345e6[_0x27d156(0x131)])throw new _univerjs_core[(_0x27d156(0x14f))]();}}))),this['disposeWithMe'](this[_0x25dfae(0x117)](this[_0x25dfae(0x12e)][_0x25dfae(0x119)],()=>_0x20eb69['beforeCommandExecuted'](_0x261555=>{const _0x5bade0=_0x25dfae;if(_0x261555['id']===_univerjs_pro_sheets_print[_0x5bade0(0x127)]['id']){const _0x2dd98f=_0x224fc2['get'](_univerjs_pro_sheets_print['ISheetPrintManagerService']);if(!this[_0x5bade0(0x11c)]())return;const _0x2bba0e={'layoutConfig':_0x2dd98f[_0x5bade0(0x145)],'renderConfig':_0x2dd98f[_0x5bade0(0x132)]};if(_0x2bba0e==null)return;this[_0x5bade0(0x137)](this[_0x5bade0(0x12e)][_0x5bade0(0x119)],_0x2bba0e);if(_0x2bba0e[_0x5bade0(0x131)])throw new _univerjs_core[(_0x5bade0(0x14f))]();}}))),this[_0x25dfae(0x13d)](this[_0x25dfae(0x117)](this['Event'][_0x25dfae(0x113)],()=>_0x20eb69[_0x25dfae(0x146)](_0x3d1019=>{const _0x5aefec=_0x25dfae;if(_0x3d1019['id']===_univerjs_pro_sheets_print[_0x5aefec(0x153)]['id']){const _0x55c5f7=this[_0x5aefec(0x11c)]();if(!_0x55c5f7)return;const _0x284023={'workbook':_0x55c5f7,'worksheet':_0x55c5f7['getActiveSheet']()};if(_0x284023==null)return;this[_0x5aefec(0x137)](this[_0x5aefec(0x12e)]['SheetPrintOpen'],_0x284023);}}))),this[_0x25dfae(0x13d)](this[_0x25dfae(0x117)](this[_0x25dfae(0x12e)][_0x25dfae(0x13f)],()=>_0x20eb69[_0x25dfae(0x146)](_0x43c6f3=>{const _0x31e876=_0x25dfae;if(_0x43c6f3['id']===_univerjs_pro_sheets_print['ConfirmSheetPrintOperation']['id']){const _0x4fd73b=_0x224fc2[_0x31e876(0x123)](_univerjs_pro_sheets_print[_0x31e876(0x11a)]);if(!this[_0x31e876(0x11c)]())return;const _0x3a7405={'layoutConfig':_0x4fd73b[_0x31e876(0x145)],'renderConfig':_0x4fd73b[_0x31e876(0x132)]};if(_0x3a7405==null)return;this[_0x31e876(0x137)](this[_0x31e876(0x12e)][_0x31e876(0x13f)],_0x3a7405);}}))),this[_0x25dfae(0x13d)](this[_0x25dfae(0x117)](this[_0x25dfae(0x12e)][_0x25dfae(0x122)],()=>_0x20eb69[_0x25dfae(0x146)](_0x3e55ac=>{const _0x528d61=_0x25dfae;if(_0x3e55ac['id']===_univerjs_pro_sheets_print[_0x528d61(0x127)]['id']){const _0x58f145=_0x224fc2[_0x528d61(0x123)](_univerjs_pro_sheets_print[_0x528d61(0x11a)]);if(!this[_0x528d61(0x11c)]())return;const _0x24ffeb={'layoutConfig':_0x58f145[_0x528d61(0x145)],'renderConfig':_0x58f145[_0x528d61(0x132)]};if(_0x24ffeb==null)return;this[_0x528d61(0x137)](this[_0x528d61(0x12e)][_0x528d61(0x122)],_0x24ffeb);}})));}};_univerjs_core_facade['FUniver']['extend'](FUniverSheetsPrintMixin);
|