@ckeditor/ckeditor5-track-changes 0.0.0-internal-20241017.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 (466) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +22 -0
  3. package/README.md +68 -0
  4. package/build/track-changes.js +5 -0
  5. package/build/translations/ar.js +1 -0
  6. package/build/translations/az.js +1 -0
  7. package/build/translations/bg.js +1 -0
  8. package/build/translations/bn.js +1 -0
  9. package/build/translations/ca.js +1 -0
  10. package/build/translations/cs.js +1 -0
  11. package/build/translations/da.js +1 -0
  12. package/build/translations/de.js +1 -0
  13. package/build/translations/el.js +1 -0
  14. package/build/translations/en-au.js +1 -0
  15. package/build/translations/es.js +1 -0
  16. package/build/translations/et.js +1 -0
  17. package/build/translations/fi.js +1 -0
  18. package/build/translations/fr.js +1 -0
  19. package/build/translations/gl.js +1 -0
  20. package/build/translations/he.js +1 -0
  21. package/build/translations/hi.js +1 -0
  22. package/build/translations/hr.js +1 -0
  23. package/build/translations/hu.js +1 -0
  24. package/build/translations/id.js +1 -0
  25. package/build/translations/it.js +1 -0
  26. package/build/translations/ja.js +1 -0
  27. package/build/translations/ko.js +1 -0
  28. package/build/translations/lt.js +1 -0
  29. package/build/translations/lv.js +1 -0
  30. package/build/translations/ms.js +1 -0
  31. package/build/translations/nl.js +1 -0
  32. package/build/translations/no.js +1 -0
  33. package/build/translations/pl.js +1 -0
  34. package/build/translations/pt-br.js +1 -0
  35. package/build/translations/pt.js +1 -0
  36. package/build/translations/ro.js +1 -0
  37. package/build/translations/ru.js +1 -0
  38. package/build/translations/sk.js +1 -0
  39. package/build/translations/sq.js +1 -0
  40. package/build/translations/sr-latn.js +1 -0
  41. package/build/translations/sr.js +1 -0
  42. package/build/translations/sv.js +1 -0
  43. package/build/translations/th.js +1 -0
  44. package/build/translations/tk.js +1 -0
  45. package/build/translations/tr.js +1 -0
  46. package/build/translations/tt.js +1 -0
  47. package/build/translations/uk.js +1 -0
  48. package/build/translations/ur.js +1 -0
  49. package/build/translations/vi.js +1 -0
  50. package/build/translations/zh-cn.js +1 -0
  51. package/build/translations/zh.js +1 -0
  52. package/ckeditor5-metadata.json +31 -0
  53. package/dist/augmentation.d.ts +44 -0
  54. package/dist/commands/acceptsuggestioncommand.d.ts +28 -0
  55. package/dist/commands/discardsuggestioncommand.d.ts +28 -0
  56. package/dist/commands/executeonallsuggestionscommand.d.ts +28 -0
  57. package/dist/commands/executeonselectedsuggestionscommand.d.ts +28 -0
  58. package/dist/commands/trackchangescommand.d.ts +30 -0
  59. package/dist/index-content.css +4 -0
  60. package/dist/index-editor.css +4 -0
  61. package/dist/index.css +4 -0
  62. package/dist/index.d.ts +22 -0
  63. package/dist/index.js +25 -0
  64. package/dist/integrations/aiassistant.d.ts +21 -0
  65. package/dist/integrations/alignment.d.ts +21 -0
  66. package/dist/integrations/basicstyles.d.ts +21 -0
  67. package/dist/integrations/blockquote.d.ts +21 -0
  68. package/dist/integrations/casechange.d.ts +21 -0
  69. package/dist/integrations/ckbox.d.ts +21 -0
  70. package/dist/integrations/codeblock.d.ts +21 -0
  71. package/dist/integrations/comments.d.ts +18 -0
  72. package/dist/integrations/deletecommand.d.ts +21 -0
  73. package/dist/integrations/entercommand.d.ts +20 -0
  74. package/dist/integrations/findandreplace.d.ts +25 -0
  75. package/dist/integrations/font.d.ts +21 -0
  76. package/dist/integrations/formatpainter.d.ts +21 -0
  77. package/dist/integrations/heading.d.ts +21 -0
  78. package/dist/integrations/highlight.d.ts +21 -0
  79. package/dist/integrations/horizontalline.d.ts +21 -0
  80. package/dist/integrations/htmlembed.d.ts +21 -0
  81. package/dist/integrations/image.d.ts +21 -0
  82. package/dist/integrations/imagereplace.d.ts +21 -0
  83. package/dist/integrations/imagestyle.d.ts +21 -0
  84. package/dist/integrations/importword.d.ts +22 -0
  85. package/dist/integrations/indent.d.ts +21 -0
  86. package/dist/integrations/inputcommand.d.ts +20 -0
  87. package/dist/integrations/legacylist.d.ts +21 -0
  88. package/dist/integrations/legacylistproperties.d.ts +33 -0
  89. package/dist/integrations/link.d.ts +21 -0
  90. package/dist/integrations/list.d.ts +21 -0
  91. package/dist/integrations/listproperties.d.ts +24 -0
  92. package/dist/integrations/mediaembed.d.ts +21 -0
  93. package/dist/integrations/mention.d.ts +21 -0
  94. package/dist/integrations/mergefields.d.ts +21 -0
  95. package/dist/integrations/multilevellist.d.ts +28 -0
  96. package/dist/integrations/pagebreak.d.ts +21 -0
  97. package/dist/integrations/paragraph.d.ts +21 -0
  98. package/dist/integrations/removeformat.d.ts +21 -0
  99. package/dist/integrations/restrictededitingmode.d.ts +21 -0
  100. package/dist/integrations/shiftentercommand.d.ts +20 -0
  101. package/dist/integrations/standardeditingmode.d.ts +21 -0
  102. package/dist/integrations/style.d.ts +21 -0
  103. package/dist/integrations/table.d.ts +46 -0
  104. package/dist/integrations/tablecaption.d.ts +26 -0
  105. package/dist/integrations/tableclipboard.d.ts +23 -0
  106. package/dist/integrations/tablecolumnresize.d.ts +30 -0
  107. package/dist/integrations/tableheadings.d.ts +26 -0
  108. package/dist/integrations/tablemergesplit.d.ts +26 -0
  109. package/dist/integrations/tableofcontents.d.ts +21 -0
  110. package/dist/integrations/tableproperties.d.ts +39 -0
  111. package/dist/integrations/template.d.ts +21 -0
  112. package/dist/integrations/title.d.ts +21 -0
  113. package/dist/integrations/undo.d.ts +21 -0
  114. package/dist/integrations/utils.d.ts +21 -0
  115. package/dist/suggestion.d.ts +295 -0
  116. package/dist/suggestiondescriptionfactory.d.ts +187 -0
  117. package/dist/trackchanges.d.ts +192 -0
  118. package/dist/trackchangesconfig.d.ts +89 -0
  119. package/dist/trackchangesdata.d.ts +53 -0
  120. package/dist/trackchangesediting.d.ts +557 -0
  121. package/dist/trackchangesui.d.ts +50 -0
  122. package/dist/translations/ar.d.ts +8 -0
  123. package/dist/translations/ar.js +23 -0
  124. package/dist/translations/ar.umd.js +23 -0
  125. package/dist/translations/az.d.ts +8 -0
  126. package/dist/translations/az.js +23 -0
  127. package/dist/translations/az.umd.js +23 -0
  128. package/dist/translations/bg.d.ts +8 -0
  129. package/dist/translations/bg.js +23 -0
  130. package/dist/translations/bg.umd.js +23 -0
  131. package/dist/translations/bn.d.ts +8 -0
  132. package/dist/translations/bn.js +23 -0
  133. package/dist/translations/bn.umd.js +23 -0
  134. package/dist/translations/ca.d.ts +8 -0
  135. package/dist/translations/ca.js +23 -0
  136. package/dist/translations/ca.umd.js +23 -0
  137. package/dist/translations/cs.d.ts +8 -0
  138. package/dist/translations/cs.js +23 -0
  139. package/dist/translations/cs.umd.js +23 -0
  140. package/dist/translations/da.d.ts +8 -0
  141. package/dist/translations/da.js +23 -0
  142. package/dist/translations/da.umd.js +23 -0
  143. package/dist/translations/de.d.ts +8 -0
  144. package/dist/translations/de.js +23 -0
  145. package/dist/translations/de.umd.js +23 -0
  146. package/dist/translations/el.d.ts +8 -0
  147. package/dist/translations/el.js +23 -0
  148. package/dist/translations/el.umd.js +23 -0
  149. package/dist/translations/en-au.d.ts +8 -0
  150. package/dist/translations/en-au.js +23 -0
  151. package/dist/translations/en-au.umd.js +23 -0
  152. package/dist/translations/en.d.ts +8 -0
  153. package/dist/translations/en.js +23 -0
  154. package/dist/translations/en.umd.js +23 -0
  155. package/dist/translations/es.d.ts +8 -0
  156. package/dist/translations/es.js +23 -0
  157. package/dist/translations/es.umd.js +23 -0
  158. package/dist/translations/et.d.ts +8 -0
  159. package/dist/translations/et.js +23 -0
  160. package/dist/translations/et.umd.js +23 -0
  161. package/dist/translations/fi.d.ts +8 -0
  162. package/dist/translations/fi.js +23 -0
  163. package/dist/translations/fi.umd.js +23 -0
  164. package/dist/translations/fr.d.ts +8 -0
  165. package/dist/translations/fr.js +23 -0
  166. package/dist/translations/fr.umd.js +23 -0
  167. package/dist/translations/gl.d.ts +8 -0
  168. package/dist/translations/gl.js +23 -0
  169. package/dist/translations/gl.umd.js +23 -0
  170. package/dist/translations/he.d.ts +8 -0
  171. package/dist/translations/he.js +23 -0
  172. package/dist/translations/he.umd.js +23 -0
  173. package/dist/translations/hi.d.ts +8 -0
  174. package/dist/translations/hi.js +23 -0
  175. package/dist/translations/hi.umd.js +23 -0
  176. package/dist/translations/hr.d.ts +8 -0
  177. package/dist/translations/hr.js +23 -0
  178. package/dist/translations/hr.umd.js +23 -0
  179. package/dist/translations/hu.d.ts +8 -0
  180. package/dist/translations/hu.js +23 -0
  181. package/dist/translations/hu.umd.js +23 -0
  182. package/dist/translations/id.d.ts +8 -0
  183. package/dist/translations/id.js +23 -0
  184. package/dist/translations/id.umd.js +23 -0
  185. package/dist/translations/it.d.ts +8 -0
  186. package/dist/translations/it.js +23 -0
  187. package/dist/translations/it.umd.js +23 -0
  188. package/dist/translations/ja.d.ts +8 -0
  189. package/dist/translations/ja.js +23 -0
  190. package/dist/translations/ja.umd.js +23 -0
  191. package/dist/translations/ko.d.ts +8 -0
  192. package/dist/translations/ko.js +23 -0
  193. package/dist/translations/ko.umd.js +23 -0
  194. package/dist/translations/lt.d.ts +8 -0
  195. package/dist/translations/lt.js +23 -0
  196. package/dist/translations/lt.umd.js +23 -0
  197. package/dist/translations/lv.d.ts +8 -0
  198. package/dist/translations/lv.js +23 -0
  199. package/dist/translations/lv.umd.js +23 -0
  200. package/dist/translations/ms.d.ts +8 -0
  201. package/dist/translations/ms.js +23 -0
  202. package/dist/translations/ms.umd.js +23 -0
  203. package/dist/translations/nl.d.ts +8 -0
  204. package/dist/translations/nl.js +23 -0
  205. package/dist/translations/nl.umd.js +23 -0
  206. package/dist/translations/no.d.ts +8 -0
  207. package/dist/translations/no.js +23 -0
  208. package/dist/translations/no.umd.js +23 -0
  209. package/dist/translations/pl.d.ts +8 -0
  210. package/dist/translations/pl.js +23 -0
  211. package/dist/translations/pl.umd.js +23 -0
  212. package/dist/translations/pt-br.d.ts +8 -0
  213. package/dist/translations/pt-br.js +23 -0
  214. package/dist/translations/pt-br.umd.js +23 -0
  215. package/dist/translations/pt.d.ts +8 -0
  216. package/dist/translations/pt.js +23 -0
  217. package/dist/translations/pt.umd.js +23 -0
  218. package/dist/translations/ro.d.ts +8 -0
  219. package/dist/translations/ro.js +23 -0
  220. package/dist/translations/ro.umd.js +23 -0
  221. package/dist/translations/ru.d.ts +8 -0
  222. package/dist/translations/ru.js +23 -0
  223. package/dist/translations/ru.umd.js +23 -0
  224. package/dist/translations/sk.d.ts +8 -0
  225. package/dist/translations/sk.js +23 -0
  226. package/dist/translations/sk.umd.js +23 -0
  227. package/dist/translations/sq.d.ts +8 -0
  228. package/dist/translations/sq.js +23 -0
  229. package/dist/translations/sq.umd.js +23 -0
  230. package/dist/translations/sr-latn.d.ts +8 -0
  231. package/dist/translations/sr-latn.js +23 -0
  232. package/dist/translations/sr-latn.umd.js +23 -0
  233. package/dist/translations/sr.d.ts +8 -0
  234. package/dist/translations/sr.js +23 -0
  235. package/dist/translations/sr.umd.js +23 -0
  236. package/dist/translations/sv.d.ts +8 -0
  237. package/dist/translations/sv.js +23 -0
  238. package/dist/translations/sv.umd.js +23 -0
  239. package/dist/translations/th.d.ts +8 -0
  240. package/dist/translations/th.js +23 -0
  241. package/dist/translations/th.umd.js +23 -0
  242. package/dist/translations/tk.d.ts +8 -0
  243. package/dist/translations/tk.js +23 -0
  244. package/dist/translations/tk.umd.js +23 -0
  245. package/dist/translations/tr.d.ts +8 -0
  246. package/dist/translations/tr.js +23 -0
  247. package/dist/translations/tr.umd.js +23 -0
  248. package/dist/translations/tt.d.ts +8 -0
  249. package/dist/translations/tt.js +23 -0
  250. package/dist/translations/tt.umd.js +23 -0
  251. package/dist/translations/uk.d.ts +8 -0
  252. package/dist/translations/uk.js +23 -0
  253. package/dist/translations/uk.umd.js +23 -0
  254. package/dist/translations/ur.d.ts +8 -0
  255. package/dist/translations/ur.js +23 -0
  256. package/dist/translations/ur.umd.js +23 -0
  257. package/dist/translations/vi.d.ts +8 -0
  258. package/dist/translations/vi.js +23 -0
  259. package/dist/translations/vi.umd.js +23 -0
  260. package/dist/translations/zh-cn.d.ts +8 -0
  261. package/dist/translations/zh-cn.js +23 -0
  262. package/dist/translations/zh-cn.umd.js +23 -0
  263. package/dist/translations/zh.d.ts +8 -0
  264. package/dist/translations/zh.js +23 -0
  265. package/dist/translations/zh.umd.js +23 -0
  266. package/dist/ui/suggestioncontroller.d.ts +41 -0
  267. package/dist/ui/view/basesuggestionthreadview.d.ts +209 -0
  268. package/dist/ui/view/suggestionthreadview.d.ts +98 -0
  269. package/dist/ui/view/suggestionview.d.ts +194 -0
  270. package/dist/utils/common-translations.d.ts +13 -0
  271. package/dist/utils/utils.d.ts +41 -0
  272. package/lang/contexts.json +134 -0
  273. package/lang/translations/ar.po +672 -0
  274. package/lang/translations/az.po +588 -0
  275. package/lang/translations/bg.po +588 -0
  276. package/lang/translations/bn.po +614 -0
  277. package/lang/translations/ca.po +588 -0
  278. package/lang/translations/cs.po +630 -0
  279. package/lang/translations/da.po +588 -0
  280. package/lang/translations/de.po +588 -0
  281. package/lang/translations/el.po +588 -0
  282. package/lang/translations/en-au.po +588 -0
  283. package/lang/translations/en.po +588 -0
  284. package/lang/translations/es.po +609 -0
  285. package/lang/translations/et.po +588 -0
  286. package/lang/translations/fi.po +588 -0
  287. package/lang/translations/fr.po +609 -0
  288. package/lang/translations/gl.po +588 -0
  289. package/lang/translations/he.po +625 -0
  290. package/lang/translations/hi.po +588 -0
  291. package/lang/translations/hr.po +609 -0
  292. package/lang/translations/hu.po +588 -0
  293. package/lang/translations/id.po +567 -0
  294. package/lang/translations/it.po +609 -0
  295. package/lang/translations/ja.po +567 -0
  296. package/lang/translations/ko.po +567 -0
  297. package/lang/translations/lt.po +630 -0
  298. package/lang/translations/lv.po +609 -0
  299. package/lang/translations/ms.po +567 -0
  300. package/lang/translations/nl.po +588 -0
  301. package/lang/translations/no.po +588 -0
  302. package/lang/translations/pl.po +630 -0
  303. package/lang/translations/pt-br.po +609 -0
  304. package/lang/translations/pt.po +609 -0
  305. package/lang/translations/ro.po +609 -0
  306. package/lang/translations/ru.po +632 -0
  307. package/lang/translations/sk.po +630 -0
  308. package/lang/translations/sq.po +588 -0
  309. package/lang/translations/sr-latn.po +609 -0
  310. package/lang/translations/sr.po +609 -0
  311. package/lang/translations/sv.po +588 -0
  312. package/lang/translations/th.po +567 -0
  313. package/lang/translations/tk.po +588 -0
  314. package/lang/translations/tr.po +588 -0
  315. package/lang/translations/tt.po +567 -0
  316. package/lang/translations/uk.po +630 -0
  317. package/lang/translations/ur.po +588 -0
  318. package/lang/translations/vi.po +567 -0
  319. package/lang/translations/zh-cn.po +567 -0
  320. package/lang/translations/zh.po +567 -0
  321. package/package.json +57 -0
  322. package/src/augmentation.d.ts +40 -0
  323. package/src/augmentation.js +23 -0
  324. package/src/commands/acceptsuggestioncommand.d.ts +24 -0
  325. package/src/commands/acceptsuggestioncommand.js +23 -0
  326. package/src/commands/discardsuggestioncommand.d.ts +24 -0
  327. package/src/commands/discardsuggestioncommand.js +23 -0
  328. package/src/commands/executeonallsuggestionscommand.d.ts +24 -0
  329. package/src/commands/executeonallsuggestionscommand.js +23 -0
  330. package/src/commands/executeonselectedsuggestionscommand.d.ts +24 -0
  331. package/src/commands/executeonselectedsuggestionscommand.js +23 -0
  332. package/src/commands/trackchangescommand.d.ts +26 -0
  333. package/src/commands/trackchangescommand.js +23 -0
  334. package/src/index.d.ts +18 -0
  335. package/src/index.js +23 -0
  336. package/src/integrations/aiassistant.d.ts +17 -0
  337. package/src/integrations/aiassistant.js +23 -0
  338. package/src/integrations/alignment.d.ts +17 -0
  339. package/src/integrations/alignment.js +23 -0
  340. package/src/integrations/basicstyles.d.ts +17 -0
  341. package/src/integrations/basicstyles.js +23 -0
  342. package/src/integrations/blockquote.d.ts +17 -0
  343. package/src/integrations/blockquote.js +23 -0
  344. package/src/integrations/casechange.d.ts +17 -0
  345. package/src/integrations/casechange.js +23 -0
  346. package/src/integrations/ckbox.d.ts +17 -0
  347. package/src/integrations/ckbox.js +23 -0
  348. package/src/integrations/codeblock.d.ts +17 -0
  349. package/src/integrations/codeblock.js +23 -0
  350. package/src/integrations/comments.d.ts +14 -0
  351. package/src/integrations/comments.js +23 -0
  352. package/src/integrations/deletecommand.d.ts +17 -0
  353. package/src/integrations/deletecommand.js +23 -0
  354. package/src/integrations/entercommand.d.ts +16 -0
  355. package/src/integrations/entercommand.js +23 -0
  356. package/src/integrations/findandreplace.d.ts +21 -0
  357. package/src/integrations/findandreplace.js +23 -0
  358. package/src/integrations/font.d.ts +17 -0
  359. package/src/integrations/font.js +23 -0
  360. package/src/integrations/formatpainter.d.ts +17 -0
  361. package/src/integrations/formatpainter.js +23 -0
  362. package/src/integrations/heading.d.ts +17 -0
  363. package/src/integrations/heading.js +23 -0
  364. package/src/integrations/highlight.d.ts +17 -0
  365. package/src/integrations/highlight.js +23 -0
  366. package/src/integrations/horizontalline.d.ts +17 -0
  367. package/src/integrations/horizontalline.js +23 -0
  368. package/src/integrations/htmlembed.d.ts +17 -0
  369. package/src/integrations/htmlembed.js +23 -0
  370. package/src/integrations/image.d.ts +17 -0
  371. package/src/integrations/image.js +23 -0
  372. package/src/integrations/imagereplace.d.ts +17 -0
  373. package/src/integrations/imagereplace.js +23 -0
  374. package/src/integrations/imagestyle.d.ts +17 -0
  375. package/src/integrations/imagestyle.js +23 -0
  376. package/src/integrations/importword.d.ts +18 -0
  377. package/src/integrations/importword.js +23 -0
  378. package/src/integrations/indent.d.ts +17 -0
  379. package/src/integrations/indent.js +23 -0
  380. package/src/integrations/inputcommand.d.ts +16 -0
  381. package/src/integrations/inputcommand.js +23 -0
  382. package/src/integrations/legacylist.d.ts +17 -0
  383. package/src/integrations/legacylist.js +23 -0
  384. package/src/integrations/legacylistproperties.d.ts +29 -0
  385. package/src/integrations/legacylistproperties.js +23 -0
  386. package/src/integrations/link.d.ts +17 -0
  387. package/src/integrations/link.js +23 -0
  388. package/src/integrations/list.d.ts +17 -0
  389. package/src/integrations/list.js +23 -0
  390. package/src/integrations/listproperties.d.ts +20 -0
  391. package/src/integrations/listproperties.js +23 -0
  392. package/src/integrations/mediaembed.d.ts +17 -0
  393. package/src/integrations/mediaembed.js +23 -0
  394. package/src/integrations/mention.d.ts +17 -0
  395. package/src/integrations/mention.js +23 -0
  396. package/src/integrations/mergefields.d.ts +17 -0
  397. package/src/integrations/mergefields.js +23 -0
  398. package/src/integrations/multilevellist.d.ts +24 -0
  399. package/src/integrations/multilevellist.js +23 -0
  400. package/src/integrations/pagebreak.d.ts +17 -0
  401. package/src/integrations/pagebreak.js +23 -0
  402. package/src/integrations/paragraph.d.ts +17 -0
  403. package/src/integrations/paragraph.js +23 -0
  404. package/src/integrations/removeformat.d.ts +17 -0
  405. package/src/integrations/removeformat.js +23 -0
  406. package/src/integrations/restrictededitingmode.d.ts +17 -0
  407. package/src/integrations/restrictededitingmode.js +23 -0
  408. package/src/integrations/shiftentercommand.d.ts +16 -0
  409. package/src/integrations/shiftentercommand.js +23 -0
  410. package/src/integrations/standardeditingmode.d.ts +17 -0
  411. package/src/integrations/standardeditingmode.js +23 -0
  412. package/src/integrations/style.d.ts +17 -0
  413. package/src/integrations/style.js +23 -0
  414. package/src/integrations/table.d.ts +42 -0
  415. package/src/integrations/table.js +23 -0
  416. package/src/integrations/tablecaption.d.ts +22 -0
  417. package/src/integrations/tablecaption.js +23 -0
  418. package/src/integrations/tableclipboard.d.ts +19 -0
  419. package/src/integrations/tableclipboard.js +23 -0
  420. package/src/integrations/tablecolumnresize.d.ts +26 -0
  421. package/src/integrations/tablecolumnresize.js +23 -0
  422. package/src/integrations/tableheadings.d.ts +22 -0
  423. package/src/integrations/tableheadings.js +23 -0
  424. package/src/integrations/tablemergesplit.d.ts +22 -0
  425. package/src/integrations/tablemergesplit.js +23 -0
  426. package/src/integrations/tableofcontents.d.ts +17 -0
  427. package/src/integrations/tableofcontents.js +23 -0
  428. package/src/integrations/tableproperties.d.ts +35 -0
  429. package/src/integrations/tableproperties.js +23 -0
  430. package/src/integrations/template.d.ts +17 -0
  431. package/src/integrations/template.js +23 -0
  432. package/src/integrations/title.d.ts +17 -0
  433. package/src/integrations/title.js +23 -0
  434. package/src/integrations/undo.d.ts +17 -0
  435. package/src/integrations/undo.js +23 -0
  436. package/src/integrations/utils.d.ts +17 -0
  437. package/src/integrations/utils.js +23 -0
  438. package/src/suggestion.d.ts +291 -0
  439. package/src/suggestion.js +24 -0
  440. package/src/suggestiondescriptionfactory.d.ts +183 -0
  441. package/src/suggestiondescriptionfactory.js +23 -0
  442. package/src/trackchanges.d.ts +188 -0
  443. package/src/trackchanges.js +23 -0
  444. package/src/trackchangesconfig.d.ts +85 -0
  445. package/src/trackchangesconfig.js +23 -0
  446. package/src/trackchangesdata.d.ts +49 -0
  447. package/src/trackchangesdata.js +23 -0
  448. package/src/trackchangesediting.d.ts +553 -0
  449. package/src/trackchangesediting.js +23 -0
  450. package/src/trackchangesui.d.ts +46 -0
  451. package/src/trackchangesui.js +23 -0
  452. package/src/ui/suggestioncontroller.d.ts +37 -0
  453. package/src/ui/suggestioncontroller.js +24 -0
  454. package/src/ui/view/basesuggestionthreadview.d.ts +205 -0
  455. package/src/ui/view/basesuggestionthreadview.js +23 -0
  456. package/src/ui/view/suggestionthreadview.d.ts +94 -0
  457. package/src/ui/view/suggestionthreadview.js +23 -0
  458. package/src/ui/view/suggestionview.d.ts +190 -0
  459. package/src/ui/view/suggestionview.js +23 -0
  460. package/src/utils/common-translations.d.ts +9 -0
  461. package/src/utils/common-translations.js +23 -0
  462. package/src/utils/utils.d.ts +37 -0
  463. package/src/utils/utils.js +23 -0
  464. package/theme/icons/track-changes-accept.svg +11 -0
  465. package/theme/icons/track-changes-discard.svg +11 -0
  466. package/theme/icons/track-changes.svg +11 -0
