@ckeditor/ckeditor5-comments 41.3.1 → 41.4.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 (265) hide show
  1. package/build/comments.js +1 -1
  2. package/build/translations/ti.js +1 -0
  3. package/dist/index-content.css +4 -0
  4. package/dist/index-editor.css +596 -0
  5. package/dist/index.css +990 -0
  6. package/dist/index.js +23 -0
  7. package/dist/translations/af.d.ts +8 -0
  8. package/dist/translations/af.js +23 -0
  9. package/dist/translations/af.umd.js +23 -0
  10. package/dist/translations/ar.d.ts +8 -0
  11. package/dist/translations/ar.js +23 -0
  12. package/dist/translations/ar.umd.js +23 -0
  13. package/dist/translations/bg.d.ts +8 -0
  14. package/dist/translations/bg.js +23 -0
  15. package/dist/translations/bg.umd.js +23 -0
  16. package/dist/translations/bn.d.ts +8 -0
  17. package/dist/translations/bn.js +23 -0
  18. package/dist/translations/bn.umd.js +23 -0
  19. package/dist/translations/bs.d.ts +8 -0
  20. package/dist/translations/bs.js +23 -0
  21. package/dist/translations/bs.umd.js +23 -0
  22. package/dist/translations/ca.d.ts +8 -0
  23. package/dist/translations/ca.js +23 -0
  24. package/dist/translations/ca.umd.js +23 -0
  25. package/dist/translations/cs.d.ts +8 -0
  26. package/dist/translations/cs.js +23 -0
  27. package/dist/translations/cs.umd.js +23 -0
  28. package/dist/translations/da.d.ts +8 -0
  29. package/dist/translations/da.js +23 -0
  30. package/dist/translations/da.umd.js +23 -0
  31. package/dist/translations/de-ch.d.ts +8 -0
  32. package/dist/translations/de-ch.js +23 -0
  33. package/dist/translations/de-ch.umd.js +23 -0
  34. package/dist/translations/de.d.ts +8 -0
  35. package/dist/translations/de.js +23 -0
  36. package/dist/translations/de.umd.js +23 -0
  37. package/dist/translations/el.d.ts +8 -0
  38. package/dist/translations/el.js +23 -0
  39. package/dist/translations/el.umd.js +23 -0
  40. package/dist/translations/en-au.d.ts +8 -0
  41. package/dist/translations/en-au.js +23 -0
  42. package/dist/translations/en-au.umd.js +23 -0
  43. package/dist/translations/en.d.ts +8 -0
  44. package/dist/translations/en.js +23 -0
  45. package/dist/translations/en.umd.js +23 -0
  46. package/dist/translations/es-co.d.ts +8 -0
  47. package/dist/translations/es-co.js +23 -0
  48. package/dist/translations/es-co.umd.js +23 -0
  49. package/dist/translations/es.d.ts +8 -0
  50. package/dist/translations/es.js +23 -0
  51. package/dist/translations/es.umd.js +23 -0
  52. package/dist/translations/et.d.ts +8 -0
  53. package/dist/translations/et.js +23 -0
  54. package/dist/translations/et.umd.js +23 -0
  55. package/dist/translations/fa.d.ts +8 -0
  56. package/dist/translations/fa.js +23 -0
  57. package/dist/translations/fa.umd.js +23 -0
  58. package/dist/translations/fi.d.ts +8 -0
  59. package/dist/translations/fi.js +23 -0
  60. package/dist/translations/fi.umd.js +23 -0
  61. package/dist/translations/fr.d.ts +8 -0
  62. package/dist/translations/fr.js +23 -0
  63. package/dist/translations/fr.umd.js +23 -0
  64. package/dist/translations/gl.d.ts +8 -0
  65. package/dist/translations/gl.js +23 -0
  66. package/dist/translations/gl.umd.js +23 -0
  67. package/dist/translations/he.d.ts +8 -0
  68. package/dist/translations/he.js +23 -0
  69. package/dist/translations/he.umd.js +23 -0
  70. package/dist/translations/hi.d.ts +8 -0
  71. package/dist/translations/hi.js +23 -0
  72. package/dist/translations/hi.umd.js +23 -0
  73. package/dist/translations/hr.d.ts +8 -0
  74. package/dist/translations/hr.js +23 -0
  75. package/dist/translations/hr.umd.js +23 -0
  76. package/dist/translations/hu.d.ts +8 -0
  77. package/dist/translations/hu.js +23 -0
  78. package/dist/translations/hu.umd.js +23 -0
  79. package/dist/translations/id.d.ts +8 -0
  80. package/dist/translations/id.js +23 -0
  81. package/dist/translations/id.umd.js +23 -0
  82. package/dist/translations/it.d.ts +8 -0
  83. package/dist/translations/it.js +23 -0
  84. package/dist/translations/it.umd.js +23 -0
  85. package/dist/translations/ja.d.ts +8 -0
  86. package/dist/translations/ja.js +23 -0
  87. package/dist/translations/ja.umd.js +23 -0
  88. package/dist/translations/jv.d.ts +8 -0
  89. package/dist/translations/jv.js +23 -0
  90. package/dist/translations/jv.umd.js +23 -0
  91. package/dist/translations/ko.d.ts +8 -0
  92. package/dist/translations/ko.js +23 -0
  93. package/dist/translations/ko.umd.js +23 -0
  94. package/dist/translations/lt.d.ts +8 -0
  95. package/dist/translations/lt.js +23 -0
  96. package/dist/translations/lt.umd.js +23 -0
  97. package/dist/translations/lv.d.ts +8 -0
  98. package/dist/translations/lv.js +23 -0
  99. package/dist/translations/lv.umd.js +23 -0
  100. package/dist/translations/ms.d.ts +8 -0
  101. package/dist/translations/ms.js +23 -0
  102. package/dist/translations/ms.umd.js +23 -0
  103. package/dist/translations/nl.d.ts +8 -0
  104. package/dist/translations/nl.js +23 -0
  105. package/dist/translations/nl.umd.js +23 -0
  106. package/dist/translations/no.d.ts +8 -0
  107. package/dist/translations/no.js +23 -0
  108. package/dist/translations/no.umd.js +23 -0
  109. package/dist/translations/pl.d.ts +8 -0
  110. package/dist/translations/pl.js +23 -0
  111. package/dist/translations/pl.umd.js +23 -0
  112. package/dist/translations/pt-br.d.ts +8 -0
  113. package/dist/translations/pt-br.js +23 -0
  114. package/dist/translations/pt-br.umd.js +23 -0
  115. package/dist/translations/pt.d.ts +8 -0
  116. package/dist/translations/pt.js +23 -0
  117. package/dist/translations/pt.umd.js +23 -0
  118. package/dist/translations/ro.d.ts +8 -0
  119. package/dist/translations/ro.js +23 -0
  120. package/dist/translations/ro.umd.js +23 -0
  121. package/dist/translations/ru.d.ts +8 -0
  122. package/dist/translations/ru.js +23 -0
  123. package/dist/translations/ru.umd.js +23 -0
  124. package/dist/translations/sk.d.ts +8 -0
  125. package/dist/translations/sk.js +23 -0
  126. package/dist/translations/sk.umd.js +23 -0
  127. package/dist/translations/sq.d.ts +8 -0
  128. package/dist/translations/sq.js +23 -0
  129. package/dist/translations/sq.umd.js +23 -0
  130. package/dist/translations/sr-latn.d.ts +8 -0
  131. package/dist/translations/sr-latn.js +23 -0
  132. package/dist/translations/sr-latn.umd.js +23 -0
  133. package/dist/translations/sr.d.ts +8 -0
  134. package/dist/translations/sr.js +23 -0
  135. package/dist/translations/sr.umd.js +23 -0
  136. package/dist/translations/sv.d.ts +8 -0
  137. package/dist/translations/sv.js +23 -0
  138. package/dist/translations/sv.umd.js +23 -0
  139. package/dist/translations/th.d.ts +8 -0
  140. package/dist/translations/th.js +23 -0
  141. package/dist/translations/th.umd.js +23 -0
  142. package/dist/translations/ti.d.ts +8 -0
  143. package/dist/translations/ti.js +23 -0
  144. package/dist/translations/ti.umd.js +23 -0
  145. package/dist/translations/tk.d.ts +8 -0
  146. package/dist/translations/tk.js +23 -0
  147. package/dist/translations/tk.umd.js +23 -0
  148. package/dist/translations/tr.d.ts +8 -0
  149. package/dist/translations/tr.js +23 -0
  150. package/dist/translations/tr.umd.js +23 -0
  151. package/dist/translations/tt.d.ts +8 -0
  152. package/dist/translations/tt.js +23 -0
  153. package/dist/translations/tt.umd.js +23 -0
  154. package/dist/translations/ug.d.ts +8 -0
  155. package/dist/translations/ug.js +23 -0
  156. package/dist/translations/ug.umd.js +23 -0
  157. package/dist/translations/uk.d.ts +8 -0
  158. package/dist/translations/uk.js +23 -0
  159. package/dist/translations/uk.umd.js +23 -0
  160. package/dist/translations/ur.d.ts +8 -0
  161. package/dist/translations/ur.js +23 -0
  162. package/dist/translations/ur.umd.js +23 -0
  163. package/dist/translations/vi.d.ts +8 -0
  164. package/dist/translations/vi.js +23 -0
  165. package/dist/translations/vi.umd.js +23 -0
  166. package/dist/translations/zh-cn.d.ts +8 -0
  167. package/dist/translations/zh-cn.js +23 -0
  168. package/dist/translations/zh-cn.umd.js +23 -0
  169. package/dist/translations/zh.d.ts +8 -0
  170. package/dist/translations/zh.js +23 -0
  171. package/dist/translations/zh.umd.js +23 -0
  172. package/dist/types/annotations/annotation.d.ts +94 -0
  173. package/dist/types/annotations/annotationcollection.d.ts +102 -0
  174. package/dist/types/annotations/annotations.d.ts +158 -0
  175. package/dist/types/annotations/annotationsuis.d.ts +236 -0
  176. package/dist/types/annotations/editorannotations.d.ts +71 -0
  177. package/dist/types/annotations/inlineannotations.d.ts +94 -0
  178. package/dist/types/annotations/narrowsidebar.d.ts +89 -0
  179. package/dist/types/annotations/sidebar.d.ts +104 -0
  180. package/dist/types/annotations/view/annotationcounterbuttonview.d.ts +33 -0
  181. package/dist/types/annotations/view/annotationview.d.ts +94 -0
  182. package/dist/types/annotations/view/sidebaritemview.d.ts +59 -0
  183. package/dist/types/annotations/view/sidebarview.d.ts +36 -0
  184. package/dist/types/annotations/widesidebar.d.ts +81 -0
  185. package/dist/types/augmentation.d.ts +56 -0
  186. package/dist/types/comments/addcommentthreadcommand.d.ts +39 -0
  187. package/dist/types/comments/commentsarchive.d.ts +35 -0
  188. package/dist/types/comments/commentsarchiveui.d.ts +42 -0
  189. package/dist/types/comments/commentsediting.d.ts +84 -0
  190. package/dist/types/comments/commentsrepository.d.ts +1134 -0
  191. package/dist/types/comments/commentsui.d.ts +37 -0
  192. package/dist/types/comments/integrations/clipboard.d.ts +30 -0
  193. package/dist/types/comments/integrations/commentsrestrictededitingmode.d.ts +21 -0
  194. package/dist/types/comments/integrations/importword.d.ts +25 -0
  195. package/dist/types/comments/ui/commenteditor/commenteditor.d.ts +40 -0
  196. package/dist/types/comments/ui/commenteditor/commenteditorui.d.ts +35 -0
  197. package/dist/types/comments/ui/commenteditor/commenteditoruiview.d.ts +40 -0
  198. package/dist/types/comments/ui/commentthreadcontroller.d.ts +68 -0
  199. package/dist/types/comments/ui/view/basecommentthreadview.d.ts +123 -0
  200. package/dist/types/comments/ui/view/basecommentview.d.ts +116 -0
  201. package/dist/types/comments/ui/view/collapsedcommentsview.d.ts +17 -0
  202. package/dist/types/comments/ui/view/commentcontentview.d.ts +18 -0
  203. package/dist/types/comments/ui/view/commentinputview.d.ts +90 -0
  204. package/dist/types/comments/ui/view/commentsarchiveview.d.ts +42 -0
  205. package/dist/types/comments/ui/view/commentslistview.d.ts +104 -0
  206. package/dist/types/comments/ui/view/commentthreadheaderview.d.ts +54 -0
  207. package/dist/types/comments/ui/view/commentthreadinputview.d.ts +45 -0
  208. package/dist/types/comments/ui/view/commentthreadview.d.ts +122 -0
  209. package/dist/types/comments/ui/view/commentview.d.ts +247 -0
  210. package/dist/types/comments.d.ts +39 -0
  211. package/dist/types/commentsonly.d.ts +37 -0
  212. package/dist/types/config.d.ts +202 -0
  213. package/dist/types/index.d.ts +28 -0
  214. package/dist/types/utils/common-translations.d.ts +13 -0
  215. package/dist/types/utils/createmutationobserver.d.ts +18 -0
  216. package/lang/translations/ti.po +120 -0
  217. package/package.json +4 -3
  218. package/src/annotations/annotation.js +1 -1
  219. package/src/annotations/annotationcollection.js +1 -1
  220. package/src/annotations/annotations.js +1 -1
  221. package/src/annotations/annotationsuis.js +1 -1
  222. package/src/annotations/editorannotations.js +1 -1
  223. package/src/annotations/inlineannotations.js +1 -1
  224. package/src/annotations/narrowsidebar.js +1 -1
  225. package/src/annotations/sidebar.js +1 -1
  226. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  227. package/src/annotations/view/annotationview.js +1 -1
  228. package/src/annotations/view/sidebaritemview.js +1 -1
  229. package/src/annotations/view/sidebarview.js +1 -1
  230. package/src/annotations/widesidebar.js +1 -1
  231. package/src/comments/addcommentthreadcommand.js +1 -1
  232. package/src/comments/commentsarchive.js +1 -1
  233. package/src/comments/commentsarchiveui.js +1 -1
  234. package/src/comments/commentsediting.js +1 -1
  235. package/src/comments/commentsrepository.d.ts +1 -1
  236. package/src/comments/commentsrepository.js +1 -1
  237. package/src/comments/commentsui.js +1 -1
  238. package/src/comments/integrations/clipboard.js +1 -1
  239. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  240. package/src/comments/integrations/importword.js +1 -1
  241. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  242. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  243. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  244. package/src/comments/ui/commentthreadcontroller.js +1 -1
  245. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  246. package/src/comments/ui/view/basecommentview.js +1 -1
  247. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  248. package/src/comments/ui/view/commentcontentview.js +1 -1
  249. package/src/comments/ui/view/commentinputview.js +1 -1
  250. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  251. package/src/comments/ui/view/commentslistview.js +1 -1
  252. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  253. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  254. package/src/comments/ui/view/commentthreadview.js +1 -1
  255. package/src/comments/ui/view/commentview.js +1 -1
  256. package/src/comments.js +1 -1
  257. package/src/commentsonly.js +1 -1
  258. package/src/index.js +1 -1
  259. package/src/utils/common-translations.js +1 -1
  260. package/src/utils/createmutationobserver.js +1 -1
  261. package/theme/annotation.css +13 -0
  262. package/theme/comment.css +4 -0
  263. package/theme/commentinput.css +4 -0
  264. package/theme/commentthread.css +8 -0
  265. package/theme/sidebar.css +8 -0
