@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,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 _0x2f9f(){const _0xfecbe3=['734vZXWfm','607270LtrQll','1915116dPAmKs','has','get','37rlqEHF','insertTemplate','32336lAASIf','99csYgpH','Template','TrackChangesEditing','editor','1451616hxgcjn','afterInit','738624XFsgdH','497EGViHc','plugins','1236440mVXMgg','enableCommand'];_0x2f9f=function(){return _0xfecbe3;};return _0x2f9f();}const _0x4bf9fc=_0x17bd;function _0x17bd(_0x31b44a,_0x5bd6ee){const _0x2f9f1e=_0x2f9f();return _0x17bd=function(_0x17bd99,_0x4062a2){_0x17bd99=_0x17bd99-0xde;let _0x4ba273=_0x2f9f1e[_0x17bd99];return _0x4ba273;},_0x17bd(_0x31b44a,_0x5bd6ee);}(function(_0x34575c,_0x47e876){const _0x3de45d=_0x17bd,_0x331f2c=_0x34575c();while(!![]){try{const _0x3669c4=parseInt(_0x3de45d(0xe8))/0x1*(-parseInt(_0x3de45d(0xe3))/0x2)+parseInt(_0x3de45d(0xde))/0x3+parseInt(_0x3de45d(0xef))/0x4+parseInt(_0x3de45d(0xe1))/0x5+parseInt(_0x3de45d(0xe5))/0x6+parseInt(_0x3de45d(0xdf))/0x7*(-parseInt(_0x3de45d(0xea))/0x8)+-parseInt(_0x3de45d(0xeb))/0x9*(parseInt(_0x3de45d(0xe4))/0xa);if(_0x3669c4===_0x47e876)break;else _0x331f2c['push'](_0x331f2c['shift']());}catch(_0x3d480d){_0x331f2c['push'](_0x331f2c['shift']());}}}(_0x2f9f,0x328b4));import{Plugin as _0x32d6ab}from'ckeditor5/src/core.js';export default class Dt extends _0x32d6ab{[_0x4bf9fc(0xf0)](){const _0x5084e8=_0x4bf9fc,_0x2e2562=this[_0x5084e8(0xee)];_0x2e2562[_0x5084e8(0xe0)][_0x5084e8(0xe6)](_0x5084e8(0xec))&&_0x2e2562[_0x5084e8(0xe0)][_0x5084e8(0xe7)](_0x5084e8(0xed))[_0x5084e8(0xe2)](_0x5084e8(0xe9));}}
@@ -0,0 +1,17 @@
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/integrations/title
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * Provides track changes plugin integration for title feature.
11
+ */
12
+ export default class TrackChangesTitle extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ afterInit(): void;
17
+ }
@@ -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 _0x416ea2=_0x2276;function _0x2276(_0x1ce2fb,_0x2457e0){const _0x2ca65b=_0x2ca6();return _0x2276=function(_0x22767c,_0x5ce7e5){_0x22767c=_0x22767c-0x14e;let _0x5f56eb=_0x2ca65b[_0x22767c];return _0x5f56eb;},_0x2276(_0x1ce2fb,_0x2457e0);}(function(_0x49c8f8,_0x355e82){const _0x3aae69=_0x2276,_0x4e82d4=_0x49c8f8();while(!![]){try{const _0x40859b=-parseInt(_0x3aae69(0x178))/0x1*(-parseInt(_0x3aae69(0x166))/0x2)+parseInt(_0x3aae69(0x153))/0x3*(parseInt(_0x3aae69(0x15f))/0x4)+parseInt(_0x3aae69(0x164))/0x5*(parseInt(_0x3aae69(0x15e))/0x6)+-parseInt(_0x3aae69(0x16d))/0x7*(-parseInt(_0x3aae69(0x157))/0x8)+-parseInt(_0x3aae69(0x155))/0x9*(parseInt(_0x3aae69(0x15d))/0xa)+parseInt(_0x3aae69(0x15b))/0xb+-parseInt(_0x3aae69(0x17b))/0xc;if(_0x40859b===_0x355e82)break;else _0x4e82d4['push'](_0x4e82d4['shift']());}catch(_0x1f20df){_0x4e82d4['push'](_0x4e82d4['shift']());}}}(_0x2ca6,0xd565c));import{Plugin as _0x1a03f0}from'ckeditor5/src/core.js';import{getTranslation as _0xe0ea12}from'../utils/common-translations.js';function _0x2ca6(){const _0x54f955=['TrackChangesEditing','nodeBefore','end','plugins','differ','afterInit','suggestion','removeMarker','descriptionFactory','createRange','320149lwDuEv','Title','updateMarker','42518076dvMSRr','get','schema','has','forward','isEqual','6SCdslz','registerElementLabel','598527CYEBGU','ELEMENT_TITLE','738488FBZvjn','_splitMarkerName','start','model','12102046betBaA','locale','40iWnJaS','146250mrWjkM','1404116lJQdpv','getNearestSelectionRange','isCollapsed','isTouching','from','120hDryhQ','editor','8eHHaEx','getChangedMarkers','element','title-content','document','newRange','registerPostFixer','77bLkxVU'];_0x2ca6=function(){return _0x54f955;};return _0x2ca6();}export default class $t extends _0x1a03f0{[_0x416ea2(0x173)](){const _0x458dd9=_0x416ea2,_0x120cbb=this[_0x458dd9(0x165)];if(!_0x120cbb[_0x458dd9(0x171)][_0x458dd9(0x150)](_0x458dd9(0x179)))return;const _0x466a7c=_0x120cbb[_0x458dd9(0x171)][_0x458dd9(0x14e)](_0x458dd9(0x16e));_0x466a7c[_0x458dd9(0x176)][_0x458dd9(0x154)](_0x458dd9(0x169),()=>_0xe0ea12(_0x120cbb[_0x458dd9(0x15c)],_0x458dd9(0x156))),_0x120cbb[_0x458dd9(0x15a)][_0x458dd9(0x16a)][_0x458dd9(0x16c)](_0xaffcb8=>{const _0x48a127=_0x458dd9;let _0x1349a6=!0x1;const _0x1573e7=Array[_0x48a127(0x163)](_0x120cbb[_0x48a127(0x15a)][_0x48a127(0x16a)][_0x48a127(0x172)][_0x48a127(0x167)]());for(const {name:_0x545346,data:_0x4a44f5}of _0x1573e7){const {group:_0x243f68}=_0x466a7c[_0x48a127(0x158)](_0x545346);if(_0x48a127(0x174)!==_0x243f68||!_0x4a44f5[_0x48a127(0x16b)])continue;const _0x34da83=_0x4a44f5[_0x48a127(0x16b)],_0x29cf6b=_0x34da83[_0x48a127(0x170)][_0x48a127(0x16f)];if(!_0x29cf6b||!_0x29cf6b['is'](_0x48a127(0x168),_0x48a127(0x169)))continue;if(!_0x34da83[_0x48a127(0x159)][_0x48a127(0x162)](_0x34da83[_0x48a127(0x170)]))continue;const _0x6c561a=_0x120cbb[_0x48a127(0x15a)][_0x48a127(0x14f)][_0x48a127(0x160)](_0x34da83[_0x48a127(0x170)],_0x48a127(0x151));if(_0x6c561a&&_0x6c561a[_0x48a127(0x161)]){const _0x414bc3=_0xaffcb8[_0x48a127(0x177)](_0x34da83[_0x48a127(0x159)],_0x6c561a[_0x48a127(0x159)]);_0x414bc3[_0x48a127(0x152)](_0x34da83)||(_0xaffcb8[_0x48a127(0x17a)](_0x545346,{'range':_0x414bc3}),_0x1349a6=!0x0);}_0x1349a6||(_0xaffcb8[_0x48a127(0x175)](_0x545346),_0x1349a6=!0x0);}return _0x1349a6;});}}
@@ -0,0 +1,17 @@
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/integrations/undo
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * Provides track changes plugin integration for {@link module:undo/undo~Undo undo feature}.
11
+ */
12
+ export default class TrackChangesUndo extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ afterInit(): void;
17
+ }
@@ -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 _0x48b825=_0x187a;(function(_0x5c9185,_0x14fc32){const _0x1aca6b=_0x187a,_0x19604f=_0x5c9185();while(!![]){try{const _0x2921b8=-parseInt(_0x1aca6b(0x1e2))/0x1+parseInt(_0x1aca6b(0x1ea))/0x2+parseInt(_0x1aca6b(0x1e1))/0x3+parseInt(_0x1aca6b(0x1ed))/0x4*(-parseInt(_0x1aca6b(0x1ec))/0x5)+parseInt(_0x1aca6b(0x1ef))/0x6+parseInt(_0x1aca6b(0x1df))/0x7*(-parseInt(_0x1aca6b(0x1e8))/0x8)+parseInt(_0x1aca6b(0x1f0))/0x9*(parseInt(_0x1aca6b(0x1e0))/0xa);if(_0x2921b8===_0x14fc32)break;else _0x19604f['push'](_0x19604f['shift']());}catch(_0x432433){_0x19604f['push'](_0x19604f['shift']());}}}(_0x42ff,0x948f3));function _0x187a(_0x3c67f4,_0x365800){const _0x42ff7d=_0x42ff();return _0x187a=function(_0x187a3e,_0x357a8c){_0x187a3e=_0x187a3e-0x1de;let _0x40ac82=_0x42ff7d[_0x187a3e];return _0x40ac82;},_0x187a(_0x3c67f4,_0x365800);}function _0x42ff(){const _0x5191b5=['5078502RwqCbP','72enJSjy','get','UndoEditing','6910043wVCqub','451350OvaQpy','665292qhIUiS','148380fQDVtC','plugins','undo','enableCommand','editor','has','8gRVgXI','afterInit','2124006uSkwQW','TrackChangesEditing','70xhauWp','213496mVnMNk','redo'];_0x42ff=function(){return _0x5191b5;};return _0x42ff();}import{Plugin as _0x4fa14a}from'ckeditor5/src/core.js';export default class Bt extends _0x4fa14a{[_0x48b825(0x1e9)](){const _0x53d03e=_0x48b825,_0x58ca49=this[_0x53d03e(0x1e6)],_0x29d63e=_0x58ca49[_0x53d03e(0x1e3)][_0x53d03e(0x1f1)](_0x53d03e(0x1eb));_0x58ca49[_0x53d03e(0x1e3)][_0x53d03e(0x1e7)](_0x53d03e(0x1de))&&(_0x29d63e[_0x53d03e(0x1e5)](_0x53d03e(0x1e4)),_0x29d63e[_0x53d03e(0x1e5)](_0x53d03e(0x1ee)));}}
@@ -0,0 +1,17 @@
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 { Editor } from 'ckeditor5/src/core.js';
6
+ import type { Range, Model, DowncastAddMarkerEvent } from 'ckeditor5/src/engine.js';
7
+ import type { GetCallback } from 'ckeditor5/src/utils.js';
8
+ /**
9
+ * Searches given `range` and returns all sub-ranges containing items with given `attributeKey`.
10
+ */
11
+ export declare function getRangesWithAttribute(attributeKey: string, range: Range, model: Model): Array<Range>;
12
+ /**
13
+ * Returns the conversion function for down-casting split/merge markers.
14
+ */
15
+ export declare function downcastSplitMergeMarker(editor: Editor, type: 'split' | 'merge', { showActiveMarker }?: {
16
+ showActiveMarker?: boolean | undefined;
17
+ }): GetCallback<DowncastAddMarkerEvent>;
@@ -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(_0x47aa78,_0x2b99f8){const _0x299e33=_0x4add,_0x2cdc1e=_0x47aa78();while(!![]){try{const _0x4d24e6=-parseInt(_0x299e33(0x13b))/0x1*(parseInt(_0x299e33(0x14f))/0x2)+parseInt(_0x299e33(0x138))/0x3+parseInt(_0x299e33(0x125))/0x4*(parseInt(_0x299e33(0x14b))/0x5)+-parseInt(_0x299e33(0x12e))/0x6+parseInt(_0x299e33(0x137))/0x7*(-parseInt(_0x299e33(0x139))/0x8)+parseInt(_0x299e33(0x12f))/0x9*(parseInt(_0x299e33(0x142))/0xa)+parseInt(_0x299e33(0x132))/0xb;if(_0x4d24e6===_0x2b99f8)break;else _0x2cdc1e['push'](_0x2cdc1e['shift']());}catch(_0x5a71ed){_0x2cdc1e['push'](_0x2cdc1e['shift']());}}}(_0x416b,0xde4f3));function _0x416b(){const _0x1c4d4c=['bindElementToMarker','model','2360690wZiKKG','writer','addHighlight','includes','createRangeOn','parent','isLimit','hasAttribute','toViewPosition','995VHEAdQ','toViewElement','previousPosition','item','12mVlEHP','createUIElement','_splitMarkerName','plugins','consumable','getWalker','elementEnd','isAtEnd','ck-suggestion-marker--active','ck-suggestion-marker-','name','10412XAHbFU','start','schema','get','activeMarkers','push','isContent','mapper','getCustomProperty','1303284FeSrVp','18TLSdxJ','isBlock','type','4328819fEifGk','span','markerName','nextSibling','getItems','173117nwlWvq','1939899WDQRFC','128ocpZwo','addClass','84468ltXEFq','markerRange','TrackChangesEditing','insert','test'];_0x416b=function(){return _0x1c4d4c;};return _0x416b();}export function getRangesWithAttribute(_0x41a35f,_0x5826a3,_0x4757d4){const _0x552eba=_0x4add,_0x410b96=[];for(const _0x2bf835 of _0x5826a3[_0x552eba(0x136)]())_0x2bf835[_0x552eba(0x149)](_0x41a35f)&&_0x410b96[_0x552eba(0x12a)](_0x4757d4[_0x552eba(0x146)](_0x2bf835));return _0x410b96;}function _0x4add(_0x275b70,_0xe45f24){const _0x416b11=_0x416b();return _0x4add=function(_0x4add7c,_0x51567d){_0x4add7c=_0x4add7c-0x11c;let _0x4a1e20=_0x416b11[_0x4add7c];return _0x4a1e20;},_0x4add(_0x275b70,_0xe45f24);}export function downcastSplitMergeMarker(_0x545eec,_0x546b5f,{showActiveMarker:_0x35fbe1=!0x0}={}){const _0x5fc43c=_0x4add,_0x413211=_0x545eec[_0x5fc43c(0x11d)][_0x5fc43c(0x128)](_0x5fc43c(0x13d));return(_0x45b77a,_0x3cb86b,_0x2f56e1)=>{const _0xb5ec91=_0x5fc43c;if(!_0x2f56e1[_0xb5ec91(0x11e)][_0xb5ec91(0x13f)](_0x3cb86b[_0xb5ec91(0x13c)],_0x45b77a[_0xb5ec91(0x124)]))return;const _0x278924=_0x3cb86b[_0xb5ec91(0x13c)][_0xb5ec91(0x11f)](),_0x526648=_0x3cb86b[_0xb5ec91(0x13c)][_0xb5ec91(0x126)],_0x29baeb=_0x545eec[_0xb5ec91(0x141)][_0xb5ec91(0x127)];let _0x9d4765=null,_0xa9d4ce=null,_0x1cc3ed=!0x1,_0x455d63=!0x1;for(const _0x2bb7f5 of _0x278924){const _0x5ce046=_0x2bb7f5[_0xb5ec91(0x14e)];_0x1cc3ed=_0x1cc3ed||_0x29baeb[_0xb5ec91(0x12b)](_0x5ce046);const _0x2d766d=_0x2f56e1[_0xb5ec91(0x12c)][_0xb5ec91(0x14c)](_0x5ce046);if(_0x2d766d&&_0x2d766d[_0xb5ec91(0x12d)](_0xb5ec91(0x144)))return;_0xb5ec91(0x120)==_0x2bb7f5[_0xb5ec91(0x131)]&&(_0x29baeb[_0xb5ec91(0x130)](_0x5ce046)&&!_0x29baeb[_0xb5ec91(0x148)](_0x5ce046)&&(_0x5ce046[_0xb5ec91(0x135)]||_0x526648[_0xb5ec91(0x121)]?_0x9d4765&&_0x9d4765[_0xb5ec91(0x147)]==_0x5ce046||(_0x9d4765=_0x5ce046,_0x4339e0(_0x2bb7f5[_0xb5ec91(0x14d)]),_0x455d63=!0x0):_0xa9d4ce=_0xa9d4ce||_0x2bb7f5[_0xb5ec91(0x14d)]));}function _0x4339e0(_0x1cdf72){const _0x58b494=_0xb5ec91,{authorId:_0xb7021d}=_0x413211[_0x58b494(0x11c)](_0x3cb86b[_0x58b494(0x134)]),_0x5414f2=_0x2f56e1[_0x58b494(0x143)][_0x58b494(0x150)](_0x58b494(0x133),{'class':_0x58b494(0x123)+_0x546b5f,'data-author-id':_0xb7021d}),_0x397b33=_0x2f56e1[_0x58b494(0x12c)][_0x58b494(0x14a)](_0x1cdf72);_0x35fbe1&&_0x413211[_0x58b494(0x129)][_0x58b494(0x145)](_0x3cb86b[_0x58b494(0x134)])&&_0x2f56e1[_0x58b494(0x143)][_0x58b494(0x13a)](_0x58b494(0x122),_0x5414f2),_0x2f56e1[_0x58b494(0x143)][_0x58b494(0x13e)](_0x397b33,_0x5414f2),_0x2f56e1[_0x58b494(0x12c)][_0x58b494(0x140)](_0x5414f2,_0x3cb86b[_0x58b494(0x134)]);}_0x1cc3ed||_0x455d63||!_0xa9d4ce||_0x4339e0(_0xa9d4ce);};}
@@ -0,0 +1,291 @@
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/suggestion
7
+ * @publicApi
8
+ */
9
+ import { Element, type Marker, type Model, type Range, type Item } from 'ckeditor5/src/engine.js';
10
+ import type { User } from 'ckeditor5-collaboration/src/collaboration-core.js';
11
+ import type { CommentThread } from '@ckeditor/ckeditor5-comments';
12
+ import type { FormatData, AttributeData } from './trackchangesediting.js';
13
+ declare const Suggestion_base: {
14
+ new (): import("ckeditor5/src/utils.js").Observable;
15
+ prototype: import("ckeditor5/src/utils.js").Observable;
16
+ };
17
+ /**
18
+ * Represents a singular suggestion that is tracked by track changes plugin.
19
+ *
20
+ * `Suggestion` instances are created and handled by {@link module:track-changes/trackchanges~TrackChanges track changes plugin}.
21
+ */
22
+ export default class Suggestion extends /* #__PURE__ -- @preserve */ Suggestion_base {
23
+ /**
24
+ * Suggestion ID.
25
+ */
26
+ readonly id: string;
27
+ /**
28
+ * Suggestion type.
29
+ */
30
+ type: SuggestionType;
31
+ /**
32
+ * Suggestion sub-type.
33
+ *
34
+ * This is an additional identifier for suggestions. Two suggestions of the same type may have different sub-types to differentiate
35
+ * suggestions behavior and handle interactions between suggestions.
36
+ *
37
+ * Sub-type is used for:
38
+ *
39
+ * * suggestions joining (only suggestions with the same sub-type can be joined),
40
+ * * suggestions custom callbacks (fired when adding, deleting and joining suggestions).
41
+ */
42
+ subType: string | null;
43
+ /**
44
+ * The author of the change marked by the suggestion.
45
+ */
46
+ author: User;
47
+ /**
48
+ * The user which saved the suggestion data in the database.
49
+ *
50
+ * Usually the same as author but may be different in some cases (e.g. when suggestion was added from an external source).
51
+ */
52
+ creator: User;
53
+ /**
54
+ * The flag indicating whether the suggestion comes from an external source.
55
+ */
56
+ isExternal: boolean;
57
+ /**
58
+ * Additional suggestion data.
59
+ */
60
+ data: FormatData | AttributeData | null;
61
+ /**
62
+ * Date when the suggestion was saved in the database.
63
+ */
64
+ createdAt: Date | null;
65
+ /**
66
+ * Date when the change marked by the suggestion was made.
67
+ *
68
+ * Usually the same as {@link #createdAt `createdAt`} but may be different in some cases
69
+ * (e.g. when suggestion was added from an external source).
70
+ *
71
+ * @observable
72
+ */
73
+ authoredAt: Date | null;
74
+ /**
75
+ * Custom suggestion attributes. See also {@link #setAttribute} and {@link #removeAttribute}.
76
+ *
77
+ * @observable
78
+ */
79
+ attributes: {
80
+ [k: string]: unknown;
81
+ };
82
+ /**
83
+ * Previous suggestion in suggestions chain.
84
+ *
85
+ * Chained suggestions should be handled as one entity.
86
+ *
87
+ * @observable
88
+ */
89
+ previous: Suggestion | null;
90
+ /**
91
+ * Next suggestion in suggestions chain.
92
+ *
93
+ * Chained suggestions should be handled as one entity.
94
+ *
95
+ * @observable
96
+ */
97
+ next: Suggestion | null;
98
+ /**
99
+ * Comment thread model for comments added to this suggestion.
100
+ *
101
+ * @observable
102
+ */
103
+ commentThread: CommentThread | null;
104
+ constructor(model: Model, options: SuggestionOptions);
105
+ /**
106
+ * The first (most-previous) suggestion in this suggestion chain.
107
+ */
108
+ get head(): Suggestion;
109
+ /**
110
+ * Informs whether suggestion has at least one comment.
111
+ */
112
+ get hasComments(): boolean;
113
+ /**
114
+ * Informs whether the suggestion is a multi-range suggestion or a single-range suggestion.
115
+ *
116
+ * This is evaluated basing on the marker name belonging to this suggestion.
117
+ * Even if only one marker belongs to the suggestion at a given time it can still be a multi range suggestion.
118
+ */
119
+ get isMultiRange(): boolean;
120
+ /**
121
+ * Informs whether the suggestion is still in the editor content.
122
+ *
123
+ * Returns `true` if there is at least one marker suggestion in the editor content.
124
+ */
125
+ get isInContent(): boolean;
126
+ /**
127
+ * Binds given marker name to this suggestion.
128
+ */
129
+ addMarkerName(markerName: string): void;
130
+ /**
131
+ * Returns all names of markers belonging to this suggestion.
132
+ */
133
+ getMarkerNames(): Array<string>;
134
+ /**
135
+ * Returns all markers belonging to this suggestion.
136
+ */
137
+ getMarkers(): Array<Marker>;
138
+ /**
139
+ * Returns the first marker belonging to this suggestion, i.e the first marker that was added to this suggestion
140
+ * and not removed yet.
141
+ *
142
+ * This method is useful if you know that the suggestion has only one marker and want to process it.
143
+ */
144
+ getFirstMarker(): Marker | null;
145
+ /**
146
+ * Removes all markers from the suggestion and the editor content.
147
+ */
148
+ removeMarkers(): void;
149
+ /**
150
+ * Removes marker with the given name from the suggestion and the editor content.
151
+ */
152
+ removeMarker(markerName: string): void;
153
+ /**
154
+ * Adds a new range to this suggestion. It is assumed that the suggestion is a multi-range suggestion.
155
+ *
156
+ * A marker name is generated from this suggestion's properties and a marker with that name is created and set to a given `range`.
157
+ */
158
+ addRange(range: Range): void;
159
+ /**
160
+ * Checks if given `range` is intersecting with any of the ranges of markers belonging to this suggestion.
161
+ */
162
+ isIntersectingWithRange(range: Range): boolean;
163
+ /**
164
+ * Returns all ranges of all markers belonging to this suggestion.
165
+ */
166
+ getRanges(): Array<Range>;
167
+ /**
168
+ * Returns all {@link module:engine/model/item~Item model items} that are in this suggestion.
169
+ */
170
+ getItems(): Array<Item>;
171
+ /**
172
+ * Returns the first range belonging to this suggestion, i.e. the range of the first marker that was added to
173
+ * this suggestion and not removed yet.
174
+ *
175
+ * This method is useful if you know that the suggestion has only one marker and want to process its range.
176
+ */
177
+ getFirstRange(): Range | null;
178
+ /**
179
+ * Returns the model element contained in the suggestion.
180
+ *
181
+ * A {@link module:engine/model/element~Element model element} is considered as contained if there is exactly
182
+ * one range in the suggestion, and that range contains exactly one element.
183
+ *
184
+ * Returns `null` if there is no contained element.
185
+ */
186
+ getContainedElement(): Element | null;
187
+ /**
188
+ * Accepts the suggestion.
189
+ */
190
+ accept(): void;
191
+ /**
192
+ * Discards the suggestion.
193
+ */
194
+ discard(): void;
195
+ /**
196
+ * Returns all suggestions that are in this suggestion chain.
197
+ */
198
+ getAllAdjacentSuggestions(): Array<Suggestion>;
199
+ /**
200
+ * Adds suggestion attribute.
201
+ *
202
+ * Suggestion attributes are custom data that can be set and used by features
203
+ * built around suggestions. Use it to store your feature data with other suggestion data.
204
+ *
205
+ * ```ts
206
+ * suggestion.setAttribute( 'isImportant', true );
207
+ * ```
208
+ *
209
+ * You can group multiple values in an object, using dot notation:
210
+ *
211
+ * ```ts
212
+ * suggestion.setAttribute( 'customData.type', 'image' );
213
+ * suggestion.setAttribute( 'customData.src', 'foo.jpg' );
214
+ * ```
215
+ *
216
+ * Attributes set on the suggestion can be accessed through `attribute` property:
217
+ *
218
+ * ```ts
219
+ * const isImportant = suggestion.attributes.isImportant;
220
+ * const type = suggestion.attributes.customData.type;
221
+ * ```
222
+ *
223
+ * You can also observe `attributes` property or bind other properties to it:
224
+ *
225
+ * ```ts
226
+ * myObj.bind( 'customData' ).to( suggestion, 'attributes', attributes => attributes.customData );
227
+ * ```
228
+ *
229
+ * Whenever `setAttribute()` or `removeAttribute()` is called, `attributes` property
230
+ * is re-set and observables are refreshed.
231
+ */
232
+ setAttribute(name: string, value: unknown): void;
233
+ /**
234
+ * Removes suggestion attribute.
235
+ *
236
+ * See also {@link #setAttribute}
237
+ */
238
+ removeAttribute(name: string): void;
239
+ toJSON(): SuggestionJSON;
240
+ /**
241
+ * Returns a random string that can be used as additional identifier for the marker name for suggestions that are multi range.
242
+ */
243
+ static getMultiRangeId(): string;
244
+ }
245
+ export interface SuggestionOptions {
246
+ id: string;
247
+ type: SuggestionType;
248
+ subType: string | null;
249
+ attributes: {
250
+ [k: string]: unknown;
251
+ };
252
+ author: User;
253
+ creator: User;
254
+ onAccept: Function;
255
+ onDiscard: Function;
256
+ onAttributesChange: Function;
257
+ }
258
+ export interface SuggestionJSON {
259
+ /**
260
+ * Suggestion ID.
261
+ */
262
+ id: string;
263
+ /**
264
+ * Contains the information about the type and subtype of the suggestion.
265
+ */
266
+ type: string;
267
+ /**
268
+ * The ID of the author.
269
+ */
270
+ authorId: string;
271
+ /**
272
+ * Date when the suggestion was saved in the database.
273
+ */
274
+ createdAt: Date | null;
275
+ /**
276
+ * Informs whether suggestion has at least one comment.
277
+ */
278
+ hasComments?: boolean;
279
+ /**
280
+ * Additional suggestion data.
281
+ */
282
+ data?: FormatData | AttributeData | null;
283
+ /**
284
+ * Custom suggestion attributes.
285
+ */
286
+ attributes: {
287
+ [k: string]: unknown;
288
+ };
289
+ }
290
+ export type SuggestionType = 'insertion' | 'deletion' | 'formatInline' | 'formatBlock' | 'attribute';
291
+ export {};
@@ -0,0 +1,24 @@
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 _0x55409b=_0x11ab;(function(_0x2d3df4,_0x30d874){const _0x352d7d=_0x11ab,_0x3c1e56=_0x2d3df4();while(!![]){try{const _0x310d5b=-parseInt(_0x352d7d(0xf7))/0x1+-parseInt(_0x352d7d(0xeb))/0x2+-parseInt(_0x352d7d(0xd6))/0x3*(parseInt(_0x352d7d(0xd4))/0x4)+parseInt(_0x352d7d(0xd5))/0x5+-parseInt(_0x352d7d(0xdf))/0x6+parseInt(_0x352d7d(0xf3))/0x7*(parseInt(_0x352d7d(0xfb))/0x8)+parseInt(_0x352d7d(0xde))/0x9;if(_0x310d5b===_0x30d874)break;else _0x3c1e56['push'](_0x3c1e56['shift']());}catch(_0x1f2659){_0x3c1e56['push'](_0x3c1e56['shift']());}}}(_0x3a66,0x8eb5a));import{Element as _0x1e4ce6}from'ckeditor5/src/engine.js';function _0x11ab(_0x38f55b,_0x3497c4){const _0x3a6615=_0x3a66();return _0x11ab=function(_0x11ab62,_0x1a3a50){_0x11ab62=_0x11ab62-0xb3;let _0x1796ae=_0x3a6615[_0x11ab62];return _0x1796ae;},_0x11ab(_0x38f55b,_0x3497c4);}import{ObservableMixin as _0x5ae3fa,uid as _0x1bfa4a}from'ckeditor5/src/utils.js';import{cloneDeep as _0x15757b,isEqual as _0x45faad,set as _0x54ed76,unset as _0x3ce7d8}from'lodash-es';function _0x3a66(){const _0x2e89ca=['data','getMarkerNames','end','creator','removeAttribute','toJSON','substr','393468XyfepU','5558360vHKxmp','21RIGRmu','delete','isIntersecting','_markerNames','authoredAt','getAllAdjacentSuggestions','onDiscard','isMultiRange','8914320tTdJJT','5113314cNYvnJ','from','author','push','_isDataLoaded','_onDiscard','addRange','attributes','subType','@external','isIntersectingWithRange','getItems','1394996YuuhtW','getMarkers','removeMarker','onAttributesChange','_model','get','markers','filter','73941BDaXDn','discard','change','getRange','303939xvqnsV','previous','setAttribute','suggestion:','776DWPPEb','hasComments','_onAttributesChange','start','decorate','size','head','getFirstMarker','onAccept','createdAt','removeMarkers','set','nodeAfter','clear','accept','isInContent','addMarker','getRanges','getContainedElement','_onAccept','length','commentThread','add','getFirstRange','next','type','map','_saved','isExternal','getMultiRangeId','reduce','nodeBefore','addMarkerName','split'];_0x3a66=function(){return _0x2e89ca;};return _0x3a66();}export default class u extends/* #__PURE__ -- @preserve */
24
+ _0x5ae3fa(){constructor(_0xee481e,_0x272d75){const _0x54ddf9=_0x11ab;super(),this[_0x54ddf9(0xe3)]=!0x1,this['id']=_0x272d75['id'],this[_0x54ddf9(0xc4)]=_0x272d75[_0x54ddf9(0xc4)],this[_0x54ddf9(0xe7)]=_0x272d75[_0x54ddf9(0xe7)]||null,this[_0x54ddf9(0xe1)]=_0x272d75[_0x54ddf9(0xe1)],this[_0x54ddf9(0xd0)]=_0x272d75[_0x54ddf9(0xd0)]||_0x272d75[_0x54ddf9(0xe1)],this[_0x54ddf9(0xc7)]=Boolean(_0x272d75[_0x54ddf9(0xe6)]&&_0x272d75[_0x54ddf9(0xe6)][_0x54ddf9(0xe8)]),this[_0x54ddf9(0xcd)]=null,this[_0x54ddf9(0xef)]=_0xee481e,this[_0x54ddf9(0xbe)]=_0x272d75[_0x54ddf9(0xb3)],this[_0x54ddf9(0xe4)]=_0x272d75[_0x54ddf9(0xdc)],this[_0x54ddf9(0xfd)]=_0x272d75[_0x54ddf9(0xee)],this[_0x54ddf9(0xd9)]=new Set(),this[_0x54ddf9(0xb4)]=null,this[_0x54ddf9(0xb6)](_0x54ddf9(0xda),null),this[_0x54ddf9(0xb6)](_0x54ddf9(0xe6),_0x272d75[_0x54ddf9(0xe6)]||{}),this[_0x54ddf9(0xb6)](_0x54ddf9(0xf8),null),this[_0x54ddf9(0xb6)](_0x54ddf9(0xc3),null),this[_0x54ddf9(0xb6)](_0x54ddf9(0xc0),null),this[_0x54ddf9(0xb6)](_0x54ddf9(0xc6),!0x1),this[_0x54ddf9(0xff)](_0x54ddf9(0xb9)),this[_0x54ddf9(0xff)](_0x54ddf9(0xf4));}get[_0x55409b(0x101)](){const _0x3c1a5f=_0x55409b;let _0x456a30=this;for(;_0x456a30[_0x3c1a5f(0xf8)];)_0x456a30=_0x456a30[_0x3c1a5f(0xf8)];return _0x456a30;}get[_0x55409b(0xfc)](){const _0x10980f=_0x55409b;return!!this[_0x10980f(0xc0)]&&this[_0x10980f(0xc0)][_0x10980f(0xbf)]>0x0;}get[_0x55409b(0xdd)](){const _0x3de51a=_0x55409b;if(0x0==this[_0x3de51a(0xd9)][_0x3de51a(0x100)])return!0x1;return 0x6==Array[_0x3de51a(0xe0)](this[_0x3de51a(0xd9)])[0x0][_0x3de51a(0xcc)](':')[_0x3de51a(0xbf)];}get[_0x55409b(0xba)](){const _0x140348=_0x55409b;return null!==this[_0x140348(0x102)]();}[_0x55409b(0xcb)](_0x29ce57){const _0x4e6ecf=_0x55409b;this[_0x4e6ecf(0xd9)][_0x4e6ecf(0xc1)](_0x29ce57);}[_0x55409b(0xce)](){const _0x35e108=_0x55409b;return Array[_0x35e108(0xe0)](this[_0x35e108(0xd9)]);}[_0x55409b(0xec)](){const _0x48a5d2=_0x55409b;return this[_0x48a5d2(0xce)]()[_0x48a5d2(0xc5)](_0x3553ce=>this[_0x48a5d2(0xef)][_0x48a5d2(0xf1)][_0x48a5d2(0xf0)](_0x3553ce))[_0x48a5d2(0xf2)](_0x1425f1=>_0x1425f1);}[_0x55409b(0x102)](){const _0x4785c3=_0x55409b;return this[_0x4785c3(0xec)]()[0x0]||null;}[_0x55409b(0xb5)](){const _0x5d416c=_0x55409b;this[_0x5d416c(0xef)][_0x5d416c(0xf5)](_0x207de5=>{const _0x45a2a2=_0x5d416c;for(const _0x98b143 of this[_0x45a2a2(0xec)]())_0x207de5[_0x45a2a2(0xed)](_0x98b143);}),this[_0x5d416c(0xd9)][_0x5d416c(0xb8)]();}[_0x55409b(0xed)](_0x33789e){const _0x129be0=_0x55409b;this[_0x129be0(0xef)][_0x129be0(0xf5)](_0x526899=>{const _0x31c5e8=_0x129be0;_0x526899[_0x31c5e8(0xed)](_0x33789e);}),this[_0x129be0(0xd9)][_0x129be0(0xd7)](_0x33789e);}[_0x55409b(0xe5)](_0x416182){const _0x1bd2f9=_0x55409b,_0x20a482=_0x1bd2f9(0xfa)+this[_0x1bd2f9(0xc4)]+':'+this[_0x1bd2f9(0xe7)]+':'+this['id']+':'+this[_0x1bd2f9(0xd0)]['id']+':'+u[_0x1bd2f9(0xc8)]();this[_0x1bd2f9(0xcb)](_0x20a482),this[_0x1bd2f9(0xef)][_0x1bd2f9(0xf5)](_0x1ad07c=>{const _0x35b590=_0x1bd2f9;_0x1ad07c[_0x35b590(0xbb)](_0x20a482,{'range':_0x416182,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x55409b(0xe9)](_0x4894b6){const _0x4fe7cb=_0x55409b;for(const _0x3892bd of this[_0x4fe7cb(0xbc)]())if(_0x3892bd[_0x4fe7cb(0xd8)](_0x4894b6))return!0x0;return!0x1;}[_0x55409b(0xbc)](){const _0x14f768=_0x55409b;return this[_0x14f768(0xec)]()[_0x14f768(0xc5)](_0x332148=>_0x332148[_0x14f768(0xf6)]());}[_0x55409b(0xea)](){const _0x44a787=_0x55409b;return this[_0x44a787(0xbc)]()[_0x44a787(0xc9)]((_0x596625,_0x5ec674)=>[..._0x596625,..._0x5ec674[_0x44a787(0xea)]()],[]);}[_0x55409b(0xc2)](){const _0x66b510=_0x55409b;var _0x564813;return(null===(_0x564813=this[_0x66b510(0x102)]())||void 0x0===_0x564813?void 0x0:_0x564813[_0x66b510(0xf6)]())||null;}[_0x55409b(0xbd)](){const _0x306e01=_0x55409b,_0x248d9f=this[_0x306e01(0xbc)]();if(0x1!=_0x248d9f[_0x306e01(0xbf)])return null;const _0x15b473=_0x248d9f[0x0],_0x35a949=_0x15b473[_0x306e01(0xfe)][_0x306e01(0xb7)],_0x3e33e1=_0x15b473[_0x306e01(0xcf)][_0x306e01(0xca)];return _0x35a949 instanceof _0x1e4ce6?_0x35a949!=_0x3e33e1?null:_0x35a949:null;}[_0x55409b(0xb9)](){const _0x22b85e=_0x55409b;this[_0x22b85e(0xbe)](this[_0x22b85e(0xbc)](),this[_0x22b85e(0xcd)],this[_0x22b85e(0xe6)]),this[_0x22b85e(0xb5)]();}[_0x55409b(0xf4)](){const _0x415b4e=_0x55409b;this[_0x415b4e(0xe4)](this[_0x415b4e(0xbc)](),this[_0x415b4e(0xcd)],this[_0x415b4e(0xe6)]),this[_0x415b4e(0xb5)]();}[_0x55409b(0xdb)](){const _0x444fe6=_0x55409b,_0x525dbf=[];let _0x2f0ee1=this[_0x444fe6(0x101)];for(;_0x2f0ee1;)_0x525dbf[_0x444fe6(0xe2)](_0x2f0ee1),_0x2f0ee1=_0x2f0ee1[_0x444fe6(0xc3)];return _0x525dbf;}[_0x55409b(0xf9)](_0x30274e,_0x6c14bd){const _0x42fe8a=_0x55409b,_0x21e625=_0x15757b(this[_0x42fe8a(0xe6)]);_0x54ed76(_0x21e625,_0x30274e,_0x6c14bd),_0x45faad(_0x21e625,this[_0x42fe8a(0xe6)])||(this[_0x42fe8a(0xe6)]=_0x21e625,this[_0x42fe8a(0xfd)](_0x21e625));}[_0x55409b(0xd1)](_0x2f144d){const _0xfb7e39=_0x55409b,_0x499c08=_0x15757b(this[_0xfb7e39(0xe6)]);_0x3ce7d8(_0x499c08,_0x2f144d),_0x45faad(_0x499c08,this[_0xfb7e39(0xe6)])||(this[_0xfb7e39(0xe6)]=_0x499c08,this[_0xfb7e39(0xfd)](this[_0xfb7e39(0xe6)]));}[_0x55409b(0xd2)](){const _0x1cfa05=_0x55409b;return{'id':this['id'],'type':this[_0x1cfa05(0xe7)]?this[_0x1cfa05(0xc4)]+':'+this[_0x1cfa05(0xe7)]:this[_0x1cfa05(0xc4)],'authorId':this[_0x1cfa05(0xd0)]['id'],'createdAt':this[_0x1cfa05(0xb4)],'hasComments':this[_0x1cfa05(0xfc)],'data':this[_0x1cfa05(0xcd)],'attributes':this[_0x1cfa05(0xe6)]};}static[_0x55409b(0xc8)](){const _0x4312ee=_0x55409b;return _0x1bfa4a()[_0x4312ee(0xd3)](0x1,0x5);}}