@ckeditor/ckeditor5-export-pdf 0.0.0-nightly-20240605.0 → 0.0.0-nightly-20240606.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 (106) hide show
  1. package/README.md +6 -0
  2. package/build/export-pdf.js +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/bg.js +1 -1
  9. package/dist/translations/bg.umd.js +1 -1
  10. package/dist/translations/bn.js +1 -1
  11. package/dist/translations/bn.umd.js +1 -1
  12. package/dist/translations/ca.js +1 -1
  13. package/dist/translations/ca.umd.js +1 -1
  14. package/dist/translations/cs.js +1 -1
  15. package/dist/translations/cs.umd.js +1 -1
  16. package/dist/translations/da.js +1 -1
  17. package/dist/translations/da.umd.js +1 -1
  18. package/dist/translations/de.js +1 -1
  19. package/dist/translations/de.umd.js +1 -1
  20. package/dist/translations/el.js +1 -1
  21. package/dist/translations/el.umd.js +1 -1
  22. package/dist/translations/en-au.js +1 -1
  23. package/dist/translations/en-au.umd.js +1 -1
  24. package/dist/translations/en.umd.js +1 -1
  25. package/dist/translations/es-co.js +1 -1
  26. package/dist/translations/es-co.umd.js +1 -1
  27. package/dist/translations/es.js +1 -1
  28. package/dist/translations/es.umd.js +1 -1
  29. package/dist/translations/et.js +1 -1
  30. package/dist/translations/et.umd.js +1 -1
  31. package/dist/translations/fi.js +1 -1
  32. package/dist/translations/fi.umd.js +1 -1
  33. package/dist/translations/fr.js +1 -1
  34. package/dist/translations/fr.umd.js +1 -1
  35. package/dist/translations/gl.js +1 -1
  36. package/dist/translations/gl.umd.js +1 -1
  37. package/dist/translations/he.js +1 -1
  38. package/dist/translations/he.umd.js +1 -1
  39. package/dist/translations/hi.js +1 -1
  40. package/dist/translations/hi.umd.js +1 -1
  41. package/dist/translations/hr.js +1 -1
  42. package/dist/translations/hr.umd.js +1 -1
  43. package/dist/translations/hu.js +1 -1
  44. package/dist/translations/hu.umd.js +1 -1
  45. package/dist/translations/id.js +1 -1
  46. package/dist/translations/id.umd.js +1 -1
  47. package/dist/translations/it.js +1 -1
  48. package/dist/translations/it.umd.js +1 -1
  49. package/dist/translations/ja.js +1 -1
  50. package/dist/translations/ja.umd.js +1 -1
  51. package/dist/translations/jv.js +1 -1
  52. package/dist/translations/jv.umd.js +1 -1
  53. package/dist/translations/ko.js +1 -1
  54. package/dist/translations/ko.umd.js +1 -1
  55. package/dist/translations/lt.js +1 -1
  56. package/dist/translations/lt.umd.js +1 -1
  57. package/dist/translations/lv.js +1 -1
  58. package/dist/translations/lv.umd.js +1 -1
  59. package/dist/translations/ms.js +1 -1
  60. package/dist/translations/ms.umd.js +1 -1
  61. package/dist/translations/nl.js +1 -1
  62. package/dist/translations/nl.umd.js +1 -1
  63. package/dist/translations/no.js +1 -1
  64. package/dist/translations/no.umd.js +1 -1
  65. package/dist/translations/pl.js +1 -1
  66. package/dist/translations/pl.umd.js +1 -1
  67. package/dist/translations/pt-br.js +1 -1
  68. package/dist/translations/pt-br.umd.js +1 -1
  69. package/dist/translations/pt.js +1 -1
  70. package/dist/translations/pt.umd.js +1 -1
  71. package/dist/translations/ro.js +1 -1
  72. package/dist/translations/ro.umd.js +1 -1
  73. package/dist/translations/ru.js +1 -1
  74. package/dist/translations/ru.umd.js +1 -1
  75. package/dist/translations/sk.js +1 -1
  76. package/dist/translations/sk.umd.js +1 -1
  77. package/dist/translations/sr-latn.js +1 -1
  78. package/dist/translations/sr-latn.umd.js +1 -1
  79. package/dist/translations/sr.js +1 -1
  80. package/dist/translations/sr.umd.js +1 -1
  81. package/dist/translations/sv.js +1 -1
  82. package/dist/translations/sv.umd.js +1 -1
  83. package/dist/translations/th.js +1 -1
  84. package/dist/translations/th.umd.js +1 -1
  85. package/dist/translations/tr.js +1 -1
  86. package/dist/translations/tr.umd.js +1 -1
  87. package/dist/translations/ug.js +1 -1
  88. package/dist/translations/ug.umd.js +1 -1
  89. package/dist/translations/uk.js +1 -1
  90. package/dist/translations/uk.umd.js +1 -1
  91. package/dist/translations/ur.js +1 -1
  92. package/dist/translations/ur.umd.js +1 -1
  93. package/dist/translations/vi.js +1 -1
  94. package/dist/translations/vi.umd.js +1 -1
  95. package/dist/translations/zh-cn.js +1 -1
  96. package/dist/translations/zh-cn.umd.js +1 -1
  97. package/dist/translations/zh.js +1 -1
  98. package/dist/translations/zh.umd.js +1 -1
  99. package/dist/types/exportpdf.d.ts +10 -7
  100. package/package.json +2 -2
  101. package/src/exportpdf.d.ts +10 -7
  102. package/src/exportpdf.js +1 -1
  103. package/src/exportpdfcommand.js +1 -1
  104. package/src/exportpdfui.js +1 -1
  105. package/src/index.js +1 -1
  106. package/src/utils.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'zh':{'dictionary':{'Export\x20to\x20PDF':'匯出為\x20PDF','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.':'產生\x20PDF\x20時發生錯誤。','PDF\x20export\x20started':'PDF\x20匯出開始','PDF\x20export\x20failed':'PDF\x20匯出失敗','PDF\x20export\x20successful':'PDF\x20匯出成功','Exporting\x20PDF\x20document':'正在匯出\x20PDF\x20文件'},'getPluralForm':_0x4a0bcd=>0x0}};
