@ckeditor/ckeditor5-export-word 44.1.0 → 44.2.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 (317) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/export-word.js +2 -2
  4. package/dist/index-content.css +2 -2
  5. package/dist/index-editor.css +2 -2
  6. package/dist/index.css +2 -2
  7. package/dist/index.js +2 -2
  8. package/dist/translations/af.d.ts +2 -2
  9. package/dist/translations/af.js +2 -2
  10. package/dist/translations/af.umd.js +2 -2
  11. package/dist/translations/ar.d.ts +2 -2
  12. package/dist/translations/ar.js +2 -2
  13. package/dist/translations/ar.umd.js +2 -2
  14. package/dist/translations/ast.d.ts +2 -2
  15. package/dist/translations/ast.js +2 -2
  16. package/dist/translations/ast.umd.js +2 -2
  17. package/dist/translations/az.d.ts +2 -2
  18. package/dist/translations/az.js +2 -2
  19. package/dist/translations/az.umd.js +2 -2
  20. package/dist/translations/bg.d.ts +2 -2
  21. package/dist/translations/bg.js +2 -2
  22. package/dist/translations/bg.umd.js +2 -2
  23. package/dist/translations/bn.d.ts +2 -2
  24. package/dist/translations/bn.js +2 -2
  25. package/dist/translations/bn.umd.js +2 -2
  26. package/dist/translations/bs.d.ts +2 -2
  27. package/dist/translations/bs.js +2 -2
  28. package/dist/translations/bs.umd.js +2 -2
  29. package/dist/translations/ca.d.ts +2 -2
  30. package/dist/translations/ca.js +2 -2
  31. package/dist/translations/ca.umd.js +2 -2
  32. package/dist/translations/cs.d.ts +2 -2
  33. package/dist/translations/cs.js +2 -2
  34. package/dist/translations/cs.umd.js +2 -2
  35. package/dist/translations/da.d.ts +2 -2
  36. package/dist/translations/da.js +2 -2
  37. package/dist/translations/da.umd.js +2 -2
  38. package/dist/translations/de-ch.d.ts +2 -2
  39. package/dist/translations/de-ch.js +2 -2
  40. package/dist/translations/de-ch.umd.js +2 -2
  41. package/dist/translations/de.d.ts +2 -2
  42. package/dist/translations/de.js +2 -2
  43. package/dist/translations/de.umd.js +2 -2
  44. package/dist/translations/el.d.ts +2 -2
  45. package/dist/translations/el.js +2 -2
  46. package/dist/translations/el.umd.js +2 -2
  47. package/dist/translations/en-au.d.ts +2 -2
  48. package/dist/translations/en-au.js +2 -2
  49. package/dist/translations/en-au.umd.js +2 -2
  50. package/dist/translations/en-gb.d.ts +2 -2
  51. package/dist/translations/en-gb.js +2 -2
  52. package/dist/translations/en-gb.umd.js +2 -2
  53. package/dist/translations/en.d.ts +2 -2
  54. package/dist/translations/en.js +2 -2
  55. package/dist/translations/en.umd.js +2 -2
  56. package/dist/translations/eo.d.ts +2 -2
  57. package/dist/translations/eo.js +2 -2
  58. package/dist/translations/eo.umd.js +2 -2
  59. package/dist/translations/es-co.d.ts +2 -2
  60. package/dist/translations/es-co.js +2 -2
  61. package/dist/translations/es-co.umd.js +2 -2
  62. package/dist/translations/es.d.ts +2 -2
  63. package/dist/translations/es.js +2 -2
  64. package/dist/translations/es.umd.js +2 -2
  65. package/dist/translations/et.d.ts +2 -2
  66. package/dist/translations/et.js +2 -2
  67. package/dist/translations/et.umd.js +2 -2
  68. package/dist/translations/eu.d.ts +2 -2
  69. package/dist/translations/eu.js +2 -2
  70. package/dist/translations/eu.umd.js +2 -2
  71. package/dist/translations/fa.d.ts +2 -2
  72. package/dist/translations/fa.js +2 -2
  73. package/dist/translations/fa.umd.js +2 -2
  74. package/dist/translations/fi.d.ts +2 -2
  75. package/dist/translations/fi.js +2 -2
  76. package/dist/translations/fi.umd.js +2 -2
  77. package/dist/translations/fr.d.ts +2 -2
  78. package/dist/translations/fr.js +2 -2
  79. package/dist/translations/fr.umd.js +2 -2
  80. package/dist/translations/gl.d.ts +2 -2
  81. package/dist/translations/gl.js +2 -2
  82. package/dist/translations/gl.umd.js +2 -2
  83. package/dist/translations/gu.d.ts +2 -2
  84. package/dist/translations/gu.js +2 -2
  85. package/dist/translations/gu.umd.js +2 -2
  86. package/dist/translations/he.d.ts +2 -2
  87. package/dist/translations/he.js +2 -2
  88. package/dist/translations/he.umd.js +2 -2
  89. package/dist/translations/hi.d.ts +2 -2
  90. package/dist/translations/hi.js +2 -2
  91. package/dist/translations/hi.umd.js +2 -2
  92. package/dist/translations/hr.d.ts +2 -2
  93. package/dist/translations/hr.js +2 -2
  94. package/dist/translations/hr.umd.js +2 -2
  95. package/dist/translations/hu.d.ts +2 -2
  96. package/dist/translations/hu.js +2 -2
  97. package/dist/translations/hu.umd.js +2 -2
  98. package/dist/translations/hy.d.ts +2 -2
  99. package/dist/translations/hy.js +2 -2
  100. package/dist/translations/hy.umd.js +2 -2
  101. package/dist/translations/id.d.ts +2 -2
  102. package/dist/translations/id.js +2 -2
  103. package/dist/translations/id.umd.js +2 -2
  104. package/dist/translations/it.d.ts +2 -2
  105. package/dist/translations/it.js +2 -2
  106. package/dist/translations/it.umd.js +2 -2
  107. package/dist/translations/ja.d.ts +2 -2
  108. package/dist/translations/ja.js +2 -2
  109. package/dist/translations/ja.umd.js +2 -2
  110. package/dist/translations/jv.d.ts +2 -2
  111. package/dist/translations/jv.js +2 -2
  112. package/dist/translations/jv.umd.js +2 -2
  113. package/dist/translations/kk.d.ts +2 -2
  114. package/dist/translations/kk.js +2 -2
  115. package/dist/translations/kk.umd.js +2 -2
  116. package/dist/translations/km.d.ts +2 -2
  117. package/dist/translations/km.js +2 -2
  118. package/dist/translations/km.umd.js +2 -2
  119. package/dist/translations/kn.d.ts +2 -2
  120. package/dist/translations/kn.js +2 -2
  121. package/dist/translations/kn.umd.js +2 -2
  122. package/dist/translations/ko.d.ts +2 -2
  123. package/dist/translations/ko.js +2 -2
  124. package/dist/translations/ko.umd.js +2 -2
  125. package/dist/translations/ku.d.ts +2 -2
  126. package/dist/translations/ku.js +2 -2
  127. package/dist/translations/ku.umd.js +2 -2
  128. package/dist/translations/lt.d.ts +2 -2
  129. package/dist/translations/lt.js +2 -2
  130. package/dist/translations/lt.umd.js +2 -2
  131. package/dist/translations/lv.d.ts +2 -2
  132. package/dist/translations/lv.js +2 -2
  133. package/dist/translations/lv.umd.js +2 -2
  134. package/dist/translations/ms.d.ts +2 -2
  135. package/dist/translations/ms.js +2 -2
  136. package/dist/translations/ms.umd.js +2 -2
  137. package/dist/translations/nb.d.ts +2 -2
  138. package/dist/translations/nb.js +2 -2
  139. package/dist/translations/nb.umd.js +2 -2
  140. package/dist/translations/ne.d.ts +2 -2
  141. package/dist/translations/ne.js +2 -2
  142. package/dist/translations/ne.umd.js +2 -2
  143. package/dist/translations/nl.d.ts +2 -2
  144. package/dist/translations/nl.js +2 -2
  145. package/dist/translations/nl.umd.js +2 -2
  146. package/dist/translations/no.d.ts +2 -2
  147. package/dist/translations/no.js +2 -2
  148. package/dist/translations/no.umd.js +2 -2
  149. package/dist/translations/oc.d.ts +2 -2
  150. package/dist/translations/oc.js +2 -2
  151. package/dist/translations/oc.umd.js +2 -2
  152. package/dist/translations/pl.d.ts +2 -2
  153. package/dist/translations/pl.js +2 -2
  154. package/dist/translations/pl.umd.js +2 -2
  155. package/dist/translations/pt-br.d.ts +2 -2
  156. package/dist/translations/pt-br.js +2 -2
  157. package/dist/translations/pt-br.umd.js +2 -2
  158. package/dist/translations/pt.d.ts +2 -2
  159. package/dist/translations/pt.js +2 -2
  160. package/dist/translations/pt.umd.js +2 -2
  161. package/dist/translations/ro.d.ts +2 -2
  162. package/dist/translations/ro.js +2 -2
  163. package/dist/translations/ro.umd.js +2 -2
  164. package/dist/translations/ru.d.ts +2 -2
  165. package/dist/translations/ru.js +2 -2
  166. package/dist/translations/ru.umd.js +2 -2
  167. package/dist/translations/si.d.ts +2 -2
  168. package/dist/translations/si.js +2 -2
  169. package/dist/translations/si.umd.js +2 -2
  170. package/dist/translations/sk.d.ts +2 -2
  171. package/dist/translations/sk.js +2 -2
  172. package/dist/translations/sk.umd.js +2 -2
  173. package/dist/translations/sl.d.ts +2 -2
  174. package/dist/translations/sl.js +2 -2
  175. package/dist/translations/sl.umd.js +2 -2
  176. package/dist/translations/sq.d.ts +2 -2
  177. package/dist/translations/sq.js +2 -2
  178. package/dist/translations/sq.umd.js +2 -2
  179. package/dist/translations/sr-latn.d.ts +2 -2
  180. package/dist/translations/sr-latn.js +2 -2
  181. package/dist/translations/sr-latn.umd.js +2 -2
  182. package/dist/translations/sr.d.ts +2 -2
  183. package/dist/translations/sr.js +2 -2
  184. package/dist/translations/sr.umd.js +2 -2
  185. package/dist/translations/sv.d.ts +2 -2
  186. package/dist/translations/sv.js +2 -2
  187. package/dist/translations/sv.umd.js +2 -2
  188. package/dist/translations/th.d.ts +2 -2
  189. package/dist/translations/th.js +2 -2
  190. package/dist/translations/th.umd.js +2 -2
  191. package/dist/translations/ti.d.ts +2 -2
  192. package/dist/translations/ti.js +2 -2
  193. package/dist/translations/ti.umd.js +2 -2
  194. package/dist/translations/tk.d.ts +2 -2
  195. package/dist/translations/tk.js +2 -2
  196. package/dist/translations/tk.umd.js +2 -2
  197. package/dist/translations/tr.d.ts +2 -2
  198. package/dist/translations/tr.js +2 -2
  199. package/dist/translations/tr.umd.js +2 -2
  200. package/dist/translations/tt.d.ts +2 -2
  201. package/dist/translations/tt.js +2 -2
  202. package/dist/translations/tt.umd.js +2 -2
  203. package/dist/translations/ug.d.ts +2 -2
  204. package/dist/translations/ug.js +2 -2
  205. package/dist/translations/ug.umd.js +2 -2
  206. package/dist/translations/uk.d.ts +2 -2
  207. package/dist/translations/uk.js +2 -2
  208. package/dist/translations/uk.umd.js +2 -2
  209. package/dist/translations/ur.d.ts +2 -2
  210. package/dist/translations/ur.js +2 -2
  211. package/dist/translations/ur.umd.js +2 -2
  212. package/dist/translations/uz.d.ts +2 -2
  213. package/dist/translations/uz.js +2 -2
  214. package/dist/translations/uz.umd.js +2 -2
  215. package/dist/translations/vi.d.ts +2 -2
  216. package/dist/translations/vi.js +2 -2
  217. package/dist/translations/vi.umd.js +2 -2
  218. package/dist/translations/zh-cn.d.ts +2 -2
  219. package/dist/translations/zh-cn.js +2 -2
  220. package/dist/translations/zh-cn.umd.js +2 -2
  221. package/dist/translations/zh.d.ts +2 -2
  222. package/dist/translations/zh.js +2 -2
  223. package/dist/translations/zh.umd.js +2 -2
  224. package/lang/translations/af.po +1 -1
  225. package/lang/translations/ar.po +1 -1
  226. package/lang/translations/ast.po +1 -1
  227. package/lang/translations/az.po +1 -1
  228. package/lang/translations/bg.po +1 -1
  229. package/lang/translations/bn.po +1 -1
  230. package/lang/translations/bs.po +1 -1
  231. package/lang/translations/ca.po +1 -1
  232. package/lang/translations/cs.po +1 -1
  233. package/lang/translations/da.po +1 -1
  234. package/lang/translations/de-ch.po +1 -1
  235. package/lang/translations/de.po +1 -1
  236. package/lang/translations/el.po +1 -1
  237. package/lang/translations/en-au.po +1 -1
  238. package/lang/translations/en-gb.po +1 -1
  239. package/lang/translations/en.po +1 -1
  240. package/lang/translations/eo.po +1 -1
  241. package/lang/translations/es-co.po +1 -1
  242. package/lang/translations/es.po +1 -1
  243. package/lang/translations/et.po +1 -1
  244. package/lang/translations/eu.po +1 -1
  245. package/lang/translations/fa.po +1 -1
  246. package/lang/translations/fi.po +1 -1
  247. package/lang/translations/fr.po +1 -1
  248. package/lang/translations/gl.po +1 -1
  249. package/lang/translations/gu.po +1 -1
  250. package/lang/translations/he.po +1 -1
  251. package/lang/translations/hi.po +1 -1
  252. package/lang/translations/hr.po +1 -1
  253. package/lang/translations/hu.po +1 -1
  254. package/lang/translations/hy.po +1 -1
  255. package/lang/translations/id.po +1 -1
  256. package/lang/translations/it.po +1 -1
  257. package/lang/translations/ja.po +1 -1
  258. package/lang/translations/jv.po +1 -1
  259. package/lang/translations/kk.po +1 -1
  260. package/lang/translations/km.po +1 -1
  261. package/lang/translations/kn.po +1 -1
  262. package/lang/translations/ko.po +1 -1
  263. package/lang/translations/ku.po +1 -1
  264. package/lang/translations/lt.po +1 -1
  265. package/lang/translations/lv.po +1 -1
  266. package/lang/translations/ms.po +1 -1
  267. package/lang/translations/nb.po +1 -1
  268. package/lang/translations/ne.po +1 -1
  269. package/lang/translations/nl.po +1 -1
  270. package/lang/translations/no.po +1 -1
  271. package/lang/translations/oc.po +1 -1
  272. package/lang/translations/pl.po +1 -1
  273. package/lang/translations/pt-br.po +1 -1
  274. package/lang/translations/pt.po +1 -1
  275. package/lang/translations/ro.po +1 -1
  276. package/lang/translations/ru.po +1 -1
  277. package/lang/translations/si.po +1 -1
  278. package/lang/translations/sk.po +1 -1
  279. package/lang/translations/sl.po +1 -1
  280. package/lang/translations/sq.po +1 -1
  281. package/lang/translations/sr-latn.po +1 -1
  282. package/lang/translations/sr.po +1 -1
  283. package/lang/translations/sv.po +1 -1
  284. package/lang/translations/th.po +1 -1
  285. package/lang/translations/ti.po +1 -1
  286. package/lang/translations/tk.po +1 -1
  287. package/lang/translations/tr.po +1 -1
  288. package/lang/translations/tt.po +1 -1
  289. package/lang/translations/ug.po +1 -1
  290. package/lang/translations/uk.po +1 -1
  291. package/lang/translations/ur.po +1 -1
  292. package/lang/translations/uz.po +1 -1
  293. package/lang/translations/vi.po +1 -1
  294. package/lang/translations/zh-cn.po +1 -1
  295. package/lang/translations/zh.po +1 -1
  296. package/package.json +32 -5
  297. package/src/augmentation.d.ts +1 -1
  298. package/src/augmentation.js +1 -1
  299. package/src/exportword.d.ts +2 -2
  300. package/src/exportword.js +2 -2
  301. package/src/exportwordcommand.d.ts +1 -1
  302. package/src/exportwordcommand.js +2 -2
  303. package/src/exportwordui.d.ts +1 -1
  304. package/src/exportwordui.js +2 -2
  305. package/src/index.d.ts +1 -1
  306. package/src/index.js +2 -2
  307. package/src/utils/common-translations.d.ts +1 -1
  308. package/src/utils/common-translations.js +2 -2
  309. package/src/utils.d.ts +1 -7
  310. package/src/utils.js +2 -2
  311. package/dist/augmentation.d.ts +0 -25
  312. package/dist/exportword.d.ts +0 -364
  313. package/dist/exportwordcommand.d.ts +0 -40
  314. package/dist/exportwordui.d.ts +0 -35
  315. package/dist/index.d.ts +0 -14
  316. package/dist/utils/common-translations.d.ts +0 -13
  317. package/dist/utils.d.ts +0 -62
