@ckeditor/ckeditor5-export-word 41.4.2 → 42.0.0-alpha.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 (104) hide show
  1. package/README.md +6 -0
  2. package/build/export-word.js +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/bg.js +1 -1
  7. package/dist/translations/bg.umd.js +1 -1
  8. package/dist/translations/bn.js +1 -1
  9. package/dist/translations/bn.umd.js +1 -1
  10. package/dist/translations/ca.js +1 -1
  11. package/dist/translations/ca.umd.js +1 -1
  12. package/dist/translations/cs.js +1 -1
  13. package/dist/translations/cs.umd.js +1 -1
  14. package/dist/translations/da.js +1 -1
  15. package/dist/translations/da.umd.js +1 -1
  16. package/dist/translations/de.js +1 -1
  17. package/dist/translations/de.umd.js +1 -1
  18. package/dist/translations/el.js +1 -1
  19. package/dist/translations/el.umd.js +1 -1
  20. package/dist/translations/en-au.js +1 -1
  21. package/dist/translations/en-au.umd.js +1 -1
  22. package/dist/translations/en.umd.js +1 -1
  23. package/dist/translations/es.js +1 -1
  24. package/dist/translations/es.umd.js +1 -1
  25. package/dist/translations/et.js +1 -1
  26. package/dist/translations/et.umd.js +1 -1
  27. package/dist/translations/fi.js +1 -1
  28. package/dist/translations/fi.umd.js +1 -1
  29. package/dist/translations/fr.js +1 -1
  30. package/dist/translations/fr.umd.js +1 -1
  31. package/dist/translations/gl.js +1 -1
  32. package/dist/translations/gl.umd.js +1 -1
  33. package/dist/translations/he.js +1 -1
  34. package/dist/translations/he.umd.js +1 -1
  35. package/dist/translations/hi.js +1 -1
  36. package/dist/translations/hi.umd.js +1 -1
  37. package/dist/translations/hr.js +1 -1
  38. package/dist/translations/hr.umd.js +1 -1
  39. package/dist/translations/hu.js +1 -1
  40. package/dist/translations/hu.umd.js +1 -1
  41. package/dist/translations/id.js +1 -1
  42. package/dist/translations/id.umd.js +1 -1
  43. package/dist/translations/it.js +1 -1
  44. package/dist/translations/it.umd.js +1 -1
  45. package/dist/translations/ja.js +1 -1
  46. package/dist/translations/ja.umd.js +1 -1
  47. package/dist/translations/jv.js +1 -1
  48. package/dist/translations/jv.umd.js +1 -1
  49. package/dist/translations/ko.js +1 -1
  50. package/dist/translations/ko.umd.js +1 -1
  51. package/dist/translations/lt.js +1 -1
  52. package/dist/translations/lt.umd.js +1 -1
  53. package/dist/translations/lv.js +1 -1
  54. package/dist/translations/lv.umd.js +1 -1
  55. package/dist/translations/ms.js +1 -1
  56. package/dist/translations/ms.umd.js +1 -1
  57. package/dist/translations/nl.js +1 -1
  58. package/dist/translations/nl.umd.js +1 -1
  59. package/dist/translations/no.js +1 -1
  60. package/dist/translations/no.umd.js +1 -1
  61. package/dist/translations/pl.js +1 -1
  62. package/dist/translations/pl.umd.js +1 -1
  63. package/dist/translations/pt-br.js +1 -1
  64. package/dist/translations/pt-br.umd.js +1 -1
  65. package/dist/translations/pt.js +1 -1
  66. package/dist/translations/pt.umd.js +1 -1
  67. package/dist/translations/ro.js +1 -1
  68. package/dist/translations/ro.umd.js +1 -1
  69. package/dist/translations/ru.js +1 -1
  70. package/dist/translations/ru.umd.js +1 -1
  71. package/dist/translations/sk.js +1 -1
  72. package/dist/translations/sk.umd.js +1 -1
  73. package/dist/translations/sr-latn.js +1 -1
  74. package/dist/translations/sr-latn.umd.js +1 -1
  75. package/dist/translations/sr.js +1 -1
  76. package/dist/translations/sr.umd.js +1 -1
  77. package/dist/translations/sv.js +1 -1
  78. package/dist/translations/sv.umd.js +1 -1
  79. package/dist/translations/th.js +1 -1
  80. package/dist/translations/th.umd.js +1 -1
  81. package/dist/translations/tr.js +1 -1
  82. package/dist/translations/tr.umd.js +1 -1
  83. package/dist/translations/ug.js +1 -1
  84. package/dist/translations/ug.umd.js +1 -1
  85. package/dist/translations/uk.js +1 -1
  86. package/dist/translations/uk.umd.js +1 -1
  87. package/dist/translations/ur.js +1 -1
  88. package/dist/translations/ur.umd.js +1 -1
  89. package/dist/translations/vi.js +1 -1
  90. package/dist/translations/vi.umd.js +1 -1
  91. package/dist/translations/zh-cn.js +1 -1
  92. package/dist/translations/zh-cn.umd.js +1 -1
  93. package/dist/translations/zh.js +1 -1
  94. package/dist/translations/zh.umd.js +1 -1
  95. package/dist/types/exportword.d.ts +92 -7
  96. package/dist/types/exportwordcommand.d.ts +1 -1
  97. package/package.json +2 -2
  98. package/src/exportword.d.ts +92 -7
  99. package/src/exportword.js +1 -1
  100. package/src/exportwordcommand.d.ts +1 -1
  101. package/src/exportwordcommand.js +1 -1
  102. package/src/exportwordui.js +1 -1
  103. package/src/index.js +1 -1
  104. package/src/utils.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x231844=>{const {'zh-cn':{dictionary:_0x3c93d5,getPluralForm:_0x40dc78}}={'zh-cn':{'dictionary':{'Export\x20to\x20Word':'导出Word文档','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'生成Word文档时发生了异常。','Word\x20document\x20export\x20started':'Word\x20文档导出开始','Word\x20document\x20export\x20failed':'Word\x20文档导出失败','Word\x20document\x20export\x20successful':'Word\x20文档导出成功','Exporting\x20Word\x20document':'正在导出\x20Word\x20文档'},'getPluralForm':_0x2ab7fa=>0x0}};_0x231844['zh-cn']||={'dictionary':{},'getPluralForm':null},_0x231844['zh-cn']['dictionary']=Object['assign'](_0x231844['zh-cn']['dictionary'],_0x3c93d5),_0x231844['zh-cn']['getPluralForm']=_0x40dc78;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x5e70bf=>{const {'zh-cn':{dictionary:_0x5360c1,getPluralForm:_0x581b00}}={'zh-cn':{'dictionary':{'Export\x20to\x20Word':'导出Word文档','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'生成Word文档时发生了异常。','Word\x20document\x20export\x20started':'Word\x20文档导出开始','Word\x20document\x20export\x20failed':'Word\x20文档导出失败','Word\x20document\x20export\x20successful':'Word\x20文档导出成功','Exporting\x20Word\x20document':'正在导出\x20Word\x20文档'},'getPluralForm':_0x3378b9=>0x0}};_0x5e70bf['zh-cn']||={'dictionary':{},'getPluralForm':null},_0x5e70bf['zh-cn']['dictionary']=Object['assign'](_0x5e70bf['zh-cn']['dictionary'],_0x5360c1),_0x5e70bf['zh-cn']['getPluralForm']=_0x581b00;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'zh':{'dictionary':{'Export\x20to\x20Word':'匯出到\x20Word','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'產生\x20Word\x20檔案時出錯。','Word\x20document\x20export\x20started':'Word\x20文件匯出開始','Word\x20document\x20export\x20failed':'Word\x20文件匯出失敗','Word\x20document\x20export\x20successful':'Word\x20文件匯出成功','Exporting\x20Word\x20document':'正在匯出\x20Word\x20文件'},'getPluralForm':_0x23bc7e=>0x0}};
23
+ export default{'zh':{'dictionary':{'Export\x20to\x20Word':'匯出到\x20Word','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'產生\x20Word\x20檔案時出錯。','Word\x20document\x20export\x20started':'Word\x20文件匯出開始','Word\x20document\x20export\x20failed':'Word\x20文件匯出失敗','Word\x20document\x20export\x20successful':'Word\x20文件匯出成功','Exporting\x20Word\x20document':'正在匯出\x20Word\x20文件'},'getPluralForm':_0x3fa033=>0x0}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x3bd978=>{const {zh:{dictionary:_0x3802ba,getPluralForm:_0x1d0a24}}={'zh':{'dictionary':{'Export\x20to\x20Word':'匯出到\x20Word','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'產生\x20Word\x20檔案時出錯。','Word\x20document\x20export\x20started':'Word\x20文件匯出開始','Word\x20document\x20export\x20failed':'Word\x20文件匯出失敗','Word\x20document\x20export\x20successful':'Word\x20文件匯出成功','Exporting\x20Word\x20document':'正在匯出\x20Word\x20文件'},'getPluralForm':_0x2277f2=>0x0}};_0x3bd978['zh']||={'dictionary':{},'getPluralForm':null},_0x3bd978['zh']['dictionary']=Object['assign'](_0x3bd978['zh']['dictionary'],_0x3802ba),_0x3bd978['zh']['getPluralForm']=_0x1d0a24;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x19bf3f=>{const {zh:{dictionary:_0x4292d3,getPluralForm:_0x5f0473}}={'zh':{'dictionary':{'Export\x20to\x20Word':'匯出到\x20Word','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.':'產生\x20Word\x20檔案時出錯。','Word\x20document\x20export\x20started':'Word\x20文件匯出開始','Word\x20document\x20export\x20failed':'Word\x20文件匯出失敗','Word\x20document\x20export\x20successful':'Word\x20文件匯出成功','Exporting\x20Word\x20document':'正在匯出\x20Word\x20文件'},'getPluralForm':_0x30dc89=>0x0}};_0x19bf3f['zh']||={'dictionary':{},'getPluralForm':null},_0x19bf3f['zh']['dictionary']=Object['assign'](_0x19bf3f['zh']['dictionary'],_0x4292d3),_0x19bf3f['zh']['getPluralForm']=_0x5f0473;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -61,13 +61,16 @@ export interface ExportWordConfig {
61
61
  * ```
62
62
  *
63
63
  * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
64
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
64
+ * {@glink getting-started/setup/css the default editor content styles}
65
+ * to the converter.
65
66
  *
66
67
  * **Default editor's content styles**:
67
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
68
+ * {@glink getting-started/setup/css The default editor content styles}
68
69
  * are applied to the generated Word file thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
69
70
  * If you don't want them to be applied, you have to omit the token:
70
71
  *
72
+ * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
73
+ *
71
74
  * ```ts
72
75
  * const exportWordConfig = {
73
76
  * stylesheets: [ './path/to/custom-editor-styles.css' ]
@@ -79,7 +82,7 @@ export interface ExportWordConfig {
79
82
  * ```ts
80
83
  * const exportWordConfig = {
81
84
  * stylesheets: [
82
- * 'EDITOR_STYLES',
85
+ * 'path/to/editor-styles.css',
83
86
  * './path/to/custom-styles.css'
84
87
  * ]
85
88
  * }
@@ -158,7 +161,7 @@ export interface ExportWordConfig {
158
161
  * timezone: 'UTC'
159
162
  * }`
160
163
  */
161
- converterOptions?: ExportWordConverterOptions;
164
+ converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
162
165
  /**
163
166
  * A function to gather the HTML to be converted to Word.
164
167
  *
@@ -197,6 +200,12 @@ export interface ExportWordConfig {
197
200
  * See: {@link module:cloud-services/cloudservices~CloudServices#token}
198
201
  */
199
202
  token?: InitializedToken;
203
+ /**
204
+ * The version of `Export to Word` API.
205
+ *
206
+ * @default '1'
207
+ */
208
+ version?: 1 | 2;
200
209
  }
201
210
  export type ExportWordConverterOptions = {
202
211
  format?: ExportWordConverterFormatOption;
@@ -213,12 +222,12 @@ export type ExportWordConverterOptions = {
213
222
  base_url?: string;
214
223
  timezone?: string;
215
224
  };
216
- export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5';
217
- export type ExportWordConverterOrientationOption = 'portrait' | 'landscape';
225
+ export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
226
+ export type ExportWordConverterOrientationOption = 'portrait' | 'landscape' | string & Record<never, never>;
218
227
  export type ExportWordConverterHeaderFooterOption = Array<{
219
228
  html?: string;
220
229
  css?: string;
221
- type?: 'default' | 'even' | 'odd' | 'first';
230
+ type?: 'default' | 'even' | 'odd' | 'first' | string & Record<never, never>;
222
231
  }>;
223
232
  export type ExportWordConverterCommentsOption = {
224
233
  [id: string]: Array<{
@@ -234,3 +243,79 @@ export type ExportWordConverterSuggestionsOption = {
234
243
  created: Date | null;
235
244
  };
236
245
  };
246
+ export type ExportWordConverterOptionsV2 = {
247
+ document?: ExportWordConverterDocumentOptionsV2;
248
+ header?: ExportWordConverterHeaderFooterOptionsV2;
249
+ footer?: ExportWordConverterHeaderFooterOptionsV2;
250
+ collaboration_features?: ExportWordConverterCollaborationFeaturesOptionsV2;
251
+ extra_http_headers?: ExportWordConverterExtraHttpHeaders;
252
+ timezone?: string;
253
+ base_url?: string;
254
+ };
255
+ export type ExportWordConverterDocumentOptionsV2 = {
256
+ margins?: ExportWordConverterMarginsOptionsV2;
257
+ size?: ExportWordConverterFormatOptionsV2;
258
+ orientation?: ExportWordConverterOrientationOptionsV2;
259
+ };
260
+ export type ExportWordConverterMarginsOptionsV2 = {
261
+ top?: string;
262
+ right?: string;
263
+ bottom?: string;
264
+ left?: string;
265
+ };
266
+ export type ExportWordConverterHeaderFooterOptionsV2 = {
267
+ first?: ExportWordConverterHeaderFooterItemOptionsV2;
268
+ odd?: ExportWordConverterHeaderFooterItemOptionsV2;
269
+ even?: ExportWordConverterHeaderFooterItemOptionsV2;
270
+ default?: ExportWordConverterHeaderFooterItemOptionsV2;
271
+ };
272
+ /**
273
+ * If fetching some resources (e.g. images) used in a generated Word requires passing an additional
274
+ * authorization factor in the form of additional HTTP headers:
275
+ *
276
+ * ```
277
+ * extra_http_headers: {
278
+ * 'https://ckeditor.com': {
279
+ * authorization: 'Bearer xxx'
280
+ * },
281
+ * 'https://example.com': {
282
+ * authorization: 'Bearer xxx'
283
+ * },
284
+ * }
285
+ * ```
286
+ */
287
+ export type ExportWordConverterExtraHttpHeaders = {
288
+ [domain: string]: ExportWordConverterExtraHttpHeadersHeader;
289
+ };
290
+ export type ExportWordConverterExtraHttpHeadersHeader = {
291
+ [header: string]: string;
292
+ };
293
+ export type ExportWordConverterHeaderFooterItemOptionsV2 = {
294
+ html?: string;
295
+ css?: string;
296
+ };
297
+ export type ExportWordConverterOrientationOptionsV2 = 'portrait' | 'landscape' | string & Record<never, never>;
298
+ export type ExportWordConverterFormatOptionsV2 = ExportWordConverterPredifinedFormatOptionsV2 | ExportWordConverterCustomFormatOptionsV2;
299
+ export type ExportWordConverterPredifinedFormatOptionsV2 = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
300
+ export type ExportWordConverterCustomFormatOptionsV2 = {
301
+ width?: string;
302
+ height?: string;
303
+ };
304
+ export type ExportWordConverterCollaborationFeaturesOptionsV2 = {
305
+ comment_threads: ExportWordConverterCommentsThreadOptionsV2;
306
+ suggestions: ExportWordConverterSuggestionsOptionsV2;
307
+ };
308
+ export type ExportWordConverterCommentsThreadOptionsV2 = {
309
+ thread_id: string;
310
+ is_resolved: boolean;
311
+ comments: Array<{
312
+ author: string;
313
+ created_at: string;
314
+ content: string;
315
+ }>;
316
+ };
317
+ export type ExportWordConverterSuggestionsOptionsV2 = Array<{
318
+ id: string;
319
+ author: string;
320
+ created_at: string;
321
+ }>;
@@ -11,7 +11,7 @@
11
11
  * @publicApi
12
12
  */
13
13
  import { Command, type Editor } from 'ckeditor5/src/core.js';
14
- import { type ExportWordConfig } from './exportword.js';
14
+ import type { ExportWordConfig } from './exportword.js';
15
15
  /**
16
16
  * The export to Word command.
17
17
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-word",
3
- "version": "41.4.2",
3
+ "version": "42.0.0-alpha.0",
4
4
  "description": "Export to Word 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": "41.4.2"
33
+ "ckeditor5": "42.0.0-alpha.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
@@ -57,13 +57,16 @@ export interface ExportWordConfig {
57
57
  * ```
58
58
  *
59
59
  * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
60
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
60
+ * {@glink getting-started/setup/css the default editor content styles}
61
+ * to the converter.
61
62
  *
62
63
  * **Default editor's content styles**:
63
- * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
64
+ * {@glink getting-started/setup/css The default editor content styles}
64
65
  * are applied to the generated Word file thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
65
66
  * If you don't want them to be applied, you have to omit the token:
66
67
  *
68
+ * **NOTE:** The 'EDITOR_STYLES' string is only supported in legacy webpack setup.
69
+ *
67
70
  * ```ts
68
71
  * const exportWordConfig = {
69
72
  * stylesheets: [ './path/to/custom-editor-styles.css' ]
@@ -75,7 +78,7 @@ export interface ExportWordConfig {
75
78
  * ```ts
76
79
  * const exportWordConfig = {
77
80
  * stylesheets: [
78
- * 'EDITOR_STYLES',
81
+ * 'path/to/editor-styles.css',
79
82
  * './path/to/custom-styles.css'
80
83
  * ]
81
84
  * }
@@ -154,7 +157,7 @@ export interface ExportWordConfig {
154
157
  * timezone: 'UTC'
155
158
  * }`
156
159
  */
157
- converterOptions?: ExportWordConverterOptions;
160
+ converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
158
161
  /**
159
162
  * A function to gather the HTML to be converted to Word.
160
163
  *
@@ -193,6 +196,12 @@ export interface ExportWordConfig {
193
196
  * See: {@link module:cloud-services/cloudservices~CloudServices#token}
194
197
  */
195
198
  token?: InitializedToken;
199
+ /**
200
+ * The version of `Export to Word` API.
201
+ *
202
+ * @default '1'
203
+ */
204
+ version?: 1 | 2;
196
205
  }
197
206
  export type ExportWordConverterOptions = {
198
207
  format?: ExportWordConverterFormatOption;
@@ -209,12 +218,12 @@ export type ExportWordConverterOptions = {
209
218
  base_url?: string;
210
219
  timezone?: string;
211
220
  };
212
- export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5';
213
- export type ExportWordConverterOrientationOption = 'portrait' | 'landscape';
221
+ export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
222
+ export type ExportWordConverterOrientationOption = 'portrait' | 'landscape' | string & Record<never, never>;
214
223
  export type ExportWordConverterHeaderFooterOption = Array<{
215
224
  html?: string;
216
225
  css?: string;
217
- type?: 'default' | 'even' | 'odd' | 'first';
226
+ type?: 'default' | 'even' | 'odd' | 'first' | string & Record<never, never>;
218
227
  }>;
219
228
  export type ExportWordConverterCommentsOption = {
220
229
  [id: string]: Array<{
@@ -230,3 +239,79 @@ export type ExportWordConverterSuggestionsOption = {
230
239
  created: Date | null;
231
240
  };
232
241
  };
242
+ export type ExportWordConverterOptionsV2 = {
243
+ document?: ExportWordConverterDocumentOptionsV2;
244
+ header?: ExportWordConverterHeaderFooterOptionsV2;
245
+ footer?: ExportWordConverterHeaderFooterOptionsV2;
246
+ collaboration_features?: ExportWordConverterCollaborationFeaturesOptionsV2;
247
+ extra_http_headers?: ExportWordConverterExtraHttpHeaders;
248
+ timezone?: string;
249
+ base_url?: string;
250
+ };
251
+ export type ExportWordConverterDocumentOptionsV2 = {
252
+ margins?: ExportWordConverterMarginsOptionsV2;
253
+ size?: ExportWordConverterFormatOptionsV2;
254
+ orientation?: ExportWordConverterOrientationOptionsV2;
255
+ };
256
+ export type ExportWordConverterMarginsOptionsV2 = {
257
+ top?: string;
258
+ right?: string;
259
+ bottom?: string;
260
+ left?: string;
261
+ };
262
+ export type ExportWordConverterHeaderFooterOptionsV2 = {
263
+ first?: ExportWordConverterHeaderFooterItemOptionsV2;
264
+ odd?: ExportWordConverterHeaderFooterItemOptionsV2;
265
+ even?: ExportWordConverterHeaderFooterItemOptionsV2;
266
+ default?: ExportWordConverterHeaderFooterItemOptionsV2;
267
+ };
268
+ /**
269
+ * If fetching some resources (e.g. images) used in a generated Word requires passing an additional
270
+ * authorization factor in the form of additional HTTP headers:
271
+ *
272
+ * ```
273
+ * extra_http_headers: {
274
+ * 'https://ckeditor.com': {
275
+ * authorization: 'Bearer xxx'
276
+ * },
277
+ * 'https://example.com': {
278
+ * authorization: 'Bearer xxx'
279
+ * },
280
+ * }
281
+ * ```
282
+ */
283
+ export type ExportWordConverterExtraHttpHeaders = {
284
+ [domain: string]: ExportWordConverterExtraHttpHeadersHeader;
285
+ };
286
+ export type ExportWordConverterExtraHttpHeadersHeader = {
287
+ [header: string]: string;
288
+ };
289
+ export type ExportWordConverterHeaderFooterItemOptionsV2 = {
290
+ html?: string;
291
+ css?: string;
292
+ };
293
+ export type ExportWordConverterOrientationOptionsV2 = 'portrait' | 'landscape' | string & Record<never, never>;
294
+ export type ExportWordConverterFormatOptionsV2 = ExportWordConverterPredifinedFormatOptionsV2 | ExportWordConverterCustomFormatOptionsV2;
295
+ export type ExportWordConverterPredifinedFormatOptionsV2 = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
296
+ export type ExportWordConverterCustomFormatOptionsV2 = {
297
+ width?: string;
298
+ height?: string;
299
+ };
300
+ export type ExportWordConverterCollaborationFeaturesOptionsV2 = {
301
+ comment_threads: ExportWordConverterCommentsThreadOptionsV2;
302
+ suggestions: ExportWordConverterSuggestionsOptionsV2;
303
+ };
304
+ export type ExportWordConverterCommentsThreadOptionsV2 = {
305
+ thread_id: string;
306
+ is_resolved: boolean;
307
+ comments: Array<{
308
+ author: string;
309
+ created_at: string;
310
+ content: string;
311
+ }>;
312
+ };
313
+ export type ExportWordConverterSuggestionsOptionsV2 = Array<{
314
+ id: string;
315
+ author: string;
316
+ created_at: string;
317
+ }>;
package/src/exportword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x47151d=_0x4c4f;(function(_0x177377,_0x568515){const _0xd88426=_0x4c4f,_0x4e5b99=_0x177377();while(!![]){try{const _0x40a564=-parseInt(_0xd88426(0x159))/0x1*(-parseInt(_0xd88426(0x15a))/0x2)+parseInt(_0xd88426(0x164))/0x3*(-parseInt(_0xd88426(0x155))/0x4)+parseInt(_0xd88426(0x150))/0x5*(parseInt(_0xd88426(0x160))/0x6)+parseInt(_0xd88426(0x15d))/0x7+parseInt(_0xd88426(0x14c))/0x8+-parseInt(_0xd88426(0x153))/0x9+-parseInt(_0xd88426(0x15f))/0xa*(parseInt(_0xd88426(0x166))/0xb);if(_0x40a564===_0x568515)break;else _0x4e5b99['push'](_0x4e5b99['shift']());}catch(_0x4a3179){_0x4e5b99['push'](_0x4e5b99['shift']());}}}(_0x81dc,0x9ee53));function _0x4c4f(_0x256d11,_0x50e5c8){const _0x81dcec=_0x81dc();return _0x4c4f=function(_0x4c4f48,_0x54ef74){_0x4c4f48=_0x4c4f48-0x14b;let _0x3a3bd0=_0x81dcec[_0x4c4f48];return _0x3a3bd0;},_0x4c4f(_0x256d11,_0x50e5c8);}import{Plugin as _0x5c8423}from'ckeditor5/src/core.js';import{Notification as _0x29c33a}from'ckeditor5/src/ui.js';import _0x4ff803 from'./exportwordcommand.js';import _0x325ed1 from'./exportwordui.js';export default class s extends _0x5c8423{static get[_0x47151d(0x154)](){const _0x9b3587=_0x47151d;return _0x9b3587(0x15c);}static get[_0x47151d(0x165)](){const _0x10aa82=_0x47151d;return[_0x10aa82(0x14d),_0x29c33a,_0x325ed1];}[_0x47151d(0x151)](){const _0x4c92b7=_0x47151d,_0x25cc45=this[_0x4c92b7(0x14b)],_0x54e536=_0x25cc45[_0x4c92b7(0x162)][_0x4c92b7(0x161)](_0x4c92b7(0x14e))||{};_0x25cc45[_0x4c92b7(0x14f)][_0x4c92b7(0x158)](_0x4c92b7(0x14e),new _0x4ff803(_0x25cc45));const _0x14d09f=_0x25cc45[_0x4c92b7(0x15b)][_0x4c92b7(0x161)](_0x4c92b7(0x14d));!0x1===_0x54e536[_0x4c92b7(0x163)]?this[_0x4c92b7(0x157)]=null:_0x54e536[_0x4c92b7(0x163)]?_0x14d09f[_0x4c92b7(0x15e)](_0x54e536[_0x4c92b7(0x163)])[_0x4c92b7(0x156)](_0x4800f7=>{const _0x2827db=_0x4c92b7;this[_0x2827db(0x157)]=_0x4800f7;}):this[_0x4c92b7(0x157)]=_0x14d09f[_0x4c92b7(0x152)];}}function _0x81dc(){const _0x4e021f=['8226iVYBSd','get','config','tokenUrl','480gRdTfP','requires','55jzrYjz','editor','9216976wVYodS','CloudServices','exportWord','commands','2325ausgog','init','token','989595kEohhS','pluginName','20576wQfWQC','then','_token','add','3gbskEM','713662YYeFBy','plugins','ExportWord','4209485YHWTZw','registerTokenUrl','3755310YtaFqI'];_0x81dc=function(){return _0x4e021f;};return _0x81dc();}
23
+ const _0x17ce6d=_0x21b2;(function(_0x5c37fe,_0x5d588b){const _0xe8a6ec=_0x21b2,_0x47e70a=_0x5c37fe();while(!![]){try{const _0x49ff9d=-parseInt(_0xe8a6ec(0x1a9))/0x1*(parseInt(_0xe8a6ec(0x1ab))/0x2)+-parseInt(_0xe8a6ec(0x194))/0x3*(parseInt(_0xe8a6ec(0x197))/0x4)+parseInt(_0xe8a6ec(0x193))/0x5+-parseInt(_0xe8a6ec(0x190))/0x6+parseInt(_0xe8a6ec(0x1a2))/0x7*(-parseInt(_0xe8a6ec(0x19a))/0x8)+-parseInt(_0xe8a6ec(0x191))/0x9*(parseInt(_0xe8a6ec(0x19f))/0xa)+parseInt(_0xe8a6ec(0x192))/0xb;if(_0x49ff9d===_0x5d588b)break;else _0x47e70a['push'](_0x47e70a['shift']());}catch(_0x538492){_0x47e70a['push'](_0x47e70a['shift']());}}}(_0x18b8,0xe1d95));function _0x18b8(){const _0x4ad2b5=['ExportWord','tokenUrl','2642570bzMmAD','get','plugins','349433ruziOw','init','_token','registerTokenUrl','then','config','CloudServices','5ZHcNty','editor','171074wuxYGE','3244008cgrxHW','63itzuxK','51529599pxTWNg','8964320LHnoLQ','3859479dMJfJu','add','token','4MxmnOI','commands','requires','232zIXsoG','exportWord','pluginName'];_0x18b8=function(){return _0x4ad2b5;};return _0x18b8();}import{Plugin as _0x2deb63}from'ckeditor5/src/core.js';import{Notification as _0x5f2a49}from'ckeditor5/src/ui.js';import _0xfaf148 from'./exportwordcommand.js';function _0x21b2(_0x35a47c,_0x337151){const _0x18b8e7=_0x18b8();return _0x21b2=function(_0x21b265,_0x3dc6a6){_0x21b265=_0x21b265-0x190;let _0x499e94=_0x18b8e7[_0x21b265];return _0x499e94;},_0x21b2(_0x35a47c,_0x337151);}import _0x460a77 from'./exportwordui.js';export default class s extends _0x2deb63{static get[_0x17ce6d(0x19c)](){const _0x29f645=_0x17ce6d;return _0x29f645(0x19d);}static get[_0x17ce6d(0x199)](){const _0x4c5460=_0x17ce6d;return[_0x4c5460(0x1a8),_0x5f2a49,_0x460a77];}[_0x17ce6d(0x1a3)](){const _0x8d5627=_0x17ce6d,_0x3fb321=this[_0x8d5627(0x1aa)],_0x34be9f=_0x3fb321[_0x8d5627(0x1a7)][_0x8d5627(0x1a0)](_0x8d5627(0x19b))||{};_0x3fb321[_0x8d5627(0x198)][_0x8d5627(0x195)](_0x8d5627(0x19b),new _0xfaf148(_0x3fb321));const _0x107ed7=_0x3fb321[_0x8d5627(0x1a1)][_0x8d5627(0x1a0)](_0x8d5627(0x1a8));!0x1===_0x34be9f[_0x8d5627(0x19e)]?this[_0x8d5627(0x1a4)]=null:_0x34be9f[_0x8d5627(0x19e)]?_0x107ed7[_0x8d5627(0x1a5)](_0x34be9f[_0x8d5627(0x19e)])[_0x8d5627(0x1a6)](_0x13281c=>{const _0x1196c5=_0x8d5627;this[_0x1196c5(0x1a4)]=_0x13281c;}):this[_0x8d5627(0x1a4)]=_0x107ed7[_0x8d5627(0x196)];}}
@@ -7,7 +7,7 @@
7
7
  * @publicApi
8
8
  */
9
9
  import { Command, type Editor } from 'ckeditor5/src/core.js';
10
- import { type ExportWordConfig } from './exportword.js';
10
+ import type { ExportWordConfig } from './exportword.js';
11
11
  /**
12
12
  * The export to Word command.
13
13
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x247c37}from'ckeditor5/src/core.js';import{getStyles as _0x4d5505,getConverterOptions as _0x281583}from'./utils.js';export default class e extends _0x247c37{constructor(_0x1d66b9){super(_0x1d66b9),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x321a9f={}){const _0x59aa62=this['editor'],t=_0x59aa62['t'],_0x500c4a=_0x321a9f['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x1dd633=_0x321a9f['converterOptions']||{},_0x871593=_0x59aa62['plugins']['get']('ExportWord'),_0xccb8e0=_0x321a9f['token']||_0x871593['_token'],_0x39c8ad=!0x1!==_0x1dd633['auto_pagination'],_0x436638=_0x321a9f['dataCallback']||(_0x5906ef=>_0x5906ef['data']['get']({'pagination':_0x39c8ad}));return this['isBusy']=!0x0,this['refresh'](),_0x4d5505(_0x321a9f['stylesheets']||['EDITOR_STYLES'])['then'](async _0x5ac532=>{_0x59aa62['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20started'));const _0x331621=await _0x436638(_0x59aa62),_0x339bb0={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x59aa62['locale']['contentLanguageDirection']+'\x22>'+_0x331621+'</div>','css':_0x5ac532,'options':{..._0x1dd633,..._0x281583(_0x59aa62)}},_0x1ab8ad={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0xccb8e0?{'Authorization':_0xccb8e0['value']}:null},'body':JSON['stringify'](_0x339bb0)};return window['fetch'](_0x500c4a,_0x1ab8ad)['then'](_0x10129d=>{if(0xc8!==_0x10129d['status'])throw _0x10129d;return _0x10129d['blob']();})['then'](_0x11901a=>{_0x59aa62['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20successful'));const _0x1d44c6='function'==typeof _0x321a9f['fileName']?_0x321a9f['fileName']():_0x321a9f['fileName'];this['_downloadFile'](_0x11901a,_0x1d44c6||'document.docx');});})['catch'](_0x5b0b81=>{const _0x1b8348=_0x59aa62['plugins']['get']('Notification');throw _0x59aa62['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20failed'),{'politeness':'assertive'}),_0x1b8348['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x5b0b81;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x3d0605,_0x3c42fa){const _0x4cf2fb=document['createElement']('a');_0x4cf2fb['href']=window['URL']['createObjectURL'](_0x3d0605),_0x4cf2fb['download']=_0x3c42fa,_0x4cf2fb['click'](),_0x4cf2fb['remove']();}}
23
+ import{Command as _0x1b56f0}from'ckeditor5/src/core.js';import{getStyles as _0x16a4c0,getConverterOptions as _0x137b1f}from'./utils.js';export default class e extends _0x1b56f0{constructor(_0x5b1fe6){super(_0x5b1fe6),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x255609={}){const _0x102fbc=this['editor'],t=_0x102fbc['t'],_0x1e00a9=_0x255609['version']||0x1,_0x4c9f5f=_0x255609['converterUrl']||(0x2===_0x1e00a9?'https://docx-converter.cke-cs.com/v2/convert/docx-html':'https://docx-converter.cke-cs.com/v1/convert'),_0x38ec13=_0x255609['converterOptions']||{},_0x16cf98=_0x102fbc['plugins']['get']('ExportWord'),_0x551870=_0x255609['token']||_0x16cf98['_token'],_0x180b4d=!0x1!==_0x38ec13['auto_pagination'],_0x231c36=_0x255609['dataCallback']||(_0x4d28c1=>_0x4d28c1['data']['get']({'pagination':_0x180b4d}));return this['isBusy']=!0x0,this['refresh'](),_0x16a4c0(_0x255609['stylesheets']||['EDITOR_STYLES'])['then'](async _0x211fa5=>{_0x102fbc['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20started'));const _0x5cd7c6=await _0x231c36(_0x102fbc),_0x558fd2={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x102fbc['locale']['contentLanguageDirection']+'\x22>'+_0x5cd7c6+'</div>','css':_0x211fa5,[0x2===_0x1e00a9?'config':'options']:{..._0x38ec13,..._0x137b1f(_0x102fbc)}},_0x2d567c={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x551870?{'Authorization':_0x551870['value']}:null},'body':JSON['stringify'](_0x558fd2)};return window['fetch'](_0x4c9f5f,_0x2d567c)['then'](_0x5f3f8f=>{if(0xc8!==_0x5f3f8f['status'])throw _0x5f3f8f;return _0x5f3f8f['blob']();})['then'](_0x49dca0=>{_0x102fbc['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20successful'));const _0x303dae='function'==typeof _0x255609['fileName']?_0x255609['fileName']():_0x255609['fileName'];this['_downloadFile'](_0x49dca0,_0x303dae||'document.docx');});})['catch'](_0x12dc34=>{const _0x5333fd=_0x102fbc['plugins']['get']('Notification');throw _0x102fbc['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20failed'),{'politeness':'assertive'}),_0x5333fd['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x12dc34;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x3cca18,_0x45edda){const _0x16cb64=document['createElement']('a');_0x16cb64['href']=window['URL']['createObjectURL'](_0x3cca18),_0x16cb64['download']=_0x45edda,_0x16cb64['click'](),_0x16cb64['remove']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0xf3cbec}from'ckeditor5/src/core.js';import{ButtonView as _0x34d33d,MenuBarMenuListItemButtonView as _0x542797,SpinnerView as _0x5427da}from'ckeditor5/src/ui.js';import _0x5646a3 from'../theme/icons/exportword.svg';export default class i extends _0xf3cbec{static get['pluginName'](){return'ExportWordUI';}['init'](){const _0x2ce3ea=this['editor'];_0x2ce3ea['ui']['componentFactory']['add']('exportWord',()=>{const _0x3456e8=_0x2ce3ea['commands']['get']('exportWord'),_0x299dde=this['_createButton'](_0x34d33d);return _0x299dde['set']({'tooltip':!0x0}),_0x299dde['bind']('isOn')['to'](_0x3456e8,'isBusy'),_0x299dde;}),_0x2ce3ea['ui']['componentFactory']['add']('menuBar:exportWord',()=>this['_createButton'](_0x542797));}['_createButton'](_0x2327da){const _0x1bcf2d=this['editor'],_0x106fd8=_0x1bcf2d['config']['get']('exportWord')||{},t=_0x1bcf2d['locale']['t'],_0x4df08f=_0x1bcf2d['commands']['get']('exportWord'),_0x58d70e=new _0x2327da(_0x1bcf2d['locale']),_0x58c1f7=new _0x5427da();return _0x58d70e['children']['add'](_0x58c1f7),_0x58c1f7['bind']('isVisible')['to'](_0x4df08f,'isBusy'),_0x58d70e['iconView']['bind']('isVisible')['to'](_0x4df08f,'isBusy',_0x231cdc=>!_0x231cdc),_0x58d70e['set']({'icon':_0x5646a3}),_0x58d70e['bind']('isEnabled')['to'](_0x4df08f,'isEnabled'),_0x58d70e['bind']('label')['to'](_0x4df08f,'isBusy',_0x4cab87=>t(_0x4cab87?'Exporting\x20Word\x20document':'Export\x20to\x20Word')),this['listenTo'](_0x58d70e,'execute',()=>{_0x1bcf2d['execute']('exportWord',_0x106fd8),_0x1bcf2d['editing']['view']['focus']();}),_0x58d70e;}}
23
+ import{Plugin as _0x528a3b}from'ckeditor5/src/core.js';import{ButtonView as _0x4873d2,MenuBarMenuListItemButtonView as _0xd7e14d,SpinnerView as _0x452211}from'ckeditor5/src/ui.js';import _0x124587 from'../theme/icons/exportword.svg';export default class i extends _0x528a3b{static get['pluginName'](){return'ExportWordUI';}['init'](){const _0x185b31=this['editor'];_0x185b31['ui']['componentFactory']['add']('exportWord',()=>{const _0x35d4d5=_0x185b31['commands']['get']('exportWord'),_0x297d51=this['_createButton'](_0x4873d2);return _0x297d51['set']({'tooltip':!0x0}),_0x297d51['bind']('isOn')['to'](_0x35d4d5,'isBusy'),_0x297d51;}),_0x185b31['ui']['componentFactory']['add']('menuBar:exportWord',()=>this['_createButton'](_0xd7e14d));}['_createButton'](_0x5a9f2c){const _0x462c2d=this['editor'],_0x4d41db=_0x462c2d['config']['get']('exportWord')||{},t=_0x462c2d['locale']['t'],_0x397feb=_0x462c2d['commands']['get']('exportWord'),_0x1e3b35=new _0x5a9f2c(_0x462c2d['locale']),_0x56c8fa=new _0x452211();return _0x1e3b35['children']['add'](_0x56c8fa),_0x56c8fa['bind']('isVisible')['to'](_0x397feb,'isBusy'),_0x1e3b35['iconView']['bind']('isVisible')['to'](_0x397feb,'isBusy',_0x911cae=>!_0x911cae),_0x1e3b35['set']({'icon':_0x124587}),_0x1e3b35['bind']('isEnabled')['to'](_0x397feb,'isEnabled'),_0x1e3b35['bind']('label')['to'](_0x397feb,'isBusy',_0x5bde88=>t(_0x5bde88?'Exporting\x20Word\x20document':'Export\x20to\x20Word')),this['listenTo'](_0x1e3b35,'execute',()=>{_0x462c2d['execute']('exportWord',_0x4d41db),_0x462c2d['editing']['view']['focus']();}),_0x1e3b35;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x301b(){var _0x1880af=['136xExBcl','5915819hIbJbg','3496200uGLYUX','8yXBHSD','50pateSm','894OKpyGj','8634wXWCrs','148210hcjHil','944IkDWdg','1224081FYORuF','9568768VoDzvh','210oMGIvN'];_0x301b=function(){return _0x1880af;};return _0x301b();}(function(_0x31e606,_0xfd9a82){var _0x5112b3=_0x439c,_0x44ef7e=_0x31e606();while(!![]){try{var _0x461fd8=-parseInt(_0x5112b3(0x149))/0x1*(parseInt(_0x5112b3(0x146))/0x2)+parseInt(_0x5112b3(0x147))/0x3*(-parseInt(_0x5112b3(0x14d))/0x4)+-parseInt(_0x5112b3(0x148))/0x5*(parseInt(_0x5112b3(0x14c))/0x6)+parseInt(_0x5112b3(0x14e))/0x7*(parseInt(_0x5112b3(0x144))/0x8)+parseInt(_0x5112b3(0x14a))/0x9*(parseInt(_0x5112b3(0x145))/0xa)+parseInt(_0x5112b3(0x14b))/0xb+-parseInt(_0x5112b3(0x14f))/0xc;if(_0x461fd8===_0xfd9a82)break;else _0x44ef7e['push'](_0x44ef7e['shift']());}catch(_0x3dd79d){_0x44ef7e['push'](_0x44ef7e['shift']());}}}(_0x301b,0x8566a));export{default as ExportWord}from'./exportword.js';function _0x439c(_0x5a8dac,_0x2f834e){var _0x301b3b=_0x301b();return _0x439c=function(_0x439c9c,_0x7a10ce){_0x439c9c=_0x439c9c-0x144;var _0x7468b9=_0x301b3b[_0x439c9c];return _0x7468b9;},_0x439c(_0x5a8dac,_0x2f834e);}import'./augmentation.js';
23
+ function _0x15f9(_0x3f8f53,_0x402cc4){var _0x6c1fb5=_0x6c1f();return _0x15f9=function(_0x15f9cb,_0x2f8f84){_0x15f9cb=_0x15f9cb-0x115;var _0x5518bd=_0x6c1fb5[_0x15f9cb];return _0x5518bd;},_0x15f9(_0x3f8f53,_0x402cc4);}(function(_0x9c122d,_0x12db5a){var _0x37bc36=_0x15f9,_0x3f87b5=_0x9c122d();while(!![]){try{var _0x5c088f=-parseInt(_0x37bc36(0x11c))/0x1+parseInt(_0x37bc36(0x115))/0x2+parseInt(_0x37bc36(0x117))/0x3*(parseInt(_0x37bc36(0x11b))/0x4)+-parseInt(_0x37bc36(0x116))/0x5+-parseInt(_0x37bc36(0x119))/0x6+-parseInt(_0x37bc36(0x11d))/0x7+parseInt(_0x37bc36(0x11a))/0x8*(parseInt(_0x37bc36(0x118))/0x9);if(_0x5c088f===_0x12db5a)break;else _0x3f87b5['push'](_0x3f87b5['shift']());}catch(_0x2af1c6){_0x3f87b5['push'](_0x3f87b5['shift']());}}}(_0x6c1f,0xcb332));function _0x6c1f(){var _0x3cbe5f=['4YNbxHV','1110785uVBgHt','6184731CpOXzC','872452dBJrQp','4157890DVbCFt','2584731GCdHUa','1815309XaDQYK','7621314izDezI','144nxhwBF'];_0x6c1f=function(){return _0x3cbe5f;};return _0x6c1f();}export{default as ExportWord}from'./exportword.js';import'./augmentation.js';
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x1e0398,_0x3166c2){const _0x4873f2=_0x54f2,_0x2be0ee=_0x1e0398();while(!![]){try{const _0x49be67=-parseInt(_0x4873f2(0x1f3))/0x1*(parseInt(_0x4873f2(0x204))/0x2)+parseInt(_0x4873f2(0x20e))/0x3*(parseInt(_0x4873f2(0x215))/0x4)+parseInt(_0x4873f2(0x20f))/0x5+-parseInt(_0x4873f2(0x20c))/0x6+-parseInt(_0x4873f2(0x226))/0x7+-parseInt(_0x4873f2(0x213))/0x8*(-parseInt(_0x4873f2(0x1fa))/0x9)+-parseInt(_0x4873f2(0x221))/0xa;if(_0x49be67===_0x3166c2)break;else _0x2be0ee['push'](_0x2be0ee['shift']());}catch(_0x55cda5){_0x2be0ee['push'](_0x2be0ee['shift']());}}}(_0x1b23,0x2734e));function _0x1b23(){const _0x5d5dc9=['9SmWqpb','plugins','authorId','name','getCommentThreads','keys','users','ownerNode','timezone','text','2VRgWwl','content','resolvedOptions','TrackChanges','length','author','CommentsRepository','hasAttribute','240780OEkWcp','Users','21dKQLNm','534230HZCPMh','DateTimeFormat','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.','EDITOR_STYLES','1914728pLuyWP','join','57284CVdctK','then','data-cke','timeZone','map','get','suggestions','.ck-content','getSuggestions','indexOf','from','comments','1010890AWoRam','styleSheets','trim','push','all','219254mQxkem','has','isResolved','113303mRvlcF',':root','cssText','cssRules','fetch','createdAt','warn'];_0x1b23=function(){return _0x5d5dc9;};return _0x1b23();}export function getStyles(_0x559371){const _0x500883=_0x54f2;if(!_0x559371)return new Promise(_0x135ee1=>_0x135ee1(''));const _0x33f0a8=[];for(const _0x3ecbe0 of _0x559371)_0x500883(0x212)!==_0x3ecbe0?_0x33f0a8[_0x500883(0x224)](window[_0x500883(0x1f7)](_0x3ecbe0)[_0x500883(0x216)](_0xec7514=>_0xec7514[_0x500883(0x203)]())):_0x33f0a8[_0x500883(0x224)](f());return Promise[_0x500883(0x225)](_0x33f0a8)[_0x500883(0x216)](_0x5e4db7=>_0x5e4db7[_0x500883(0x214)]('\x20')[_0x500883(0x223)]());}function f(){const _0x5655d8=_0x54f2,_0x1d9bf5=[],_0x26bbce=[];for(const _0x2da30b of Array[_0x5655d8(0x21f)](document[_0x5655d8(0x222)])){if(_0x2da30b[_0x5655d8(0x201)][_0x5655d8(0x20b)](_0x5655d8(0x217))){for(const _0x5f3825 of Array[_0x5655d8(0x21f)](_0x2da30b[_0x5655d8(0x1f6)]))-0x1!==_0x5f3825[_0x5655d8(0x1f5)][_0x5655d8(0x21e)](_0x5655d8(0x21c))?_0x1d9bf5[_0x5655d8(0x224)](_0x5f3825[_0x5655d8(0x1f5)]):-0x1!==_0x5f3825[_0x5655d8(0x1f5)][_0x5655d8(0x21e)](_0x5655d8(0x1f4))&&_0x26bbce[_0x5655d8(0x224)](_0x5f3825[_0x5655d8(0x1f5)]);}}return _0x1d9bf5[_0x5655d8(0x208)]||console[_0x5655d8(0x1f9)](_0x5655d8(0x211)),[..._0x26bbce,..._0x1d9bf5][_0x5655d8(0x214)]('\x20')[_0x5655d8(0x223)]();}export function getConverterOptions(_0x115eb2){const _0x769f0d=_0x54f2,_0x150511=_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x227)](_0x769f0d(0x20d)),_0x5bd228=_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x227)](_0x769f0d(0x20a)),_0x2a8912=_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x227)](_0x769f0d(0x207)),_0x14d2a6={};if(_0x150511&&_0x5bd228){const _0x3eb7ef=getComments(_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x21a)](_0x769f0d(0x20a))[_0x769f0d(0x1fe)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x769f0d(0x1ff)](_0x3eb7ef)[_0x769f0d(0x208)]&&(_0x14d2a6[_0x769f0d(0x220)]=_0x3eb7ef);}if(_0x150511&&_0x2a8912){const _0x5b0e30=_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x21a)](_0x769f0d(0x207)),_0x376f1d=_0x115eb2[_0x769f0d(0x1fb)][_0x769f0d(0x21a)](_0x769f0d(0x20d)),_0x2dd138=getSuggestions(_0x5b0e30[_0x769f0d(0x21d)]({'toJSON':!0x0}),_0x376f1d[_0x769f0d(0x200)]);Object[_0x769f0d(0x1ff)](_0x2dd138)[_0x769f0d(0x208)]&&(_0x14d2a6[_0x769f0d(0x21b)]=_0x2dd138);}return(_0x14d2a6[_0x769f0d(0x21b)]||_0x14d2a6[_0x769f0d(0x220)])&&(_0x14d2a6[_0x769f0d(0x202)]=new Intl[(_0x769f0d(0x210))]()[_0x769f0d(0x206)]()[_0x769f0d(0x218)]),_0x14d2a6;}export function getComments(_0x4a504f){const _0x2dc600=_0x54f2,_0x425e02={};if(!_0x4a504f[_0x2dc600(0x208)])return _0x425e02;for(const _0x261dbc of _0x4a504f)_0x261dbc[_0x2dc600(0x220)][_0x2dc600(0x219)](_0x184470=>{const _0xbe7dc5=_0x2dc600;void 0x0===_0x425e02[_0x261dbc['id']]&&(_0x425e02[_0x261dbc['id']]=[]),_0x425e02[_0x261dbc['id']][_0xbe7dc5(0x224)]({'author':_0x184470[_0xbe7dc5(0x209)][_0xbe7dc5(0x1fd)],'content':_0x184470[_0xbe7dc5(0x205)],'created':_0x184470[_0xbe7dc5(0x1f8)],'is_resolved':_0x261dbc[_0xbe7dc5(0x228)]});});return _0x425e02;}function _0x54f2(_0xbed791,_0x575b82){const _0x1b23c5=_0x1b23();return _0x54f2=function(_0x54f26d,_0x48c9a4){_0x54f26d=_0x54f26d-0x1f3;let _0x1ad673=_0x1b23c5[_0x54f26d];return _0x1ad673;},_0x54f2(_0xbed791,_0x575b82);}export function getSuggestions(_0x5acf47,_0xd7cb1f){const _0x5498d7=_0x54f2,_0x519387={};if(!_0x5acf47[_0x5498d7(0x208)]||!_0xd7cb1f[_0x5498d7(0x208)])return _0x519387;for(const _0x5cdd31 of _0x5acf47)_0x519387[_0x5cdd31['id']]={'author':_0xd7cb1f[_0x5498d7(0x21a)](_0x5cdd31[_0x5498d7(0x1fc)])[_0x5498d7(0x1fd)],'created':_0x5cdd31[_0x5498d7(0x1f8)]};return _0x519387;}
23
+ (function(_0x247fd2,_0x3da526){const _0xbda155=_0x2a08,_0x29613d=_0x247fd2();while(!![]){try{const _0x29c15c=-parseInt(_0xbda155(0xf1))/0x1*(-parseInt(_0xbda155(0xe6))/0x2)+parseInt(_0xbda155(0x10c))/0x3+parseInt(_0xbda155(0x10d))/0x4*(-parseInt(_0xbda155(0xec))/0x5)+parseInt(_0xbda155(0xf7))/0x6*(-parseInt(_0xbda155(0xfb))/0x7)+-parseInt(_0xbda155(0xe7))/0x8*(-parseInt(_0xbda155(0xfa))/0x9)+-parseInt(_0xbda155(0xf0))/0xa+-parseInt(_0xbda155(0xe9))/0xb;if(_0x29c15c===_0x3da526)break;else _0x29613d['push'](_0x29613d['shift']());}catch(_0x3fa738){_0x29613d['push'](_0x29613d['shift']());}}}(_0x5039,0x413a5));export function getStyles(_0x17ce45){const _0x2bf144=_0x2a08;if(!_0x17ce45)return new Promise(_0x3e285e=>_0x3e285e(''));const _0x194f2c=[];for(const _0x2a21d5 of _0x17ce45)_0x2bf144(0xe4)!==_0x2a21d5?_0x194f2c[_0x2bf144(0x10b)](window[_0x2bf144(0xea)](_0x2a21d5)[_0x2bf144(0xf3)](_0x1c9966=>_0x1c9966[_0x2bf144(0x10a)]())):_0x194f2c[_0x2bf144(0x10b)](f());return Promise[_0x2bf144(0xf4)](_0x194f2c)[_0x2bf144(0xf3)](_0x384ab7=>_0x384ab7[_0x2bf144(0x110)]('\x20')[_0x2bf144(0xe3)]());}function f(){const _0x8821a4=_0x2a08,_0x5832f9=[],_0xa7169d=[];for(const _0x5b7320 of Array[_0x8821a4(0xf5)](document[_0x8821a4(0xed)])){if(_0x5b7320[_0x8821a4(0x102)][_0x8821a4(0x118)](_0x8821a4(0x105))){for(const _0x8ee1db of Array[_0x8821a4(0xf5)](_0x5b7320[_0x8821a4(0x100)]))-0x1!==_0x8ee1db[_0x8821a4(0x115)][_0x8821a4(0xf6)](_0x8821a4(0x10e))?_0x5832f9[_0x8821a4(0x10b)](_0x8ee1db[_0x8821a4(0x115)]):-0x1!==_0x8ee1db[_0x8821a4(0x115)][_0x8821a4(0xf6)](_0x8821a4(0x112))&&_0xa7169d[_0x8821a4(0x10b)](_0x8ee1db[_0x8821a4(0x115)]);}}return _0x5832f9[_0x8821a4(0x109)]||console[_0x8821a4(0x106)](_0x8821a4(0xf2)),[..._0xa7169d,..._0x5832f9][_0x8821a4(0x110)]('\x20')[_0x8821a4(0xe3)]();}function _0x2a08(_0x48ca98,_0x2303ae){const _0x5039d2=_0x5039();return _0x2a08=function(_0x2a087e,_0x316718){_0x2a087e=_0x2a087e-0xe3;let _0x30d0ba=_0x5039d2[_0x2a087e];return _0x30d0ba;},_0x2a08(_0x48ca98,_0x2303ae);}export function getConverterOptions(_0xce987c){const _0x4d49bc=_0x2a08,_0x50260e=_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x108)](_0x4d49bc(0x10f)),_0x19efd4=_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x108)](_0x4d49bc(0x104)),_0x1bf01e=_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x108)](_0x4d49bc(0x116)),_0x40c84e={};if(_0x50260e&&_0x19efd4){const _0x9c8d6e=getComments(_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x107)](_0x4d49bc(0x104))[_0x4d49bc(0xfe)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x4d49bc(0x114)](_0x9c8d6e)[_0x4d49bc(0x109)]&&(_0x40c84e[_0x4d49bc(0x117)]=_0x9c8d6e);}if(_0x50260e&&_0x1bf01e){const _0x36b389=_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x107)](_0x4d49bc(0x116)),_0x17db0d=_0xce987c[_0x4d49bc(0x101)][_0x4d49bc(0x107)](_0x4d49bc(0x10f)),_0x300f95=getSuggestions(_0x36b389[_0x4d49bc(0xf9)]({'toJSON':!0x0}),_0x17db0d[_0x4d49bc(0x103)]);Object[_0x4d49bc(0x114)](_0x300f95)[_0x4d49bc(0x109)]&&(_0x40c84e[_0x4d49bc(0x113)]=_0x300f95);}return(_0x40c84e[_0x4d49bc(0x113)]||_0x40c84e[_0x4d49bc(0x117)])&&(_0x40c84e[_0x4d49bc(0xee)]=new Intl[(_0x4d49bc(0x119))]()[_0x4d49bc(0xff)]()[_0x4d49bc(0xef)]),_0x40c84e;}export function getComments(_0xcc0182){const _0x5a1715=_0x2a08,_0x50f0b0={};if(!_0xcc0182[_0x5a1715(0x109)])return _0x50f0b0;for(const _0x21e9ae of _0xcc0182)_0x21e9ae[_0x5a1715(0x117)][_0x5a1715(0xeb)](_0x1435ab=>{const _0x279281=_0x5a1715;void 0x0===_0x50f0b0[_0x21e9ae['id']]&&(_0x50f0b0[_0x21e9ae['id']]=[]),_0x50f0b0[_0x21e9ae['id']][_0x279281(0x10b)]({'author':_0x1435ab[_0x279281(0x111)][_0x279281(0xfc)],'content':_0x1435ab[_0x279281(0xf8)],'created':_0x1435ab[_0x279281(0xfd)],'is_resolved':_0x21e9ae[_0x279281(0xe8)]});});return _0x50f0b0;}function _0x5039(){const _0x49cdd8=['author',':root','suggestions','keys','cssText','TrackChanges','comments','hasAttribute','DateTimeFormat','trim','EDITOR_STYLES','authorId','78HcttBH','8lNEvJm','isResolved','987976jUoDOY','fetch','map','390AkQxKI','styleSheets','timezone','timeZone','2832130FIhpOD','7782QVftQu','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.','then','all','from','indexOf','583326kkvyWi','content','getSuggestions','2556837PvYkdV','7nnEFVC','name','createdAt','getCommentThreads','resolvedOptions','cssRules','plugins','ownerNode','users','CommentsRepository','data-cke','warn','get','has','length','text','push','661266lokliR','3620iGCMSw','.ck-content','Users','join'];_0x5039=function(){return _0x49cdd8;};return _0x5039();}export function getSuggestions(_0x336655,_0xc184ba){const _0x2c2466=_0x2a08,_0x5e5763={};if(!_0x336655[_0x2c2466(0x109)]||!_0xc184ba[_0x2c2466(0x109)])return _0x5e5763;for(const _0x3d1c93 of _0x336655)_0x5e5763[_0x3d1c93['id']]={'author':_0xc184ba[_0x2c2466(0x107)](_0x3d1c93[_0x2c2466(0xe5)])[_0x2c2466(0xfc)],'created':_0x3d1c93[_0x2c2466(0xfd)]};return _0x5e5763;}