@ckeditor/ckeditor5-export-word 41.4.1 → 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
- (_0xb258aa=>{const {'zh-cn':{dictionary:_0xf471c3,getPluralForm:_0x47196b}}={'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':_0x101fce=>0x0}};_0xb258aa['zh-cn']||={'dictionary':{},'getPluralForm':null},_0xb258aa['zh-cn']['dictionary']=Object['assign'](_0xb258aa['zh-cn']['dictionary'],_0xf471c3),_0xb258aa['zh-cn']['getPluralForm']=_0x47196b;})(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':_0x1ab066=>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
- (_0x3c3938=>{const {zh:{dictionary:_0x4d00b8,getPluralForm:_0xcc8298}}={'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':_0x290144=>0x0}};_0x3c3938['zh']||={'dictionary':{},'getPluralForm':null},_0x3c3938['zh']['dictionary']=Object['assign'](_0x3c3938['zh']['dictionary'],_0x4d00b8),_0x3c3938['zh']['getPluralForm']=_0xcc8298;})(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.1",
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.1"
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 _0x3870db=_0x210a;function _0x434e(){const _0x142bcb=['1304193kiznpG','6xehPUp','_token','CloudServices','tokenUrl','8SkrQUD','then','add','7695144iiricO','requires','editor','4171392WQlUKP','registerTokenUrl','pluginName','2128756wUdPVO','init','get','commands','token','6160220xzJFdk','exportWord','ExportWord','plugins','998220HnWNPo','config','5473076PcMcir'];_0x434e=function(){return _0x142bcb;};return _0x434e();}(function(_0x3d1509,_0x32f3d8){const _0x2792a1=_0x210a,_0x3c3285=_0x3d1509();while(!![]){try{const _0x23bdc5=-parseInt(_0x2792a1(0xf8))/0x1+parseInt(_0x2792a1(0x109))/0x2+parseInt(_0x2792a1(0xfb))/0x3+-parseInt(_0x2792a1(0x106))/0x4+parseInt(_0x2792a1(0x10e))/0x5+parseInt(_0x2792a1(0xfc))/0x6*(parseInt(_0x2792a1(0xfa))/0x7)+parseInt(_0x2792a1(0x100))/0x8*(-parseInt(_0x2792a1(0x103))/0x9);if(_0x23bdc5===_0x32f3d8)break;else _0x3c3285['push'](_0x3c3285['shift']());}catch(_0x3877f6){_0x3c3285['push'](_0x3c3285['shift']());}}}(_0x434e,0x969e9));import{Plugin as _0x4960c9}from'ckeditor5/src/core.js';import{Notification as _0x8acec2}from'ckeditor5/src/ui.js';function _0x210a(_0x39ce7b,_0x59c79f){const _0x434eed=_0x434e();return _0x210a=function(_0x210a64,_0x3ae28f){_0x210a64=_0x210a64-0xf5;let _0x305433=_0x434eed[_0x210a64];return _0x305433;},_0x210a(_0x39ce7b,_0x59c79f);}import _0x53ab49 from'./exportwordcommand.js';import _0x445395 from'./exportwordui.js';export default class s extends _0x4960c9{static get[_0x3870db(0x108)](){const _0x2fc973=_0x3870db;return _0x2fc973(0xf6);}static get[_0x3870db(0x104)](){const _0x4f156e=_0x3870db;return[_0x4f156e(0xfe),_0x8acec2,_0x445395];}[_0x3870db(0x10a)](){const _0x3293e5=_0x3870db,_0xe52271=this[_0x3293e5(0x105)],_0x21dd3c=_0xe52271[_0x3293e5(0xf9)][_0x3293e5(0x10b)](_0x3293e5(0xf5))||{};_0xe52271[_0x3293e5(0x10c)][_0x3293e5(0x102)](_0x3293e5(0xf5),new _0x53ab49(_0xe52271));const _0x27fcfb=_0xe52271[_0x3293e5(0xf7)][_0x3293e5(0x10b)](_0x3293e5(0xfe));!0x1===_0x21dd3c[_0x3293e5(0xff)]?this[_0x3293e5(0xfd)]=null:_0x21dd3c[_0x3293e5(0xff)]?_0x27fcfb[_0x3293e5(0x107)](_0x21dd3c[_0x3293e5(0xff)])[_0x3293e5(0x101)](_0x223d82=>{const _0x46ca08=_0x3293e5;this[_0x46ca08(0xfd)]=_0x223d82;}):this[_0x3293e5(0xfd)]=_0x27fcfb[_0x3293e5(0x10d)];}}
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 _0x5cf212}from'ckeditor5/src/core.js';import{getStyles as _0x9ad2e6,getConverterOptions as _0x1773e5}from'./utils.js';export default class e extends _0x5cf212{constructor(_0x35e340){super(_0x35e340),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x4da8af={}){const _0x47f8d2=this['editor'],t=_0x47f8d2['t'],_0x3f6ba2=_0x4da8af['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x133917=_0x4da8af['converterOptions']||{},_0x5efac8=_0x47f8d2['plugins']['get']('ExportWord'),_0x4c3abc=_0x4da8af['token']||_0x5efac8['_token'],_0x575b9b=!0x1!==_0x133917['auto_pagination'],_0x30a892=_0x4da8af['dataCallback']||(_0x1b9f3b=>_0x1b9f3b['data']['get']({'pagination':_0x575b9b}));return this['isBusy']=!0x0,this['refresh'](),_0x9ad2e6(_0x4da8af['stylesheets']||['EDITOR_STYLES'])['then'](async _0x2b63f5=>{_0x47f8d2['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20started'));const _0x5a4bb2=await _0x30a892(_0x47f8d2),_0x240132={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x47f8d2['locale']['contentLanguageDirection']+'\x22>'+_0x5a4bb2+'</div>','css':_0x2b63f5,'options':{..._0x133917,..._0x1773e5(_0x47f8d2)}},_0x354c18={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x4c3abc?{'Authorization':_0x4c3abc['value']}:null},'body':JSON['stringify'](_0x240132)};return window['fetch'](_0x3f6ba2,_0x354c18)['then'](_0x1318c0=>{if(0xc8!==_0x1318c0['status'])throw _0x1318c0;return _0x1318c0['blob']();})['then'](_0x3d2df2=>{_0x47f8d2['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20successful'));const _0x1106cc='function'==typeof _0x4da8af['fileName']?_0x4da8af['fileName']():_0x4da8af['fileName'];this['_downloadFile'](_0x3d2df2,_0x1106cc||'document.docx');});})['catch'](_0x515400=>{const _0x2d7ec7=_0x47f8d2['plugins']['get']('Notification');throw _0x47f8d2['ui']['ariaLiveAnnouncer']['announce'](t('Word\x20document\x20export\x20failed'),{'politeness':'assertive'}),_0x2d7ec7['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x515400;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x4ce5e9,_0x160e80){const _0x7a6b94=document['createElement']('a');_0x7a6b94['href']=window['URL']['createObjectURL'](_0x4ce5e9),_0x7a6b94['download']=_0x160e80,_0x7a6b94['click'](),_0x7a6b94['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 _0x58356e}from'ckeditor5/src/core.js';import{ButtonView as _0x4256f7,MenuBarMenuListItemButtonView as _0x554ab6,SpinnerView as _0x51dee7}from'ckeditor5/src/ui.js';import _0x85defc from'../theme/icons/exportword.svg';export default class i extends _0x58356e{static get['pluginName'](){return'ExportWordUI';}['init'](){const _0xcc038c=this['editor'];_0xcc038c['ui']['componentFactory']['add']('exportWord',()=>{const _0x2610ce=_0xcc038c['commands']['get']('exportWord'),_0x1ac16e=this['_createButton'](_0x4256f7);return _0x1ac16e['set']({'tooltip':!0x0}),_0x1ac16e['bind']('isOn')['to'](_0x2610ce,'isBusy'),_0x1ac16e;}),_0xcc038c['ui']['componentFactory']['add']('menuBar:exportWord',()=>this['_createButton'](_0x554ab6));}['_createButton'](_0x31cdc6){const _0x97c8fb=this['editor'],_0x343775=_0x97c8fb['config']['get']('exportWord')||{},t=_0x97c8fb['locale']['t'],_0x66d46d=_0x97c8fb['commands']['get']('exportWord'),_0x166c92=new _0x31cdc6(_0x97c8fb['locale']),_0x1934d3=new _0x51dee7();return _0x166c92['children']['add'](_0x1934d3),_0x1934d3['bind']('isVisible')['to'](_0x66d46d,'isBusy'),_0x166c92['iconView']['bind']('isVisible')['to'](_0x66d46d,'isBusy',_0x21daaa=>!_0x21daaa),_0x166c92['set']({'icon':_0x85defc}),_0x166c92['bind']('isEnabled')['to'](_0x66d46d,'isEnabled'),_0x166c92['bind']('label')['to'](_0x66d46d,'isBusy',_0x18ddfa=>t(_0x18ddfa?'Exporting\x20Word\x20document':'Export\x20to\x20Word')),this['listenTo'](_0x166c92,'execute',()=>{_0x97c8fb['execute']('exportWord',_0x343775),_0x97c8fb['editing']['view']['focus']();}),_0x166c92;}}
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(_0x42d576,_0x4be04b){var _0xb79450=_0x118c,_0x1d817c=_0x42d576();while(!![]){try{var _0x14e657=-parseInt(_0xb79450(0xa7))/0x1*(-parseInt(_0xb79450(0x9f))/0x2)+parseInt(_0xb79450(0xa2))/0x3+parseInt(_0xb79450(0xa1))/0x4+parseInt(_0xb79450(0xa3))/0x5+-parseInt(_0xb79450(0xa6))/0x6+-parseInt(_0xb79450(0xa0))/0x7*(-parseInt(_0xb79450(0xa4))/0x8)+parseInt(_0xb79450(0xa5))/0x9*(-parseInt(_0xb79450(0xa8))/0xa);if(_0x14e657===_0x4be04b)break;else _0x1d817c['push'](_0x1d817c['shift']());}catch(_0x168e7c){_0x1d817c['push'](_0x1d817c['shift']());}}}(_0x2e15,0x21870));export{default as ExportWord}from'./exportword.js';function _0x118c(_0xfc9b23,_0x255ee8){var _0x2e1541=_0x2e15();return _0x118c=function(_0x118c15,_0x5487bf){_0x118c15=_0x118c15-0x9f;var _0x293a97=_0x2e1541[_0x118c15];return _0x293a97;},_0x118c(_0xfc9b23,_0x255ee8);}function _0x2e15(){var _0x42c1fb=['2hCZtNv','49wYnzuU','636664ELKaRg','259605Bcgufc','118150BUCuhU','64088tUWVZS','67941ycgrrJ','458190OzyKbk','54363aqNiKf','220mdMHec'];_0x2e15=function(){return _0x42c1fb;};return _0x2e15();}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(_0x1ea0e5,_0x25722e){const _0x3972fb=_0x35e2,_0x2f61ed=_0x1ea0e5();while(!![]){try{const _0x53a8c0=-parseInt(_0x3972fb(0xd7))/0x1+-parseInt(_0x3972fb(0xdf))/0x2+-parseInt(_0x3972fb(0xba))/0x3+parseInt(_0x3972fb(0xe9))/0x4+parseInt(_0x3972fb(0xe8))/0x5+-parseInt(_0x3972fb(0xda))/0x6+-parseInt(_0x3972fb(0xc9))/0x7*(-parseInt(_0x3972fb(0xc4))/0x8);if(_0x53a8c0===_0x25722e)break;else _0x2f61ed['push'](_0x2f61ed['shift']());}catch(_0x48f443){_0x2f61ed['push'](_0x2f61ed['shift']());}}}(_0x5417,0xd1398));export function getStyles(_0x18c94f){const _0x4d1f18=_0x35e2;if(!_0x18c94f)return new Promise(_0x918613=>_0x918613(''));const _0x208a04=[];for(const _0x1456a0 of _0x18c94f)_0x4d1f18(0xb8)!==_0x1456a0?_0x208a04[_0x4d1f18(0xcd)](window[_0x4d1f18(0xe1)](_0x1456a0)[_0x4d1f18(0xbc)](_0x2ea467=>_0x2ea467[_0x4d1f18(0xe6)]())):_0x208a04[_0x4d1f18(0xcd)](f());return Promise[_0x4d1f18(0xc1)](_0x208a04)[_0x4d1f18(0xbc)](_0x39e117=>_0x39e117[_0x4d1f18(0xdc)]('\x20')[_0x4d1f18(0xeb)]());}function _0x35e2(_0x418d6d,_0x32b865){const _0x54171a=_0x5417();return _0x35e2=function(_0x35e231,_0x4610fc){_0x35e231=_0x35e231-0xb8;let _0x48231e=_0x54171a[_0x35e231];return _0x48231e;},_0x35e2(_0x418d6d,_0x32b865);}function f(){const _0x153d13=_0x35e2,_0x41caf1=[],_0x3afc41=[];for(const _0x15c144 of Array[_0x153d13(0xbe)](document[_0x153d13(0xdb)])){if(_0x15c144[_0x153d13(0xe3)][_0x153d13(0xd1)](_0x153d13(0xc0))){for(const _0x1f0bca of Array[_0x153d13(0xbe)](_0x15c144[_0x153d13(0xd2)]))-0x1!==_0x1f0bca[_0x153d13(0xc6)][_0x153d13(0xe7)](_0x153d13(0xcb))?_0x41caf1[_0x153d13(0xcd)](_0x1f0bca[_0x153d13(0xc6)]):-0x1!==_0x1f0bca[_0x153d13(0xc6)][_0x153d13(0xe7)](_0x153d13(0xbb))&&_0x3afc41[_0x153d13(0xcd)](_0x1f0bca[_0x153d13(0xc6)]);}}return _0x41caf1[_0x153d13(0xc2)]||console[_0x153d13(0xcf)](_0x153d13(0xe2)),[..._0x3afc41,..._0x41caf1][_0x153d13(0xdc)]('\x20')[_0x153d13(0xeb)]();}export function getConverterOptions(_0x44ac69){const _0x1a0e66=_0x35e2,_0x3e802e=_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xd3)](_0x1a0e66(0xe5)),_0x2246a7=_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xd3)](_0x1a0e66(0xc3)),_0x115864=_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xd3)](_0x1a0e66(0xbd)),_0x57e737={};if(_0x3e802e&&_0x2246a7){const _0x254528=getComments(_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xbf)](_0x1a0e66(0xc3))[_0x1a0e66(0xca)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x1a0e66(0xd6)](_0x254528)[_0x1a0e66(0xc2)]&&(_0x57e737[_0x1a0e66(0xea)]=_0x254528);}if(_0x3e802e&&_0x115864){const _0x55ea7f=_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xbf)](_0x1a0e66(0xbd)),_0x14094f=_0x44ac69[_0x1a0e66(0xd8)][_0x1a0e66(0xbf)](_0x1a0e66(0xe5)),_0x32d5be=getSuggestions(_0x55ea7f[_0x1a0e66(0xd4)]({'toJSON':!0x0}),_0x14094f[_0x1a0e66(0xe4)]);Object[_0x1a0e66(0xd6)](_0x32d5be)[_0x1a0e66(0xc2)]&&(_0x57e737[_0x1a0e66(0xc8)]=_0x32d5be);}return(_0x57e737[_0x1a0e66(0xc8)]||_0x57e737[_0x1a0e66(0xea)])&&(_0x57e737[_0x1a0e66(0xc7)]=new Intl[(_0x1a0e66(0xde))]()[_0x1a0e66(0xc5)]()[_0x1a0e66(0xd0)]),_0x57e737;}export function getComments(_0x212f21){const _0xa5cc9=_0x35e2,_0x2a0098={};if(!_0x212f21[_0xa5cc9(0xc2)])return _0x2a0098;for(const _0x1472ef of _0x212f21)_0x1472ef[_0xa5cc9(0xea)][_0xa5cc9(0xd9)](_0x61d0c0=>{const _0x434c6a=_0xa5cc9;void 0x0===_0x2a0098[_0x1472ef['id']]&&(_0x2a0098[_0x1472ef['id']]=[]),_0x2a0098[_0x1472ef['id']][_0x434c6a(0xcd)]({'author':_0x61d0c0[_0x434c6a(0xd5)][_0x434c6a(0xcc)],'content':_0x61d0c0[_0x434c6a(0xce)],'created':_0x61d0c0[_0x434c6a(0xe0)],'is_resolved':_0x1472ef[_0x434c6a(0xdd)]});});return _0x2a0098;}export function getSuggestions(_0xe20ca4,_0x21b24c){const _0x897809=_0x35e2,_0x32b720={};if(!_0xe20ca4[_0x897809(0xc2)]||!_0x21b24c[_0x897809(0xc2)])return _0x32b720;for(const _0x1361e6 of _0xe20ca4)_0x32b720[_0x1361e6['id']]={'author':_0x21b24c[_0x897809(0xbf)](_0x1361e6[_0x897809(0xb9)])[_0x897809(0xcc)],'created':_0x1361e6[_0x897809(0xe0)]};return _0x32b720;}function _0x5417(){const _0x4899d1=['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.','ownerNode','users','Users','text','indexOf','3310005gPhJjp','3998992xLYbgl','comments','trim','EDITOR_STYLES','authorId','50463cFhwax',':root','then','TrackChanges','from','get','data-cke','all','length','CommentsRepository','83432NcucSB','resolvedOptions','cssText','timezone','suggestions','1477iqajzk','getCommentThreads','.ck-content','name','push','content','warn','timeZone','hasAttribute','cssRules','has','getSuggestions','author','keys','677211NpoUGL','plugins','map','9281076hVtDtS','styleSheets','join','isResolved','DateTimeFormat','1528812EnGhuV','createdAt','fetch'];_0x5417=function(){return _0x4899d1;};return _0x5417();}
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;}