@@ -0,0 +1,183 @@
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
+ import { type Locale, type PriorityString } from 'ckeditor5/src/utils.js';
6
+ import type { Schema, Element } from 'ckeditor5/src/engine.js';
7
+ import type Suggestion from './suggestion.js';
8
+ /**
9
+ * Creates descriptions for suggestions and suggestions chains.
10
+ *
11
+ * The class manages everything related to generating descriptions for suggestions. Here, you register labels for elements,
12
+ * attributes, or custom callback for non-regular cases.
13
+ *
14
+ * One or more suggestions that are grouped together (based ond various conditions) create "suggestion chain".
15
+ * In such chain one suggestion may impact other suggestion when it comes to the description of the whole chain.
16
+ * For example, insertion next to deletion results in "Replaced" description.
17
+ */
18
+ export default class SuggestionDescriptionFactory {
19
+ constructor(schema: Schema, locale: Locale);
20
+ /**
21
+ * Returns descriptions for given suggestion chain.
22
+ *
23
+ * The structure of the descriptions array is as follows (explained on an example):
24
+ *
25
+ * ```ts
26
+ * [
27
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
28
+ * { type: 'insertion', content: '*Insert:* image },
29
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
30
+ * ]
31
+ * ```
32
+ *
33
+ * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
34
+ * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
35
+ *
36
+ * ```html
37
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
38
+ * <p><strong>Insert:</strong> image</p>
39
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
40
+ * ```
41
+ */
42
+ getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
43
+ /**
44
+ * Registers a callback function that returns a custom description for a suggestion.
45
+ *
46
+ * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
47
+ *
48
+ * The callback takes the suggestion instance as a parameter and should return
49
+ * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
50
+ * if the suggestion was not handled by the callback.
51
+ *
52
+ * Example of a description callback for the bold style:
53
+ *
54
+ * ```ts
55
+ * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
56
+ * const { data } = suggestion;
57
+ *
58
+ * // Omit suggestions that are not bold style suggestions.
59
+ * if ( !data || data.commandName !== 'bold' ) {
60
+ * return;
61
+ * }
62
+ *
63
+ * const isSet = !!data.commandParams[ 0 ].forceValue;
64
+ * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
65
+ *
66
+ * return {
67
+ * type: 'format',
68
+ * content
69
+ * };
70
+ * } );
71
+ * ```
72
+ */
73
+ registerDescriptionCallback(callback: DescriptionCallback): void;
74
+ /**
75
+ * For given `elementName` registers how this element will be labeled in a description (for example when it is added
76
+ * or removed).
77
+ *
78
+ * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
79
+ * and should return boolean value.
80
+ *
81
+ * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
82
+ *
83
+ * A simple use case without using internationalization:
84
+ *
85
+ * ```ts
86
+ * suggestionDescriptionFactory.registerElementLabel(
87
+ * 'paragraph',
88
+ * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
89
+ * );
90
+ * ```
91
+ *
92
+ * If you want your feature to be localized to other languages, use localization service:
93
+ *
94
+ * ```ts
95
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
96
+ *
97
+ * suggestionDescriptionFactory.registerElementLabel(
98
+ * 'paragraph',
99
+ * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
100
+ * );
101
+ * ```
102
+ */
103
+ registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
104
+ /**
105
+ * For given `attributeName` registers how this attribute will be labeled in a description (for example when it is added
106
+ * or removed).
107
+ *
108
+ * Example usage with internationalization:
109
+ *
110
+ * ```ts
111
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
112
+ *
113
+ * suggestionDescriptionFactory.registerAttributeLabel(
114
+ * 'bold',
115
+ * t( 'bold' )
116
+ * );
117
+ * ```
118
+ */
119
+ registerAttributeLabel(attributeName: string, attributeLabel: string): void;
120
+ /**
121
+ * Returns label registered for given element or the element name if there is no label registered for it.
122
+ */
123
+ getItemLabel(element: Element, quantity?: number): string;
124
+ }
125
+ /**
126
+ * A description for the suggestion.
127
+ *
128
+ * ```ts
129
+ * {
130
+ * type: 'format',
131
+ * label: '*Set format:* bold'
132
+ * }
133
+ * ```
134
+ *
135
+ * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
136
+ * by displaying a color box next to the suggestion.
137
+ *
138
+ * ```ts
139
+ * {
140
+ * type: 'format',
141
+ * label: '*Set font color:*',
142
+ * color: {
143
+ * value: 'hsl( 60, 60%, 60% )',
144
+ * title: 'yellow'
145
+ * }
146
+ * }
147
+ * ```
148
+ */
149
+ export interface Description {
150
+ type: 'insertion' | 'deletion' | 'replace' | 'format';
151
+ /**
152
+ * Description label. You may use `*` to bold part of the label.
153
+ */
154
+ content: string;
155
+ /**
156
+ * The optional `color` property used for color-related suggestions.
157
+ * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
158
+ */
159
+ color?: {
160
+ value: string;
161
+ title: string;
162
+ };
163
+ }
164
+ export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
165
+ export type LabelCallback = (quantity: number) => string;
166
+ export interface LabelCallbackObject {
167
+ matchingCallback: (element: Element) => boolean;
168
+ label: LabelCallback;
169
+ priority: PriorityString;
170
+ }
171
+ /**
172
+ * An intermediate state which is easier to operate on when consecutive suggestion
173
+ * ranges are traversed.
174
+ */
175
+ interface DescriptionItem {
176
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer' | 'addFormat' | 'removeFormat';
177
+ add?: string;
178
+ remove?: string;
179
+ element?: Element;
180
+ quantity?: number;
181
+ key?: string;
182
+ }
183
+ export {};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x16114c=_0x1790;(function(_0x3a9af6,_0x5cf2b3){const _0x154e44=_0x1790,_0x18e170=_0x3a9af6();while(!![]){try{const _0x2f6158=parseInt(_0x154e44(0x1b3))/0x1*(-parseInt(_0x154e44(0x1bc))/0x2)+parseInt(_0x154e44(0x208))/0x3*(-parseInt(_0x154e44(0x1c4))/0x4)+-parseInt(_0x154e44(0x1e3))/0x5+parseInt(_0x154e44(0x1cb))/0x6+parseInt(_0x154e44(0x1e6))/0x7*(-parseInt(_0x154e44(0x1b6))/0x8)+parseInt(_0x154e44(0x1fb))/0x9*(-parseInt(_0x154e44(0x1f3))/0xa)+-parseInt(_0x154e44(0x1ee))/0xb*(-parseInt(_0x154e44(0x1ec))/0xc);if(_0x2f6158===_0x5cf2b3)break;else _0x18e170['push'](_0x18e170['shift']());}catch(_0x32aa06){_0x18e170['push'](_0x18e170['shift']());}}}(_0x1bac,0x72c52));import{getTranslation as _0x2f378c}from'./utils/common-translations.js';import{priorities as _0x4d126a,insertToPriorityArray as _0x8c3440}from'ckeditor5/src/utils.js';import{renameAttributeKey as _0x4f6162}from'./trackchangesediting.js';export default class f{constructor(_0x192bd3,_0x18b939){const _0x2419eb=_0x1790;this[_0x2419eb(0x1f4)]=[],this[_0x2419eb(0x1c1)]=new Map(),this[_0x2419eb(0x1e4)]=[],this[_0x2419eb(0x1ed)]=new Map(),this[_0x2419eb(0x1eb)]=_0x192bd3,this[_0x2419eb(0x1ae)]=_0x18b939;}[_0x16114c(0x1d9)](_0x11f725){const _0x42b446=_0x16114c,_0x2b6b46=[],_0x26171f=new Set(),_0x52936d=new Set();for(let _0xf24f97=0x0;_0xf24f97<_0x11f725[_0x42b446(0x204)];_0xf24f97++){const _0x4cf39b=_0x11f725[_0xf24f97];if(!_0x4cf39b[_0x42b446(0x1ba)])continue;const _0xec5dbc=this[_0x42b446(0x1be)](_0x4cf39b);if(_0xec5dbc){if(null!=_0x4cf39b[_0x42b446(0x1b2)]){if(_0x26171f[_0x42b446(0x1b4)](_0x4cf39b[_0x42b446(0x1b2)]))continue;_0x26171f[_0x42b446(0x1dc)](_0x4cf39b[_0x42b446(0x1b2)]);}_0x2b6b46[_0x42b446(0x1b9)](_0xec5dbc);}else{if(_0x42b446(0x1d6)!=_0x4cf39b[_0x42b446(0x202)])_0x42b446(0x1d4)!=_0x4cf39b[_0x42b446(0x202)]&&_0x42b446(0x1af)!=_0x4cf39b[_0x42b446(0x202)]||this[_0x42b446(0x200)](_0x2b6b46,_0x4cf39b,_0x11f725[_0xf24f97+0x1]);else{const _0x15dde1=_0x4cf39b[_0x42b446(0x1ca)][_0x42b446(0x206)];if(_0x52936d[_0x42b446(0x1b4)](_0x15dde1))continue;_0x52936d[_0x42b446(0x1dc)](_0x4cf39b[_0x42b446(0x1ca)][_0x42b446(0x206)]),_0x15dde1==_0x4f6162?this[_0x42b446(0x1dd)](_0x2b6b46,_0x4cf39b):this[_0x42b446(0x20c)](_0x2b6b46,_0x4cf39b);}}}return this[_0x42b446(0x1c6)](_0x2b6b46);}[_0x16114c(0x1ac)](_0xc647af){const _0x25f4b0=_0x16114c;this[_0x25f4b0(0x1f4)][_0x25f4b0(0x1b9)](_0xc647af);}[_0x16114c(0x1df)](_0x234cad,_0x2542b4,_0x171252=_0x4d126a[_0x16114c(0x1da)]){const _0x1ca246=_0x16114c;_0x1ca246(0x1c8)==typeof _0x234cad?_0x8c3440(this[_0x1ca246(0x1e4)],{'matchingCallback':_0x234cad,'label':_0x2542b4,'priority':_0x171252}):this[_0x1ca246(0x1c1)][_0x1ca246(0x1b0)](_0x234cad,_0x2542b4);}[_0x16114c(0x1c5)](_0x4090d0,_0x4b6326){const _0x2bcc59=_0x16114c;this[_0x2bcc59(0x1ed)][_0x2bcc59(0x1b0)](_0x4090d0,_0x4b6326);}[_0x16114c(0x1c3)](_0xd7c248,_0x2fc6c0=0x1){const _0x30ff14=_0x16114c;let _0x2748d7;for(const _0xfbe173 of this[_0x30ff14(0x1e4)])if(_0xfbe173[_0x30ff14(0x1fe)](_0xd7c248)){_0x2748d7=_0xfbe173[_0x30ff14(0x1f6)];break;}return _0x2748d7||(_0x2748d7=this[_0x30ff14(0x1c1)][_0x30ff14(0x203)](_0xd7c248[_0x30ff14(0x1f5)])),_0x2748d7?_0x2748d7(_0x2fc6c0):0x1!==_0x2fc6c0?_0x2fc6c0+'\x20'+_0xd7c248[_0x30ff14(0x1f5)]+'s':''+_0xd7c248[_0x30ff14(0x1f5)];}[_0x16114c(0x1ea)](_0x169c1b,_0x479922){const _0x1d9a80=_0x16114c,_0x5318af=_0x479922[_0x1d9a80(0x1e2)]()[_0x1d9a80(0x1fd)](),_0x3a8f36=_0x1d9a80(0x1d4)==_0x479922[_0x1d9a80(0x202)]?_0x1d9a80(0x1dc):_0x1d9a80(0x1c9);for(const _0x11164a of _0x5318af){const _0x15d482=_0x11164a[_0x1d9a80(0x1d7)],_0x5a2a7f=_0x169c1b[_0x169c1b[_0x1d9a80(0x204)]-0x1];if(_0x15d482['is'](_0x1d9a80(0x205)))_0x5a2a7f&&_0x5a2a7f[_0x1d9a80(0x202)][_0x1d9a80(0x1c7)](_0x1d9a80(0x1d5))>-0x1&&_0x169c1b[_0x1d9a80(0x1f2)](),_0x5a2a7f&&_0x1d9a80(0x1e9)==_0x5a2a7f[_0x1d9a80(0x202)]?_0x5a2a7f[_0x3a8f36]+=_0x15d482[_0x1d9a80(0x1ca)]:_0x169c1b[_0x1d9a80(0x1b9)]({'type':_0x1d9a80(0x1e9),'add':_0x1d9a80(0x1dc)==_0x3a8f36?_0x15d482[_0x1d9a80(0x1ca)]:'','remove':_0x1d9a80(0x1c9)==_0x3a8f36?_0x15d482[_0x1d9a80(0x1ca)]:''});else{if(this[_0x1d9a80(0x1eb)][_0x1d9a80(0x1f7)](_0x15d482)){const _0x22126e=_0x15d482;if(_0x5a2a7f&&_0x5a2a7f[_0x1d9a80(0x202)][_0x1d9a80(0x1c7)](_0x1d9a80(0x1d5))>-0x1&&_0x169c1b[_0x1d9a80(0x1f2)](),_0x1d9a80(0x1ff)==_0x11164a[_0x1d9a80(0x202)])continue;_0x5a2a7f&&_0x5a2a7f[_0x1d9a80(0x202)]==_0x3a8f36+_0x1d9a80(0x1bd)&&_0x5a2a7f[_0x1d9a80(0x1de)][_0x1d9a80(0x1f5)]==_0x22126e[_0x1d9a80(0x1f5)]?_0x5a2a7f[_0x1d9a80(0x1cf)]++:_0x169c1b[_0x1d9a80(0x1b9)]({'type':_0x3a8f36+_0x1d9a80(0x1bd),'element':_0x22126e,'quantity':0x1}),_0x5318af[_0x1d9a80(0x1e5)](_0xe885bd=>!(_0x1d9a80(0x1ff)==_0xe885bd[_0x1d9a80(0x202)]&&_0xe885bd[_0x1d9a80(0x1d7)]==_0x15d482));}else{if(this[_0x1d9a80(0x1eb)][_0x1d9a80(0x1d8)](_0x15d482,_0x1d9a80(0x207))||_0x15d482['is'](_0x1d9a80(0x1de),_0x1d9a80(0x209))){const _0x3e6f87=_0x15d482;if(_0x1d9a80(0x1dc)==_0x3a8f36&&_0x1d9a80(0x1ad)==_0x11164a[_0x1d9a80(0x202)]||_0x1d9a80(0x1c9)==_0x3a8f36&&_0x1d9a80(0x1ff)==_0x11164a[_0x1d9a80(0x202)])continue;if(_0x5a2a7f&&-0x1==_0x5a2a7f[_0x1d9a80(0x202)][_0x1d9a80(0x1c7)](_0x1d9a80(0x1d5))){_0x1d9a80(0x1e9)==_0x5a2a7f[_0x1d9a80(0x202)]&&(_0x5a2a7f[_0x3a8f36]+='\x0a');continue;}let _0x31176a;if(_0x31176a=_0x1d9a80(0x1dc)==_0x3a8f36?_0x3e6f87[_0x1d9a80(0x1bf)]&&!this[_0x1d9a80(0x1eb)][_0x1d9a80(0x1f7)](_0x3e6f87[_0x1d9a80(0x1bf)])?_0x3e6f87[_0x1d9a80(0x1bf)]:null:_0x3e6f87[_0x1d9a80(0x1e1)]&&!this[_0x1d9a80(0x1eb)][_0x1d9a80(0x1f7)](_0x3e6f87[_0x1d9a80(0x1e1)])?_0x3e6f87[_0x1d9a80(0x1e1)]:null,_0x3e6f87[_0x1d9a80(0x1b1)]||_0x31176a&&_0x31176a[_0x1d9a80(0x1b1)]){const _0x5cbda5=_0x31176a&&_0x31176a[_0x1d9a80(0x1b1)]?_0x31176a:_0x3e6f87;_0x5a2a7f&&_0x5a2a7f[_0x1d9a80(0x202)]==_0x3a8f36+_0x1d9a80(0x1b7)&&_0x5a2a7f[_0x1d9a80(0x1de)][_0x1d9a80(0x1f5)]==_0x5cbda5[_0x1d9a80(0x1f5)]?_0x5a2a7f[_0x1d9a80(0x1cf)]++:_0x169c1b[_0x1d9a80(0x1b9)]({'type':_0x3a8f36+_0x1d9a80(0x1b7),'element':_0x5cbda5,'quantity':0x1});}else _0x169c1b[_0x1d9a80(0x1b9)]({'type':_0x3a8f36+_0x1d9a80(0x1d5),'element':_0x3e6f87});}}}}}[_0x16114c(0x1c6)](_0x4174d9){const _0x2aef1f=_0x16114c,_0x5e86cd=this[_0x2aef1f(0x1ae)],_0x1d51da=[],_0x59f886=[],_0xd81acc=[];for(const _0x8c469d of _0x4174d9)switch(_0x8c469d[_0x2aef1f(0x202)]){case _0x2aef1f(0x1e9):if(_0x8c469d[_0x2aef1f(0x1dc)]=_0x8c469d[_0x2aef1f(0x1dc)][_0x2aef1f(0x1e8)](/(\S)\u000A+(\S)/g,_0x2aef1f(0x1ef))[_0x2aef1f(0x1e8)](/\u000A/g,''),_0x8c469d[_0x2aef1f(0x1c9)]=_0x8c469d[_0x2aef1f(0x1c9)][_0x2aef1f(0x1e8)](/(\S)\u000A+(\S)/g,_0x2aef1f(0x1ef))[_0x2aef1f(0x1e8)](/\u000A/g,''),''!=_0x8c469d[_0x2aef1f(0x1dc)]&&''!=_0x8c469d[_0x2aef1f(0x1c9)]){_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1e8),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1ab),['\x22'+_0x8c469d[_0x2aef1f(0x1c9)]+'\x22','\x22'+_0x8c469d[_0x2aef1f(0x1dc)]+'\x22'])});continue;}if(null!=_0x8c469d[_0x2aef1f(0x1dc)][_0x2aef1f(0x1f8)](/^ +$/)){_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d4),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1e0),_0x2f378c(_0x5e86cd,_0x2aef1f(0x201),_0x8c469d[_0x2aef1f(0x1dc)][_0x2aef1f(0x204)]))});continue;}if(null!=_0x8c469d[_0x2aef1f(0x1c9)][_0x2aef1f(0x1f8)](/^ +$/)){_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1af),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1cd),_0x2f378c(_0x5e86cd,_0x2aef1f(0x201),_0x8c469d[_0x2aef1f(0x1c9)][_0x2aef1f(0x204)]))});continue;}if(''!=_0x8c469d[_0x2aef1f(0x1dc)]){_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d4),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1e0),'\x22'+_0x8c469d[_0x2aef1f(0x1dc)]+'\x22')});continue;}_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1af),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1cd),'\x22'+_0x8c469d[_0x2aef1f(0x1c9)]+'\x22')});continue;case _0x2aef1f(0x1d1):case _0x2aef1f(0x1c2):_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d4),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1e0),this[_0x2aef1f(0x1c3)](_0x8c469d[_0x2aef1f(0x1de)],_0x8c469d[_0x2aef1f(0x1cf)]))});continue;case _0x2aef1f(0x1d2):case _0x2aef1f(0x1d0):_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1af),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1cd),this[_0x2aef1f(0x1c3)](_0x8c469d[_0x2aef1f(0x1de)],_0x8c469d[_0x2aef1f(0x1cf)]))});continue;case _0x2aef1f(0x1b8):_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d4),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x20a),this[_0x2aef1f(0x1c3)](_0x8c469d[_0x2aef1f(0x1de)],_0x8c469d[_0x2aef1f(0x1cf)]))});continue;case _0x2aef1f(0x1db):_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1af),'content':_0x2f378c(_0x5e86cd,_0x2aef1f(0x1fa),this[_0x2aef1f(0x1c3)](_0x8c469d[_0x2aef1f(0x1de)],_0x8c469d[_0x2aef1f(0x1cf)]))});continue;case _0x2aef1f(0x1f0):_0x59f886[_0x2aef1f(0x1b9)](_0x8c469d[_0x2aef1f(0x206)]);continue;case _0x2aef1f(0x20b):_0xd81acc[_0x2aef1f(0x1b9)](_0x8c469d[_0x2aef1f(0x206)]);continue;default:_0x1d51da[_0x2aef1f(0x1b9)](_0x8c469d);}if(_0x59f886[_0x2aef1f(0x204)]){const _0x30bee9=_0x59f886[_0x2aef1f(0x1ce)](_0x278eb9=>this[_0x2aef1f(0x1ed)][_0x2aef1f(0x1b4)](_0x278eb9)?this[_0x2aef1f(0x1ed)][_0x2aef1f(0x203)](_0x278eb9):_0x278eb9)[_0x2aef1f(0x1e7)](',\x20');_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d3),'content':_0x2f378c(this[_0x2aef1f(0x1ae)],_0x2aef1f(0x1bb),_0x30bee9)});}if(_0xd81acc[_0x2aef1f(0x204)]){const _0x30c936=_0xd81acc[_0x2aef1f(0x1ce)](_0xd916eb=>this[_0x2aef1f(0x1ed)][_0x2aef1f(0x1b4)](_0xd916eb)?this[_0x2aef1f(0x1ed)][_0x2aef1f(0x203)](_0xd916eb):_0xd916eb)[_0x2aef1f(0x1e7)](',\x20');_0x1d51da[_0x2aef1f(0x1b9)]({'type':_0x2aef1f(0x1d3),'content':_0x2f378c(this[_0x2aef1f(0x1ae)],_0x2aef1f(0x1fc),_0x30c936)});}return _0x1d51da;}[_0x16114c(0x1be)](_0x5958d0){const _0x43e0cf=_0x16114c;for(const _0x302221 of this[_0x43e0cf(0x1f4)]){const _0x316b70=_0x302221(_0x5958d0);if(_0x316b70&&_0x43e0cf(0x202)in _0x316b70)return _0x316b70;}}[_0x16114c(0x20c)](_0x2a9b4c,_0x2b5e37){const _0x495fe4=_0x16114c,_0x2cfcef=_0x2b5e37[_0x495fe4(0x1ca)],_0x26f24c=void 0x0===_0x2cfcef[_0x495fe4(0x20d)]?_0x495fe4(0x20b):_0x495fe4(0x1f0);_0x2a9b4c[_0x495fe4(0x1b9)]({'type':_0x26f24c,'key':_0x2cfcef[_0x495fe4(0x206)]});}[_0x16114c(0x1dd)](_0x4d130e,_0x20b0de){const _0x1f468f=_0x16114c;_0x4d130e[_0x1f468f(0x1b9)]({'type':_0x1f468f(0x1d3),'content':_0x2f378c(this[_0x1f468f(0x1ae)],_0x1f468f(0x1f1),this[_0x1f468f(0x1c3)](_0x20b0de[_0x1f468f(0x1e2)]()[_0x1f468f(0x1f9)][_0x1f468f(0x1b5)],0x1))});}[_0x16114c(0x200)](_0x28969c,_0xb67faa,_0x59343e){const _0x3e7ce4=_0x16114c;if(this[_0x3e7ce4(0x1ea)](_0x28969c,_0xb67faa),_0x59343e&&_0x59343e[_0x3e7ce4(0x1e2)]()&&!_0xb67faa[_0x3e7ce4(0x1e2)]()[_0x3e7ce4(0x1cc)][_0x3e7ce4(0x1c0)](_0x59343e[_0x3e7ce4(0x1e2)]()[_0x3e7ce4(0x1f9)])){const _0x4b7e4b=_0x28969c[_0x28969c[_0x3e7ce4(0x204)]-0x1],_0x19e01c=_0x3e7ce4(0x1d4)==_0xb67faa[_0x3e7ce4(0x202)]?_0x3e7ce4(0x1dc):_0x3e7ce4(0x1c9);_0x4b7e4b&&_0x3e7ce4(0x1e9)==_0x4b7e4b[_0x3e7ce4(0x202)]&&(_0x4b7e4b[_0x19e01c]+='\x0a');}}}function _0x1790(_0x1b2838,_0x1f2184){const _0x1bacf6=_0x1bac();return _0x1790=function(_0x1790b6,_0x2c7977){_0x1790b6=_0x1790b6-0x1ab;let _0x5e087c=_0x1bacf6[_0x1790b6];return _0x5e087c;},_0x1790(_0x1b2838,_0x1f2184);}function _0x1bac(){const _0x359767=['25076qpQqQV','registerAttributeLabel','_resolveDescriptionItems','indexOf','function','remove','data','4812252XctBPC','end','*Remove:*\x20%0','map','quantity','removeObject','addEmptyContainer','removeEmptyContainer','format','insertion','Container','attribute','item','checkChild','getDescriptions','normal','removeContainer','add','_handleRenameSuggestionDescription','element','registerElementLabel','*Insert:*\x20%0','previousSibling','getFirstRange','4146620bWYmGl','_itemLabelsCallbacks','skip','134281EGbQIn','join','replace','text','_addDescriptionItems','_schema','14344608MbhoDi','_attributeLabels','11bVEITb','$1\x20$2','addFormat','*Change\x20to:*\x20%0','pop','72740zrCzVQ','_customCallbacks','name','label','isObject','match','start','*Merge:*\x20%0','549pRzNbB','*Remove\x20format:*\x20%0','getWalker','matchingCallback','elementEnd','_handleInsertRemoveSuggestionDescription','ELEMENT_SPACE','type','get','length','$textProxy','key','$text','39euRxhn','softBreak','*Split:*\x20%0','removeFormat','_handleAttributeSuggestionDescription','newValue','REPLACE_TEXT','registerDescriptionCallback','elementStart','_locale','deletion','set','isEmpty','subType','4xYWYSG','has','nodeAfter','24OrlBRX','EmptyContainer','addContainer','push','isInContent','*Set\x20format:*\x20%0','57622bFRhua','Object','_handleCustomCallbackDescription','nextSibling','isEqual','_itemLabels','addObject','getItemLabel'];_0x1bac=function(){return _0x359767;};return _0x1bac();}
@@ -0,0 +1,188 @@
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
+ * @module track-changes/trackchanges
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import TrackChangesUI from './trackchangesui.js';
11
+ import TrackChangesEditing from './trackchangesediting.js';
12
+ import 'ckeditor5-collaboration/src/collaboration-core.js';
13
+ import type { default as Suggestion, SuggestionJSON } from './suggestion.js';
14
+ /**
15
+ * A plugin that provides track changes mode for the editor. In track changes mode, all insertions are visually marked and all deletions
16
+ * are not deleted but also visually marked. Unsupported commands are disabled when the editor is in the track changes mode.
17
+ *
18
+ * To learn how to integrate the track changes feature with your editor, refer to the
19
+ * {@glink features/collaboration/track-changes/track-changes-integration Track changes integration} guide.
20
+ *
21
+ * Basic API:
22
+ *
23
+ * ```ts
24
+ * // Get the track changes plugin:
25
+ * const trackChangesPlugin = editor.plugins.get( 'TrackChanges' );
26
+ *
27
+ * // Add a suggestion:
28
+ * trackChangesPlugin.addSuggestion( suggestionData );
29
+ *
30
+ * // Get all suggestions:
31
+ * trackChangesPlugin.getSuggestions();
32
+ *
33
+ * // Set the adapter:
34
+ * trackChangesPlugin.adapter = {
35
+ * // ...
36
+ * }
37
+ * ```
38
+ *
39
+ * The plugin registers several commands:
40
+ *
41
+ * * `trackChanges` &ndash; Toggles the track changes mode in the editor.
42
+ * * `acceptSuggestion` &ndash; Accepts a suggestion with the specified ID.
43
+ * * `discardSuggestion` &ndash; Discards a suggestion with the specified ID.
44
+ * * `acceptAllSuggestions` &ndash; Accepts all suggestions.
45
+ * * `discardAllSuggestions` &ndash; Discards all suggestions.
46
+ * * `acceptSelectedSuggestions` &ndash; Accepts all suggestions in the current selection.
47
+ * * `discardSelectedSuggestions` &ndash; Discards all suggestions in the current selection.
48
+ *
49
+ * Examples:
50
+ *
51
+ * ```ts
52
+ * editor.execute( 'trackChanges' );
53
+ * editor.execute( 'acceptSuggestion', 'suggestion-1' );
54
+ * editor.execute( 'discardSuggestion', 'suggestion-1' );
55
+ * editor.execute( 'acceptAllSuggestions' );
56
+ * editor.execute( 'discardAllSuggestions' );
57
+ * editor.execute( 'acceptSelectedSuggestions' );
58
+ * editor.execute( 'discardSelectedSuggestions' )
59
+ * ```
60
+ *
61
+ * Note that there is no command to add a suggestion. This is because suggestions
62
+ * are added automatically when editing commands are executed while the editor is in track
63
+ * changes mode. For instance:
64
+ *
65
+ * ```ts
66
+ * // Turn on the track changes mode:
67
+ * editor.execute( 'trackChanges' );
68
+ *
69
+ * // Insert some text. It will be automatically inserted as a suggestion:
70
+ * editor.execute( 'input', { text: 'foo' } );
71
+ * ```
72
+ */
73
+ export default class TrackChanges extends Plugin {
74
+ static get requires(): readonly [typeof TrackChangesEditing, typeof TrackChangesUI, "Comments"];
75
+ static get pluginName(): "TrackChanges";
76
+ /**
77
+ * @inheritDoc
78
+ */
79
+ static get isOfficialPlugin(): true;
80
+ /**
81
+ * @inheritDoc
82
+ */
83
+ static get isPremiumPlugin(): true;
84
+ /**
85
+ * An adapter object that should communicate with the data source to fetch or save the suggestion data.
86
+ *
87
+ * This is a shorthand to {@link module:track-changes/trackchangesediting~TrackChangesEditing#adapter `TrackChangesEditing#adapter`}.
88
+ */
89
+ set adapter(adapter: TrackChangesAdapter | null);
90
+ get adapter(): TrackChangesAdapter | null;
91
+ /**
92
+ * Adds suggestion data.
93
+ *
94
+ * Use this method to load the suggestion data during the editor initialization if you do not use the adapter integration.
95
+ */
96
+ addSuggestion(suggestionData: SuggestionData): Suggestion;
97
+ getSuggestions(options: {
98
+ skipNotAttached?: boolean;
99
+ toJSON: true;
100
+ }): Array<SuggestionJSON>;
101
+ getSuggestions(options?: {
102
+ skipNotAttached?: boolean;
103
+ toJSON?: false;
104
+ }): Array<Suggestion>;
105
+ getSuggestions(options: {
106
+ skipNotAttached?: boolean;
107
+ toJSON: boolean;
108
+ }): Array<Suggestion> | Array<SuggestionJSON>;
109
+ /**
110
+ * Returns the suggestion instance for a given ID.
111
+ */
112
+ getSuggestion(id: string): Suggestion;
113
+ }
114
+ /**
115
+ * Track changes adapter.
116
+ *
117
+ * The track changes adapter is an object that communicates asynchronously with the data source to fetch or save the suggestion data.
118
+ * It is used internally by the track changes feature whenever a suggestion is loaded, created or deleted.
119
+ *
120
+ * The adapter is optional. You might need to provide it if you are {@glink features/collaboration/track-changes/track-changes-integration}
121
+ * using the track changes feature without real-time collaboration.
122
+ *
123
+ * To set the adapter, overwrite {@link module:track-changes/trackchanges~TrackChanges#adapter the `TrackChanges#adapter` property}.
124
+ */
125
+ export interface TrackChangesAdapter {
126
+ /**
127
+ * Called each time the suggestion data is needed.
128
+ *
129
+ * The method should return a promise that resolves with the suggestion data object.
130
+ *
131
+ * @param id The ID of the suggestion to get.
132
+ */
133
+ getSuggestion(id: string): Promise<SuggestionData>;
134
+ /**
135
+ * Called each time a new suggestion is created.
136
+ *
137
+ * The method should save the suggestion data in the database
138
+ * and return a promise that should be resolved when the save is
139
+ * completed.
140
+ *
141
+ * If the promise resolves with an object with the `createdAt` property,
142
+ * this suggestion property will be updated in the suggestion in the editor.
143
+ * This lets you update the suggestion data with server-side information.
144
+ *
145
+ * The `suggestionData` object does not expect the `authorId` property.
146
+ * For security reasons, the author of the suggestion should be set
147
+ * on the server side.
148
+ *
149
+ * If `suggestionData.originalSuggestionId` is set, the new suggestion should
150
+ * have the `authorId` property set to the same as the suggestion with
151
+ * `originalSuggestionId`. This happens when one user splits
152
+ * another user's suggestion, creating a new suggestion as a result. See
153
+ * {@glink features/collaboration/track-changes/track-changes-integration#implementation Track changes integration} guide.
154
+ *
155
+ * **Note:** Failure to properly handle this property will result in editor crash in some scenarios.
156
+ *
157
+ * In any other case, use the current (local) user to set `authorId`.
158
+ *
159
+ * The `suggestionData` object does not expect the `createdAt` property either.
160
+ * You should use the server-side time generator to ensure that all users
161
+ * see the same date.
162
+ *
163
+ * It is recommended to stringify `suggestionData.attributes` value to JSON and save it as a string in your database,
164
+ * and then to parse the strings when loading suggestions.
165
+ */
166
+ addSuggestion(suggestionData: AddSuggestionInput): Promise<SuggestionData>;
167
+ /**
168
+ * Called each time the suggestion properties change.
169
+ *
170
+ * The method should update the suggestion properties in the database
171
+ * and return a promise that should be resolved when the save is
172
+ * completed.
173
+ *
174
+ * Keep in mind that the `data` parameter only contains those
175
+ * properties of a suggestion which changed.
176
+ */
177
+ updateSuggestion(id: string, suggestionData: UpdateSuggestionInput): Promise<void>;
178
+ }
179
+ export interface SuggestionData extends SuggestionJSON {
180
+ /**
181
+ * Original suggestion ID from which the current one was split.
182
+ */
183
+ originalSuggestionId?: string | null;
184
+ }
185
+ export type AddSuggestionInput = Omit<SuggestionData, 'authorId' | 'createdAt'>;
186
+ export type UpdateSuggestionInput = Partial<Pick<SuggestionJSON, 'hasComments' | 'attributes'>> & {
187
+ state?: 'open' | 'accepted' | 'rejected';
188
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x3f85(){var _0x31cd46=['adapter','editor','pluginName','isPremiumPlugin','isOfficialPlugin','get','Comments','1222044bXaaPI','916429wkAwYx','4MZTdWK','4291686RpxGKI','addSuggestionData','plugins','6193776OJtiDJ','getSuggestions','4373885oJsnEp','TrackChanges','requires','1149tNCnmj','2074LZJtdO','addSuggestion','getSuggestion','3154653lqmiVl'];_0x3f85=function(){return _0x31cd46;};return _0x3f85();}var _0x3f2e18=_0x4400;(function(_0x5a077,_0x20d801){var _0x29351c=_0x4400,_0x1511da=_0x5a077();while(!![]){try{var _0x3f46be=-parseInt(_0x29351c(0xc5))/0x1+parseInt(_0x29351c(0xd0))/0x2*(parseInt(_0x29351c(0xcf))/0x3)+-parseInt(_0x29351c(0xc6))/0x4*(-parseInt(_0x29351c(0xcc))/0x5)+parseInt(_0x29351c(0xc4))/0x6+parseInt(_0x29351c(0xc7))/0x7+-parseInt(_0x29351c(0xca))/0x8+parseInt(_0x29351c(0xbc))/0x9;if(_0x3f46be===_0x20d801)break;else _0x1511da['push'](_0x1511da['shift']());}catch(_0x1729e2){_0x1511da['push'](_0x1511da['shift']());}}}(_0x3f85,0xb6c2a));import{Plugin as _0x40d5d8}from'ckeditor5/src/core.js';import _0x44a629 from'./trackchangesui.js';import _0x28e1ab from'./trackchangesediting.js';import'ckeditor5-collaboration/src/collaboration-core.js';function _0x4400(_0x2ec30a,_0x360e19){var _0x3f856d=_0x3f85();return _0x4400=function(_0x4400c0,_0xf8cd97){_0x4400c0=_0x4400c0-0xba;var _0xdad3b8=_0x3f856d[_0x4400c0];return _0xdad3b8;},_0x4400(_0x2ec30a,_0x360e19);}export default class k extends _0x40d5d8{static get[_0x3f2e18(0xce)](){var _0x29c549=_0x3f2e18;return[_0x28e1ab,_0x44a629,_0x29c549(0xc3)];}static get[_0x3f2e18(0xbf)](){var _0x2dc9f1=_0x3f2e18;return _0x2dc9f1(0xcd);}static get[_0x3f2e18(0xc1)](){return!0x0;}static get[_0x3f2e18(0xc0)](){return!0x0;}set[_0x3f2e18(0xbd)](_0x49e9aa){var _0x33d426=_0x3f2e18;this[_0x33d426(0xbe)][_0x33d426(0xc9)][_0x33d426(0xc2)](_0x28e1ab)[_0x33d426(0xbd)]=_0x49e9aa;}get[_0x3f2e18(0xbd)](){var _0x482321=_0x3f2e18;return this[_0x482321(0xbe)][_0x482321(0xc9)][_0x482321(0xc2)](_0x28e1ab)[_0x482321(0xbd)];}[_0x3f2e18(0xba)](_0x3185a4){var _0x17ec92=_0x3f2e18;return this[_0x17ec92(0xbe)][_0x17ec92(0xc9)][_0x17ec92(0xc2)](_0x28e1ab)[_0x17ec92(0xc8)](_0x3185a4);}[_0x3f2e18(0xcb)]({skipNotAttached:_0x587a23=!0x1,toJSON:_0x361743=!0x1}={}){var _0x52139c=_0x3f2e18;return this[_0x52139c(0xbe)][_0x52139c(0xc9)][_0x52139c(0xc2)](_0x28e1ab)[_0x52139c(0xcb)]({'skipNotAttached':_0x587a23,'toJSON':_0x361743});}[_0x3f2e18(0xbb)](_0x3e752b){var _0x2685ce=_0x3f2e18;return this[_0x2685ce(0xbe)][_0x2685ce(0xc9)][_0x2685ce(0xc2)](_0x28e1ab)[_0x2685ce(0xbb)](_0x3e752b);}}
@@ -0,0 +1,85 @@
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
+ * @module track-changes/trackchangesconfig
7
+ * @publicApi
8
+ */
9
+ import type SuggestionThreadView from './ui/view/suggestionthreadview.js';
10
+ import type SuggestionView from './ui/view/suggestionview.js';
11
+ /**
12
+ * The configuration of the track changes feature.
13
+ *
14
+ * Example:
15
+ *
16
+ * ```ts
17
+ * ClassicEditor
18
+ * .create( {
19
+ * // Track changes feature configuration.
20
+ * trackChanges: {
21
+ * // Do not allow users to comment suggestions (default is `false`).
22
+ * disableComments: true,
23
+ * // Do not track styling and formatting changes (default is `default`).
24
+ * trackFormatChanges: 'never',
25
+ * // Merges suggestion changes inside a block. (default is `true`).
26
+ * mergeNestedSuggestions: true
27
+ * }
28
+ * } )
29
+ * .then( ... )
30
+ * .catch( ... );
31
+ * ```
32
+ *
33
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
34
+ */
35
+ export interface TrackChangesConfig {
36
+ /**
37
+ * A property that specifies if the comments for suggestions are enabled or disabled.
38
+ * When the option is set to `true`, the comment thread UI for suggestions will be hidden
39
+ * and commenting suggestions will be disabled.
40
+ *
41
+ * Suggestion thread views will be marked with the additional `ck-suggestion--disabled-comments` class when the suggestion comments
42
+ * are disabled.
43
+ */
44
+ disableComments: boolean;
45
+ /**
46
+ * A property that specifies whether formatting changes should be tracked.
47
+ *
48
+ * Formatting changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
49
+ *
50
+ * By default, formatting changes are tracked. However, if you make a formatting change inside your own insertion suggestion, it
51
+ * is immediately applied, without creating a suggestion.
52
+ *
53
+ * Possible values are:
54
+ *
55
+ * * `'default'` - format changes are tracked, but when made inside your own insertion suggestion, they will be immediately applied.
56
+ * * `'always'` - format changes will always be tracked, even inside your own insertion suggestion.
57
+ * * `'never'` - format changes will never be tracked (suggestions for such changes will not be created).
58
+ *
59
+ * Defaults to `'default'`.
60
+ */
61
+ trackFormatChanges: 'never' | 'default' | 'always';
62
+ /**
63
+ * Specifies whether suggestions on an object (e.g. image, table) should be automatically merged
64
+ * with suggestions inside the object (e.g. image caption, table cell).
65
+ *
66
+ * For example, when set to `true`, creating a table and writing some text inside the table will result in one suggestion.
67
+ * When set to `false`, it will be two separate suggestions, one for the inserted table and one for the inserted text.
68
+ *
69
+ * Keep in mind that only suggestions from the same author and of the same type are merged this way.
70
+ */
71
+ mergeNestedSuggestions: boolean;
72
+ /**
73
+ * A view class to be used to create suggestion thread views.
74
+ *
75
+ * {@link module:track-changes/ui/view/suggestionthreadview~SuggestionThreadView} is used by default
76
+ * when this property is not set.
77
+ */
78
+ SuggestionThreadView?: typeof SuggestionThreadView;
79
+ /**
80
+ * A view class to be used to create the suggestion view.
81
+ *
82
+ * {@link module:track-changes/ui/view/suggestionview~SuggestionView} is used by default when this property is not set.
83
+ */
84
+ SuggestionView?: typeof SuggestionView;
85
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};
@@ -0,0 +1,49 @@
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
+ * @module track-changes/trackchangesdata
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import TrackChangesEditing from './trackchangesediting.js';
11
+ /**
12
+ * This plugin returns the editor data with accepted or discarded suggestions without modifying the editor content.
13
+ */
14
+ export default class TrackChangesData extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get requires(): readonly [typeof TrackChangesEditing];
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "TrackChangesData";
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
+ /**
36
+ * Returns the editor data with all the suggestions accepted.
37
+ *
38
+ * @param options Options for {@link module:engine/controller/datacontroller~DataController#get}.
39
+ * @returns A promise which resolves with the output data.
40
+ */
41
+ getDataWithAcceptedSuggestions(options: Record<string, unknown>): Promise<string | Record<string, string>>;
42
+ /**
43
+ * Returns the editor data with all the suggestions discarded.
44
+ *
45
+ * @param options Options for {@link module:engine/controller/datacontroller~DataController#get}.
46
+ * @returns A promise which resolves with the output data.
47
+ */
48
+ getDataWithDiscardedSuggestions(options: Record<string, unknown>): Promise<string | Record<string, string>>;
49
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x54e1bc=_0x1de3;(function(_0x461402,_0x2e97a3){const _0x51c646=_0x1de3,_0x4967a4=_0x461402();while(!![]){try{const _0x424baa=-parseInt(_0x51c646(0xf9))/0x1*(-parseInt(_0x51c646(0xc5))/0x2)+parseInt(_0x51c646(0xfd))/0x3+parseInt(_0x51c646(0xed))/0x4+-parseInt(_0x51c646(0xe1))/0x5*(parseInt(_0x51c646(0xe6))/0x6)+-parseInt(_0x51c646(0x104))/0x7+parseInt(_0x51c646(0xf5))/0x8+parseInt(_0x51c646(0xc9))/0x9;if(_0x424baa===_0x2e97a3)break;else _0x4967a4['push'](_0x4967a4['shift']());}catch(_0x26e5a6){_0x4967a4['push'](_0x4967a4['shift']());}}}(_0x5b27,0xc531b));import{Plugin as _0xdec8c3}from'ckeditor5/src/core.js';import{CKEditorError as _0x399384}from'ckeditor5/src/utils.js';import _0x5832cc from'./trackchangesediting.js';function _0x1de3(_0x37d6cf,_0x241fd5){const _0x5b278e=_0x5b27();return _0x1de3=function(_0x1de379,_0x382a60){_0x1de379=_0x1de379-0xc1;let _0x14e45c=_0x5b278e[_0x1de379];return _0x14e45c;},_0x1de3(_0x37d6cf,_0x241fd5);}import{sanitizeEditorConfig as _0xaa7f88}from'ckeditor5-collaboration/src/collaboration-core.js';const w=[_0x54e1bc(0xe4)];export default class T extends _0xdec8c3{static get[_0x54e1bc(0xcd)](){return[_0x5832cc];}static get[_0x54e1bc(0xf3)](){const _0x1b4563=_0x54e1bc;return _0x1b4563(0xe5);}static get[_0x54e1bc(0xec)](){return!0x0;}static get[_0x54e1bc(0xf4)](){return!0x0;}[_0x54e1bc(0xeb)](){const _0x2d4e79=_0x54e1bc,_0x437a53=this[_0x2d4e79(0xdb)];if(_0x437a53[_0x2d4e79(0xdd)][_0x2d4e79(0xd1)](_0x2d4e79(0xc3),_0x455d25=>{const _0x280de3=_0x2d4e79,_0x4126fc=_0x437a53[_0x280de3(0xdc)][_0x280de3(0xf7)][_0x280de3(0xe8)]()[_0x280de3(0xf0)]((_0x14a770,_0x188e4b)=>(_0x14a770[_0x188e4b]='',_0x14a770),{});return _0x437a53[_0x280de3(0xd9)][_0x280de3(0xfe)](_0x4126fc,_0x455d25);}),_0x2d4e79(0xe9)!=typeof _0x437a53[_0x2d4e79(0xdd)][_0x2d4e79(0xf2)](_0x2d4e79(0xf8))[_0x2d4e79(0xc6)])throw new _0x399384(_0x2d4e79(0xfb));}[_0x54e1bc(0xdf)](_0x5773fb){const _0x2e182b=_0x54e1bc;return N(this[_0x2e182b(0xdb)],!0x0,_0x5773fb);}[_0x54e1bc(0xca)](_0x3c8447){const _0x549a86=_0x54e1bc;return N(this[_0x549a86(0xdb)],!0x1,_0x3c8447);}}class D extends _0xdec8c3{static get[_0x54e1bc(0xf3)](){const _0xae680c=_0x54e1bc;return _0xae680c(0xfa);}static get[_0x54e1bc(0xec)](){return!0x0;}static get[_0x54e1bc(0xf4)](){return!0x0;}constructor(_0x538768){const _0x1aac56=_0x54e1bc;function _0x3ac16b(_0x55daf9){const _0x47c0fc=_0x1de3;return _0x55daf9[_0x47c0fc(0xd4)](_0x9b29da=>String[_0x47c0fc(0xd7)](_0x9b29da))[_0x47c0fc(0xc8)]('');}super(_0x538768),this[_0x1aac56(0xd6)]=_0x1aac56(0xea),_0x538768[_0x3ac16b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3ac16b([0x76,0x69,0x65,0x77])][_0x3ac16b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3ac16b([0x61,0x75,0x74,0x6f]),_0x538768[_0x3ac16b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3ac16b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3ac16b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3ac16b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3ac16b([0x6f,0x6b])});}[_0x54e1bc(0xeb)](){const _0x3c3b62=_0x54e1bc;this[_0x3c3b62(0xdb)][_0x3c3b62(0xd0)][_0x3c3b62(0xf2)](_0x3c3b62(0x100))[_0x3c3b62(0xe2)]={'addCommentThread':()=>new Promise(()=>{}),'getCommentThread':()=>new Promise(()=>{}),'updateCommentThread':()=>new Promise(()=>{}),'resolveCommentThread':()=>new Promise(()=>{}),'reopenCommentThread':()=>new Promise(()=>{}),'removeCommentThread':()=>new Promise(()=>{}),'addComment':()=>new Promise(()=>{}),'updateComment':()=>new Promise(()=>{}),'removeComment':()=>new Promise(()=>{})},this[_0x3c3b62(0xdb)][_0x3c3b62(0xd0)][_0x3c3b62(0xf2)](_0x3c3b62(0xf6))[_0x3c3b62(0xe2)]=null;}}function v(_0x429b1e){const _0x1e31ef=_0x54e1bc;return void 0x0!==_0x429b1e[_0x1e31ef(0xc1)];}function _0x5b27(){const _0x48586f=['addCommentThread','getDataWithAcceptedSuggestions','useAnonymousUser','5890565JKIljW','_adapter','remove','Pagination','TrackChangesData','6Euqhrw','getCommentThreads','getRootNames','function','end','init','isOfficialPlugin','2969560pRnaHl','div','execute','reduce','users','get','pluginName','isPremiumPlugin','435848aYUDIb','TrackChangesEditing','document','trackChangesData','469562GGNEZX','TrackChangesDataGetter','track-changes-data-invalid-editor-creator','rootsAttributes','251844fXOBaL','create','name','CommentsRepository','data','createElement','discardAllSuggestions','1663025RpOhUq','getRootsAttributes','push','trackChangesData.editorCreator','getSuggestions','4AviJBR','editorCreator','Users','join','3631068dnRJPP','getDataWithDiscardedSuggestions','addUser','appendChild','requires','addSuggestionData','acceptAllSuggestions','plugins','define','getUser','destroy','map','getFullData','result','fromCharCode','set','constructor','createDocumentFragment','editor','model','config'];_0x5b27=function(){return _0x48586f;};return _0x5b27();}async function N(_0xb1c407,_0x24c1a5,_0x579e41){const _0x488919=_0x54e1bc,_0xc4921b=_0xaa7f88(_0xb1c407,w);_0xc4921b[_0x488919(0xd0)][_0x488919(0xc2)](_0x5832cc,D),_0xc4921b[_0x488919(0xfc)]=v(_0xb1c407)?_0xb1c407[_0x488919(0xc1)]():void 0x0;const _0x448b02=document[_0x488919(0xda)](),_0x281615=_0xb1c407[_0x488919(0xdd)][_0x488919(0xf2)](_0x488919(0xf8))[_0x488919(0xc6)],_0x526d7b=await _0x281615(_0xc4921b,()=>function(_0x1ffd69){const _0x44584f=_0x488919,_0x3e4ce6=document[_0x44584f(0x102)](_0x44584f(0xee));return _0x1ffd69[_0x44584f(0xcc)](_0x3e4ce6),_0x3e4ce6;}(_0x448b02));!function(_0x3faf0c,_0x404d75){const _0x207884=_0x488919,_0x233eb4=_0x3faf0c[_0x207884(0xdc)][_0x207884(0xf7)][_0x207884(0xe8)]()[_0x207884(0xf0)]((_0x89036,_0xee2f6f)=>(_0x89036[_0xee2f6f]=_0x3faf0c[_0x207884(0x101)][_0x207884(0xf2)]({'rootName':_0xee2f6f}),_0x89036),{}),_0x30bb49=_0x3faf0c[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0xc7))[_0x207884(0xf1)][_0x207884(0xd4)](_0xd53ea2=>({'id':_0xd53ea2['id'],'name':_0xd53ea2[_0x207884(0xff)]})),_0x494d4b=_0x3faf0c[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0xf6))[_0x207884(0xc4)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x558c8f=_0x3faf0c[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0x100))[_0x207884(0xe7)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x463ed3=_0x404d75[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0xc7)),_0x2accb6=_0x404d75[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0xf6)),_0xc87df7=_0x404d75[_0x207884(0xd0)][_0x207884(0xf2)](_0x207884(0x100));for(const _0x7d8df0 of _0xc87df7[_0x207884(0xe7)]())_0x7d8df0[_0x207884(0xe3)]();for(const _0x25d28c of _0x30bb49)_0x463ed3[_0x207884(0xd2)](_0x25d28c['id'])||_0x463ed3[_0x207884(0xcb)](_0x25d28c);_0x463ed3['me']||_0x463ed3[_0x207884(0xe0)]();for(const _0x5c59a5 of _0x558c8f)_0xc87df7[_0x207884(0xde)](_0x5c59a5);for(const _0x2a1e22 of _0x494d4b)_0x2accb6[_0x207884(0xce)](_0x2a1e22);_0x404d75[_0x207884(0x101)][_0x207884(0xd8)](_0x233eb4);}(_0xb1c407,_0x526d7b),_0x526d7b[_0x488919(0xef)](_0x24c1a5?_0x488919(0xcf):_0x488919(0x103));const _0x537c61=v(_0x526d7b)?_0x526d7b[_0x488919(0xd5)](_0x579e41):_0x526d7b[_0x488919(0x101)][_0x488919(0xf2)](_0x579e41);return await _0x526d7b[_0x488919(0xd3)](),_0x537c61;}