@ckeditor/ckeditor5-comments 38.2.0-alpha.1 → 39.0.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 (163) hide show
  1. package/README.md +0 -1
  2. package/build/comments.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de.js +1 -1
  10. package/build/translations/el.js +1 -1
  11. package/build/translations/es.js +1 -1
  12. package/build/translations/et.js +1 -1
  13. package/build/translations/fi.js +1 -1
  14. package/build/translations/fr.js +1 -1
  15. package/build/translations/gl.js +1 -1
  16. package/build/translations/he.js +1 -1
  17. package/build/translations/hi.js +1 -1
  18. package/build/translations/hr.js +1 -1
  19. package/build/translations/hu.js +1 -1
  20. package/build/translations/id.js +1 -1
  21. package/build/translations/ja.js +1 -1
  22. package/build/translations/ko.js +1 -1
  23. package/build/translations/lt.js +1 -1
  24. package/build/translations/ms.js +1 -1
  25. package/build/translations/nl.js +1 -1
  26. package/build/translations/no.js +1 -1
  27. package/build/translations/pl.js +1 -1
  28. package/build/translations/pt.js +1 -1
  29. package/build/translations/ro.js +1 -1
  30. package/build/translations/ru.js +1 -1
  31. package/build/translations/sq.js +1 -1
  32. package/build/translations/sr.js +1 -1
  33. package/build/translations/sv.js +1 -1
  34. package/build/translations/th.js +1 -1
  35. package/build/translations/tr.js +1 -1
  36. package/build/translations/uk.js +1 -1
  37. package/build/translations/vi.js +1 -1
  38. package/build/translations/zh-cn.js +1 -1
  39. package/build/translations/zh.js +1 -1
  40. package/lang/translations/ar.po +1 -1
  41. package/lang/translations/bg.po +1 -1
  42. package/lang/translations/bn.po +1 -1
  43. package/lang/translations/ca.po +1 -1
  44. package/lang/translations/cs.po +1 -1
  45. package/lang/translations/da.po +1 -1
  46. package/lang/translations/de.po +1 -1
  47. package/lang/translations/el.po +1 -1
  48. package/lang/translations/es.po +1 -1
  49. package/lang/translations/et.po +1 -1
  50. package/lang/translations/fi.po +1 -1
  51. package/lang/translations/fr.po +1 -1
  52. package/lang/translations/gl.po +12 -12
  53. package/lang/translations/he.po +1 -1
  54. package/lang/translations/hi.po +1 -1
  55. package/lang/translations/hr.po +1 -1
  56. package/lang/translations/hu.po +1 -1
  57. package/lang/translations/id.po +1 -1
  58. package/lang/translations/ja.po +1 -1
  59. package/lang/translations/ko.po +1 -1
  60. package/lang/translations/lt.po +1 -1
  61. package/lang/translations/ms.po +1 -1
  62. package/lang/translations/nl.po +1 -1
  63. package/lang/translations/no.po +1 -1
  64. package/lang/translations/pl.po +1 -1
  65. package/lang/translations/pt.po +1 -1
  66. package/lang/translations/ro.po +1 -1
  67. package/lang/translations/ru.po +1 -1
  68. package/lang/translations/sq.po +2 -2
  69. package/lang/translations/sr.po +1 -1
  70. package/lang/translations/sv.po +1 -1
  71. package/lang/translations/th.po +1 -1
  72. package/lang/translations/tr.po +1 -1
  73. package/lang/translations/uk.po +1 -1
  74. package/lang/translations/vi.po +1 -1
  75. package/lang/translations/zh-cn.po +1 -1
  76. package/lang/translations/zh.po +1 -1
  77. package/package.json +4 -5
  78. package/src/annotations/annotation.d.ts +10 -6
  79. package/src/annotations/annotation.js +2 -2
  80. package/src/annotations/annotationcollection.d.ts +7 -3
  81. package/src/annotations/annotationcollection.js +2 -2
  82. package/src/annotations/annotations.d.ts +10 -6
  83. package/src/annotations/annotations.js +2 -2
  84. package/src/annotations/annotationsuis.d.ts +9 -5
  85. package/src/annotations/annotationsuis.js +2 -2
  86. package/src/annotations/editorannotations.d.ts +8 -4
  87. package/src/annotations/editorannotations.js +2 -2
  88. package/src/annotations/inlineannotations.d.ts +10 -6
  89. package/src/annotations/inlineannotations.js +2 -2
  90. package/src/annotations/narrowsidebar.d.ts +10 -6
  91. package/src/annotations/narrowsidebar.js +2 -2
  92. package/src/annotations/sidebar.d.ts +9 -5
  93. package/src/annotations/sidebar.js +2 -2
  94. package/src/annotations/view/annotationcounterbuttonview.d.ts +6 -2
  95. package/src/annotations/view/annotationcounterbuttonview.js +2 -2
  96. package/src/annotations/view/annotationview.d.ts +6 -2
  97. package/src/annotations/view/annotationview.js +2 -2
  98. package/src/annotations/view/sidebaritemview.d.ts +6 -2
  99. package/src/annotations/view/sidebaritemview.js +2 -2
  100. package/src/annotations/view/sidebarview.d.ts +6 -2
  101. package/src/annotations/view/sidebarview.js +2 -2
  102. package/src/annotations/widesidebar.d.ts +9 -5
  103. package/src/annotations/widesidebar.js +2 -2
  104. package/src/augmentation.d.ts +5 -1
  105. package/src/augmentation.js +1 -1
  106. package/src/comments/addcommentthreadcommand.d.ts +5 -1
  107. package/src/comments/addcommentthreadcommand.js +2 -2
  108. package/src/comments/commentsarchive.d.ts +8 -4
  109. package/src/comments/commentsarchive.js +2 -2
  110. package/src/comments/commentsarchiveui.d.ts +9 -5
  111. package/src/comments/commentsarchiveui.js +2 -2
  112. package/src/comments/commentsediting.d.ts +10 -6
  113. package/src/comments/commentsediting.js +2 -2
  114. package/src/comments/commentsrepository.d.ts +30 -13
  115. package/src/comments/commentsrepository.js +2 -2
  116. package/src/comments/commentsui.d.ts +9 -5
  117. package/src/comments/commentsui.js +2 -2
  118. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +5 -1
  119. package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
  120. package/src/comments/integrations/importword.d.ts +5 -1
  121. package/src/comments/integrations/importword.js +2 -2
  122. package/src/comments/ui/commenteditor/commenteditor.d.ts +9 -5
  123. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  124. package/src/comments/ui/commenteditor/commenteditorui.d.ts +7 -3
  125. package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
  126. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +7 -3
  127. package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
  128. package/src/comments/ui/commentthreadcontroller.d.ts +6 -6
  129. package/src/comments/ui/commentthreadcontroller.js +2 -2
  130. package/src/comments/ui/view/basecommentthreadview.d.ts +12 -8
  131. package/src/comments/ui/view/basecommentthreadview.js +2 -2
  132. package/src/comments/ui/view/basecommentview.d.ts +8 -4
  133. package/src/comments/ui/view/basecommentview.js +2 -2
  134. package/src/comments/ui/view/collapsedcommentsview.d.ts +6 -2
  135. package/src/comments/ui/view/collapsedcommentsview.js +2 -2
  136. package/src/comments/ui/view/commentcontentview.d.ts +6 -2
  137. package/src/comments/ui/view/commentcontentview.js +2 -2
  138. package/src/comments/ui/view/commentinputview.d.ts +8 -4
  139. package/src/comments/ui/view/commentinputview.js +2 -2
  140. package/src/comments/ui/view/commentsarchiveview.d.ts +7 -3
  141. package/src/comments/ui/view/commentsarchiveview.js +2 -2
  142. package/src/comments/ui/view/commentslistview.d.ts +9 -5
  143. package/src/comments/ui/view/commentslistview.js +2 -2
  144. package/src/comments/ui/view/commentthreadheaderview.d.ts +7 -3
  145. package/src/comments/ui/view/commentthreadheaderview.js +2 -2
  146. package/src/comments/ui/view/commentthreadinputview.d.ts +9 -5
  147. package/src/comments/ui/view/commentthreadinputview.js +2 -2
  148. package/src/comments/ui/view/commentthreadview.d.ts +11 -7
  149. package/src/comments/ui/view/commentthreadview.js +2 -2
  150. package/src/comments/ui/view/commentview.d.ts +12 -8
  151. package/src/comments/ui/view/commentview.js +2 -2
  152. package/src/comments.d.ts +14 -10
  153. package/src/comments.js +2 -2
  154. package/src/commentsonly.d.ts +6 -2
  155. package/src/commentsonly.js +2 -2
  156. package/src/config.d.ts +11 -7
  157. package/src/config.js +1 -1
  158. package/src/index.d.ts +24 -21
  159. package/src/index.js +2 -2
  160. package/src/utils/common-translations.d.ts +5 -1
  161. package/src/utils/common-translations.js +2 -2
  162. package/src/utils/createmutationobserver.d.ts +2 -1
  163. package/src/utils/createmutationobserver.js +2 -2
