@ckeditor/ckeditor5-export-pdf 42.0.0-alpha.8 → 42.0.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 (105) hide show
  1. package/build/export-pdf.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/bg.js +1 -1
  8. package/dist/translations/bg.umd.js +1 -1
  9. package/dist/translations/bn.js +1 -1
  10. package/dist/translations/bn.umd.js +1 -1
  11. package/dist/translations/ca.js +1 -1
  12. package/dist/translations/ca.umd.js +1 -1
  13. package/dist/translations/cs.js +1 -1
  14. package/dist/translations/cs.umd.js +1 -1
  15. package/dist/translations/da.js +1 -1
  16. package/dist/translations/da.umd.js +1 -1
  17. package/dist/translations/de.js +1 -1
  18. package/dist/translations/de.umd.js +1 -1
  19. package/dist/translations/el.js +1 -1
  20. package/dist/translations/el.umd.js +1 -1
  21. package/dist/translations/en-au.js +1 -1
  22. package/dist/translations/en-au.umd.js +1 -1
  23. package/dist/translations/en.umd.js +1 -1
  24. package/dist/translations/es-co.js +1 -1
  25. package/dist/translations/es-co.umd.js +1 -1
  26. package/dist/translations/es.js +1 -1
  27. package/dist/translations/es.umd.js +1 -1
  28. package/dist/translations/et.js +1 -1
  29. package/dist/translations/et.umd.js +1 -1
  30. package/dist/translations/fi.js +1 -1
  31. package/dist/translations/fi.umd.js +1 -1
  32. package/dist/translations/fr.js +1 -1
  33. package/dist/translations/fr.umd.js +1 -1
  34. package/dist/translations/gl.js +1 -1
  35. package/dist/translations/gl.umd.js +1 -1
  36. package/dist/translations/he.js +1 -1
  37. package/dist/translations/he.umd.js +1 -1
  38. package/dist/translations/hi.js +1 -1
  39. package/dist/translations/hi.umd.js +1 -1
  40. package/dist/translations/hr.js +1 -1
  41. package/dist/translations/hr.umd.js +1 -1
  42. package/dist/translations/hu.js +1 -1
  43. package/dist/translations/hu.umd.js +1 -1
  44. package/dist/translations/id.js +1 -1
  45. package/dist/translations/id.umd.js +1 -1
  46. package/dist/translations/it.js +1 -1
  47. package/dist/translations/it.umd.js +1 -1
  48. package/dist/translations/ja.js +1 -1
  49. package/dist/translations/ja.umd.js +1 -1
  50. package/dist/translations/jv.js +1 -1
  51. package/dist/translations/jv.umd.js +1 -1
  52. package/dist/translations/ko.js +1 -1
  53. package/dist/translations/ko.umd.js +1 -1
  54. package/dist/translations/lt.js +1 -1
  55. package/dist/translations/lt.umd.js +1 -1
  56. package/dist/translations/lv.js +1 -1
  57. package/dist/translations/lv.umd.js +1 -1
  58. package/dist/translations/ms.js +1 -1
  59. package/dist/translations/ms.umd.js +1 -1
  60. package/dist/translations/nl.js +1 -1
  61. package/dist/translations/nl.umd.js +1 -1
  62. package/dist/translations/no.js +1 -1
  63. package/dist/translations/no.umd.js +1 -1
  64. package/dist/translations/pl.js +1 -1
  65. package/dist/translations/pl.umd.js +1 -1
  66. package/dist/translations/pt-br.js +1 -1
  67. package/dist/translations/pt-br.umd.js +1 -1
  68. package/dist/translations/pt.js +1 -1
  69. package/dist/translations/pt.umd.js +1 -1
  70. package/dist/translations/ro.js +1 -1
  71. package/dist/translations/ro.umd.js +1 -1
  72. package/dist/translations/ru.js +1 -1
  73. package/dist/translations/ru.umd.js +1 -1
  74. package/dist/translations/sk.js +1 -1
  75. package/dist/translations/sk.umd.js +1 -1
  76. package/dist/translations/sr-latn.js +1 -1
  77. package/dist/translations/sr-latn.umd.js +1 -1
  78. package/dist/translations/sr.js +1 -1
  79. package/dist/translations/sr.umd.js +1 -1
  80. package/dist/translations/sv.js +1 -1
  81. package/dist/translations/sv.umd.js +1 -1
  82. package/dist/translations/th.js +1 -1
  83. package/dist/translations/th.umd.js +1 -1
  84. package/dist/translations/tr.js +1 -1
  85. package/dist/translations/tr.umd.js +1 -1
  86. package/dist/translations/ug.js +1 -1
  87. package/dist/translations/ug.umd.js +1 -1
  88. package/dist/translations/uk.js +1 -1
  89. package/dist/translations/uk.umd.js +1 -1
  90. package/dist/translations/ur.js +1 -1
  91. package/dist/translations/ur.umd.js +1 -1
  92. package/dist/translations/vi.js +1 -1
  93. package/dist/translations/vi.umd.js +1 -1
  94. package/dist/translations/zh-cn.js +1 -1
  95. package/dist/translations/zh-cn.umd.js +1 -1
  96. package/dist/translations/zh.js +1 -1
  97. package/dist/translations/zh.umd.js +1 -1
  98. package/dist/types/exportpdf.d.ts +6 -5
  99. package/package.json +2 -2
  100. package/src/exportpdf.d.ts +6 -5
  101. package/src/exportpdf.js +1 -1
  102. package/src/exportpdfcommand.js +1 -1
  103. package/src/exportpdfui.js +1 -1
  104. package/src/index.js +1 -1
  105. package/src/utils.js +1 -1
