@ckeditor/ckeditor5-export-pdf 42.0.0-alpha.2 → 42.0.0-alpha.20

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.2",
3
+ "version": "42.0.0-alpha.20",
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.2"
33
+ "ckeditor5": "42.0.0-alpha.20"
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 _0x38baef=_0x2d91;function _0x2d91(_0x2ca03c,_0x51abb9){const _0x3a16e4=_0x3a16();return _0x2d91=function(_0x2d91ea,_0x4c8ab8){_0x2d91ea=_0x2d91ea-0x15a;let _0x250669=_0x3a16e4[_0x2d91ea];return _0x250669;},_0x2d91(_0x2ca03c,_0x51abb9);}(function(_0x201d94,_0x1ba184){const _0x279d18=_0x2d91,_0x4d4390=_0x201d94();while(!![]){try{const _0x311bac=parseInt(_0x279d18(0x15a))/0x1*(parseInt(_0x279d18(0x166))/0x2)+-parseInt(_0x279d18(0x175))/0x3+-parseInt(_0x279d18(0x163))/0x4*(parseInt(_0x279d18(0x165))/0x5)+-parseInt(_0x279d18(0x161))/0x6*(-parseInt(_0x279d18(0x16d))/0x7)+-parseInt(_0x279d18(0x15e))/0x8+parseInt(_0x279d18(0x15b))/0x9+parseInt(_0x279d18(0x16a))/0xa*(parseInt(_0x279d18(0x169))/0xb);if(_0x311bac===_0x1ba184)break;else _0x4d4390['push'](_0x4d4390['shift']());}catch(_0x21946a){_0x4d4390['push'](_0x4d4390['shift']());}}}(_0x3a16,0xb4864));function _0x3a16(){const _0x2832c0=['_token','5566781XHLzGK','20TFXlFq','add','config','19187ySaNAu','registerTokenUrl','get','plugins','ExportPdf','commands','init','pluginName','2424054wXtsvB','2KLnuzD','11489184frBWCe','exportPdf','CloudServices','11817752fCXZEW','token','requires','2130YSMRkI','tokenUrl','136ZHdqVi','editor','98815KzMeyM','434834ZGUuNp','then'];_0x3a16=function(){return _0x2832c0;};return _0x3a16();}import{Plugin as _0x541e0b}from'ckeditor5/src/core.js';import{Notification as _0x2bb1f0}from'ckeditor5/src/ui.js';import _0x5aa879 from'./exportpdfcommand.js';import _0x42477f from'./exportpdfui.js';export default class s extends _0x541e0b{static get[_0x38baef(0x174)](){const _0x25bd36=_0x38baef;return _0x25bd36(0x171);}static get[_0x38baef(0x160)](){const _0x48a870=_0x38baef;return[_0x48a870(0x15d),_0x2bb1f0,_0x42477f];}[_0x38baef(0x173)](){const _0x3548cf=_0x38baef,_0x343324=this[_0x3548cf(0x164)],_0x3ebc95=_0x343324[_0x3548cf(0x16c)][_0x3548cf(0x16f)](_0x3548cf(0x15c))||{};_0x343324[_0x3548cf(0x172)][_0x3548cf(0x16b)](_0x3548cf(0x15c),new _0x5aa879(_0x343324));const _0x24debe=_0x343324[_0x3548cf(0x170)][_0x3548cf(0x16f)](_0x3548cf(0x15d));!0x1===_0x3ebc95[_0x3548cf(0x162)]?this[_0x3548cf(0x168)]=null:_0x3ebc95[_0x3548cf(0x162)]?_0x24debe[_0x3548cf(0x16e)](_0x3ebc95[_0x3548cf(0x162)])[_0x3548cf(0x167)](_0x167c4e=>{const _0x136440=_0x3548cf;this[_0x136440(0x168)]=_0x167c4e;}):this[_0x3548cf(0x168)]=_0x24debe[_0x3548cf(0x15f)];}}
23
+ function _0x523e(){const _0x562033=['get','plugins','token','config','29257NgfrEw','editor','1637238MsyCmq','37112tMbMgX','tokenUrl','commands','init','95RXwExz','CloudServices','add','registerTokenUrl','233284EbfyWy','_token','5485440DtrmvY','18388710eNRuzq','then','pluginName','14pURhHE','exportPdf','ExportPdf','2547186TPhIiO','requires'];_0x523e=function(){return _0x562033;};return _0x523e();}const _0x162a4c=_0x1724;function _0x1724(_0x30c7d6,_0x46fd9f){const _0x523e98=_0x523e();return _0x1724=function(_0x1724f2,_0x1fbb3e){_0x1724f2=_0x1724f2-0x1d9;let _0x2fcf50=_0x523e98[_0x1724f2];return _0x2fcf50;},_0x1724(_0x30c7d6,_0x46fd9f);}(function(_0x4a7c30,_0x391a96){const _0x5d6751=_0x1724,_0x4bc005=_0x4a7c30();while(!![]){try{const _0x1d91aa=parseInt(_0x5d6751(0x1dd))/0x1+-parseInt(_0x5d6751(0x1df))/0x2+-parseInt(_0x5d6751(0x1f1))/0x3+parseInt(_0x5d6751(0x1e8))/0x4*(parseInt(_0x5d6751(0x1e4))/0x5)+-parseInt(_0x5d6751(0x1ea))/0x6+-parseInt(_0x5d6751(0x1ee))/0x7*(parseInt(_0x5d6751(0x1e0))/0x8)+parseInt(_0x5d6751(0x1eb))/0x9;if(_0x1d91aa===_0x391a96)break;else _0x4bc005['push'](_0x4bc005['shift']());}catch(_0x267c42){_0x4bc005['push'](_0x4bc005['shift']());}}}(_0x523e,0x8fe23));import{Plugin as _0x37cf7d}from'ckeditor5/src/core.js';import{Notification as _0x471772}from'ckeditor5/src/ui.js';import _0x2e8bf1 from'./exportpdfcommand.js';import _0x4a61b5 from'./exportpdfui.js';export default class s extends _0x37cf7d{static get[_0x162a4c(0x1ed)](){const _0x338bca=_0x162a4c;return _0x338bca(0x1f0);}static get[_0x162a4c(0x1f2)](){const _0x36aef1=_0x162a4c;return[_0x36aef1(0x1e5),_0x471772,_0x4a61b5];}[_0x162a4c(0x1e3)](){const _0x5e3106=_0x162a4c,_0x2e4763=this[_0x5e3106(0x1de)],_0x44f442=_0x2e4763[_0x5e3106(0x1dc)][_0x5e3106(0x1d9)](_0x5e3106(0x1ef))||{};_0x2e4763[_0x5e3106(0x1e2)][_0x5e3106(0x1e6)](_0x5e3106(0x1ef),new _0x2e8bf1(_0x2e4763));const _0x461456=_0x2e4763[_0x5e3106(0x1da)][_0x5e3106(0x1d9)](_0x5e3106(0x1e5));!0x1===_0x44f442[_0x5e3106(0x1e1)]?this[_0x5e3106(0x1e9)]=null:_0x44f442[_0x5e3106(0x1e1)]?_0x461456[_0x5e3106(0x1e7)](_0x44f442[_0x5e3106(0x1e1)])[_0x5e3106(0x1ec)](_0xacb90a=>{const _0x247e60=_0x5e3106;this[_0x247e60(0x1e9)]=_0xacb90a;}):this[_0x5e3106(0x1e9)]=_0x461456[_0x5e3106(0x1db)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x449da8}from'ckeditor5/src/core.js';import{getStyles as _0x157df3}from'./utils.js';export default class o extends _0x449da8{constructor(_0x2be8b7){super(_0x2be8b7),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x2b0079={}){const _0x3d0898=this['editor'],t=_0x3d0898['t'],_0x2dea29=_0x2b0079['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x177120=_0x2b0079['dataCallback']||(_0x76cfc2=>_0x76cfc2['data']['get']()),_0x3671d2=_0x3d0898['plugins']['get']('ExportPdf'),_0x44f77f=_0x2b0079['token']||_0x3671d2['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x157df3(_0x2b0079['stylesheets']||['EDITOR_STYLES'])['then'](async _0x11303d=>{_0x3d0898['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x23307b={'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'+_0x3d0898['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x177120(_0x3d0898)+'\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':_0x11303d,'options':_0x2b0079['converterOptions']},_0x3a8b54={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x44f77f?{'Authorization':_0x44f77f['value']}:null,'x-cs-app-id':_0x2b0079['appID']||'cke5'},'body':JSON['stringify'](_0x23307b)};return window['fetch'](_0x2dea29,_0x3a8b54)['then'](_0x2e5a50=>{if(0xc8!==_0x2e5a50['status'])throw _0x2e5a50;return _0x2e5a50['blob']();})['then'](_0x83d07c=>{_0x3d0898['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x182e45='function'==typeof _0x2b0079['fileName']?_0x2b0079['fileName']():_0x2b0079['fileName'];this['_downloadFile'](_0x83d07c,_0x182e45||'document.pdf');});})['catch'](_0x707784=>{const _0x4a935e=_0x3d0898['plugins']['get']('Notification');throw _0x3d0898['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x4a935e['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x707784;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x5cd71c,_0x575911){const _0x55d292=document['createElement']('a');_0x55d292['href']=window['URL']['createObjectURL'](_0x5cd71c),_0x55d292['download']=_0x575911,_0x55d292['click'](),_0x55d292['remove']();}}
23
+ import{Command as _0xb77cd8}from'ckeditor5/src/core.js';import{getStyles as _0x156686}from'./utils.js';export default class o extends _0xb77cd8{constructor(_0x2700b0){super(_0x2700b0),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x3b28e6={}){const _0x40c156=this['editor'],t=_0x40c156['t'],_0x59327e=_0x3b28e6['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x2fe0f6=_0x3b28e6['dataCallback']||(_0x3541fd=>_0x3541fd['data']['get']()),_0x19e427=_0x40c156['plugins']['get']('ExportPdf'),_0x35f0d8=_0x3b28e6['token']||_0x19e427['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x156686(_0x3b28e6['stylesheets']||['EDITOR_STYLES'])['then'](async _0x4adcb4=>{_0x40c156['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x37d76d={'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'+_0x40c156['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x2fe0f6(_0x40c156)+'\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':_0x4adcb4,'options':_0x3b28e6['converterOptions']},_0x62dffa={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x35f0d8?{'Authorization':_0x35f0d8['value']}:null,'x-cs-app-id':_0x3b28e6['appID']||'cke5'},'body':JSON['stringify'](_0x37d76d)};return window['fetch'](_0x59327e,_0x62dffa)['then'](_0x31d4f7=>{if(0xc8!==_0x31d4f7['status'])throw _0x31d4f7;return _0x31d4f7['blob']();})['then'](_0x485f5c=>{_0x40c156['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x422b01='function'==typeof _0x3b28e6['fileName']?_0x3b28e6['fileName']():_0x3b28e6['fileName'];this['_downloadFile'](_0x485f5c,_0x422b01||'document.pdf');});})['catch'](_0x116bf5=>{const _0x24b6c1=_0x40c156['plugins']['get']('Notification');throw _0x40c156['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x24b6c1['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x116bf5;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x4a53cf,_0x35940a){const _0x52c760=document['createElement']('a');_0x52c760['href']=window['URL']['createObjectURL'](_0x4a53cf),_0x52c760['download']=_0x35940a,_0x52c760['click'](),_0x52c760['remove']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x588a73}from'ckeditor5/src/core.js';import{ButtonView as _0x3d788c,MenuBarMenuListItemButtonView as _0x4322cd,SpinnerView as _0x1480fc}from'ckeditor5/src/ui.js';import _0x57eaa6 from'../theme/icons/exportpdf.svg';export default class i extends _0x588a73{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x3afaa5=this['editor'];_0x3afaa5['ui']['componentFactory']['add']('exportPdf',()=>{const _0x3c8199=this['_createButton'](_0x3d788c),_0x2f48bf=_0x3afaa5['commands']['get']('exportPdf');return _0x3c8199['set']({'tooltip':!0x0}),_0x3c8199['bind']('isOn')['to'](_0x2f48bf,'isBusy'),_0x3c8199;}),_0x3afaa5['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x4322cd));}['_createButton'](_0x5568eb){const _0x11cf07=this['editor'],_0x25710a=_0x11cf07['config']['get']('exportPdf')||{},t=_0x11cf07['locale']['t'],_0x3f9985=_0x11cf07['commands']['get']('exportPdf'),_0x5ec401=new _0x5568eb(_0x11cf07['locale']),_0x24db59=new _0x1480fc();return _0x5ec401['children']['add'](_0x24db59),_0x24db59['bind']('isVisible')['to'](_0x3f9985,'isBusy'),_0x5ec401['iconView']['bind']('isVisible')['to'](_0x3f9985,'isBusy',_0x35a694=>!_0x35a694),_0x5ec401['set']({'icon':_0x57eaa6}),_0x5ec401['bind']('isEnabled')['to'](_0x3f9985,'isEnabled'),_0x5ec401['bind']('label')['to'](_0x3f9985,'isBusy',_0xbdf8a4=>t(_0xbdf8a4?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0x5ec401,'execute',()=>{_0x11cf07['execute']('exportPdf',_0x25710a),_0x11cf07['editing']['view']['focus']();}),_0x5ec401;}}
23
+ import{Plugin as _0x5b1e34}from'ckeditor5/src/core.js';import{ButtonView as _0x1f0648,MenuBarMenuListItemButtonView as _0x572327,SpinnerView as _0x5adca3}from'ckeditor5/src/ui.js';import _0x5ac0ed from'../theme/icons/exportpdf.svg';export default class i extends _0x5b1e34{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x2811f9=this['editor'];_0x2811f9['ui']['componentFactory']['add']('exportPdf',()=>{const _0x883dd6=this['_createButton'](_0x1f0648),_0x4482dc=_0x2811f9['commands']['get']('exportPdf');return _0x883dd6['set']({'tooltip':!0x0}),_0x883dd6['bind']('isOn')['to'](_0x4482dc,'isBusy'),_0x883dd6;}),_0x2811f9['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x572327));}['_createButton'](_0x1bd8ef){const _0x8f488a=this['editor'],_0x2b4970=_0x8f488a['config']['get']('exportPdf')||{},t=_0x8f488a['locale']['t'],_0x568def=_0x8f488a['commands']['get']('exportPdf'),_0x6c7265=new _0x1bd8ef(_0x8f488a['locale']),_0x7be6a=new _0x5adca3();return _0x6c7265['children']['add'](_0x7be6a),_0x7be6a['bind']('isVisible')['to'](_0x568def,'isBusy'),_0x6c7265['iconView']['bind']('isVisible')['to'](_0x568def,'isBusy',_0x1ada75=>!_0x1ada75),_0x6c7265['set']({'icon':_0x5ac0ed}),_0x6c7265['bind']('isEnabled')['to'](_0x568def,'isEnabled'),_0x6c7265['bind']('label')['to'](_0x568def,'isBusy',_0x5ece80=>t(_0x5ece80?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0x6c7265,'execute',()=>{_0x8f488a['execute']('exportPdf',_0x2b4970),_0x8f488a['editing']['view']['focus']();}),_0x6c7265;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x144d82,_0x45b574){var _0x4a1a14=_0x2fa7,_0x2341d7=_0x144d82();while(!![]){try{var _0x4b3f49=parseInt(_0x4a1a14(0x15d))/0x1+parseInt(_0x4a1a14(0x159))/0x2*(-parseInt(_0x4a1a14(0x15a))/0x3)+-parseInt(_0x4a1a14(0x154))/0x4*(parseInt(_0x4a1a14(0x155))/0x5)+-parseInt(_0x4a1a14(0x158))/0x6+parseInt(_0x4a1a14(0x15b))/0x7*(parseInt(_0x4a1a14(0x15e))/0x8)+parseInt(_0x4a1a14(0x157))/0x9+-parseInt(_0x4a1a14(0x15c))/0xa*(-parseInt(_0x4a1a14(0x156))/0xb);if(_0x4b3f49===_0x45b574)break;else _0x2341d7['push'](_0x2341d7['shift']());}catch(_0x389dd3){_0x2341d7['push'](_0x2341d7['shift']());}}}(_0x3a17,0x97d3b));function _0x2fa7(_0x212495,_0x35893f){var _0x3a17b7=_0x3a17();return _0x2fa7=function(_0x2fa7e9,_0x48f73f){_0x2fa7e9=_0x2fa7e9-0x154;var _0x485b7b=_0x3a17b7[_0x2fa7e9];return _0x485b7b;},_0x2fa7(_0x212495,_0x35893f);}export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';function _0x3a17(){var _0x49ab28=['16839heyKLN','868LFENDT','8444690vLwOch','607606iddcxK','9224SooAAz','192928DMnKgV','120yJTXfK','11OGNlTt','5036526micNBB','1880802ASEJsn','22ludeJL'];_0x3a17=function(){return _0x49ab28;};return _0x3a17();}
23
+ function _0x3bca(_0x5edb84,_0x68085f){var _0x430b73=_0x430b();return _0x3bca=function(_0x3bca74,_0x2e938f){_0x3bca74=_0x3bca74-0xec;var _0x129557=_0x430b73[_0x3bca74];return _0x129557;},_0x3bca(_0x5edb84,_0x68085f);}function _0x430b(){var _0x5b8de6=['8hFWzDD','11238omUoSq','8004976NCHehC','31162450ddESVP','176118cvdzZX','11uRBoRH','290MxjjmO','91exhsfj','14597532ckLjdh','1304244wQMnwD','2254200fZRXri'];_0x430b=function(){return _0x5b8de6;};return _0x430b();}(function(_0x2cfa19,_0x3b3ca9){var _0x390e53=_0x3bca,_0x3e0f64=_0x2cfa19();while(!![]){try{var _0x3013bf=-parseInt(_0x390e53(0xee))/0x1*(parseInt(_0x390e53(0xf3))/0x2)+-parseInt(_0x390e53(0xf1))/0x3+parseInt(_0x390e53(0xf0))/0x4+-parseInt(_0x390e53(0xed))/0x5*(parseInt(_0x390e53(0xf6))/0x6)+-parseInt(_0x390e53(0xf4))/0x7+-parseInt(_0x390e53(0xf2))/0x8*(-parseInt(_0x390e53(0xef))/0x9)+-parseInt(_0x390e53(0xf5))/0xa*(-parseInt(_0x390e53(0xec))/0xb);if(_0x3013bf===_0x3b3ca9)break;else _0x3e0f64['push'](_0x3e0f64['shift']());}catch(_0x2d2a1a){_0x3e0f64['push'](_0x3e0f64['shift']());}}}(_0x430b,0xe945b));export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x5498cd,_0x5aac58){const _0x27762f=_0x48c0,_0x1b950d=_0x5498cd();while(!![]){try{const _0x475d10=parseInt(_0x27762f(0x110))/0x1*(-parseInt(_0x27762f(0x10c))/0x2)+-parseInt(_0x27762f(0x11f))/0x3*(-parseInt(_0x27762f(0x10f))/0x4)+parseInt(_0x27762f(0x10a))/0x5*(-parseInt(_0x27762f(0x119))/0x6)+-parseInt(_0x27762f(0x118))/0x7+parseInt(_0x27762f(0x123))/0x8+parseInt(_0x27762f(0x122))/0x9+parseInt(_0x27762f(0x10b))/0xa;if(_0x475d10===_0x5aac58)break;else _0x1b950d['push'](_0x1b950d['shift']());}catch(_0x59dac1){_0x1b950d['push'](_0x1b950d['shift']());}}}(_0x2646,0x1cd22));function _0x48c0(_0x15ce4e,_0x156264){const _0x264653=_0x2646();return _0x48c0=function(_0x48c055,_0x1eab7e){_0x48c055=_0x48c055-0x109;let _0x11361b=_0x264653[_0x48c055];return _0x11361b;},_0x48c0(_0x15ce4e,_0x156264);}export function getStyles(_0x4bce8a){const _0x2f8ade=_0x48c0;if(!_0x4bce8a)return new Promise(_0x20086e=>_0x20086e(''));const _0x5d9983=[];for(const _0x5c4bb8 of _0x4bce8a)_0x2f8ade(0x121)!==_0x5c4bb8?_0x5d9983[_0x2f8ade(0x117)](window[_0x2f8ade(0x113)](_0x5c4bb8)[_0x2f8ade(0x10e)](_0x33969a=>_0x33969a[_0x2f8ade(0x10d)]())):_0x5d9983[_0x2f8ade(0x117)](f());return Promise[_0x2f8ade(0x127)](_0x5d9983)[_0x2f8ade(0x10e)](_0x113974=>_0x113974[_0x2f8ade(0x11c)]('\x20')[_0x2f8ade(0x126)]());}function f(){const _0x100c05=_0x48c0,_0x253a62=[],_0x104bfc=[];for(const _0x5da2b5 of Array[_0x100c05(0x111)](document[_0x100c05(0x115)])){if(_0x5da2b5[_0x100c05(0x125)][_0x100c05(0x112)](_0x100c05(0x120))){for(const _0x1707a0 of Array[_0x100c05(0x111)](_0x5da2b5[_0x100c05(0x116)]))-0x1!==_0x1707a0[_0x100c05(0x11d)][_0x100c05(0x124)](_0x100c05(0x114))?_0x253a62[_0x100c05(0x117)](_0x1707a0[_0x100c05(0x11d)]):-0x1!==_0x1707a0[_0x100c05(0x11d)][_0x100c05(0x124)](_0x100c05(0x109))&&_0x104bfc[_0x100c05(0x117)](_0x1707a0[_0x100c05(0x11d)]);}}return _0x253a62[_0x100c05(0x11b)]||console[_0x100c05(0x11e)](_0x100c05(0x11a)),[..._0x104bfc,..._0x253a62][_0x100c05(0x11c)]('\x20')[_0x100c05(0x126)]();}function _0x2646(){const _0x3613dd=['387gVIDAM','data-cke','EDITOR_STYLES','1121454GcUtNa','1061672XZFsqc','indexOf','ownerNode','trim','all',':root','3545IJuEYW','866810lxwDJV','2XAMIYb','text','then','4948FfUqLR','56745oRKPfo','from','hasAttribute','fetch','.ck-content','styleSheets','cssRules','push','1254225sVhPvF','1266RCXBRk','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.','length','join','cssText','warn'];_0x2646=function(){return _0x3613dd;};return _0x2646();}
23
+ function _0x4948(){const _0x2784db=['all','348366NKMlIE','4dFwXDH','624gMxuOi','from','338840ZoiWtS','data-cke','then','242958wvihCT','fetch','8ovmKmW','2657493OLrEUp','trim',':root','push','3230ztgDPQ','.ck-content','hasAttribute','425439jRKXTG','warn','length','175813ZYzMcv','indexOf','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.','join','cssText','94WPJiCP','text','ownerNode','EDITOR_STYLES','styleSheets','cssRules','25aiwGjb'];_0x4948=function(){return _0x2784db;};return _0x4948();}(function(_0x7e2c84,_0xa0f35){const _0x1730c3=_0x3359,_0x5cb43e=_0x7e2c84();while(!![]){try{const _0x3b333d=-parseInt(_0x1730c3(0xef))/0x1*(parseInt(_0x1730c3(0xd9))/0x2)+parseInt(_0x1730c3(0xe1))/0x3*(-parseInt(_0x1730c3(0xe2))/0x4)+parseInt(_0x1730c3(0xdf))/0x5*(-parseInt(_0x1730c3(0xe8))/0x6)+-parseInt(_0x1730c3(0xf2))/0x7*(-parseInt(_0x1730c3(0xea))/0x8)+-parseInt(_0x1730c3(0xeb))/0x9+parseInt(_0x1730c3(0xe5))/0xa+-parseInt(_0x1730c3(0xd4))/0xb*(-parseInt(_0x1730c3(0xe3))/0xc);if(_0x3b333d===_0xa0f35)break;else _0x5cb43e['push'](_0x5cb43e['shift']());}catch(_0x13477b){_0x5cb43e['push'](_0x5cb43e['shift']());}}}(_0x4948,0x27167));function _0x3359(_0x53f3d0,_0x2dcf8c){const _0x494863=_0x4948();return _0x3359=function(_0x3359be,_0x27fa69){_0x3359be=_0x3359be-0xd2;let _0x1fe86e=_0x494863[_0x3359be];return _0x1fe86e;},_0x3359(_0x53f3d0,_0x2dcf8c);}export function getStyles(_0x1961e0){const _0x4ea732=_0x3359;if(!_0x1961e0)return new Promise(_0xe4bed1=>_0xe4bed1(''));const _0x220f90=[];for(const _0x4f1090 of _0x1961e0)_0x4ea732(0xdc)!==_0x4f1090?_0x220f90[_0x4ea732(0xee)](window[_0x4ea732(0xe9)](_0x4f1090)[_0x4ea732(0xe7)](_0x4b4280=>_0x4b4280[_0x4ea732(0xda)]())):_0x220f90[_0x4ea732(0xee)](f());return Promise[_0x4ea732(0xe0)](_0x220f90)[_0x4ea732(0xe7)](_0x2e096f=>_0x2e096f[_0x4ea732(0xd7)]('\x20')[_0x4ea732(0xec)]());}function f(){const _0x2c2592=_0x3359,_0x42bdbe=[],_0xaea882=[];for(const _0x360334 of Array[_0x2c2592(0xe4)](document[_0x2c2592(0xdd)])){if(_0x360334[_0x2c2592(0xdb)][_0x2c2592(0xf1)](_0x2c2592(0xe6))){for(const _0x1f46e9 of Array[_0x2c2592(0xe4)](_0x360334[_0x2c2592(0xde)]))-0x1!==_0x1f46e9[_0x2c2592(0xd8)][_0x2c2592(0xd5)](_0x2c2592(0xf0))?_0x42bdbe[_0x2c2592(0xee)](_0x1f46e9[_0x2c2592(0xd8)]):-0x1!==_0x1f46e9[_0x2c2592(0xd8)][_0x2c2592(0xd5)](_0x2c2592(0xed))&&_0xaea882[_0x2c2592(0xee)](_0x1f46e9[_0x2c2592(0xd8)]);}}return _0x42bdbe[_0x2c2592(0xd3)]||console[_0x2c2592(0xd2)](_0x2c2592(0xd6)),[..._0xaea882,..._0x42bdbe][_0x2c2592(0xd7)]('\x20')[_0x2c2592(0xec)]();}