@@ -1,17 +1,21 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module comments/comments/commentsrepository
3
7
  * @publicApi
4
8
  */
5
- import { Context, PendingActions, ContextPlugin, Editor } from 'ckeditor5/src/core.js';
6
- import { Collection } from 'ckeditor5/src/utils.js';
7
- import { Users, type User } from 'ckeditor5-collaboration';
8
- import CommentThreadController from './ui/commentthreadcontroller.js';
9
+ import { Context, PendingActions, ContextPlugin, Editor } from 'ckeditor5/src/core';
10
+ import { Collection } from 'ckeditor5/src/utils';
11
+ import { Users, type User } from 'ckeditor5-collaboration/src/collaboration-core';
12
+ import CommentThreadController from './ui/commentthreadcontroller';
9
13
  import '../../theme/comment.css';
10
14
  import '../../theme/commentthread.css';
11
15
  import '../../theme/commentinput.css';
12
- import Annotation, { type AnnotationTarget } from '../annotations/annotation.js';
13
- import Annotations from '../annotations/annotations.js';
14
- import type BaseCommentThreadView from './ui/view/basecommentthreadview.js';
16
+ import Annotation, { type AnnotationTarget } from '../annotations/annotation';
17
+ import Annotations from '../annotations/annotations';
18
+ import type BaseCommentThreadView from './ui/view/basecommentthreadview';
15
19
  /**
16
20
  * Stores the list of {@link module:comments/comments/commentsrepository~CommentThread}
17
21
  * and provides event-driven API for managing them. It is also responsible for using the comments adapter
@@ -245,11 +249,11 @@ interface CommentPermissionsConfig {
245
249
  */