@@ -65,10 +65,11 @@ export interface ExportPdfConfig {
65
65
  *
66
66
  * **Default editor's content styles**:
67
67
  * {@glink getting-started/setup/css The default editor content styles}
68
- * are applied to the generated PDF thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
68
+ * are applied to the generated PDF thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
69
69
  * If you don't want them to be applied, you have to omit the token:
70
70
  *
71
- * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
71
+ * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
72
+ * In other setups you always need to pass the stylesheets.
72
73
  *
73
74
  * ```ts
74
75
  * const exportPdfConfig = {
@@ -77,13 +78,13 @@ export interface ExportPdfConfig {
77
78
  * ```
78
79
  *
79
80
  * **Web fonts:** If you want to {@glink features/converters/export-pdf#providing-web-font-styles use web fonts} in your PDF document,
80
- * you should provide a path to the file containing the web font declaration before the `'EDITOR_STYLES'` token:
81
+ * you should provide a path to the file containing the web font declaration before the `'EDITOR_STYLES'` token and other style sheets:
81
82
  *
82
83
  * ```ts
83
84
  * const exportPdfConfig = {
84
85
  * stylesheets: [
85
- * 'path/to/editor-styles.css',
86
86
  * './path/to/fonts.css'
87
+ * './path/to/editor-styles.css',
87
88
  * ]
88
89
  * }
89
90
  * ```
@@ -93,8 +94,8 @@ export interface ExportPdfConfig {
93
94
  * ```ts
94
95
  * const exportPdfConfig = {
95
96
  * stylesheets: [
96
- * 'path/to/editor-styles.css',
97
97
  * './path/to/fonts.css',
98
+ * './path/to/editor-styles.css',
98
99
  * './path/to/custom-styles.css'
99
100
  * ]
100
101
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-pdf",
3
- "version": "42.0.0-alpha.8",
3
+ "version": "42.0.0",
4
4
  "description": "Export to PDF feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,7 +30,7 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "42.0.0-alpha.8"
33
+ "ckeditor5": "42.0.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (http://cksource.com/)",
@@ -61,10 +61,11 @@ export interface ExportPdfConfig {
61
61
  *
62
62
  * **Default editor's content styles**:
63
63
  * {@glink getting-started/setup/css The default editor content styles}
64
- * are applied to the generated PDF thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
64
+ * are applied to the generated PDF thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
65
65
  * If you don't want them to be applied, you have to omit the token:
66
66
  *
67
- * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
67
+ * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
68
+ * In other setups you always need to pass the stylesheets.
68
69
  *
69
70
  * ```ts
70
71
  * const exportPdfConfig = {
@@ -73,13 +74,13 @@ export interface ExportPdfConfig {
73
74
  * ```
74
75
  *
75
76
  * **Web fonts:** If you want to {@glink features/converters/export-pdf#providing-web-font-styles use web fonts} in your PDF document,
76
- * you should provide a path to the file containing the web font declaration before the `'EDITOR_STYLES'` token:
77
+ * you should provide a path to the file containing the web font declaration before the `'EDITOR_STYLES'` token and other style sheets:
77
78
  *
78
79
  * ```ts
79
80
  * const exportPdfConfig = {
80
81
  * stylesheets: [
81
- * 'path/to/editor-styles.css',
82
82
  * './path/to/fonts.css'
83
+ * './path/to/editor-styles.css',
83
84
  * ]
84
85
  * }
85
86
  * ```
@@ -89,8 +90,8 @@ export interface ExportPdfConfig {
89
90
  * ```ts
90
91
  * const exportPdfConfig = {
91
92
  * stylesheets: [
92
- * 'path/to/editor-styles.css',
93
93
  * './path/to/fonts.css',
94
+ * './path/to/editor-styles.css',
94
95
  * './path/to/custom-styles.css'
95
96
  * ]
96
97
  * }
package/src/exportpdf.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x9e25c4=_0x2322;(function(_0x6d9310,_0x24d27a){const _0x23b806=_0x2322,_0x3fd487=_0x6d9310();while(!![]){try{const _0x10e595=parseInt(_0x23b806(0x14a))/0x1*(-parseInt(_0x23b806(0x151))/0x2)+parseInt(_0x23b806(0x147))/0x3+parseInt(_0x23b806(0x14f))/0x4*(parseInt(_0x23b806(0x157))/0x5)+-parseInt(_0x23b806(0x154))/0x6+parseInt(_0x23b806(0x152))/0x7*(-parseInt(_0x23b806(0x14d))/0x8)+-parseInt(_0x23b806(0x146))/0x9+parseInt(_0x23b806(0x13e))/0xa;if(_0x10e595===_0x24d27a)break;else _0x3fd487['push'](_0x3fd487['shift']());}catch(_0x2663dd){_0x3fd487['push'](_0x3fd487['shift']());}}}(_0x11ec,0x285f6));import{Plugin as _0x4868cf}from'ckeditor5/src/core.js';function _0x11ec(){const _0x26a464=['pluginName','1413225kGUjqo','353190crIKEz','ExportPdf','requires','60Hfpynw','tokenUrl','registerTokenUrl','8MOLWNg','init','864tIeQnM','CloudServices','3860GMxxjP','232883NONwFs','get','1417410ffFVwI','editor','commands','3295mJjbbD','_token','4476210ZQZREO','then','exportPdf','config','add','token','plugins'];_0x11ec=function(){return _0x26a464;};return _0x11ec();}import{Notification as _0x341fb4}from'ckeditor5/src/ui.js';import _0x50d5cf from'./exportpdfcommand.js';function _0x2322(_0x1392cd,_0x2596a0){const _0x11ec6f=_0x11ec();return _0x2322=function(_0x2322e3,_0x489dd7){_0x2322e3=_0x2322e3-0x13d;let _0x5edb58=_0x11ec6f[_0x2322e3];return _0x5edb58;},_0x2322(_0x1392cd,_0x2596a0);}import _0x256e8e from'./exportpdfui.js';export default class s extends _0x4868cf{static get[_0x9e25c4(0x145)](){const _0x14efe1=_0x9e25c4;return _0x14efe1(0x148);}static get[_0x9e25c4(0x149)](){const _0x9c8ade=_0x9e25c4;return[_0x9c8ade(0x150),_0x341fb4,_0x256e8e];}[_0x9e25c4(0x14e)](){const _0xf4eb86=_0x9e25c4,_0x2ff493=this[_0xf4eb86(0x155)],_0xf387a7=_0x2ff493[_0xf4eb86(0x141)][_0xf4eb86(0x153)](_0xf4eb86(0x140))||{};_0x2ff493[_0xf4eb86(0x156)][_0xf4eb86(0x142)](_0xf4eb86(0x140),new _0x50d5cf(_0x2ff493));const _0x478468=_0x2ff493[_0xf4eb86(0x144)][_0xf4eb86(0x153)](_0xf4eb86(0x150));!0x1===_0xf387a7[_0xf4eb86(0x14b)]?this[_0xf4eb86(0x13d)]=null:_0xf387a7[_0xf4eb86(0x14b)]?_0x478468[_0xf4eb86(0x14c)](_0xf387a7[_0xf4eb86(0x14b)])[_0xf4eb86(0x13f)](_0x3611a0=>{const _0x473cbc=_0xf4eb86;this[_0x473cbc(0x13d)]=_0x3611a0;}):this[_0xf4eb86(0x13d)]=_0x478468[_0xf4eb86(0x143)];}}
23
+ const _0x49fb61=_0xd763;function _0xd763(_0x38ae8a,_0x84b4ae){const _0x1e0e2e=_0x1e0e();return _0xd763=function(_0xd76337,_0x5eba23){_0xd76337=_0xd76337-0x1ec;let _0x58aae8=_0x1e0e2e[_0xd76337];return _0x58aae8;},_0xd763(_0x38ae8a,_0x84b4ae);}(function(_0x4265a1,_0x57e9e8){const _0x5d5e04=_0xd763,_0x3d8fcc=_0x4265a1();while(!![]){try{const _0x311002=-parseInt(_0x5d5e04(0x1f1))/0x1+parseInt(_0x5d5e04(0x1fc))/0x2+-parseInt(_0x5d5e04(0x1f2))/0x3*(-parseInt(_0x5d5e04(0x1f6))/0x4)+parseInt(_0x5d5e04(0x201))/0x5+parseInt(_0x5d5e04(0x202))/0x6+parseInt(_0x5d5e04(0x1ee))/0x7+-parseInt(_0x5d5e04(0x1f4))/0x8;if(_0x311002===_0x57e9e8)break;else _0x3d8fcc['push'](_0x3d8fcc['shift']());}catch(_0x491940){_0x3d8fcc['push'](_0x3d8fcc['shift']());}}}(_0x1e0e,0x507a9));import{Plugin as _0x4af74c}from'ckeditor5/src/core.js';function _0x1e0e(){const _0x2357f2=['_token','commands','add','1174964stntSL','token','pluginName','init','get','1572980WFdJtf','1794540AnqNJG','editor','tokenUrl','then','registerTokenUrl','4336759XdnFBL','exportPdf','requires','526122VIKRMu','664311SGGAhw','CloudServices','11262528FcQgkj','ExportPdf','8RvFjEM','plugins','config'];_0x1e0e=function(){return _0x2357f2;};return _0x1e0e();}import{Notification as _0x3a1d95}from'ckeditor5/src/ui.js';import _0x45a81e from'./exportpdfcommand.js';import _0x41daa3 from'./exportpdfui.js';export default class s extends _0x4af74c{static get[_0x49fb61(0x1fe)](){const _0x182b0c=_0x49fb61;return _0x182b0c(0x1f5);}static get[_0x49fb61(0x1f0)](){const _0x36a874=_0x49fb61;return[_0x36a874(0x1f3),_0x3a1d95,_0x41daa3];}[_0x49fb61(0x1ff)](){const _0x1839fd=_0x49fb61,_0x14c01a=this[_0x1839fd(0x203)],_0x47d1e9=_0x14c01a[_0x1839fd(0x1f8)][_0x1839fd(0x200)](_0x1839fd(0x1ef))||{};_0x14c01a[_0x1839fd(0x1fa)][_0x1839fd(0x1fb)](_0x1839fd(0x1ef),new _0x45a81e(_0x14c01a));const _0x485d0c=_0x14c01a[_0x1839fd(0x1f7)][_0x1839fd(0x200)](_0x1839fd(0x1f3));!0x1===_0x47d1e9[_0x1839fd(0x204)]?this[_0x1839fd(0x1f9)]=null:_0x47d1e9[_0x1839fd(0x204)]?_0x485d0c[_0x1839fd(0x1ed)](_0x47d1e9[_0x1839fd(0x204)])[_0x1839fd(0x1ec)](_0x97f485=>{const _0x2c5a51=_0x1839fd;this[_0x2c5a51(0x1f9)]=_0x97f485;}):this[_0x1839fd(0x1f9)]=_0x485d0c[_0x1839fd(0x1fd)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x155d04}from'ckeditor5/src/core.js';import{getStyles as _0x5809ee}from'./utils.js';export default class o extends _0x155d04{constructor(_0x15eab4){super(_0x15eab4),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x5ee4c0={}){const _0x47edb2=this['editor'],t=_0x47edb2['t'],_0x141dc6=_0x5ee4c0['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0xe6ddd2=_0x5ee4c0['dataCallback']||(_0x4c578f=>_0x4c578f['data']['get']()),_0x1cec36=_0x47edb2['plugins']['get']('ExportPdf'),_0x3096e4=_0x5ee4c0['token']||_0x1cec36['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x5809ee(_0x5ee4c0['stylesheets']||['EDITOR_STYLES'])['then'](async _0x3edf42=>{_0x47edb2['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x13aea2={'html':'<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x47edb2['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0xe6ddd2(_0x47edb2)+'\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>','css':_0x3edf42,'options':_0x5ee4c0['converterOptions']},_0x1e4895={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x3096e4?{'Authorization':_0x3096e4['value']}:null,'x-cs-app-id':_0x5ee4c0['appID']||'cke5'},'body':JSON['stringify'](_0x13aea2)};return window['fetch'](_0x141dc6,_0x1e4895)['then'](_0x2ddf4b=>{if(0xc8!==_0x2ddf4b['status'])throw _0x2ddf4b;return _0x2ddf4b['blob']();})['then'](_0x5d351f=>{_0x47edb2['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x513f13='function'==typeof _0x5ee4c0['fileName']?_0x5ee4c0['fileName']():_0x5ee4c0['fileName'];this['_downloadFile'](_0x5d351f,_0x513f13||'document.pdf');});})['catch'](_0x30a74d=>{const _0x275bb0=_0x47edb2['plugins']['get']('Notification');throw _0x47edb2['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x275bb0['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x30a74d;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x942193,_0x5c2b96){const _0x565e76=document['createElement']('a');_0x565e76['href']=window['URL']['createObjectURL'](_0x942193),_0x565e76['download']=_0x5c2b96,_0x565e76['click'](),_0x565e76['remove']();}}
23
+ import{Command as _0x5d443a}from'ckeditor5/src/core.js';import{getStyles as _0x1cce9d}from'./utils.js';export default class o extends _0x5d443a{constructor(_0x31d2af){super(_0x31d2af),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x34f394={}){const _0x5a7492=this['editor'],t=_0x5a7492['t'],_0x46fcac=_0x34f394['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x295c9f=_0x34f394['dataCallback']||(_0x504181=>_0x504181['data']['get']()),_0x517c54=_0x5a7492['plugins']['get']('ExportPdf'),_0x1ae7e1=_0x34f394['token']||_0x517c54['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x1cce9d(_0x34f394['stylesheets']||['EDITOR_STYLES'])['then'](async _0x5c5320=>{_0x5a7492['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x25b836={'html':'<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x5a7492['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x295c9f(_0x5a7492)+'\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>','css':_0x5c5320,'options':_0x34f394['converterOptions']},_0x26eb2c={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x1ae7e1?{'Authorization':_0x1ae7e1['value']}:null,'x-cs-app-id':_0x34f394['appID']||'cke5'},'body':JSON['stringify'](_0x25b836)};return window['fetch'](_0x46fcac,_0x26eb2c)['then'](_0x52244e=>{if(0xc8!==_0x52244e['status'])throw _0x52244e;return _0x52244e['blob']();})['then'](_0x2f6f2d=>{_0x5a7492['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x48517c='function'==typeof _0x34f394['fileName']?_0x34f394['fileName']():_0x34f394['fileName'];this['_downloadFile'](_0x2f6f2d,_0x48517c||'document.pdf');});})['catch'](_0x5017c8=>{const _0xd30bd3=_0x5a7492['plugins']['get']('Notification');throw _0x5a7492['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0xd30bd3['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x5017c8;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0xd52589,_0x158669){const _0x447bfe=document['createElement']('a');_0x447bfe['href']=window['URL']['createObjectURL'](_0xd52589),_0x447bfe['download']=_0x158669,_0x447bfe['click'](),_0x447bfe['remove']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x410155}from'ckeditor5/src/core.js';import{ButtonView as _0x1b47e4,MenuBarMenuListItemButtonView as _0x4bd6b,SpinnerView as _0x699c0f}from'ckeditor5/src/ui.js';import _0x16cca5 from'../theme/icons/exportpdf.svg';export default class i extends _0x410155{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x441991=this['editor'];_0x441991['ui']['componentFactory']['add']('exportPdf',()=>{const _0x15655c=this['_createButton'](_0x1b47e4),_0x5e2945=_0x441991['commands']['get']('exportPdf');return _0x15655c['set']({'tooltip':!0x0}),_0x15655c['bind']('isOn')['to'](_0x5e2945,'isBusy'),_0x15655c;}),_0x441991['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x4bd6b));}['_createButton'](_0x362721){const _0x385747=this['editor'],_0x3e663a=_0x385747['config']['get']('exportPdf')||{},t=_0x385747['locale']['t'],_0x12b1a9=_0x385747['commands']['get']('exportPdf'),_0xaea029=new _0x362721(_0x385747['locale']),_0xe386ae=new _0x699c0f();return _0xaea029['children']['add'](_0xe386ae),_0xe386ae['bind']('isVisible')['to'](_0x12b1a9,'isBusy'),_0xaea029['iconView']['bind']('isVisible')['to'](_0x12b1a9,'isBusy',_0x5349f2=>!_0x5349f2),_0xaea029['set']({'icon':_0x16cca5}),_0xaea029['bind']('isEnabled')['to'](_0x12b1a9,'isEnabled'),_0xaea029['bind']('label')['to'](_0x12b1a9,'isBusy',_0x28de48=>t(_0x28de48?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0xaea029,'execute',()=>{_0x385747['execute']('exportPdf',_0x3e663a),_0x385747['editing']['view']['focus']();}),_0xaea029;}}
23
+ import{Plugin as _0xfbf8d6}from'ckeditor5/src/core.js';import{ButtonView as _0x1e87fe,MenuBarMenuListItemButtonView as _0x2cf62b,SpinnerView as _0x2be7c4}from'ckeditor5/src/ui.js';import _0x4f4c49 from'../theme/icons/exportpdf.svg';export default class i extends _0xfbf8d6{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x54e500=this['editor'];_0x54e500['ui']['componentFactory']['add']('exportPdf',()=>{const _0x372151=this['_createButton'](_0x1e87fe),_0x1111ca=_0x54e500['commands']['get']('exportPdf');return _0x372151['set']({'tooltip':!0x0}),_0x372151['bind']('isOn')['to'](_0x1111ca,'isBusy'),_0x372151;}),_0x54e500['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x2cf62b));}['_createButton'](_0xc9d217){const _0x3e4781=this['editor'],_0x1bfbd4=_0x3e4781['config']['get']('exportPdf')||{},t=_0x3e4781['locale']['t'],_0x3481d5=_0x3e4781['commands']['get']('exportPdf'),_0x49927d=new _0xc9d217(_0x3e4781['locale']),_0x5e770e=new _0x2be7c4();return _0x49927d['children']['add'](_0x5e770e),_0x5e770e['bind']('isVisible')['to'](_0x3481d5,'isBusy'),_0x49927d['iconView']['bind']('isVisible')['to'](_0x3481d5,'isBusy',_0x3fc53f=>!_0x3fc53f),_0x49927d['set']({'icon':_0x4f4c49}),_0x49927d['bind']('isEnabled')['to'](_0x3481d5,'isEnabled'),_0x49927d['bind']('label')['to'](_0x3481d5,'isBusy',_0x3375c4=>t(_0x3375c4?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0x49927d,'execute',()=>{_0x3e4781['execute']('exportPdf',_0x1bfbd4),_0x3e4781['editing']['view']['focus']();}),_0x49927d;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x54e5(){var _0x31ea16=['171wzavMD','1653804izqprJ','1041916JiXnjX','22iPWrpT','1587346BQLMFB','1069572woheFv','1854240BCkFNJ','6635jlezBX','3vtJlGf','2988eeqFEU','294416Iovzoc','1pUIBoj'];_0x54e5=function(){return _0x31ea16;};return _0x54e5();}function _0x394b(_0x553011,_0x379a28){var _0x54e53f=_0x54e5();return _0x394b=function(_0x394ba6,_0x36d6c1){_0x394ba6=_0x394ba6-0x10a;var _0x216d2c=_0x54e53f[_0x394ba6];return _0x216d2c;},_0x394b(_0x553011,_0x379a28);}(function(_0x2add9a,_0x4a9019){var _0x1b021b=_0x394b,_0x220a2f=_0x2add9a();while(!![]){try{var _0x29bd4e=-parseInt(_0x1b021b(0x10b))/0x1*(-parseInt(_0x1b021b(0x110))/0x2)+parseInt(_0x1b021b(0x114))/0x3*(parseInt(_0x1b021b(0x10e))/0x4)+-parseInt(_0x1b021b(0x113))/0x5*(-parseInt(_0x1b021b(0x115))/0x6)+-parseInt(_0x1b021b(0x111))/0x7+-parseInt(_0x1b021b(0x10a))/0x8*(parseInt(_0x1b021b(0x10c))/0x9)+-parseInt(_0x1b021b(0x112))/0xa+-parseInt(_0x1b021b(0x10f))/0xb*(parseInt(_0x1b021b(0x10d))/0xc);if(_0x29bd4e===_0x4a9019)break;else _0x220a2f['push'](_0x220a2f['shift']());}catch(_0x1b0414){_0x220a2f['push'](_0x220a2f['shift']());}}}(_0x54e5,0x621f2));export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';
23
+ (function(_0xcf4675,_0x5b25de){var _0x5a717d=_0x215e,_0x364caf=_0xcf4675();while(!![]){try{var _0x23b95b=parseInt(_0x5a717d(0x11f))/0x1*(parseInt(_0x5a717d(0x120))/0x2)+parseInt(_0x5a717d(0x11b))/0x3+parseInt(_0x5a717d(0x11c))/0x4+-parseInt(_0x5a717d(0x11d))/0x5*(-parseInt(_0x5a717d(0x11a))/0x6)+parseInt(_0x5a717d(0x11e))/0x7*(-parseInt(_0x5a717d(0x118))/0x8)+-parseInt(_0x5a717d(0x117))/0x9+-parseInt(_0x5a717d(0x119))/0xa;if(_0x23b95b===_0x5b25de)break;else _0x364caf['push'](_0x364caf['shift']());}catch(_0x5b6b35){_0x364caf['push'](_0x364caf['shift']());}}}(_0x2f39,0x5c26f));export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';function _0x215e(_0x188948,_0xd4dc1a){var _0x2f397d=_0x2f39();return _0x215e=function(_0x215e56,_0xecf03e){_0x215e56=_0x215e56-0x117;var _0x5c20a9=_0x2f397d[_0x215e56];return _0x5c20a9;},_0x215e(_0x188948,_0xd4dc1a);}function _0x2f39(){var _0x314196=['2052411ExvzvT','1806080WygwEr','5ctdKEU','243243RYTRqq','25zsPTcW','26098kgNFDT','1747881TGfpQx','48DsOBCv','8270810fbJCmO','872142EUTUtc'];_0x2f39=function(){return _0x314196;};return _0x2f39();}
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x42aa(){const _0x3ca419=['text','trim','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','12XIPDUU','cssText','136320oCsaWx','9170525ApsBAp','all','warn','data-cke','indexOf','length','from','324067tlKhtI','35010eBQuBK','9426dhyQAN','EDITOR_STYLES','join','ownerNode','push','.ck-content','5427AnDEBA','then','736092qcoMrs','fetch','3920928PtsiLD','1540NgUzku','styleSheets','cssRules',':root','hasAttribute'];_0x42aa=function(){return _0x3ca419;};return _0x42aa();}function _0x51c3(_0x44dc75,_0x7db708){const _0x42aac6=_0x42aa();return _0x51c3=function(_0x51c3ab,_0x307a4b){_0x51c3ab=_0x51c3ab-0x16e;let _0x3691cd=_0x42aac6[_0x51c3ab];return _0x3691cd;},_0x51c3(_0x44dc75,_0x7db708);}(function(_0x2fe6f3,_0x37934b){const _0xc3319f=_0x51c3,_0x12149f=_0x2fe6f3();while(!![]){try{const _0x354129=parseInt(_0xc3319f(0x183))/0x1+parseInt(_0xc3319f(0x17b))/0x2+parseInt(_0xc3319f(0x179))/0x3*(parseInt(_0xc3319f(0x16e))/0x4)+parseInt(_0xc3319f(0x171))/0x5*(-parseInt(_0xc3319f(0x185))/0x6)+-parseInt(_0xc3319f(0x17c))/0x7+-parseInt(_0xc3319f(0x170))/0x8+parseInt(_0xc3319f(0x18b))/0x9*(parseInt(_0xc3319f(0x184))/0xa);if(_0x354129===_0x37934b)break;else _0x12149f['push'](_0x12149f['shift']());}catch(_0x18c1de){_0x12149f['push'](_0x12149f['shift']());}}}(_0x42aa,0xe93e3));export function getStyles(_0x5c7016){const _0x484ece=_0x51c3;if(!_0x5c7016)return new Promise(_0x485c27=>_0x485c27(''));const _0x3114f5=[];for(const _0x11007e of _0x5c7016)_0x484ece(0x186)!==_0x11007e?_0x3114f5[_0x484ece(0x189)](window[_0x484ece(0x16f)](_0x11007e)[_0x484ece(0x18c)](_0x41ad7b=>_0x41ad7b[_0x484ece(0x176)]())):_0x3114f5[_0x484ece(0x189)](f());return Promise[_0x484ece(0x17d)](_0x3114f5)[_0x484ece(0x18c)](_0x120147=>_0x120147[_0x484ece(0x187)]('\x20')[_0x484ece(0x177)]());}function f(){const _0x36af9a=_0x51c3,_0x2fa7d0=[],_0x28fdc3=[];for(const _0x196590 of Array[_0x36af9a(0x182)](document[_0x36af9a(0x172)])){if(_0x196590[_0x36af9a(0x188)][_0x36af9a(0x175)](_0x36af9a(0x17f))){for(const _0x268142 of Array[_0x36af9a(0x182)](_0x196590[_0x36af9a(0x173)]))-0x1!==_0x268142[_0x36af9a(0x17a)][_0x36af9a(0x180)](_0x36af9a(0x18a))?_0x2fa7d0[_0x36af9a(0x189)](_0x268142[_0x36af9a(0x17a)]):-0x1!==_0x268142[_0x36af9a(0x17a)][_0x36af9a(0x180)](_0x36af9a(0x174))&&_0x28fdc3[_0x36af9a(0x189)](_0x268142[_0x36af9a(0x17a)]);}}return _0x2fa7d0[_0x36af9a(0x181)]||console[_0x36af9a(0x17e)](_0x36af9a(0x178)),[..._0x28fdc3,..._0x2fa7d0][_0x36af9a(0x187)]('\x20')[_0x36af9a(0x177)]();}
23
+ (function(_0x435d90,_0x4fad9c){const _0x35ce73=_0x1c04,_0x23b021=_0x435d90();while(!![]){try{const _0x1a7d1a=-parseInt(_0x35ce73(0x173))/0x1*(-parseInt(_0x35ce73(0x177))/0x2)+parseInt(_0x35ce73(0x17f))/0x3+-parseInt(_0x35ce73(0x180))/0x4*(-parseInt(_0x35ce73(0x17e))/0x5)+parseInt(_0x35ce73(0x182))/0x6+-parseInt(_0x35ce73(0x174))/0x7+-parseInt(_0x35ce73(0x181))/0x8+-parseInt(_0x35ce73(0x183))/0x9;if(_0x1a7d1a===_0x4fad9c)break;else _0x23b021['push'](_0x23b021['shift']());}catch(_0x1b4828){_0x23b021['push'](_0x23b021['shift']());}}}(_0xa860,0xa29bc));export function getStyles(_0x5849eb){const _0x5db743=_0x1c04;if(!_0x5849eb)return new Promise(_0x141480=>_0x141480(''));const _0x282006=[];for(const _0x42e8cc of _0x5849eb)_0x5db743(0x178)!==_0x42e8cc?_0x282006[_0x5db743(0x185)](window[_0x5db743(0x18a)](_0x42e8cc)[_0x5db743(0x189)](_0x3b2dd1=>_0x3b2dd1[_0x5db743(0x18b)]())):_0x282006[_0x5db743(0x185)](f());return Promise[_0x5db743(0x170)](_0x282006)[_0x5db743(0x189)](_0x14f7eb=>_0x14f7eb[_0x5db743(0x17a)]('\x20')[_0x5db743(0x18c)]());}function _0xa860(){const _0x2f8cac=['hasAttribute','styleSheets','758SNqGhn','EDITOR_STYLES','.ck-content','join','warn','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','cssText','30hEpHgW','2949870PcpIXm','747628UkcTtX','2925248SKhGzr','3966120jPDXfP','20476314sjucaY','length','push','ownerNode','indexOf','from','then','fetch','text','trim',':root','all','cssRules','data-cke','3046pQsTtW','4293380NncPaN'];_0xa860=function(){return _0x2f8cac;};return _0xa860();}function _0x1c04(_0x9e60af,_0x17c1b3){const _0xa860bd=_0xa860();return _0x1c04=function(_0x1c04e0,_0x257fd1){_0x1c04e0=_0x1c04e0-0x170;let _0x3a01c3=_0xa860bd[_0x1c04e0];return _0x3a01c3;},_0x1c04(_0x9e60af,_0x17c1b3);}function f(){const _0x52144b=_0x1c04,_0xedc523=[],_0x1fff9c=[];for(const _0x54cfa5 of Array[_0x52144b(0x188)](document[_0x52144b(0x176)])){if(_0x54cfa5[_0x52144b(0x186)][_0x52144b(0x175)](_0x52144b(0x172))){for(const _0x588a78 of Array[_0x52144b(0x188)](_0x54cfa5[_0x52144b(0x171)]))-0x1!==_0x588a78[_0x52144b(0x17d)][_0x52144b(0x187)](_0x52144b(0x179))?_0xedc523[_0x52144b(0x185)](_0x588a78[_0x52144b(0x17d)]):-0x1!==_0x588a78[_0x52144b(0x17d)][_0x52144b(0x187)](_0x52144b(0x18d))&&_0x1fff9c[_0x52144b(0x185)](_0x588a78[_0x52144b(0x17d)]);}}return _0xedc523[_0x52144b(0x184)]||console[_0x52144b(0x17b)](_0x52144b(0x17c)),[..._0x1fff9c,..._0xedc523][_0x52144b(0x17a)]('\x20')[_0x52144b(0x18c)]();}