@@ -0,0 +1,56 @@
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 { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index.js';
10
+ declare module '@ckeditor/ckeditor5-core' {
11
+ interface EditorConfig {
12
+ /**
13
+ * The configuration of the comments feature.
14
+ * Introduced by the {@link module:comments/comments~Comments} feature.
15
+ *
16
+ * Read more in {@link module:comments/config~CommentsConfig}.
17
+ *
18
+ * ```ts
19
+ * ClassicEditor
20
+ * .create( {
21
+ * comments: ... // Locale editor configuration.
22
+ * } )
23
+ * .then( ... )
24
+ * .catch( ... );
25
+ * ```
26
+ *
27
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
28
+ */
29
+ comments?: CommentsConfig;
30
+ /**
31
+ * The configuration of the sidebar feature.
32
+ * Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
33
+ */
34
+ sidebar?: SidebarConfig;
35
+ /**
36
+ * Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
37
+ *
38
+ * ```ts
39
+ * ClassicEditor
40
+ * .create( {
41
+ * commentsOnly: true
42
+ * } )
43
+ * .then( ... )
44
+ * .catch( ... );
45
+ * ```
46
+ */
47
+ commentsOnly?: boolean;
48
+ }
49
+ interface PluginsMap {
50
+ [Annotations.pluginName]: Annotations;
51
+ [AnnotationsUIs.pluginName]: AnnotationsUIs;
52
+ [EditorAnnotations.pluginName]: EditorAnnotations;
53
+ [CommentsRepository.pluginName]: CommentsRepository;
54
+ [CommentsUI.pluginName]: CommentsUI;
55
+ }
56
+ }
@@ -0,0 +1,39 @@
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 comments/comments/addcommentthreadcommand
11
+ * @publicApi
12
+ */
13
+ import { Command } from 'ckeditor5/src/core.js';
14
+ /**
15
+ * Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
16
+ * Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
17
+ *
18
+ * ```ts
19
+ * // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
20
+ * editor.execute( 'addCommentThread' );
21
+ *
22
+ * // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
23
+ * editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
24
+ * ```
25
+ */
26
+ export default class AddCommentThreadCommand extends Command {
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ refresh(): void;
31
+ /**
32
+ * @fires execute
33
+ * @param options Options for executed command.
34
+ * @param options.threadId Id of comment marker that will be added.
35
+ */
36
+ execute({ threadId }?: {
37
+ threadId?: string | undefined;
38
+ }): void;
39
+ }
@@ -0,0 +1,35 @@
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 comments/comments/commentsarchive
11
+ * @publicApi
12
+ */
13
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
14
+ import { Collection } from 'ckeditor5/src/utils.js';
15
+ import CommentsRepository, { type CommentThread } from './commentsrepository.js';
16
+ import Annotations from '../annotations/annotations.js';
17
+ /**
18
+ * This plugin handles all operations on archived threads needed for the comments archive.
19
+ */
20
+ export default class CommentsArchive extends ContextPlugin {
21
+ archivedThreads: Collection<CommentThread>;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "CommentsArchive";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get requires(): readonly [typeof CommentsRepository, typeof Annotations];
30
+ constructor(context: Context | Editor);
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init(): void;
35
+ }
@@ -0,0 +1,42 @@
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 comments/comments/commentsarchiveui
11
+ * @publicApi
12
+ */
13
+ import '../../theme/commentsarchive.css';
14
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
15
+ import { ViewCollection, Dialog } from 'ckeditor5/src/ui.js';
16
+ import CommentsArchiveView from './ui/view/commentsarchiveview.js';
17
+ import CommentsArchive from './commentsarchive.js';
18
+ import type AnnotationView from '../annotations/view/annotationview.js';
19
+ /**
20
+ * Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
21
+ * archived comment thread annotation views.
22
+ */
23
+ export default class CommentsArchiveUI extends Plugin {
24
+ commentsArchiveView: CommentsArchiveView | undefined;
25
+ annotationViews: ViewCollection<AnnotationView>;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "CommentsArchiveUI";
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get requires(): readonly [typeof CommentsArchive, typeof Dialog];
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ constructor(editor: Editor);
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ init(): void;
42
+ }
@@ -0,0 +1,84 @@
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 comments/comments/commentsediting
11
+ */
12
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
13
+ import type { Marker } from 'ckeditor5/src/engine.js';
14
+ import CommentsRepository from './commentsrepository.js';
15
+ import EditorAnnotations from '../annotations/editorannotations.js';
16
+ import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode.js';
17
+ import CommentsImportWord from './integrations/importword.js';
18
+ import CommentsClipboard from './integrations/clipboard.js';
19
+ import '../../theme/commentmarker.css';
20
+ /**
21
+ * Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
22
+ * {@link module:engine/model/markercollection~Marker comment markers}.
23
+ */
24
+ export default class CommentsEditing extends Plugin {
25
+ /**
26
+ * If set to `true`, the plugin won't load comment thread for the new marker immediately after the marker is added to the editor.
27
+ * Instead, the plugin will wait until the flag will be set to `false` and then load missing comments.
28
+ *
29
+ * It's useful to hold fetching comments from the server when comments are used with real-time collaboration.
30
+ * When a user connects to an existing document, the operations from the history need to be applied one by one.
31
+ * An operation which added a new comment marker might be followed by an operation which removes that marker, so it's not
32
+ * necessary to make an additional request then.
33
+ *
34
+ * @observable
35
+ */
36
+ isThreadsLoadingPaused: boolean;
37
+ /**
38
+ * Name of the active comment marker.
39
+ *
40
+ * Markers conversion checks if comment should be marked as active and adds/removes additional css class during the conversion.
41
+ *
42
+ * @observable
43
+ */
44
+ activeMarker: string | null;
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ static get requires(): readonly [typeof CommentsRepository, typeof EditorAnnotations, typeof CommentsRestrictedEditingMode, typeof CommentsImportWord, typeof CommentsClipboard];
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static get pluginName(): "CommentsEditing";
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ constructor(editor: Editor);
57
+ /**
58
+ * @inheritDoc
59
+ */
60
+ init(): void;
61
+ /**
62
+ * @inheritDoc
63
+ */
64
+ destroy(): void;
65
+ /**
66
+ * Returns `true` if there is at least one marker in the content that is related to a comment thread with given `threadId`.
67
+ *
68
+ * @param threadId Comment thread id.
69
+ */
70
+ hasMarkerForId(threadId: string): boolean;
71
+ /**
72
+ * Returns all markers that are related to the comment thread with the given `threadId`.
73
+ *
74
+ * @param threadId Comment thread id.
75
+ * @returns Array with all markers related to given comment thread.
76
+ */
77
+ getAllMarkersForId(threadId: string): Array<Marker>;
78
+ /**
79
+ * Scrolls editing view to the first thread marker.
80
+ *
81
+ * @param threadId Comment thread id.
82
+ */
83
+ scrollToThreadMarker(threadId: string): void;
84
+ }