246
250
  admin: boolean;
247
251
  /**
248
- * Allows for editing and removing any comments created by any user.
252
+ * Allows for editing and removing any comments created by other users.
249
253
  */
250
254
  modifyAll: boolean;
251
255
  /**
252
- * Allows for editing and removing comments created by this user.
256
+ * Allows for adding new comments as well as editing and removing comments created by this user.
253
257
  */
254
258
  write: boolean;
255
259
  /**
@@ -258,8 +262,8 @@ interface CommentPermissionsConfig {
258
262
  resolve: boolean;
259
263
  }
260
264
  declare const CommentThread_base: {
261
- new (): import("ckeditor5/src/utils.js").Observable;
262
- prototype: import("ckeditor5/src/utils.js").Observable;
265
+ new (): import("ckeditor5/src/utils").Observable;
266
+ prototype: import("ckeditor5/src/utils").Observable;
263
267
  };
264
268
  /**
265
269
  * Comment thread representation.
@@ -278,6 +282,12 @@ export declare class CommentThread extends CommentThread_base {
278
282
  * @observable
279
283
  */
280
284
  isRemovable: boolean;
285
+ /**
286
+ * Informs if a user has permission to add a new comment to the comment thread.
287
+ *
288
+ * @observable
289
+ */
290
+ canComment: boolean;
281
291
  /**
282
292
  * User id which resolved the comment thread.
283
293
  *
@@ -290,6 +300,12 @@ export declare class CommentThread extends CommentThread_base {
290
300
  * @observable
291
301
  */
292
302
  resolvedAt: Date | null;
303
+ /**
304
+ * Date when the comment thread has been removed.
305
+ *
306
+ * @observable
307
+ */
308
+ deletedAt: Date | null;
293
309
  /**
294
310
  * Informs if the comment thread is resolved.
295
311
  *
@@ -323,6 +339,7 @@ export declare class CommentThread extends CommentThread_base {
323
339
  attributes: Record<string, unknown>;
324
340
  resolvedAt: Date | null;
325
341
  resolvedBy: User | null;
342
+ deletedAt: Date | null;
326
343
  isResolvable: boolean;
327
344
  isSubmitted: boolean;
328
345
  });
@@ -448,8 +465,8 @@ export declare class CommentThread extends CommentThread_base {
448
465
  toJSON(): CommentThreadDataJSON;
449
466
  }
450
467
  declare const Comment_base: {
451
- new (): import("ckeditor5/src/utils.js").Observable;
452
- prototype: import("ckeditor5/src/utils.js").Observable;
468
+ new (): import("ckeditor5/src/utils").Observable;
469
+ prototype: import("ckeditor5/src/utils").Observable;
453
470
  };
454
471
  /**
455
472
  * Single comment representation. A part of a {@link module:comments/comments/commentsrepository~CommentThread commentThread}.