23
+ export default{'zh':{'dictionary':{'Export\x20to\x20PDF':'匯出為\x20PDF','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.':'產生\x20PDF\x20時發生錯誤。','PDF\x20export\x20started':'PDF\x20匯出開始','PDF\x20export\x20failed':'PDF\x20匯出失敗','PDF\x20export\x20successful':'PDF\x20匯出成功','Exporting\x20PDF\x20document':'正在匯出\x20PDF\x20文件'},'getPluralForm':_0x2b2c5d=>0x0}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x50f37f=>{const {zh:{dictionary:_0x45bf06,getPluralForm:_0x42e522}}={'zh':{'dictionary':{'Export\x20to\x20PDF':'匯出為\x20PDF','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.':'產生\x20PDF\x20時發生錯誤。','PDF\x20export\x20started':'PDF\x20匯出開始','PDF\x20export\x20failed':'PDF\x20匯出失敗','PDF\x20export\x20successful':'PDF\x20匯出成功','Exporting\x20PDF\x20document':'正在匯出\x20PDF\x20文件'},'getPluralForm':_0x4b332a=>0x0}};_0x50f37f['zh']||={'dictionary':{},'getPluralForm':null},_0x50f37f['zh']['dictionary']=Object['assign'](_0x50f37f['zh']['dictionary'],_0x45bf06),_0x50f37f['zh']['getPluralForm']=_0x42e522;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x41a4d4=>{const {zh:{dictionary:_0x19bcfa,getPluralForm:_0x43e1bb}}={'zh':{'dictionary':{'Export\x20to\x20PDF':'匯出為\x20PDF','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.':'產生\x20PDF\x20時發生錯誤。','PDF\x20export\x20started':'PDF\x20匯出開始','PDF\x20export\x20failed':'PDF\x20匯出失敗','PDF\x20export\x20successful':'PDF\x20匯出成功','Exporting\x20PDF\x20document':'正在匯出\x20PDF\x20文件'},'getPluralForm':_0x1b19b7=>0x0}};_0x41a4d4['zh']||={'dictionary':{},'getPluralForm':null},_0x41a4d4['zh']['dictionary']=Object['assign'](_0x41a4d4['zh']['dictionary'],_0x19bcfa),_0x41a4d4['zh']['getPluralForm']=_0x43e1bb;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -60,13 +60,16 @@ export interface ExportPdfConfig {
60
60
  * ```
61
61
  *
62
62
  * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
63
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
63
+ * {@glink getting-started/setup/css the default editor content styles}
64
+ * to the converter.
64
65
  *
65
66
  * **Default editor's content styles**:
66
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
67
+ * {@glink getting-started/setup/css The default editor content styles}
67
68
  * are applied to the generated PDF thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
68
69
  * If you don't want them to be applied, you have to omit the token:
69
70
  *
71
+ * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
72
+ *
70
73
  * ```ts
71
74
  * const exportPdfConfig = {
72
75
  * stylesheets: [ './path/to/custom-editor-styles.css' ]
@@ -79,8 +82,8 @@ export interface ExportPdfConfig {
79
82
  * ```ts
80
83
  * const exportPdfConfig = {
81
84
  * stylesheets: [
82
- * './path/to/fonts.css',
83
- * 'EDITOR_STYLES'
85
+ * 'path/to/editor-styles.css',
86
+ * './path/to/fonts.css'
84
87
  * ]
85
88
  * }
86
89
  * ```
@@ -90,8 +93,8 @@ export interface ExportPdfConfig {
90
93
  * ```ts
91
94
  * const exportPdfConfig = {
92
95
  * stylesheets: [
96
+ * 'path/to/editor-styles.css',
93
97
  * './path/to/fonts.css',
94
- * 'EDITOR_STYLES',
95
98
  * './path/to/custom-styles.css'
96
99
  * ]
97
100
  * }
@@ -211,7 +214,7 @@ export interface ExportPdfConfig {
211
214
  appID?: string;
212
215
  }
213
216
  export type ExportPdfConverterOptions = {
214
- format?: 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6';
217
+ format?: 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | string & Record<never, never>;
215
218
  margin_top?: string;
216
219
  margin_bottom?: string;
217
220
  margin_right?: string;
@@ -219,7 +222,7 @@ export type ExportPdfConverterOptions = {
219
222
  header_html?: string;
220
223
  footer_html?: string;
221
224
  header_and_footer_css?: string;
222
- page_orientation?: 'portrait' | 'landscape';
225
+ page_orientation?: 'portrait' | 'landscape' | string & Record<never, never>;
223
226
  wait_for_network?: boolean;
224
227
  wait_time?: number;
225
228
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-pdf",
3
- "version": "0.0.0-nightly-20240605.0",
3
+ "version": "0.0.0-nightly-20240606.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": "0.0.0-nightly-20240605.0"
33
+ "ckeditor5": "0.0.0-nightly-20240606.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (http://cksource.com/)",
@@ -56,13 +56,16 @@ export interface ExportPdfConfig {
56
56
  * ```
57
57
  *
58
58
  * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
59
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
59
+ * {@glink getting-started/setup/css the default editor content styles}
60
+ * to the converter.
60
61
  *
61
62
  * **Default editor's content styles**:
62
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
63
+ * {@glink getting-started/setup/css The default editor content styles}
63
64
  * are applied to the generated PDF thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
64
65
  * If you don't want them to be applied, you have to omit the token:
65
66
  *
67
+ * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
68
+ *
66
69
  * ```ts
67
70
  * const exportPdfConfig = {
68
71
  * stylesheets: [ './path/to/custom-editor-styles.css' ]
@@ -75,8 +78,8 @@ export interface ExportPdfConfig {
75
78
  * ```ts
76
79
  * const exportPdfConfig = {
77
80
  * stylesheets: [
78
- * './path/to/fonts.css',
79
- * 'EDITOR_STYLES'
81
+ * 'path/to/editor-styles.css',
82
+ * './path/to/fonts.css'
80
83
  * ]
81
84
  * }
82
85
  * ```
@@ -86,8 +89,8 @@ export interface ExportPdfConfig {
86
89
  * ```ts
87
90
  * const exportPdfConfig = {
88
91
  * stylesheets: [
92
+ * 'path/to/editor-styles.css',
89
93
  * './path/to/fonts.css',
90
- * 'EDITOR_STYLES',
91
94
  * './path/to/custom-styles.css'
92
95
  * ]
93
96
  * }
@@ -207,7 +210,7 @@ export interface ExportPdfConfig {
207
210
  appID?: string;
208
211
  }
209
212
  export type ExportPdfConverterOptions = {
210
- format?: 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6';
213
+ format?: 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | string & Record<never, never>;
211
214
  margin_top?: string;
212
215
  margin_bottom?: string;
213
216
  margin_right?: string;
@@ -215,7 +218,7 @@ export type ExportPdfConverterOptions = {
215
218
  header_html?: string;
216
219
  footer_html?: string;
217
220
  header_and_footer_css?: string;
218
- page_orientation?: 'portrait' | 'landscape';
221
+ page_orientation?: 'portrait' | 'landscape' | string & Record<never, never>;
219
222
  wait_for_network?: boolean;
220
223
  wait_time?: number;
221
224
  };
package/src/exportpdf.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x33c9f5=_0x28b0;(function(_0x1c2f9d,_0x2518b8){const _0x740be6=_0x28b0,_0x1d5f71=_0x1c2f9d();while(!![]){try{const _0x47f015=-parseInt(_0x740be6(0x110))/0x1*(-parseInt(_0x740be6(0x10b))/0x2)+parseInt(_0x740be6(0xfa))/0x3+-parseInt(_0x740be6(0x112))/0x4*(-parseInt(_0x740be6(0x109))/0x5)+-parseInt(_0x740be6(0x104))/0x6*(parseInt(_0x740be6(0x103))/0x7)+parseInt(_0x740be6(0x102))/0x8+-parseInt(_0x740be6(0x10e))/0x9+parseInt(_0x740be6(0x113))/0xa*(-parseInt(_0x740be6(0x10d))/0xb);if(_0x47f015===_0x2518b8)break;else _0x1d5f71['push'](_0x1d5f71['shift']());}catch(_0x46e60a){_0x1d5f71['push'](_0x1d5f71['shift']());}}}(_0x5ae3,0xa89bc));function _0x5ae3(){const _0xbf2fbc=['plugins','225181ZmHkdj','token','40WfBtdm','12484820YRgoOs','ExportPdf','tokenUrl','1606209FUhDXR','editor','add','init','then','exportPdf','commands','config','5002272cTRAUU','109543jwMJbx','294YSUoUv','pluginName','requires','_token','CloudServices','453045TBqgXC','registerTokenUrl','6Nwuldi','get','11tglmnz','327753INrcvj'];_0x5ae3=function(){return _0xbf2fbc;};return _0x5ae3();}import{Plugin as _0x526c0e}from'ckeditor5/src/core.js';import{Notification as _0xb22a06}from'ckeditor5/src/ui.js';import _0x656780 from'./exportpdfcommand.js';function _0x28b0(_0x525e6e,_0x257dad){const _0x5ae3c3=_0x5ae3();return _0x28b0=function(_0x28b073,_0x146c4b){_0x28b073=_0x28b073-0xf8;let _0x56e73b=_0x5ae3c3[_0x28b073];return _0x56e73b;},_0x28b0(_0x525e6e,_0x257dad);}import _0x11ce92 from'./exportpdfui.js';export default class s extends _0x526c0e{static get[_0x33c9f5(0x105)](){const _0x38465e=_0x33c9f5;return _0x38465e(0xf8);}static get[_0x33c9f5(0x106)](){const _0x2c090e=_0x33c9f5;return[_0x2c090e(0x108),_0xb22a06,_0x11ce92];}[_0x33c9f5(0xfd)](){const _0xdf3541=_0x33c9f5,_0x597187=this[_0xdf3541(0xfb)],_0x319bc8=_0x597187[_0xdf3541(0x101)][_0xdf3541(0x10c)](_0xdf3541(0xff))||{};_0x597187[_0xdf3541(0x100)][_0xdf3541(0xfc)](_0xdf3541(0xff),new _0x656780(_0x597187));const _0x7423cd=_0x597187[_0xdf3541(0x10f)][_0xdf3541(0x10c)](_0xdf3541(0x108));!0x1===_0x319bc8[_0xdf3541(0xf9)]?this[_0xdf3541(0x107)]=null:_0x319bc8[_0xdf3541(0xf9)]?_0x7423cd[_0xdf3541(0x10a)](_0x319bc8[_0xdf3541(0xf9)])[_0xdf3541(0xfe)](_0x2f39ed=>{const _0x108021=_0xdf3541;this[_0x108021(0x107)]=_0x2f39ed;}):this[_0xdf3541(0x107)]=_0x7423cd[_0xdf3541(0x111)];}}
23
+ const _0x3bb715=_0x3bc8;(function(_0x3fd55e,_0x204d00){const _0x50195d=_0x3bc8,_0xf4646d=_0x3fd55e();while(!![]){try{const _0x46c6bb=parseInt(_0x50195d(0xa2))/0x1*(parseInt(_0x50195d(0xa3))/0x2)+-parseInt(_0x50195d(0xa9))/0x3*(parseInt(_0x50195d(0x9f))/0x4)+-parseInt(_0x50195d(0xa1))/0x5*(parseInt(_0x50195d(0x96))/0x6)+-parseInt(_0x50195d(0xa7))/0x7*(-parseInt(_0x50195d(0xac))/0x8)+parseInt(_0x50195d(0xa5))/0x9*(-parseInt(_0x50195d(0x9b))/0xa)+-parseInt(_0x50195d(0xaa))/0xb*(parseInt(_0x50195d(0x94))/0xc)+parseInt(_0x50195d(0x98))/0xd;if(_0x46c6bb===_0x204d00)break;else _0xf4646d['push'](_0xf4646d['shift']());}catch(_0xf69ef6){_0xf4646d['push'](_0xf4646d['shift']());}}}(_0xed2c,0x786c0));function _0xed2c(){const _0x5b9b6b=['add','CloudServices','pluginName','2968292Jtwsdm','exportPdf','303185aFicBL','3RmiqGJ','111638TLqTyv','editor','18AwESyL','get','7DpSaJa','tokenUrl','3dxLxFz','24860vUjtsF','commands','4014736sQFAbe','_token','then','plugins','config','registerTokenUrl','3096yPJezj','init','78mtmtUP','ExportPdf','36742641ZpFXYb','token','requires','4444870uxIETO'];_0xed2c=function(){return _0x5b9b6b;};return _0xed2c();}import{Plugin as _0x3fa4fe}from'ckeditor5/src/core.js';import{Notification as _0x38dc95}from'ckeditor5/src/ui.js';import _0x38242f from'./exportpdfcommand.js';function _0x3bc8(_0x5066ac,_0x10bdbd){const _0xed2c36=_0xed2c();return _0x3bc8=function(_0x3bc80b,_0x1b2c7c){_0x3bc80b=_0x3bc80b-0x90;let _0x276ea9=_0xed2c36[_0x3bc80b];return _0x276ea9;},_0x3bc8(_0x5066ac,_0x10bdbd);}import _0x64a4e6 from'./exportpdfui.js';export default class s extends _0x3fa4fe{static get[_0x3bb715(0x9e)](){const _0x30731a=_0x3bb715;return _0x30731a(0x97);}static get[_0x3bb715(0x9a)](){const _0x7234b3=_0x3bb715;return[_0x7234b3(0x9d),_0x38dc95,_0x64a4e6];}[_0x3bb715(0x95)](){const _0x13b2a5=_0x3bb715,_0x536ee6=this[_0x13b2a5(0xa4)],_0x552988=_0x536ee6[_0x13b2a5(0x92)][_0x13b2a5(0xa6)](_0x13b2a5(0xa0))||{};_0x536ee6[_0x13b2a5(0xab)][_0x13b2a5(0x9c)](_0x13b2a5(0xa0),new _0x38242f(_0x536ee6));const _0x4a05b3=_0x536ee6[_0x13b2a5(0x91)][_0x13b2a5(0xa6)](_0x13b2a5(0x9d));!0x1===_0x552988[_0x13b2a5(0xa8)]?this[_0x13b2a5(0xad)]=null:_0x552988[_0x13b2a5(0xa8)]?_0x4a05b3[_0x13b2a5(0x93)](_0x552988[_0x13b2a5(0xa8)])[_0x13b2a5(0x90)](_0x5a16a7=>{const _0x4a2bb9=_0x13b2a5;this[_0x4a2bb9(0xad)]=_0x5a16a7;}):this[_0x13b2a5(0xad)]=_0x4a05b3[_0x13b2a5(0x99)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x580afd}from'ckeditor5/src/core.js';import{getStyles as _0x1d7186}from'./utils.js';export default class o extends _0x580afd{constructor(_0x3c8a29){super(_0x3c8a29),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x2cb869={}){const _0x200576=this['editor'],t=_0x200576['t'],_0x410707=_0x2cb869['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x2742d0=_0x2cb869['dataCallback']||(_0x183087=>_0x183087['data']['get']()),_0x1d1dfd=_0x200576['plugins']['get']('ExportPdf'),_0x1de762=_0x2cb869['token']||_0x1d1dfd['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x1d7186(_0x2cb869['stylesheets']||['EDITOR_STYLES'])['then'](async _0xf055c9=>{_0x200576['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x49e850={'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'+_0x200576['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x2742d0(_0x200576)+'\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':_0xf055c9,'options':_0x2cb869['converterOptions']},_0x5d8624={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x1de762?{'Authorization':_0x1de762['value']}:null,'x-cs-app-id':_0x2cb869['appID']||'cke5'},'body':JSON['stringify'](_0x49e850)};return window['fetch'](_0x410707,_0x5d8624)['then'](_0x40ac5c=>{if(0xc8!==_0x40ac5c['status'])throw _0x40ac5c;return _0x40ac5c['blob']();})['then'](_0x4c4fdb=>{_0x200576['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x132201='function'==typeof _0x2cb869['fileName']?_0x2cb869['fileName']():_0x2cb869['fileName'];this['_downloadFile'](_0x4c4fdb,_0x132201||'document.pdf');});})['catch'](_0x356cc1=>{const _0x237440=_0x200576['plugins']['get']('Notification');throw _0x200576['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x237440['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x356cc1;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x82d125,_0x32384f){const _0x522fb2=document['createElement']('a');_0x522fb2['href']=window['URL']['createObjectURL'](_0x82d125),_0x522fb2['download']=_0x32384f,_0x522fb2['click'](),_0x522fb2['remove']();}}
23
+ import{Command as _0x56ddb0}from'ckeditor5/src/core.js';import{getStyles as _0x656d7f}from'./utils.js';export default class o extends _0x56ddb0{constructor(_0x54f863){super(_0x54f863),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x307ddc={}){const _0x455b4e=this['editor'],t=_0x455b4e['t'],_0x218c20=_0x307ddc['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x1fdcf8=_0x307ddc['dataCallback']||(_0x257882=>_0x257882['data']['get']()),_0x2f8c5c=_0x455b4e['plugins']['get']('ExportPdf'),_0x5bc371=_0x307ddc['token']||_0x2f8c5c['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x656d7f(_0x307ddc['stylesheets']||['EDITOR_STYLES'])['then'](async _0x2bc3c1=>{_0x455b4e['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x5813a4={'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'+_0x455b4e['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x1fdcf8(_0x455b4e)+'\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':_0x2bc3c1,'options':_0x307ddc['converterOptions']},_0x5e96d0={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x5bc371?{'Authorization':_0x5bc371['value']}:null,'x-cs-app-id':_0x307ddc['appID']||'cke5'},'body':JSON['stringify'](_0x5813a4)};return window['fetch'](_0x218c20,_0x5e96d0)['then'](_0x278e17=>{if(0xc8!==_0x278e17['status'])throw _0x278e17;return _0x278e17['blob']();})['then'](_0x3ae941=>{_0x455b4e['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x4a0be8='function'==typeof _0x307ddc['fileName']?_0x307ddc['fileName']():_0x307ddc['fileName'];this['_downloadFile'](_0x3ae941,_0x4a0be8||'document.pdf');});})['catch'](_0x4e399c=>{const _0x10e3a3=_0x455b4e['plugins']['get']('Notification');throw _0x455b4e['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x10e3a3['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x4e399c;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x472d1d,_0x3926e5){const _0x1ce893=document['createElement']('a');_0x1ce893['href']=window['URL']['createObjectURL'](_0x472d1d),_0x1ce893['download']=_0x3926e5,_0x1ce893['click'](),_0x1ce893['remove']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x1dab5a}from'ckeditor5/src/core.js';import{ButtonView as _0x3e293d,MenuBarMenuListItemButtonView as _0x2c4a55,SpinnerView as _0x3784c4}from'ckeditor5/src/ui.js';import _0x4f72de from'../theme/icons/exportpdf.svg';export default class i extends _0x1dab5a{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x16eb1f=this['editor'];_0x16eb1f['ui']['componentFactory']['add']('exportPdf',()=>{const _0x52ba54=this['_createButton'](_0x3e293d),_0x294264=_0x16eb1f['commands']['get']('exportPdf');return _0x52ba54['set']({'tooltip':!0x0}),_0x52ba54['bind']('isOn')['to'](_0x294264,'isBusy'),_0x52ba54;}),_0x16eb1f['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x2c4a55));}['_createButton'](_0x783573){const _0x4a61b2=this['editor'],_0x9009e6=_0x4a61b2['config']['get']('exportPdf')||{},t=_0x4a61b2['locale']['t'],_0x1597f7=_0x4a61b2['commands']['get']('exportPdf'),_0x438f4c=new _0x783573(_0x4a61b2['locale']),_0x5165c=new _0x3784c4();return _0x438f4c['children']['add'](_0x5165c),_0x5165c['bind']('isVisible')['to'](_0x1597f7,'isBusy'),_0x438f4c['iconView']['bind']('isVisible')['to'](_0x1597f7,'isBusy',_0x386355=>!_0x386355),_0x438f4c['set']({'icon':_0x4f72de}),_0x438f4c['bind']('isEnabled')['to'](_0x1597f7,'isEnabled'),_0x438f4c['bind']('label')['to'](_0x1597f7,'isBusy',_0x2bafcc=>t(_0x2bafcc?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0x438f4c,'execute',()=>{_0x4a61b2['execute']('exportPdf',_0x9009e6),_0x4a61b2['editing']['view']['focus']();}),_0x438f4c;}}
23
+ import{Plugin as _0x36b3d9}from'ckeditor5/src/core.js';import{ButtonView as _0x322b68,MenuBarMenuListItemButtonView as _0x4d3649,SpinnerView as _0x4ba2e5}from'ckeditor5/src/ui.js';import _0xd5c4ff from'../theme/icons/exportpdf.svg';export default class i extends _0x36b3d9{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x330ba4=this['editor'];_0x330ba4['ui']['componentFactory']['add']('exportPdf',()=>{const _0x329187=this['_createButton'](_0x322b68),_0xe0124=_0x330ba4['commands']['get']('exportPdf');return _0x329187['set']({'tooltip':!0x0}),_0x329187['bind']('isOn')['to'](_0xe0124,'isBusy'),_0x329187;}),_0x330ba4['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x4d3649));}['_createButton'](_0x28e50b){const _0x53fb98=this['editor'],_0x2c2ef8=_0x53fb98['config']['get']('exportPdf')||{},t=_0x53fb98['locale']['t'],_0x34fe52=_0x53fb98['commands']['get']('exportPdf'),_0x1459e6=new _0x28e50b(_0x53fb98['locale']),_0x5b9ee8=new _0x4ba2e5();return _0x1459e6['children']['add'](_0x5b9ee8),_0x5b9ee8['bind']('isVisible')['to'](_0x34fe52,'isBusy'),_0x1459e6['iconView']['bind']('isVisible')['to'](_0x34fe52,'isBusy',_0xbb0ee5=>!_0xbb0ee5),_0x1459e6['set']({'icon':_0xd5c4ff}),_0x1459e6['bind']('isEnabled')['to'](_0x34fe52,'isEnabled'),_0x1459e6['bind']('label')['to'](_0x34fe52,'isBusy',_0x429054=>t(_0x429054?'Exporting\x20PDF\x20document':'Export\x20to\x20PDF')),this['listenTo'](_0x1459e6,'execute',()=>{_0x53fb98['execute']('exportPdf',_0x2c2ef8),_0x53fb98['editing']['view']['focus']();}),_0x1459e6;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x2cda3b,_0x15d09e){var _0x37e8eb=_0x3522,_0x3f1dec=_0x2cda3b();while(!![]){try{var _0x53f2e4=-parseInt(_0x37e8eb(0x91))/0x1+-parseInt(_0x37e8eb(0x8c))/0x2+parseInt(_0x37e8eb(0x8f))/0x3+-parseInt(_0x37e8eb(0x92))/0x4+parseInt(_0x37e8eb(0x8a))/0x5*(parseInt(_0x37e8eb(0x8e))/0x6)+parseInt(_0x37e8eb(0x90))/0x7*(parseInt(_0x37e8eb(0x8b))/0x8)+parseInt(_0x37e8eb(0x8d))/0x9;if(_0x53f2e4===_0x15d09e)break;else _0x3f1dec['push'](_0x3f1dec['shift']());}catch(_0x355adb){_0x3f1dec['push'](_0x3f1dec['shift']());}}}(_0xd5b2,0xbb2be));function _0x3522(_0x433bd2,_0x3001e8){var _0xd5b2a2=_0xd5b2();return _0x3522=function(_0x3522ba,_0x2fee9f){_0x3522ba=_0x3522ba-0x8a;var _0x376633=_0xd5b2a2[_0x3522ba];return _0x376633;},_0x3522(_0x433bd2,_0x3001e8);}export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';function _0xd5b2(){var _0x53c5ea=['1470816XdVVsj','10297SaWugg','315528ynDYKW','4530636XPdgkv','5OAoWqs','5088yFdpWv','2480876qQXtPv','10575711PWICdd','5126232QDGvOX'];_0xd5b2=function(){return _0x53c5ea;};return _0xd5b2();}
23
+ (function(_0x4f7ba9,_0x40b7e0){var _0x33158b=_0x12a3,_0x4cf0fd=_0x4f7ba9();while(!![]){try{var _0x28760e=parseInt(_0x33158b(0xe3))/0x1*(parseInt(_0x33158b(0xe2))/0x2)+parseInt(_0x33158b(0xe1))/0x3*(-parseInt(_0x33158b(0xdb))/0x4)+parseInt(_0x33158b(0xdd))/0x5+-parseInt(_0x33158b(0xdc))/0x6+-parseInt(_0x33158b(0xda))/0x7+parseInt(_0x33158b(0xdf))/0x8+parseInt(_0x33158b(0xe0))/0x9*(parseInt(_0x33158b(0xde))/0xa);if(_0x28760e===_0x40b7e0)break;else _0x4cf0fd['push'](_0x4cf0fd['shift']());}catch(_0x47a56d){_0x4cf0fd['push'](_0x4cf0fd['shift']());}}}(_0x2da1,0xe0938));function _0x2da1(){var _0x6bebbd=['129764qdvCmN','5920356JxEhIo','4560505sfosYl','5789980MPxZSg','7133864uXyDTO','9KDbGAj','39TfzHay','8lWvsIM','23341OdGcaI','1035111TwFGYa'];_0x2da1=function(){return _0x6bebbd;};return _0x2da1();}function _0x12a3(_0x3b2ef7,_0x395b83){var _0x2da144=_0x2da1();return _0x12a3=function(_0x12a3fb,_0x5086d5){_0x12a3fb=_0x12a3fb-0xda;var _0x2bc53b=_0x2da144[_0x12a3fb];return _0x2bc53b;},_0x12a3(_0x3b2ef7,_0x395b83);}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(_0x3889bd,_0x3f0da9){const _0x28dd4b=_0x5d4d,_0x4f7725=_0x3889bd();while(!![]){try{const _0x58d6ec=parseInt(_0x28dd4b(0x188))/0x1*(-parseInt(_0x28dd4b(0x199))/0x2)+parseInt(_0x28dd4b(0x194))/0x3*(-parseInt(_0x28dd4b(0x17d))/0x4)+parseInt(_0x28dd4b(0x181))/0x5+-parseInt(_0x28dd4b(0x18e))/0x6*(parseInt(_0x28dd4b(0x187))/0x7)+-parseInt(_0x28dd4b(0x17f))/0x8*(parseInt(_0x28dd4b(0x183))/0x9)+-parseInt(_0x28dd4b(0x197))/0xa*(-parseInt(_0x28dd4b(0x182))/0xb)+-parseInt(_0x28dd4b(0x19b))/0xc*(-parseInt(_0x28dd4b(0x193))/0xd);if(_0x58d6ec===_0x3f0da9)break;else _0x4f7725['push'](_0x4f7725['shift']());}catch(_0x53f78b){_0x4f7725['push'](_0x4f7725['shift']());}}}(_0x516b,0xcb7cb));export function getStyles(_0x20918e){const _0x3fa915=_0x5d4d;if(!_0x20918e)return new Promise(_0xe375d7=>_0xe375d7(''));const _0x2ccf68=[];for(const _0x25ef83 of _0x20918e)_0x3fa915(0x18b)!==_0x25ef83?_0x2ccf68[_0x3fa915(0x17e)](window[_0x3fa915(0x18a)](_0x25ef83)[_0x3fa915(0x196)](_0x1b2575=>_0x1b2575[_0x3fa915(0x19a)]())):_0x2ccf68[_0x3fa915(0x17e)](f());return Promise[_0x3fa915(0x186)](_0x2ccf68)[_0x3fa915(0x196)](_0x40e4b2=>_0x40e4b2[_0x3fa915(0x192)]('\x20')[_0x3fa915(0x191)]());}function _0x5d4d(_0x249cb7,_0xd3c6e1){const _0x516b9d=_0x516b();return _0x5d4d=function(_0x5d4dab,_0x3158f8){_0x5d4dab=_0x5d4dab-0x17d;let _0x50e36=_0x516b9d[_0x5d4dab];return _0x50e36;},_0x5d4d(_0x249cb7,_0xd3c6e1);}function f(){const _0x2f5242=_0x5d4d,_0xe5e98f=[],_0x3c56f8=[];for(const _0x475ae4 of Array[_0x2f5242(0x18d)](document[_0x2f5242(0x184)])){if(_0x475ae4[_0x2f5242(0x195)][_0x2f5242(0x18c)](_0x2f5242(0x18f))){for(const _0x2f92e5 of Array[_0x2f5242(0x18d)](_0x475ae4[_0x2f5242(0x19c)]))-0x1!==_0x2f92e5[_0x2f5242(0x19e)][_0x2f5242(0x180)](_0x2f5242(0x198))?_0xe5e98f[_0x2f5242(0x17e)](_0x2f92e5[_0x2f5242(0x19e)]):-0x1!==_0x2f92e5[_0x2f5242(0x19e)][_0x2f5242(0x180)](_0x2f5242(0x190))&&_0x3c56f8[_0x2f5242(0x17e)](_0x2f92e5[_0x2f5242(0x19e)]);}}return _0xe5e98f[_0x2f5242(0x19d)]||console[_0x2f5242(0x185)](_0x2f5242(0x189)),[..._0x3c56f8,..._0xe5e98f][_0x2f5242(0x192)]('\x20')[_0x2f5242(0x191)]();}function _0x516b(){const _0x235f9d=['push','8hthrzE','indexOf','1372310JOkwxL','17699PbkrDr','4734774TXHWEO','styleSheets','warn','all','13048xfDRSY','58EEywct','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.','fetch','EDITOR_STYLES','hasAttribute','from','4512cNSyos','data-cke',':root','trim','join','2868918PGmjLA','348639ujXECR','ownerNode','then','1790PLFnPu','.ck-content','5458eMnPWJ','text','204XPQuap','cssRules','length','cssText','48pAkLQC'];_0x516b=function(){return _0x235f9d;};return _0x516b();}
23
+ (function(_0xd2eaaa,_0x14bfb8){const _0x45ea2c=_0x134a,_0x146c97=_0xd2eaaa();while(!![]){try{const _0x4fd18e=-parseInt(_0x45ea2c(0x94))/0x1+-parseInt(_0x45ea2c(0x7b))/0x2+parseInt(_0x45ea2c(0x91))/0x3+-parseInt(_0x45ea2c(0x90))/0x4+parseInt(_0x45ea2c(0x89))/0x5*(parseInt(_0x45ea2c(0x95))/0x6)+-parseInt(_0x45ea2c(0x84))/0x7*(-parseInt(_0x45ea2c(0x79))/0x8)+parseInt(_0x45ea2c(0x82))/0x9;if(_0x4fd18e===_0x14bfb8)break;else _0x146c97['push'](_0x146c97['shift']());}catch(_0xea50c){_0x146c97['push'](_0x146c97['shift']());}}}(_0x56fe,0xddaca));export function getStyles(_0x21d2d6){const _0x1f15d6=_0x134a;if(!_0x21d2d6)return new Promise(_0x29f32c=>_0x29f32c(''));const _0x2c36db=[];for(const _0x22f529 of _0x21d2d6)_0x1f15d6(0x8e)!==_0x22f529?_0x2c36db[_0x1f15d6(0x78)](window[_0x1f15d6(0x83)](_0x22f529)[_0x1f15d6(0x8d)](_0x4ba763=>_0x4ba763[_0x1f15d6(0x85)]())):_0x2c36db[_0x1f15d6(0x78)](f());return Promise[_0x1f15d6(0x8f)](_0x2c36db)[_0x1f15d6(0x8d)](_0x11e886=>_0x11e886[_0x1f15d6(0x7a)]('\x20')[_0x1f15d6(0x7e)]());}function _0x134a(_0x4d61e1,_0xd8a799){const _0x56fe77=_0x56fe();return _0x134a=function(_0x134ad2,_0x2bfc7c){_0x134ad2=_0x134ad2-0x78;let _0x3ef156=_0x56fe77[_0x134ad2];return _0x3ef156;},_0x134a(_0x4d61e1,_0xd8a799);}function _0x56fe(){const _0x4d3597=['text','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.','warn','length','225PNUQlt','from','styleSheets','data-cke','then','EDITOR_STYLES','all','452864TGKdfT','158052jwdqqQ','hasAttribute','indexOf','735513thObEt','33036xkLYAI','push','40UuEiSg','join','2981586DfjGYL','cssText',':root','trim','ownerNode','cssRules','.ck-content','12121344ekNLtZ','fetch','2240322AeitIG'];_0x56fe=function(){return _0x4d3597;};return _0x56fe();}function f(){const _0x3a8d25=_0x134a,_0x57eef6=[],_0x109901=[];for(const _0x247184 of Array[_0x3a8d25(0x8a)](document[_0x3a8d25(0x8b)])){if(_0x247184[_0x3a8d25(0x7f)][_0x3a8d25(0x92)](_0x3a8d25(0x8c))){for(const _0x2bd98d of Array[_0x3a8d25(0x8a)](_0x247184[_0x3a8d25(0x80)]))-0x1!==_0x2bd98d[_0x3a8d25(0x7c)][_0x3a8d25(0x93)](_0x3a8d25(0x81))?_0x57eef6[_0x3a8d25(0x78)](_0x2bd98d[_0x3a8d25(0x7c)]):-0x1!==_0x2bd98d[_0x3a8d25(0x7c)][_0x3a8d25(0x93)](_0x3a8d25(0x7d))&&_0x109901[_0x3a8d25(0x78)](_0x2bd98d[_0x3a8d25(0x7c)]);}}return _0x57eef6[_0x3a8d25(0x88)]||console[_0x3a8d25(0x87)](_0x3a8d25(0x86)),[..._0x109901,..._0x57eef6][_0x3a8d25(0x7a)]('\x20')[_0x3a8d25(0x7e)]();}