package/src/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x36be83,_0x3915ff){const _0x327c87=_0x21a7,_0x4c95b2=_0x36be83();while(!![]){try{const _0x4674a9=-parseInt(_0x327c87(0x14a))/0x1+-parseInt(_0x327c87(0x150))/0x2+parseInt(_0x327c87(0x17d))/0x3*(parseInt(_0x327c87(0x17e))/0x4)+parseInt(_0x327c87(0x15d))/0x5*(parseInt(_0x327c87(0x16c))/0x6)+-parseInt(_0x327c87(0x168))/0x7+-parseInt(_0x327c87(0x15a))/0x8+parseInt(_0x327c87(0x16e))/0x9;if(_0x4674a9===_0x3915ff)break;else _0x4c95b2['push'](_0x4c95b2['shift']());}catch(_0x2e7d94){_0x4c95b2['push'](_0x4c95b2['shift']());}}}(_0x1fa7,0x2cb8d));export function getStyles(_0x4b1faf){const _0x4a708b=_0x21a7;if(!_0x4b1faf)return new Promise(_0x18d634=>_0x18d634(''));const _0x19cdd6=[];for(const _0x37c043 of _0x4b1faf)_0x4a708b(0x17f)!==_0x37c043?_0x19cdd6[_0x4a708b(0x179)](window[_0x4a708b(0x13f)](_0x37c043)[_0x4a708b(0x167)](_0x47e76c=>_0x47e76c[_0x4a708b(0x157)]())):_0x19cdd6[_0x4a708b(0x179)](f());return Promise[_0x4a708b(0x16b)](_0x19cdd6)[_0x4a708b(0x167)](_0xcd01a3=>_0xcd01a3[_0x4a708b(0x145)]('\x20')[_0x4a708b(0x14f)]());}function f(){const _0x2da8f7=_0x21a7,_0x2f77e0=[],_0x3f7bb4=[];for(const _0x553b8c of Array[_0x2da8f7(0x154)](document[_0x2da8f7(0x180)])){if(_0x553b8c[_0x2da8f7(0x163)][_0x2da8f7(0x15b)](_0x2da8f7(0x164))){for(const _0x38722e of Array[_0x2da8f7(0x154)](_0x553b8c[_0x2da8f7(0x151)]))-0x1!==_0x38722e[_0x2da8f7(0x187)][_0x2da8f7(0x17b)](_0x2da8f7(0x161))?_0x2f77e0[_0x2da8f7(0x179)](_0x38722e[_0x2da8f7(0x187)]):-0x1!==_0x38722e[_0x2da8f7(0x187)][_0x2da8f7(0x17b)](_0x2da8f7(0x172))&&_0x3f7bb4[_0x2da8f7(0x179)](_0x38722e[_0x2da8f7(0x187)]);}}return _0x2f77e0[_0x2da8f7(0x182)]||console[_0x2da8f7(0x142)](_0x2da8f7(0x158)),[..._0x3f7bb4,..._0x2f77e0][_0x2da8f7(0x145)]('\x20')[_0x2da8f7(0x14f)]();}export function getConverterOptions(_0x28b16c,_0x431cf2={}){const _0x55401a=_0x21a7,_0x4adb2f=_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x173)](_0x55401a(0x185)),_0x48f42c=_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x173)](_0x55401a(0x166)),_0x23523a=_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x173)](_0x55401a(0x175)),_0x7b1263=_0x431cf2;if(_0x4adb2f&&_0x48f42c){const _0x19b637=getComments(_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x14b)](_0x55401a(0x166))[_0x55401a(0x140)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x55401a(0x14c)](_0x19b637)[_0x55401a(0x182)]&&(_0x7b1263[_0x55401a(0x143)]=_0x19b637);}if(_0x4adb2f&&_0x23523a){const _0x12dd49=_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x14b)](_0x55401a(0x175)),_0x34e5d2=_0x28b16c[_0x55401a(0x15c)][_0x55401a(0x14b)](_0x55401a(0x185)),_0x1bb1b7=getSuggestions(_0x12dd49[_0x55401a(0x15e)]({'toJSON':!0x0}),_0x34e5d2[_0x55401a(0x169)]);Object[_0x55401a(0x14c)](_0x1bb1b7)[_0x55401a(0x182)]&&(_0x7b1263[_0x55401a(0x177)]=_0x1bb1b7);}return(_0x7b1263[_0x55401a(0x177)]||_0x7b1263[_0x55401a(0x143)])&&(_0x7b1263[_0x55401a(0x14e)]=new Intl[(_0x55401a(0x184))]()[_0x55401a(0x170)]()[_0x55401a(0x165)]),_0x7b1263;}function _0x1fa7(){const _0x2078cb=['getLabel','.ck-content','map','ownerNode','data-cke','timeZone','CommentsRepository','then','2473667RUaYsZ','users','isResolved','all','106320QdbFuK','entries','7449696zCDYGD','@external','resolvedOptions','locale',':root','has','data','TrackChanges','config','suggestions','MergeFields','push','authorName','indexOf','$defaultValues','31767tdyUYv','44DHSqTL','EDITOR_STYLES','styleSheets','author','length','getDataSetValues','DateTimeFormat','Users','MergeFieldsEditing','cssText','fetch','getCommentThreads','contentLanguage','warn','comments','merge_fields','join','previewMode','mergeFields','document','comment_threads','253639hRxmQR','get','keys','content','timezone','trim','1434ZIPabf','cssRules','createdAt','$labels','from','language','collaboration_features','text','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','name','2360520orSYXN','hasAttribute','plugins','40SxhPQW','getSuggestions','getDefaultValues'];_0x1fa7=function(){return _0x2078cb;};return _0x1fa7();}export function getComments(_0x3ccbe8){const _0x2beb41=_0x21a7,_0xa0031={};if(!_0x3ccbe8[_0x2beb41(0x182)])return _0xa0031;for(const _0x2bc1b9 of _0x3ccbe8)_0x2bc1b9[_0x2beb41(0x143)][_0x2beb41(0x162)](_0x2710f4=>{const _0x404787=_0x2beb41;void 0x0===_0xa0031[_0x2bc1b9['id']]&&(_0xa0031[_0x2bc1b9['id']]=[]),_0xa0031[_0x2bc1b9['id']][_0x404787(0x179)]({'author':_0x2710f4[_0x404787(0x181)][_0x404787(0x159)],'content':_0x2710f4[_0x404787(0x14d)],'created':_0x2710f4[_0x404787(0x152)],'is_resolved':_0x2bc1b9[_0x404787(0x16a)]});});return _0xa0031;}export function getSuggestions(_0x1d9094,_0x1b7797){const _0xc06794=_0x21a7,_0x43f1f6={};if(!_0x1d9094[_0xc06794(0x182)]||!_0x1b7797[_0xc06794(0x182)])return _0x43f1f6;for(const {id:_0x4dcbc3,createdAt:_0xe8d7ab,authorId:_0xd436e4,attributes:_0x346707}of _0x1d9094){const _0x4e80a9=_0x346707&&_0x346707[_0xc06794(0x16f)],_0x23d1dd=_0x4e80a9?_0x4e80a9[_0xc06794(0x17a)]:_0x1b7797[_0xc06794(0x14b)](_0xd436e4)[_0xc06794(0x159)];_0x43f1f6[_0x4dcbc3]={'author':_0x23d1dd,'created':_0xe8d7ab};}return _0x43f1f6;}export function getConverterOptionsV2(_0x4d54b8,_0x956542={}){const _0x39856e=_0x21a7,_0x265fc4=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x173)](_0x39856e(0x185)),_0x55f073=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x173)](_0x39856e(0x166)),_0x398bf7=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x173)](_0x39856e(0x175)),_0x5d3e58=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x173)](_0x39856e(0x178)),_0x3bd682=_0x4d54b8[_0x39856e(0x171)][_0x39856e(0x141)],_0x54abe7=_0x956542,_0x3b9503={};if(_0x54abe7[_0x39856e(0x148)]=_0x54abe7[_0x39856e(0x148)]||{},_0x54abe7[_0x39856e(0x148)][_0x39856e(0x155)]=_0x54abe7[_0x39856e(0x148)][_0x39856e(0x155)]||_0x3bd682,_0x265fc4&&_0x55f073){const _0x454149=getCommentsV2(_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x14b)](_0x39856e(0x166))[_0x39856e(0x140)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x454149[_0x39856e(0x182)]&&(_0x3b9503[_0x39856e(0x149)]=_0x454149);}if(_0x265fc4&&_0x398bf7){const _0x9f6e64=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x14b)](_0x39856e(0x175)),_0x1e6f59=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x14b)](_0x39856e(0x185)),_0x318e11=getSuggestionsV2(_0x9f6e64[_0x39856e(0x15e)]({'toJSON':!0x0}),_0x1e6f59[_0x39856e(0x169)]);_0x318e11[_0x39856e(0x182)]&&(_0x3b9503[_0x39856e(0x177)]=_0x318e11);}if(_0x5d3e58){const _0x311a61=_0x4d54b8[_0x39856e(0x15c)][_0x39856e(0x14b)](_0x39856e(0x186)),_0xcf738c=_0x311a61[_0x39856e(0x146)],{prefix:_0xbfc70f,suffix:_0x366c8e}=_0x4d54b8[_0x39856e(0x176)][_0x39856e(0x14b)](_0x39856e(0x147));if(_0x54abe7[_0x39856e(0x144)]={'prefix':_0xbfc70f,'suffix':_0x366c8e},_0x39856e(0x153)!==_0xcf738c){_0x54abe7[_0x39856e(0x144)][_0x39856e(0x174)]={};const _0x297a61=_0x39856e(0x17c)===_0xcf738c?_0x311a61[_0x39856e(0x15f)]():_0x311a61[_0x39856e(0x183)](_0xcf738c,!0x0);for(const _0x15aebe of Object[_0x39856e(0x16d)](_0x297a61)){const [_0x20eda8,_0x330aaa]=_0x15aebe;_0x54abe7[_0x39856e(0x144)][_0x39856e(0x174)][_0x20eda8]=null!==_0x330aaa?_0x330aaa:_0x311a61[_0x39856e(0x160)](_0x20eda8);}}}return(_0x3b9503[_0x39856e(0x149)]||_0x3b9503[_0x39856e(0x177)])&&(_0x54abe7[_0x39856e(0x14e)]=new Intl[(_0x39856e(0x184))]()[_0x39856e(0x170)]()[_0x39856e(0x165)],_0x54abe7[_0x39856e(0x156)]=_0x3b9503),_0x54abe7;}export function getCommentsV2(_0x5583a1){const _0x21ad3a=_0x21a7,_0x20177c=[];if(!_0x5583a1[_0x21ad3a(0x182)])return _0x20177c;for(const _0x2d0eda of _0x5583a1){const _0x138695=_0x2d0eda[_0x21ad3a(0x143)][_0x21ad3a(0x162)](_0x366fb5=>({'author':_0x366fb5[_0x21ad3a(0x181)][_0x21ad3a(0x159)],'content':_0x366fb5[_0x21ad3a(0x14d)],'created_at':_0x366fb5[_0x21ad3a(0x152)]}));_0x20177c[_0x21ad3a(0x179)]({'thread_id':_0x2d0eda['id'],'is_resolved':_0x2d0eda[_0x21ad3a(0x16a)],'comments':_0x138695});}return _0x20177c;}function _0x21a7(_0x5c4c11,_0x25c8cd){const _0x1fa7e6=_0x1fa7();return _0x21a7=function(_0x21a711,_0x3e71bb){_0x21a711=_0x21a711-0x13f;let _0x5ecaf7=_0x1fa7e6[_0x21a711];return _0x5ecaf7;},_0x21a7(_0x5c4c11,_0x25c8cd);}export function getSuggestionsV2(_0x25943a,_0x7f5371){const _0x284a6c=_0x21a7;return _0x25943a[_0x284a6c(0x182)]&&_0x7f5371[_0x284a6c(0x182)]?_0x25943a[_0x284a6c(0x162)](({id:_0x5200da,createdAt:_0x7c27a1,authorId:_0x446694,attributes:_0x3453a9})=>{const _0x33afda=_0x284a6c,_0x448e5a=_0x3453a9&&_0x3453a9[_0x33afda(0x16f)];return{'id':_0x5200da,'author':_0x448e5a?_0x448e5a[_0x33afda(0x17a)]:_0x7f5371[_0x33afda(0x14b)](_0x446694)[_0x33afda(0x159)],'created_at':_0x7c27a1};}):[];}
23
+ (function(_0x733c14,_0x422c9c){const _0x22e931=_0x2dae,_0x41fbd1=_0x733c14();while(!![]){try{const _0x25e0b8=-parseInt(_0x22e931(0x163))/0x1+parseInt(_0x22e931(0x193))/0x2*(parseInt(_0x22e931(0x15b))/0x3)+-parseInt(_0x22e931(0x180))/0x4*(-parseInt(_0x22e931(0x185))/0x5)+-parseInt(_0x22e931(0x18b))/0x6*(parseInt(_0x22e931(0x188))/0x7)+-parseInt(_0x22e931(0x186))/0x8*(-parseInt(_0x22e931(0x15d))/0x9)+parseInt(_0x22e931(0x176))/0xa+parseInt(_0x22e931(0x167))/0xb*(-parseInt(_0x22e931(0x179))/0xc);if(_0x25e0b8===_0x422c9c)break;else _0x41fbd1['push'](_0x41fbd1['shift']());}catch(_0x3ba320){_0x41fbd1['push'](_0x41fbd1['shift']());}}}(_0x4685,0xb11c6));function _0x4685(){const _0x5ec09b=['isResolved','@external','get','keys','plugins','push','getCommentThreads','1240418LpoBtl','config','map','CommentsRepository','3aUWcBD','$defaultValues','510687LUCEvP','has','data','image','$labels','TrackChanges','569712PchjOq','timezone','Users','getLabel','14928276NXTVYw','resolvedOptions','users','previewMode','contentLanguage','MergeFields','merge_fields','getDataSetValues','comments','document','authorName','mergeFields','language','getSuggestions','DateTimeFormat','10613840jdNFNK','createdAt','getDefaultValues','12ZHTSSY','entries','locale','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','content','author','MergeFieldsEditing','4146580VLgSNQ','length','collaboration_features','getMergeFieldType','suggestions','5BeNHFD','152hDdeTE','name','7duGFZJ','comment_threads','timeZone','6864486YFPAhW'];_0x4685=function(){return _0x5ec09b;};return _0x4685();}export function getConverterOptions(_0x303826,_0x57bf67={}){const _0x295495=_0x2dae,_0x5479bc=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x165)),_0x57ccad=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x15a)),_0x3980e5=_0x303826[_0x295495(0x190)][_0x295495(0x15e)](_0x295495(0x162)),_0x78dea0=_0x57bf67;if(_0x5479bc&&_0x57ccad){const _0x5ad7a1=getComments(_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x15a))[_0x295495(0x192)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x295495(0x18f)](_0x5ad7a1)[_0x295495(0x181)]&&(_0x78dea0[_0x295495(0x16f)]=_0x5ad7a1);}if(_0x5479bc&&_0x3980e5){const _0x58dad3=_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x162)),_0x43a1c5=_0x303826[_0x295495(0x190)][_0x295495(0x18e)](_0x295495(0x165)),_0x9d14dd=getSuggestions(_0x58dad3[_0x295495(0x174)]({'toJSON':!0x0}),_0x43a1c5[_0x295495(0x169)]);Object[_0x295495(0x18f)](_0x9d14dd)[_0x295495(0x181)]&&(_0x78dea0[_0x295495(0x184)]=_0x9d14dd);}return(_0x78dea0[_0x295495(0x184)]||_0x78dea0[_0x295495(0x16f)])&&(_0x78dea0[_0x295495(0x164)]=new Intl[(_0x295495(0x175))]()[_0x295495(0x168)]()[_0x295495(0x18a)]),_0x78dea0;}function _0x2dae(_0x2aa9df,_0x2a1a0f){const _0x46852a=_0x4685();return _0x2dae=function(_0x2daeb1,_0x517c59){_0x2daeb1=_0x2daeb1-0x159;let _0x2e51d1=_0x46852a[_0x2daeb1];return _0x2e51d1;},_0x2dae(_0x2aa9df,_0x2a1a0f);}export function getComments(_0x22e2e2){const _0x35ecce=_0x2dae,_0x3e9c49={};if(!_0x22e2e2[_0x35ecce(0x181)])return _0x3e9c49;for(const _0x30cfed of _0x22e2e2)_0x30cfed[_0x35ecce(0x16f)][_0x35ecce(0x159)](_0x31c6b3=>{const _0x52fc5a=_0x35ecce;void 0x0===_0x3e9c49[_0x30cfed['id']]&&(_0x3e9c49[_0x30cfed['id']]=[]),_0x3e9c49[_0x30cfed['id']][_0x52fc5a(0x191)]({'author':_0x31c6b3[_0x52fc5a(0x17e)][_0x52fc5a(0x187)],'content':_0x31c6b3[_0x52fc5a(0x17d)],'created':_0x31c6b3[_0x52fc5a(0x177)],'is_resolved':_0x30cfed[_0x52fc5a(0x18c)]});});return _0x3e9c49;}export function getSuggestions(_0x3bc195,_0x52b2d3){const _0x5d1cd3=_0x2dae,_0x52498a={};if(!_0x3bc195[_0x5d1cd3(0x181)]||!_0x52b2d3[_0x5d1cd3(0x181)])return _0x52498a;for(const {id:_0x3fa74c,createdAt:_0x197013,authorId:_0x4b6cf9,attributes:_0x5a99aa}of _0x3bc195){const _0x2a2926=_0x5a99aa&&_0x5a99aa[_0x5d1cd3(0x18d)],_0xa40865=_0x2a2926?_0x2a2926[_0x5d1cd3(0x171)]:_0x52b2d3[_0x5d1cd3(0x18e)](_0x4b6cf9)[_0x5d1cd3(0x187)];_0x52498a[_0x3fa74c]={'author':_0xa40865,'created':_0x197013};}return _0x52498a;}export function getConverterOptionsV2(_0x327752,_0x4447c9={}){const _0x4ccb48=_0x2dae,_0x631f3d=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x165)),_0x20509f=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x15a)),_0x1ea55d=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x162)),_0x59ad7f=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x15e)](_0x4ccb48(0x16c)),_0x354dd9=_0x327752[_0x4ccb48(0x17b)][_0x4ccb48(0x16b)],_0x2f56e7=_0x4447c9,_0x26539a={};if(_0x2f56e7[_0x4ccb48(0x170)]=_0x2f56e7[_0x4ccb48(0x170)]||{},_0x2f56e7[_0x4ccb48(0x170)][_0x4ccb48(0x173)]=_0x2f56e7[_0x4ccb48(0x170)][_0x4ccb48(0x173)]||_0x354dd9,_0x631f3d&&_0x20509f){const _0x1a5a4f=getCommentsV2(_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x15a))[_0x4ccb48(0x192)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x1a5a4f[_0x4ccb48(0x181)]&&(_0x26539a[_0x4ccb48(0x189)]=_0x1a5a4f);}if(_0x631f3d&&_0x1ea55d){const _0xd18fcf=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x162)),_0x462a47=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x165)),_0xc75253=getSuggestionsV2(_0xd18fcf[_0x4ccb48(0x174)]({'toJSON':!0x0}),_0x462a47[_0x4ccb48(0x169)]);_0xc75253[_0x4ccb48(0x181)]&&(_0x26539a[_0x4ccb48(0x184)]=_0xc75253);}if(_0x59ad7f){const _0x3dbc33=_0x327752[_0x4ccb48(0x190)][_0x4ccb48(0x18e)](_0x4ccb48(0x17f)),_0x565fd4=_0x3dbc33[_0x4ccb48(0x16a)],{prefix:_0x4bf774,suffix:_0x1a89a2}=_0x327752[_0x4ccb48(0x194)][_0x4ccb48(0x18e)](_0x4ccb48(0x172));if(_0x2f56e7[_0x4ccb48(0x16d)]={'prefix':_0x4bf774,'suffix':_0x1a89a2},_0x4ccb48(0x161)!==_0x565fd4){_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)]={};const _0x3a03b8=_0x4ccb48(0x17c),_0x5c55fb=_0x4ccb48(0x15c)===_0x565fd4?_0x3dbc33[_0x4ccb48(0x178)]():_0x3dbc33[_0x4ccb48(0x16e)](_0x565fd4,!0x0);for(const _0x57dea5 of Object[_0x4ccb48(0x17a)](_0x5c55fb)){const [_0x4ae0e0,_0x20c0e1]=_0x57dea5;_0x4ccb48(0x160)===_0x3dbc33[_0x4ccb48(0x183)](_0x4ae0e0)?_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)][_0x4ae0e0]=null!==_0x20c0e1?_0x20c0e1:_0x3a03b8:_0x2f56e7[_0x4ccb48(0x16d)][_0x4ccb48(0x15f)][_0x4ae0e0]=null!==_0x20c0e1?_0x20c0e1:_0x3dbc33[_0x4ccb48(0x166)](_0x4ae0e0)||_0x4ae0e0;}}}return(_0x26539a[_0x4ccb48(0x189)]||_0x26539a[_0x4ccb48(0x184)])&&(_0x2f56e7[_0x4ccb48(0x164)]=new Intl[(_0x4ccb48(0x175))]()[_0x4ccb48(0x168)]()[_0x4ccb48(0x18a)],_0x2f56e7[_0x4ccb48(0x182)]=_0x26539a),_0x2f56e7;}export function getCommentsV2(_0x126fa6){const _0x45dcd8=_0x2dae,_0x3ad1d2=[];if(!_0x126fa6[_0x45dcd8(0x181)])return _0x3ad1d2;for(const _0x4e579f of _0x126fa6){const _0x2afb05=_0x4e579f[_0x45dcd8(0x16f)][_0x45dcd8(0x159)](_0x2d1df6=>({'author':_0x2d1df6[_0x45dcd8(0x17e)][_0x45dcd8(0x187)],'content':_0x2d1df6[_0x45dcd8(0x17d)],'created_at':_0x2d1df6[_0x45dcd8(0x177)]}));_0x3ad1d2[_0x45dcd8(0x191)]({'thread_id':_0x4e579f['id'],'is_resolved':_0x4e579f[_0x45dcd8(0x18c)],'comments':_0x2afb05});}return _0x3ad1d2;}export function getSuggestionsV2(_0x204f4d,_0x128f9b){const _0x7f0574=_0x2dae;return _0x204f4d[_0x7f0574(0x181)]&&_0x128f9b[_0x7f0574(0x181)]?_0x204f4d[_0x7f0574(0x159)](({id:_0x5c6886,createdAt:_0x4c0adb,authorId:_0x5a8c50,attributes:_0x34b797})=>{const _0x2c1630=_0x7f0574,_0x2d9974=_0x34b797&&_0x34b797[_0x2c1630(0x18d)];return{'id':_0x5c6886,'author':_0x2d9974?_0x2d9974[_0x2c1630(0x171)]:_0x128f9b[_0x2c1630(0x18e)](_0x5a8c50)[_0x2c1630(0x187)],'created_at':_0x4c0adb};}):[];}
@@ -1,25 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- import type { ExportWordConfig, ExportWord, ExportWordCommand } from './index.js';
10
- declare module '@ckeditor/ckeditor5-core' {
11
- interface EditorConfig {
12
- /**
13
- * The configuration of the {@link module:export-word/exportword~ExportWord export to Word feature}.
14
- *
15
- * Read more in {@link module:export-word/exportword~ExportWordConfig}.
16
- */
17
- exportWord?: ExportWordConfig;
18
- }
19
- interface PluginsMap {
20
- [ExportWord.pluginName]: ExportWord;
21
- }
22
- interface CommandsMap {
23
- exportWord: ExportWordCommand;
24
- }
25
- }
@@ -1,364 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module export-word/exportword
11
- * @publicApi
12
- */
13
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
14
- import { Notification } from 'ckeditor5/src/ui.js';
15
- import type { InitializedToken, TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
16
- import ExportWordUI from './exportwordui.js';
17
- /**
18
- * The export to Word feature.
19
- *
20
- * It allows you to generate a Word file directly from the editor content.
21
- *
22
- * For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
23
- */
24
- export default class ExportWord extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName(): "ExportWord";
29
- /**
30
- * @inheritDoc
31
- */
32
- static get isOfficialPlugin(): true;
33
- /**
34
- * @inheritDoc
35
- */
36
- static get isPremiumPlugin(): true;
37
- /**
38
- * @inheritDoc
39
- */
40
- static get requires(): readonly ["CloudServices", typeof Notification, typeof ExportWordUI];
41
- /**
42
- * @inheritDoc
43
- */
44
- init(): void;
45
- }
46
- /**
47
- * The configuration of the export to Word feature. It is used by the Word export features from
48
- * the `@ckeditor/ckeditor5-export-word` package.
49
- *
50
- * ```ts
51
- * ClassicEditor
52
- * .create( editorElement, {
53
- * exportWord: ... // Export to Word feature options.
54
- * } )
55
- * .then( ... )
56
- * .catch( ... );
57
- * ```
58
- *
59
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
60
- */
61
- export interface ExportWordConfig {
62
- /**
63
- * Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
64
- *
65
- * ```ts
66
- * const exportWordConfig = {
67
- * stylesheets: [ './path/to/custom-style.css' ]
68
- * }
69
- * ```
70
- *
71
- * **Default editor's content styles**:
72
- * {@glink getting-started/setup/css The default editor content styles}
73
- * are applied to the generated Word file thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
74
- * If you don't want them to be applied, you have to omit the token:
75
- *
76
- * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
77
- * In other setups you always need to pass the stylesheets.
78
- *
79
- * ```ts
80
- * const exportWordConfig = {
81
- * stylesheets: [ './path/to/custom-editor-styles.css' ]
82
- * }
83
- * ```
84
- *
85
- * **Custom styling:** For more advanced styling, your configuration should look like this:
86
- *
87
- * ```ts
88
- * const exportWordConfig = {
89
- * stylesheets: [
90
- * './path/to/editor-styles.css',
91
- * './path/to/custom-styles.css'
92
- * ]
93
- * }
94
- * ```
95
- *
96
- * @default `[ 'EDITOR_STYLES' ]`
97
- */
98
- stylesheets?: Array<string>;
99
- /**
100
- * The name of the generated Word file.
101
- *
102
- * ```ts
103
- * // Static file name.
104
- * const exportWordConfig = {
105
- * fileName: 'my-document.docx'
106
- * }
107
- *
108
- *
109
- * // Dynamic file name.
110
- * const exportWordConfig = {
111
- * fileName: () => {
112
- * const articleTitle = document.querySelector( '#title' );
113
- *
114
- * return `${ articleTitle.value }.docx`;
115
- * }
116
- * }
117
- * ```
118
- *
119
- * **NOTE:** The file name must contain the `.docx` extension.
120
- * Otherwise your operating system or device may have trouble identifying the file type.
121
- *
122
- * @default 'document.docx'
123
- */
124
- fileName?: string | (() => string);
125
- /**
126
- * A URL to the Docx converter.
127
- *
128
- * ```ts
129
- * const exportWordConfig = {
130
- * converterUrl: 'https://myconverter.com/v2/'
131
- * }
132
- * ```
133
- *
134
- * **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
135
- * You can provide a URL to an on-premises converter instead.
136
- *
137
- * @default 'https://docx-converter.cke-cs.com/v2/convert/html-docx'
138
- */
139
- converterUrl?: string;
140
- /**
141
- * The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
142
- *
143
- * **NOTE:** Configuring the plugin is not mandatory.
144
- *
145
- * ```ts
146
- * const exportWordConfig = {
147
- * converterOptions: {
148
- * ...
149
- * }
150
- * }
151
- * ```
152
- *
153
- * @default `{
154
- * document: {
155
- * size: 'A4',
156
- * orientation: 'portrait',
157
- * language: editor.locale.contentLanguage,
158
- * margin: {
159
- * top: '1in',
160
- * bottom: '1in',
161
- * right: '1in',
162
- * left: '1in'
163
- * }
164
- * }
165
- * headers: undefined,
166
- * footers: undefined,
167
- * auto_pagination: false,
168
- * base_url: undefined,
169
- * extra_http_headers: undefined
170
- * }`
171
- */
172
- converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
173
- /**
174
- * A function to gather the HTML to be converted to Word.
175
- *
176
- * **NOTE:** This option may be useful when the editor does not have a `getData()` method,
177
- * or if the HTML to be converted should be different than the edited one.
178
- *
179
- * ```ts
180
- * const exportWordConfig = {
181
- * dataCallback: ( editor ) => {
182
- * return `
183
- * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
184
- * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
185
- * `;
186
- * }
187
- * }
188
- * ```
189
- *
190
- * @default `( editor ) => editor.getData( { pagination: true } )
191
- *
192
- * If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
193
- * editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
194
- */
195
- dataCallback?: (editor: Editor) => string;
196
- /**
197
- * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
198
- * the export to Word feature.
199
- *
200
- * **Note:** The token can be disabled with the `false` value provided.
201
- *
202
- * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
203
- */
204
- tokenUrl?: TokenUrl | false;
205
- /**
206
- * The authentication token.
207
- *
208
- * See: {@link module:cloud-services/cloudservices~CloudServices#token}
209
- */
210
- token?: InitializedToken;
211
- /**
212
- * The version of `Export to Word` API.
213
- *
214
- * @default '2'
215
- */
216
- version?: 1 | 2;
217
- /**
218
- * The watermark configuration.
219
- *
220
- * ```ts
221
- * converterOptions: {
222
- * watermark: {
223
- * source: 'https://via.placeholder.com/200',
224
- * width: '500px',
225
- * height: '600px',
226
- * washout: 'false'
227
- * }
228
- * }
229
- * ```
230
- *
231
- * The watermark configuration is represented as an object containing 4 properties:
232
- *
233
- * - `source`: A source of the image used for the watermark.
234
- * - `width`: A string value representing the width of the watermark.
235
- * - `height`: A string value representing the height of the watermark.
236
- * - `washout`: Determines whether the washout effect should be applied. Optional - the default value is `false`.
237
- *
238
- */
239
- watermark?: ExportWordConverterWatermarkV2;
240
- }
241
- export type ExportWordConverterOptions = {
242
- format?: ExportWordConverterFormatOption;
243
- margin_top?: string;
244
- margin_bottom?: string;
245
- margin_right?: string;
246
- margin_left?: string;
247
- header?: ExportWordConverterHeaderFooterOption;
248
- footer?: ExportWordConverterHeaderFooterOption;
249
- comments?: ExportWordConverterCommentsOption;
250
- suggestions?: ExportWordConverterSuggestionsOption;
251
- orientation?: ExportWordConverterOrientationOption;
252
- auto_pagination?: boolean;
253
- base_url?: string;
254
- };
255
- export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
256
- export type ExportWordConverterOrientationOption = 'portrait' | 'landscape' | string & Record<never, never>;
257
- export type ExportWordConverterHeaderFooterOption = Array<{
258
- html?: string;
259
- css?: string;
260
- type?: 'default' | 'even' | 'odd' | 'first' | string & Record<never, never>;
261
- }>;
262
- export type ExportWordConverterCommentsOption = {
263
- [id: string]: Array<{
264
- author: string;
265
- created: Date;
266
- content?: string;
267
- is_resolved: boolean;
268
- }>;
269
- };
270
- export type ExportWordConverterSuggestionsOption = {
271
- [id: string]: {
272
- author: string;
273
- created: Date | null;
274
- };
275
- };
276
- export type ExportWordConverterOptionsV2 = {
277
- document?: ExportWordConverterDocumentOptionsV2;
278
- headers?: ExportWordConverterHeaderFooterOptionsV2;
279
- footers?: ExportWordConverterHeaderFooterOptionsV2;
280
- extra_http_headers?: ExportWordConverterExtraHttpHeaders;
281
- base_url?: string;
282
- auto_pagination?: boolean;
283
- watermark?: ExportWordConverterWatermarkV2;
284
- };
285
- export type ExportWordConverterDocumentOptionsV2 = {
286
- margins?: ExportWordConverterMarginsOptionsV2;
287
- size?: ExportWordConverterFormatOptionsV2;
288
- orientation?: ExportWordConverterOrientationOptionsV2;
289
- language?: string;
290
- };
291
- export type ExportWordConverterMarginsOptionsV2 = {
292
- top?: string;
293
- right?: string;
294
- bottom?: string;
295
- left?: string;
296
- };
297
- export type ExportWordConverterHeaderFooterOptionsV2 = {
298
- first?: ExportWordConverterHeaderFooterItemOptionsV2;
299
- odd?: ExportWordConverterHeaderFooterItemOptionsV2;
300
- even?: ExportWordConverterHeaderFooterItemOptionsV2;
301
- default?: ExportWordConverterHeaderFooterItemOptionsV2;
302
- };
303
- export type ExportWordConverterWatermarkV2 = {
304
- source?: string;
305
- width?: string;
306
- height?: string;
307
- washout?: boolean;
308
- };
309
- /**
310
- * If fetching some resources (e.g. images) used in a generated Word requires passing an additional
311
- * authorization factor in the form of additional HTTP headers:
312
- *
313
- * ```
314
- * extra_http_headers: {
315
- * 'https://ckeditor.com': {
316
- * authorization: 'Bearer xxx'
317
- * },
318
- * 'https://example.com': {
319
- * authorization: 'Bearer xxx'
320
- * },
321
- * }
322
- * ```
323
- */
324
- export type ExportWordConverterExtraHttpHeaders = {
325
- [domain: string]: ExportWordConverterExtraHttpHeadersHeader;
326
- };
327
- export type ExportWordConverterExtraHttpHeadersHeader = {
328
- [header: string]: string;
329
- };
330
- export type ExportWordConverterHeaderFooterItemOptionsV2 = {
331
- html?: string;
332
- css?: string;
333
- };
334
- export type ExportWordConverterOrientationOptionsV2 = 'portrait' | 'landscape' | string & Record<never, never>;
335
- export type ExportWordConverterFormatOptionsV2 = ExportWordConverterPredifinedFormatOptionsV2 | ExportWordConverterCustomFormatOptionsV2;
336
- export type ExportWordConverterPredifinedFormatOptionsV2 = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
337
- export type ExportWordConverterCustomFormatOptionsV2 = {
338
- width?: string;
339
- height?: string;
340
- };
341
- export type ExportWordConverterCollaborationFeaturesOptionsV2 = {
342
- comment_threads?: ExportWordConverterCommentsThreadOptionsV2;
343
- suggestions?: ExportWordConverterSuggestionsOptionsV2;
344
- };
345
- export type ExportWordConverterCommentsThreadOptionsV2 = Array<{
346
- thread_id: string;
347
- is_resolved: boolean;
348
- comments: ExportWordConverterCommentsV2;
349
- }>;
350
- export type ExportWordConverterCommentsV2 = Array<{
351
- author: string;
352
- created_at: Date;
353
- content: string;
354
- }>;
355
- export type ExportWordConverterSuggestionsOptionsV2 = Array<{
356
- id: string;
357
- author: string;
358
- created_at: Date | null;
359
- }>;
360
- export type ExportWordConverterMergeFieldsOptionsV2 = {
361
- prefix: string;
362
- suffix: string;
363
- data?: Record<string, string>;
364
- };
@@ -1,40 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module export-word/exportwordcommand
11
- * @publicApi
12
- */
13
- import { Command, type Editor } from 'ckeditor5/src/core.js';
14
- import type { ExportWordConfig } from './exportword.js';
15
- /**
16
- * The export to Word command.
17
- *
18
- * It takes the editor's HTML and CSS rules from the document and sends them to the HTML to Word converter.
19
- * After processing, the converter will send back a Word file for download.
20
- */
21
- export default class ExportWordCommand extends Command {
22
- /**
23
- * A command state that indicates if the command is currently executing.
24
- *
25
- * @observable
26
- */
27
- isBusy: boolean;
28
- /**
29
- * @inheritDoc
30
- */
31
- constructor(editor: Editor);
32
- /**
33
- * @inheritDoc
34
- */
35
- refresh(): void;
36
- /**
37
- * @inheritDoc
38
- */
39
- execute(options?: ExportWordConfig): Promise<void>;
40
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module export-word/exportwordui
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- /**
14
- * The export to Word UI feature.
15
- *
16
- * It introduces 'Export to Word' button in toolbar and menu bar.
17
- */
18
- export default class ExportWordUI extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get pluginName(): "ExportWordUI";
23
- /**
24
- * @inheritDoc
25
- */
26
- static get isOfficialPlugin(): true;
27
- /**
28
- * @inheritDoc
29
- */
30
- static get isPremiumPlugin(): true;
31
- /**
32
- * @inheritDoc
33
- */
34
- init(): void;
35
- }
package/dist/index.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module export-word
11
- */
12
- export { default as ExportWord, type ExportWordConfig } from './exportword.js';
13
- export type { default as ExportWordCommand } from './exportwordcommand.js';
14
- import './augmentation.js';
@@ -1,13 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module export-word/utils/common-translations
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- export declare function getTranslation(locale: Locale, id: string): string;
package/dist/utils.d.ts DELETED
@@ -1,62 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- import type { Editor } from 'ckeditor5/src/core.js';
10
- import type { Collection } from 'ckeditor5/src/utils.js';
11
- import type { ExportWordConverterOptions, ExportWordConverterInternalOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption, ExportWordConverterCommentsThreadOptionsV2, ExportWordConverterOptionsV2, ExportWordConverterInternalOptionsV2, ExportWordConverterSuggestionsOptionsV2 } from './exportword.js';
12
- import type { CommentThread } from '@ckeditor/ckeditor5-comments';
13
- import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
14
- import type { User } from '@ckeditor/ckeditor5-collaboration-core';
15
- /**
16
- * A helper function for getting concatenated CSS rules from external stylesheets.
17
- *
18
- * @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
19
- */
20
- export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
21
- /**
22
- * A helper function for getting a proper options object containing
23
- * comments, suggestions and the browser's timezone for the "Export to Word" converter.
24
- *
25
- * @param editor An editor instance.
26
- * @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`.
27
- */
28
- export declare function getConverterOptions(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptions): ExportWordConverterInternalOptions;
29
- /**
30
- * A helper function for getting a comments object for the converter options.
31
- *
32
- * @param threads The comment threads array.
33
- */
34
- export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
35
- /**
36
- * A helper function for getting a suggestions object for the converter options.
37
- *
38
- * @param suggestions The suggestions array.
39
- * @param users A list of all users in the editor.
40
- */
41
- export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
42
- /**
43
- * A helper function for getting a proper options object containing
44
- * comments, suggestions and the browser's timezone for the "Export to Word" converter for V2 API.
45
- *
46
- * @param editor An editor instance.
47
- * @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`.
48
- */
49
- export declare function getConverterOptionsV2(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptionsV2): ExportWordConverterInternalOptionsV2;
50
- /**
51
- * A helper function for getting a comments object for the converter options in V2 API.
52
- *
53
- * @param threads The comment threads array.
54
- */
55
- export declare function getCommentsV2(threads: Array<CommentThread>): ExportWordConverterCommentsThreadOptionsV2;
56
- /**
57
- * A helper function for getting a suggestions object for the converter options in V2 API.
58
- *
59
- * @param suggestions The suggestions array.
60
- * @param users A list of all users in the editor.
61
- */
62
- export declare function getSuggestionsV2(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOptionsV2;