@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
+ export default{'zh':{'dictionary':{'*Change\x20to:*\x20%0':'*更改成:*%0','*Change\x20%0\x20content*':'*變更\x20%0\x20內容*','*Check\x20item*':'*勾選項目*','*Format:*\x20%0':'*格式:*%0','*Indent:*\x20%0':'*縮排:*%0','*Insert:*\x20%0':'*插入:*%0','*Format:*\x20change\x20table\x20properties':'*格式:*變更表格屬性','*Format:*\x20change\x20table\x20cell\x20properties':'*格式:*變更表格的儲存格屬性','*Format:*\x20insert\x20into\x20%0':'*格式:*插入\x20%0','*Format:*\x20remove\x20from\x20%0':'*格式:*從\x20%0\x20移除','*Replace\x20image\x20URL*':'*替換圖片網址*','*Format:*\x20resize\x20table':'*格式:*調整表格大小','*Format:*\x20set\x20order\x20to\x20reversed':'*格式:*反向排序','*Format:*\x20set\x20order\x20to\x20regular':'*格式:*依標準排序','*Format:*\x20set\x20start\x20index\x20to\x20%0':'*格式:*將起始索引設定為\x20%0','*Merge\x20cells*':'*合併儲存格*','*Merge:*\x20%0':'*合併:*%0','*Outdent:*\x20%0':'*凸排:*%0','*Remove\x20all\x20formatting*':'*清除格式設定*','*Remove\x20format:*\x20%0':'*移除格式:*%0','*Remove\x20highlight*':'*刪除亮顯*','*Remove\x20image\x20text\x20alternative*':'*移除圖片替代文字*','*Remove\x20link*':'*移除連結*','*Remove:*\x20%0':'*移除:*%0','*Replace\x20table\x20cells*':'*取代儲存格*','*Reset\x20font\x20background\x20color*':'*重設文字背景顏色*','*Reset\x20font\x20color*':'*重設文字顏色*','*Reset\x20font\x20family*':'*重設字型*','*Reset\x20font\x20size*':'*重設字體大小*','*Reset\x20image\x20width*':'*重設圖片寬度*','*Set\x20font\x20background\x20color:*\x20%0':'*設定文字背景顏色:*%0','*Set\x20font\x20color:*\x20%0':'*設定字型顏色:*\x20%0','*Set\x20font\x20family:*\x20%0':'*設定字型家族:*%0','*Set\x20font\x20size:*\x20%0':'*設定字型大小:*%0','*Set\x20format:*\x20%0':'*設定格式:*\x20%0','*Set\x20format\x20to:*\x20%0':'*設定格式為:*%0','*Set\x20highlight:*\x20%0':'*設定亮顯:*%0','*Set\x20image\x20text\x20alternative:*\x20%0':'*設定影像替代文字:*%0','*Set\x20image\x20width:*\x20%0':'*設定影像寬度:*%0','*Set\x20link:*\x20%0':'*設定連結:*%0','*Split\x20cell:*\x20horizontally':'*分割儲存格:*\x20水平','*Split\x20cell:*\x20vertically':'*分割儲存格:*\x20垂直','*Split:*\x20%0':'*分割:*%0','*Uncheck\x20item*':'*取消勾選項目*','Accept\x20all\x20selected\x20suggestions':'接受所有已選取的建議','Accept\x20all\x20suggestions':'接受所有建議','Accept\x20suggestion':'接受建議','Discard\x20all\x20selected\x20suggestions':'捨棄所有選取的建議','Discard\x20all\x20suggestions':'捨棄所有建議','Discard\x20suggestion':'捨棄建議','LEAVE_INSERTION_SUGGESTION_ANNOUNCEMENT':'正在離開插入建議。','ENTER_INSERTION_SUGGESTION_ANNOUNCEMENT':'正在進入插入建議。按\x20%0\x20即可前往討論區。','LEAVE_DELETION_SUGGESTION_ANNOUNCEMENT':'正在離開刪除建議。','ENTER_DELETION_SUGGESTION_ANNOUNCEMENT':'正在進入刪除建議。按\x20%0\x20即可前往討論區。','LEAVE_FORMATTING_SUGGESTION_ANNOUNCEMENT':'正在離開格式建議。','ENTER_FORMATTING_SUGGESTION_ANNOUNCEMENT':'正在進入格式設定建議。按\x20%0\x20即可前往討論區。','SUGGESTION_THREAD_ARIA_LABEL':'建議者:%1。建立時間:%2。%0\x20則回覆。%3','SUGGESTION_THREAD_DESCRIPTION':'按\x20Enter\x20鍵可取得更多選項。按\x20Esc\x20鍵即可退出。','ELEMENT_BLOCK_QUOTE':'區塊引述','ELEMENT_DEFAULT_LIST_DEFAULT':'預設清單樣式','ELEMENT_BULLETED_LIST':'項目符號清單','ELEMENT_BULLETED_LIST_DEFAULT':'項目符號清單(預設)','ELEMENT_BULLETED_LIST_CIRCLE':'項目符號列表(空心圓)','ELEMENT_BULLETED_LIST_DISC':'項目符號列表(實心圓)','ELEMENT_BULLETED_LIST_SQUARE':'項目符號列表(方塊)','ELEMENT_CAPTION':'標號','ELEMENT_CODE_BLOCK':'代碼區塊','ELEMENT_HEADING':'標題(層級\x20%1)','ELEMENT_HEADING_CUSTOM':'標題\x20(%1)','ELEMENT_HORIZONTAL_LINE':'水平線','ELEMENT_HTML_EMBED':'HTML\x20內嵌','ELEMENT_IMAGE':'影像','ELEMENT_INLINE_IMAGE':'影像','ELEMENT_LINE_BREAK':'分行符號','ELEMENT_LIST_ITEM':'清單項目','ELEMENT_MEDIA':'媒體項目','ELEMENT_NUMBERED_LIST':'編號清單','ELEMENT_NUMBERED_LIST_DEFAULT':'編號清單(預設)','ELEMENT_NUMBERED_LIST_DECIMAL':'編號列表(阿拉伯數字)','ELEMENT_NUMBERED_LIST_DECIMAL_LEADING_ZERO':'編號列表(零開頭的阿拉伯數字)','ELEMENT_NUMBERED_LIST_LOWER_LATIN':'編號列表(小寫拉丁字元)','ELEMENT_NUMBERED_LIST_LOWER_ROMAN':'編號列表(小寫羅馬數字)','ELEMENT_NUMBERED_LIST_UPPER_LATIN':'編號列表(大寫拉丁字元)','ELEMENT_NUMBERED_LIST_UPPER_ROMAN':'編號列表(大寫羅馬數字)','ELEMENT_PAGE_BREAK':'分頁符號','ELEMENT_PARAGRAPH':'段落','ELEMENT_SPACE':'間距','ELEMENT_TABLE':'表格','ELEMENT_TABLE_COLUMN':'表格行','ELEMENT_TABLE_COLUMN_WITH_TEXT':'表格行*帶文字*\x20%1','ELEMENT_TABLE_OF_CONTENTS':'內容目錄','ELEMENT_TABLE_ROW':'表格列','ELEMENT_TABLE_ROW_WITH_TEXT':'表格列*帶文字*\x20%1','ELEMENT_TABLE_WITH_TEXT':'表格*帶文字*\x20%0','ELEMENT_TITLE':'大標題','ELEMENT_TODO_LIST':'待辦事項清單','ELEMENT_MULTI_LEVEL_LIST':'多層次清單','ELEMENT_MERGE_FIELD':'合併欄位','FORMAT_ALIGNMENT':'對齊','FORMAT_ALIGN_TO_CENTER':'置中','FORMAT_ALIGN_TO_LEFT':'靠左對齊','FORMAT_ALIGN_TO_RIGHT':'靠右對齊','FORMAT_BOLD':'粗體','FORMAT_CODE':'代碼','FORMAT_HEADER_COLUMN':'標題行','FORMAT_HEADER_ROW':'標題列','FORMAT_HIGHLIGHT':'亮顯','FORMAT_ITALIC':'斜體','FORMAT_JUSTIFY_TEXT':'左右對齊','FORMAT_REGULAR_COLUMN':'標準行','FORMAT_REGULAR_ROW':'標準列','FORMAT_RESTRICTED_DISABLED':'*在受限編輯模式下禁用*','FORMAT_RESTRICTED_ENABLED':'*在受限編輯模式下啟用*','FORMAT_SIDE_IMAGE':'側邊影像','FORMAT_STRIKETHROUGH':'刪除線','FORMAT_SUBSCRIPT':'下標','FORMAT_SUPERSCRIPT':'上標','FORMAT_UNDERLINE':'底線','FORMAT_INDENT':'縮排','FORMAT_LIST_REVERSED':'清單反轉','FORMAT_LIST_START':'清單起始','FORMAT_FONT_SIZE':'字型大小','FORMAT_FONT_FAMILY':'字型家族','FORMAT_FONT_COLOR':'字型顏色','FORMAT_FONT_BACKGROUND':'字型背景顏色','FORMAT_IMAGE_SIZE':'圖片大小','FORMAT_STYLE':'樣式','PENDING_ACTION_SUGGESTION':'建議中未儲存的變更。','REPLACE_TEXT':'*取代:*%0\x20*變更為*\x20%1','Track\x20changes':'追蹤變更','EXTERNAL_SUGGESTION':'此建議來自外部來源。','EXTERNAL_IMPORT_WORD_SUGGESTION':'此建議來自匯入的\x20Word\x20檔案。'},'getPluralForm':_0x5b349f=>0x0}};
@@ -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
+ (_0x48c7c8=>{const {zh:{dictionary:_0x2ac92b,getPluralForm:_0x537800}}={'zh':{'dictionary':{'*Change\x20to:*\x20%0':'*更改成:*%0','*Change\x20%0\x20content*':'*變更\x20%0\x20內容*','*Check\x20item*':'*勾選項目*','*Format:*\x20%0':'*格式:*%0','*Indent:*\x20%0':'*縮排:*%0','*Insert:*\x20%0':'*插入:*%0','*Format:*\x20change\x20table\x20properties':'*格式:*變更表格屬性','*Format:*\x20change\x20table\x20cell\x20properties':'*格式:*變更表格的儲存格屬性','*Format:*\x20insert\x20into\x20%0':'*格式:*插入\x20%0','*Format:*\x20remove\x20from\x20%0':'*格式:*從\x20%0\x20移除','*Replace\x20image\x20URL*':'*替換圖片網址*','*Format:*\x20resize\x20table':'*格式:*調整表格大小','*Format:*\x20set\x20order\x20to\x20reversed':'*格式:*反向排序','*Format:*\x20set\x20order\x20to\x20regular':'*格式:*依標準排序','*Format:*\x20set\x20start\x20index\x20to\x20%0':'*格式:*將起始索引設定為\x20%0','*Merge\x20cells*':'*合併儲存格*','*Merge:*\x20%0':'*合併:*%0','*Outdent:*\x20%0':'*凸排:*%0','*Remove\x20all\x20formatting*':'*清除格式設定*','*Remove\x20format:*\x20%0':'*移除格式:*%0','*Remove\x20highlight*':'*刪除亮顯*','*Remove\x20image\x20text\x20alternative*':'*移除圖片替代文字*','*Remove\x20link*':'*移除連結*','*Remove:*\x20%0':'*移除:*%0','*Replace\x20table\x20cells*':'*取代儲存格*','*Reset\x20font\x20background\x20color*':'*重設文字背景顏色*','*Reset\x20font\x20color*':'*重設文字顏色*','*Reset\x20font\x20family*':'*重設字型*','*Reset\x20font\x20size*':'*重設字體大小*','*Reset\x20image\x20width*':'*重設圖片寬度*','*Set\x20font\x20background\x20color:*\x20%0':'*設定文字背景顏色:*%0','*Set\x20font\x20color:*\x20%0':'*設定字型顏色:*\x20%0','*Set\x20font\x20family:*\x20%0':'*設定字型家族:*%0','*Set\x20font\x20size:*\x20%0':'*設定字型大小:*%0','*Set\x20format:*\x20%0':'*設定格式:*\x20%0','*Set\x20format\x20to:*\x20%0':'*設定格式為:*%0','*Set\x20highlight:*\x20%0':'*設定亮顯:*%0','*Set\x20image\x20text\x20alternative:*\x20%0':'*設定影像替代文字:*%0','*Set\x20image\x20width:*\x20%0':'*設定影像寬度:*%0','*Set\x20link:*\x20%0':'*設定連結:*%0','*Split\x20cell:*\x20horizontally':'*分割儲存格:*\x20水平','*Split\x20cell:*\x20vertically':'*分割儲存格:*\x20垂直','*Split:*\x20%0':'*分割:*%0','*Uncheck\x20item*':'*取消勾選項目*','Accept\x20all\x20selected\x20suggestions':'接受所有已選取的建議','Accept\x20all\x20suggestions':'接受所有建議','Accept\x20suggestion':'接受建議','Discard\x20all\x20selected\x20suggestions':'捨棄所有選取的建議','Discard\x20all\x20suggestions':'捨棄所有建議','Discard\x20suggestion':'捨棄建議','LEAVE_INSERTION_SUGGESTION_ANNOUNCEMENT':'正在離開插入建議。','ENTER_INSERTION_SUGGESTION_ANNOUNCEMENT':'正在進入插入建議。按\x20%0\x20即可前往討論區。','LEAVE_DELETION_SUGGESTION_ANNOUNCEMENT':'正在離開刪除建議。','ENTER_DELETION_SUGGESTION_ANNOUNCEMENT':'正在進入刪除建議。按\x20%0\x20即可前往討論區。','LEAVE_FORMATTING_SUGGESTION_ANNOUNCEMENT':'正在離開格式建議。','ENTER_FORMATTING_SUGGESTION_ANNOUNCEMENT':'正在進入格式設定建議。按\x20%0\x20即可前往討論區。','SUGGESTION_THREAD_ARIA_LABEL':'建議者:%1。建立時間:%2。%0\x20則回覆。%3','SUGGESTION_THREAD_DESCRIPTION':'按\x20Enter\x20鍵可取得更多選項。按\x20Esc\x20鍵即可退出。','ELEMENT_BLOCK_QUOTE':'區塊引述','ELEMENT_DEFAULT_LIST_DEFAULT':'預設清單樣式','ELEMENT_BULLETED_LIST':'項目符號清單','ELEMENT_BULLETED_LIST_DEFAULT':'項目符號清單(預設)','ELEMENT_BULLETED_LIST_CIRCLE':'項目符號列表(空心圓)','ELEMENT_BULLETED_LIST_DISC':'項目符號列表(實心圓)','ELEMENT_BULLETED_LIST_SQUARE':'項目符號列表(方塊)','ELEMENT_CAPTION':'標號','ELEMENT_CODE_BLOCK':'代碼區塊','ELEMENT_HEADING':'標題(層級\x20%1)','ELEMENT_HEADING_CUSTOM':'標題\x20(%1)','ELEMENT_HORIZONTAL_LINE':'水平線','ELEMENT_HTML_EMBED':'HTML\x20內嵌','ELEMENT_IMAGE':'影像','ELEMENT_INLINE_IMAGE':'影像','ELEMENT_LINE_BREAK':'分行符號','ELEMENT_LIST_ITEM':'清單項目','ELEMENT_MEDIA':'媒體項目','ELEMENT_NUMBERED_LIST':'編號清單','ELEMENT_NUMBERED_LIST_DEFAULT':'編號清單(預設)','ELEMENT_NUMBERED_LIST_DECIMAL':'編號列表(阿拉伯數字)','ELEMENT_NUMBERED_LIST_DECIMAL_LEADING_ZERO':'編號列表(零開頭的阿拉伯數字)','ELEMENT_NUMBERED_LIST_LOWER_LATIN':'編號列表(小寫拉丁字元)','ELEMENT_NUMBERED_LIST_LOWER_ROMAN':'編號列表(小寫羅馬數字)','ELEMENT_NUMBERED_LIST_UPPER_LATIN':'編號列表(大寫拉丁字元)','ELEMENT_NUMBERED_LIST_UPPER_ROMAN':'編號列表(大寫羅馬數字)','ELEMENT_PAGE_BREAK':'分頁符號','ELEMENT_PARAGRAPH':'段落','ELEMENT_SPACE':'間距','ELEMENT_TABLE':'表格','ELEMENT_TABLE_COLUMN':'表格行','ELEMENT_TABLE_COLUMN_WITH_TEXT':'表格行*帶文字*\x20%1','ELEMENT_TABLE_OF_CONTENTS':'內容目錄','ELEMENT_TABLE_ROW':'表格列','ELEMENT_TABLE_ROW_WITH_TEXT':'表格列*帶文字*\x20%1','ELEMENT_TABLE_WITH_TEXT':'表格*帶文字*\x20%0','ELEMENT_TITLE':'大標題','ELEMENT_TODO_LIST':'待辦事項清單','ELEMENT_MULTI_LEVEL_LIST':'多層次清單','ELEMENT_MERGE_FIELD':'合併欄位','FORMAT_ALIGNMENT':'對齊','FORMAT_ALIGN_TO_CENTER':'置中','FORMAT_ALIGN_TO_LEFT':'靠左對齊','FORMAT_ALIGN_TO_RIGHT':'靠右對齊','FORMAT_BOLD':'粗體','FORMAT_CODE':'代碼','FORMAT_HEADER_COLUMN':'標題行','FORMAT_HEADER_ROW':'標題列','FORMAT_HIGHLIGHT':'亮顯','FORMAT_ITALIC':'斜體','FORMAT_JUSTIFY_TEXT':'左右對齊','FORMAT_REGULAR_COLUMN':'標準行','FORMAT_REGULAR_ROW':'標準列','FORMAT_RESTRICTED_DISABLED':'*在受限編輯模式下禁用*','FORMAT_RESTRICTED_ENABLED':'*在受限編輯模式下啟用*','FORMAT_SIDE_IMAGE':'側邊影像','FORMAT_STRIKETHROUGH':'刪除線','FORMAT_SUBSCRIPT':'下標','FORMAT_SUPERSCRIPT':'上標','FORMAT_UNDERLINE':'底線','FORMAT_INDENT':'縮排','FORMAT_LIST_REVERSED':'清單反轉','FORMAT_LIST_START':'清單起始','FORMAT_FONT_SIZE':'字型大小','FORMAT_FONT_FAMILY':'字型家族','FORMAT_FONT_COLOR':'字型顏色','FORMAT_FONT_BACKGROUND':'字型背景顏色','FORMAT_IMAGE_SIZE':'圖片大小','FORMAT_STYLE':'樣式','PENDING_ACTION_SUGGESTION':'建議中未儲存的變更。','REPLACE_TEXT':'*取代:*%0\x20*變更為*\x20%1','Track\x20changes':'追蹤變更','EXTERNAL_SUGGESTION':'此建議來自外部來源。','EXTERNAL_IMPORT_WORD_SUGGESTION':'此建議來自匯入的\x20Word\x20檔案。'},'getPluralForm':_0xb75b30=>0x0}};_0x48c7c8['zh']||={'dictionary':{},'getPluralForm':null},_0x48c7c8['zh']['dictionary']=Object['assign'](_0x48c7c8['zh']['dictionary'],_0x2ac92b),_0x48c7c8['zh']['getPluralForm']=_0x537800;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ import type { Editor } from 'ckeditor5/src/core.js';
10
+ import type Suggestion from '../suggestion.js';
11
+ import type { default as BaseSuggestionThreadView } from './view/basesuggestionthreadview.js';
12
+ import type { CommentThreadController } from '@ckeditor/ckeditor5-comments';
13
+ declare const SuggestionController_base: {
14
+ new (): import("ckeditor5/src/utils.js").Observable;
15
+ prototype: import("ckeditor5/src/utils.js").Observable;
16
+ };
17
+ /**
18
+ * A controller for a suggestion.
19
+ *
20
+ * It takes a suggestion thread view, listens to events fired by that view and based on them performs actions
21
+ * on the provided suggestion model.
22
+ */
23
+ export default class SuggestionController extends /* #__PURE__ -- @preserve */ SuggestionController_base {
24
+ model: Suggestion;
25
+ view: BaseSuggestionThreadView;
26
+ commentThreadController: CommentThreadController;
27
+ constructor(editor: Editor, model: Suggestion, view: BaseSuggestionThreadView, commentThreadController: CommentThreadController);
28
+ /**
29
+ * Accepts the suggestion that belongs to this controller.
30
+ */
31
+ acceptSuggestion(): void;
32
+ /**
33
+ * Discards the suggestion that belongs to this controller.
34
+ */
35
+ discardSuggestion(): void;
36
+ /**
37
+ * Destroys `SuggestionController` instance.
38
+ */
39
+ destroy(): void;
40
+ }
41
+ export {};
@@ -0,0 +1,209 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module track-changes/ui/view/basesuggestionthreadview
11
+ * @publicApi
12
+ */
13
+ import { FocusCycler, View, ViewCollection, type FocusableView } from 'ckeditor5/src/ui.js';
14
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
15
+ import type { EditorConfig } from 'ckeditor5/src/core.js';
16
+ import type Suggestion from '../../suggestion.js';
17
+ import type { CommentsListView, CommentThreadInputView, CommentView } from '@ckeditor/ckeditor5-comments';
18
+ import { AriaDescriptionView, type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
19
+ import type { Description } from '../../suggestiondescriptionfactory.js';
20
+ import type SuggestionView from './suggestionview.js';
21
+ /**
22
+ * An abstract suggestion thread view class that should be used as a base for suggestion thread view implementations.
23
+ * It provides some behaviors, flags and building blocks to use when creating a custom suggestion thread view class.
24
+ *
25
+ * All events fired by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}
26
+ * are delegated to {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView}.
27
+ * This means that {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView} can also fire these
28
+ * events to communicate with CKEditor 5 collaboration features.
29
+ *
30
+ * For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view
31
+ * Annotations custom view} guide.
32
+ */
33
+ export default abstract class BaseSuggestionThreadView extends View {
34
+ /**
35
+ * The list of comment views. It should be used as a part of the view template when present.
36
+ */
37
+ commentsListView: CommentsListView | null;
38
+ /**
39
+ * The comment input area view. It should be used as a part of the view template when present.
40
+ */
41
+ commentThreadInputView: CommentThreadInputView | null;
42
+ /**
43
+ * A helper view that provides an ARIA description for the comment thread used by
44
+ * assistive technologies.
45
+ */
46
+ readonly ariaDescriptionView: AriaDescriptionView;
47
+ /**
48
+ * A boolean value that informs if the comment thread view is in the active state ("highlighted").
49
+ * A comment thread view is in this state when it is focused or was activated by the user in any different way.
50
+ *
51
+ * @observable
52
+ */
53
+ isActive: boolean;
54
+ /**
55
+ * Suggestion creation date.
56
+ *
57
+ * @observable
58
+ */
59
+ authoredAt: Date | null;
60
+ /**
61
+ * Flag that indicates whether suggestion acceptation is possible.
62
+ *
63
+ * @observable
64
+ */
65
+ canAccept: boolean;
66
+ /**
67
+ * Flag that indicates whether suggestion discarding is possible.
68
+ *
69
+ * @observable
70
+ */
71
+ canDiscard: boolean;
72
+ /**
73
+ * Stores description entries generated for this suggestion that describe what is the suggested change.
74
+ * They are used to create the final description presented in the suggestion view to the user.
75
+ *
76
+ * Note that one suggestion may include multiple changes.
77
+ *
78
+ * Most cases are simple and include just one description item:
79
+ *
80
+ * ```ts
81
+ * [
82
+ * { type: 'insertion', content: '*Insert:* "Foo"' }
83
+ * ]
84
+ * ```
85
+ *
86
+ * This description item represents a suggestion for inserting the "Foo" text. The `type` property describes the performed action
87
+ * while the `content` property contains additional information about the action and is optional.
88
+ *
89
+ * A more complex example is presented below:
90
+ *
91
+ * ```ts
92
+ * [
93
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
94
+ * { type: 'insertion', content: '*Insert:* image' },
95
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
96
+ * ]
97
+ * ```
98
+ *
99
+ * In this example, there are three description instances (or lines). Two new (empty) paragraphs were added,
100
+ * an image was added and then "Foo" text was replaced by "Bar". The above structure could be rendered as:
101
+ *
102
+ * ```html
103
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
104
+ * <p><strong>Insert:</strong> image</p>
105
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
106
+ * ```
107
+ *
108
+ * @observable
109
+ */
110
+ descriptionParts: Array<Description>;
111
+ /**
112
+ * Informs whether the suggestion thread has any changes that have not been saved.
113
+ *
114
+ * @observable
115
+ */
116
+ isDirty: boolean;
117
+ /**
118
+ * Informs whether the suggestion can be accepted or discarded.
119
+ *
120
+ * @observable
121
+ */
122
+ isEnabled: boolean;
123
+ /**
124
+ * The number of items in the view, where the suggestion itself counts as one.
125
+ *
126
+ * In other words, it is equal to the number of comments in the suggestion thread view plus one.
127
+ *
128
+ * @observable
129
+ */
130
+ readonly length: number;
131
+ /**
132
+ * An accessible thread label text exposed to assistive technologies.
133
+ */
134
+ ariaLabel: string;
135
+ /**
136
+ * A collection of focusable child views.
137
+ */
138
+ readonly focusables: ViewCollection<FocusableView>;
139
+ /**
140
+ * Tracks information about DOM focus in the thread.
141
+ */
142
+ readonly focusTracker: FocusTracker;
143
+ /**
144
+ * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
145
+ */
146
+ readonly keystrokes: KeystrokeHandler;
147
+ /**
148
+ * Helps cycling over focusable views in the thread.
149
+ */
150
+ readonly focusCycler: FocusCycler;
151
+ constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
152
+ /**
153
+ * @inheritDoc
154
+ */
155
+ render(): void;
156
+ /**
157
+ * Focuses the view.
158
+ */
159
+ focus(): void;
160
+ /**
161
+ * @inheritDoc
162
+ */
163
+ destroy(): void;
164
+ }
165
+ /**
166
+ * Fired when a user performed an action that should lead to accepting the suggestion.
167
+ *
168
+ * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
169
+ * If you create a view class extending `BaseSuggestionCommentView`, you should provide
170
+ * a UI element that will fire this event.
171
+ *
172
+ * @eventName ~BaseSuggestionThreadView#acceptSuggestion
173
+ */
174
+ export type AcceptSuggestionEvent = {
175
+ name: 'acceptSuggestion';
176
+ args: [
177
+ id: string
178
+ ];
179
+ };
180
+ /**
181
+ * Fired when a user performed an action that should lead to discarding the suggestion.
182
+ *
183
+ * This event is not fired by default by any component created by `BaseSuggestionThreadView`.
184
+ * If you create a view class extending `BaseSuggestionCommentView`, you should provide
185
+ * a UI element that will fire this event.
186
+ *
187
+ * @eventName ~BaseSuggestionThreadView#discardSuggestion
188
+ */
189
+ export type DiscardSuggestionEvent = {
190
+ name: 'discardSuggestion';
191
+ args: [
192
+ id: string
193
+ ];
194
+ };
195
+ /**
196
+ * Config used for suggestion thread views.
197
+ */
198
+ export interface SuggestionThreadConfig {
199
+ disableComments: boolean;
200
+ editorConfig: EditorConfig;
201
+ maxCommentsWhenCollapsed: number;
202
+ maxThreadTotalWeight: number;
203
+ maxCommentCharsWhenCollapsed: number;
204
+ formatDateTime: (date: Date | string) => string;
205
+ CommentView: typeof CommentView;
206
+ CommentsListView: typeof CommentsListView;
207
+ CommentThreadInputView: typeof CommentThreadInputView;
208
+ SuggestionView: typeof SuggestionView;
209
+ }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module track-changes/ui/view/suggestionthreadview
11
+ * @publicApi
12
+ */
13
+ import { default as BaseSuggestionThreadView, type SuggestionThreadConfig } from './basesuggestionthreadview.js';
14
+ import { type TemplateDefinition, type ViewWithFocusCycler } from 'ckeditor5/src/ui.js';
15
+ import { type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
16
+ import { type Locale } from 'ckeditor5/src/utils.js';
17
+ import type Suggestion from '../../suggestion.js';
18
+ import type SuggestionView from './suggestionview.js';
19
+ /**
20
+ * The default view for a suggestion thread.
21
+ *
22
+ * This view can be replaced by other view by overwriting the
23
+ * {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionThreadView} configuration.
24
+ */
25
+ export default class SuggestionThreadView extends BaseSuggestionThreadView implements ViewWithFocusCycler {
26
+ /**
27
+ * The suggestion thread view type.
28
+ *
29
+ * This value is not equal to the suggestion (model) type. It is evaluated based on the type of the first suggestion for
30
+ * the suggestion thread view template purposes.
31
+ *
32
+ * @observable
33
+ */
34
+ type: 'format' | 'replace' | 'deletion' | 'insertion' | '';
35
+ /**
36
+ * A suggestion description explaining what has been changed. To be presented to the user.
37
+ *
38
+ * @observable
39
+ */
40
+ description: string;
41
+ /**
42
+ * A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
43
+ */
44
+ suggestionView: SuggestionView;
45
+ constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
46
+ /**
47
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
48
+ *
49
+ * Overwrite this method if you want to set a custom template for the suggestion thread view.
50
+ *
51
+ * The template looks as follows:
52
+ *
53
+ * ```ts
54
+ * const bind = this.bindTemplate;
55
+ * const suggestionThreadChildren = [
56
+ * this.suggestionView
57
+ * ];
58
+ *
59
+ * if ( this.commentsListView ) {
60
+ * suggestionThreadChildren.push( this.commentsListView );
61
+ * }
62
+ *
63
+ * if ( this.commentThreadInputView ) {
64
+ * suggestionThreadChildren.push( this.commentThreadInputView );
65
+ * }
66
+ *
67
+ * suggestionThreadChildren.push( this.ariaDescriptionView );
68
+ *
69
+ * return {
70
+ * tag: 'div',
71
+ * attributes: {
72
+ * class: [
73
+ * 'ck',
74
+ * 'ck-rounded-corners',
75
+ * 'ck-suggestion-wrapper',
76
+ * bind.if( 'isActive', 'ck-suggestion-wrapper--active' ),
77
+ * bind.to( 'type', value => `ck-suggestion-${ value }` ),
78
+ * this._config.disableComments && 'ck-suggestion--disabled-comments'
79
+ * ],
80
+ * 'data-suggestion-id': this._model.id,
81
+ * 'data-thread-id': this._model.commentThread!.id,
82
+ * 'data-author-id': this._model.author.id,
83
+ * // Needed for managing focus after adding new comment.
84
+ * tabindex: 0,
85
+ * role: 'listitem',
86
+ * 'aria-label': bind.to( 'ariaLabel' ),
87
+ * 'aria-describedby': this.ariaDescriptionView.id
88
+ * },
89
+ * children: suggestionThreadChildren
90
+ * };
91
+ * ```
92
+ */
93
+ getTemplate(): TemplateDefinition;
94
+ /**
95
+ * @inheritDoc
96
+ */
97
+ render(): void;
98
+ }
@@ -0,0 +1,194 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module track-changes/ui/view/suggestionview
11
+ * @publicApi
12
+ */
13
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
14
+ import { View, type TemplateDefinition, type FocusableView, ViewCollection, FocusCycler } from 'ckeditor5/src/ui.js';
15
+ import { LateFocusButtonView, UserView } from 'ckeditor5-collaboration/src/collaboration-core.js';
16
+ import type Suggestion from '../../suggestion.js';
17
+ /**
18
+ * A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
19
+ *
20
+ * This view can be replaced by other view by overwriting the
21
+ * {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionView} configuration.
22
+ */
23
+ export default class SuggestionView extends View implements FocusableView {
24
+ /**
25
+ * A suggestion description explaining what has been changed. To be presented to the user.
26
+ *
27
+ * @observable
28
+ */
29
+ description: string;
30
+ /**
31
+ * A user view for the suggestion author.
32
+ */
33
+ userView: UserView;
34
+ /**
35
+ * A button view for the button that accepts the suggestion.
36
+ */
37
+ acceptButton: LateFocusButtonView;
38
+ /**
39
+ * A button view for the button that discards the suggestion.
40
+ */
41
+ discardButton: LateFocusButtonView;
42
+ /**
43
+ * A collection of focusable child views.
44
+ */
45
+ readonly focusables: ViewCollection<FocusableView>;
46
+ /**
47
+ * Tracks information about DOM focus in the suggestion.
48
+ */
49
+ readonly focusTracker: FocusTracker;
50
+ /**
51
+ * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
52
+ */
53
+ readonly keystrokes: KeystrokeHandler;
54
+ /**
55
+ * Helps cycling over focusable views in the suggestion.
56
+ */
57
+ readonly focusCycler: FocusCycler;
58
+ /**
59
+ * Suggestion creation date.
60
+ *
61
+ * @observable
62
+ */
63
+ authoredAt: Date | null;
64
+ constructor(locale: Locale, model: Suggestion, config: SuggestionConfig);
65
+ /**
66
+ * @inheritDoc
67
+ */
68
+ render(): void;
69
+ /**
70
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
71
+ *
72
+ * Overwrite this method if you want to set a custom template for the suggestion view.
73
+ *
74
+ * The template looks as follows:
75
+ *
76
+ * ```ts
77
+ * const bind = this.bindTemplate;
78
+ * const suggestionContentElements = [
79
+ * {
80
+ * tag: 'div',
81
+ *
82
+ * attributes: {
83
+ * class: [ 'ck-suggestion__info', 'ck-annotation__info' ]
84
+ * },
85
+ *
86
+ * children: [
87
+ * {
88
+ * tag: 'span',
89
+ *
90
+ * children: [
91
+ * {
92
+ * text: this.userView.name
93
+ * }
94
+ * ],
95
+ *
96
+ * attributes: {
97
+ * class: [ 'ck-suggestion__info-name', 'ck-annotation__info-name' ]
98
+ * }
99
+ * },
100
+ * {
101
+ * tag: 'time',
102
+ *
103
+ * attributes: {
104
+ * datetime: bind.to( 'authoredAt' ),
105
+ * class: [ 'ck-comment__info-time', 'ck-annotation__info-time' ]
106
+ * },
107
+ *
108
+ * children: [
109
+ * {
110
+ * text: bind.to( 'authoredAt', value => this._config.formatDateTime( value ) )
111
+ * }
112
+ * ]
113
+ * }
114
+ * ]
115
+ * },
116
+ * {
117
+ * tag: 'div',
118
+ *
119
+ * attributes: {
120
+ * class: [ 'ck-suggestion__actions', 'ck-annotation__actions' ]
121
+ * },
122
+ *
123
+ * children: [
124
+ * this.acceptButton,
125
+ * this.discardButton
126
+ * ]
127
+ * },
128
+ * {
129
+ * tag: 'div',
130
+ *
131
+ * attributes: {
132
+ * class: [ 'ck-annotation__content-wrapper' ]
133
+ * }
134
+ * }
135
+ * ];
136
+ *
137
+ * if ( this._model.isExternal ) {
138
+ * suggestionContentElements.push( {
139
+ * tag: 'div',
140
+ *
141
+ * attributes: {
142
+ * class: [ 'ck-comment__external' ]
143
+ * },
144
+ *
145
+ * children: [ {
146
+ * text: this.getExternalSuggestionNote()
147
+ * } ]
148
+ * } );
149
+ * }
150
+ *
151
+ * return {
152
+ * tag: 'div',
153
+ *
154
+ * attributes: {
155
+ * class: [
156
+ * 'ck-suggestion',
157
+ * 'ck-annotation'
158
+ * ],
159
+ * tabindex: -1
160
+ * },
161
+ *
162
+ * children: [
163
+ * this.userView,
164
+ * {
165
+ * tag: 'div',
166
+ *
167
+ * attributes: {
168
+ * class: [ 'ck-suggestion__main', 'ck-annotation__main' ],
169
+ * role: 'presentation'
170
+ * },
171
+ *
172
+ * children: suggestionContentElements
173
+ * }
174
+ * ]
175
+ * };
176
+ * ```
177
+ */
178
+ getTemplate(): TemplateDefinition;
179
+ /**
180
+ * @inheritDoc
181
+ */
182
+ focus(): void;
183
+ /**
184
+ * Gets the translated notification text which indicates that the author name comes from an external source.
185
+ */
186
+ getUserViewNotificationText(): string | null;
187
+ /**
188
+ * Gets the translated note which indicates that the suggestion comes from an external source.
189
+ */
190
+ getExternalSuggestionNote(): string;
191
+ }
192
+ export interface SuggestionConfig {
193
+ formatDateTime: (date: Date | string) => string;
194
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module track-changes/utils/common-translations
11
+ */
12
+ import { type Locale } from 'ckeditor5/src/utils.js';
13
+ export declare function getTranslation(locale: Locale, id: string, values?: number | string | ReadonlyArray<number | string>): string;