@ckeditor/ckeditor5-comments 39.0.1 → 40.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 (157) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE.md +6 -6
  3. package/README.md +14 -14
  4. package/build/comments.js +1 -1
  5. package/build/translations/fa.js +1 -1
  6. package/build/translations/pt-br.js +1 -1
  7. package/lang/translations/af.po +1 -0
  8. package/lang/translations/ar.po +1 -0
  9. package/lang/translations/bg.po +1 -0
  10. package/lang/translations/bn.po +1 -0
  11. package/lang/translations/bs.po +1 -0
  12. package/lang/translations/ca.po +1 -0
  13. package/lang/translations/cs.po +1 -0
  14. package/lang/translations/da.po +1 -0
  15. package/lang/translations/de-ch.po +1 -0
  16. package/lang/translations/de.po +1 -0
  17. package/lang/translations/el.po +1 -0
  18. package/lang/translations/en-au.po +1 -0
  19. package/lang/translations/en.po +1 -0
  20. package/lang/translations/es-co.po +1 -0
  21. package/lang/translations/es.po +1 -0
  22. package/lang/translations/et.po +1 -0
  23. package/lang/translations/fa.po +10 -9
  24. package/lang/translations/fi.po +1 -0
  25. package/lang/translations/fr.po +1 -0
  26. package/lang/translations/gl.po +1 -0
  27. package/lang/translations/he.po +1 -0
  28. package/lang/translations/hi.po +1 -0
  29. package/lang/translations/hr.po +1 -0
  30. package/lang/translations/hu.po +1 -0
  31. package/lang/translations/id.po +1 -0
  32. package/lang/translations/it.po +1 -0
  33. package/lang/translations/ja.po +1 -0
  34. package/lang/translations/jv.po +1 -0
  35. package/lang/translations/ko.po +1 -0
  36. package/lang/translations/lt.po +1 -0
  37. package/lang/translations/lv.po +1 -0
  38. package/lang/translations/ms.po +1 -0
  39. package/lang/translations/nl.po +1 -0
  40. package/lang/translations/no.po +1 -0
  41. package/lang/translations/pl.po +1 -0
  42. package/lang/translations/pt-br.po +4 -3
  43. package/lang/translations/pt.po +1 -0
  44. package/lang/translations/ro.po +1 -0
  45. package/lang/translations/ru.po +1 -0
  46. package/lang/translations/sk.po +1 -0
  47. package/lang/translations/sq.po +1 -0
  48. package/lang/translations/sr-latn.po +1 -0
  49. package/lang/translations/sr.po +1 -0
  50. package/lang/translations/sv.po +1 -0
  51. package/lang/translations/th.po +1 -0
  52. package/lang/translations/tk.po +1 -0
  53. package/lang/translations/tr.po +1 -0
  54. package/lang/translations/tt.po +1 -0
  55. package/lang/translations/ug.po +1 -0
  56. package/lang/translations/uk.po +1 -0
  57. package/lang/translations/ur.po +1 -0
  58. package/lang/translations/vi.po +1 -0
  59. package/lang/translations/zh-cn.po +1 -0
  60. package/lang/translations/zh.po +1 -0
  61. package/package.json +3 -7
  62. package/src/annotations/annotation.d.ts +90 -90
  63. package/src/annotations/annotation.js +1 -1
  64. package/src/annotations/annotationcollection.d.ts +98 -98
  65. package/src/annotations/annotationcollection.js +1 -1
  66. package/src/annotations/annotations.d.ts +154 -154
  67. package/src/annotations/annotations.js +1 -1
  68. package/src/annotations/annotationsuis.d.ts +232 -232
  69. package/src/annotations/annotationsuis.js +1 -1
  70. package/src/annotations/editorannotations.d.ts +67 -67
  71. package/src/annotations/editorannotations.js +1 -1
  72. package/src/annotations/inlineannotations.d.ts +90 -90
  73. package/src/annotations/inlineannotations.js +1 -1
  74. package/src/annotations/narrowsidebar.d.ts +85 -85
  75. package/src/annotations/narrowsidebar.js +1 -1
  76. package/src/annotations/sidebar.d.ts +100 -100
  77. package/src/annotations/sidebar.js +1 -1
  78. package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
  79. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  80. package/src/annotations/view/annotationview.d.ts +90 -90
  81. package/src/annotations/view/annotationview.js +1 -1
  82. package/src/annotations/view/sidebaritemview.d.ts +55 -55
  83. package/src/annotations/view/sidebaritemview.js +1 -1
  84. package/src/annotations/view/sidebarview.d.ts +32 -32
  85. package/src/annotations/view/sidebarview.js +1 -1
  86. package/src/annotations/widesidebar.d.ts +77 -77
  87. package/src/annotations/widesidebar.js +1 -1
  88. package/src/augmentation.d.ts +52 -52
  89. package/src/comments/addcommentthreadcommand.d.ts +35 -35
  90. package/src/comments/addcommentthreadcommand.js +1 -1
  91. package/src/comments/commentsarchive.d.ts +31 -31
  92. package/src/comments/commentsarchive.js +1 -1
  93. package/src/comments/commentsarchiveui.d.ts +38 -38
  94. package/src/comments/commentsarchiveui.js +1 -1
  95. package/src/comments/commentsediting.d.ts +79 -79
  96. package/src/comments/commentsediting.js +1 -1
  97. package/src/comments/commentsrepository.d.ts +1129 -1105
  98. package/src/comments/commentsrepository.js +1 -1
  99. package/src/comments/commentsui.d.ts +33 -33
  100. package/src/comments/commentsui.js +1 -1
  101. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
  102. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  103. package/src/comments/integrations/importword.d.ts +21 -21
  104. package/src/comments/integrations/importword.js +1 -1
  105. package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
  106. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  107. package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
  108. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  109. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
  110. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  111. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  112. package/src/comments/ui/commentthreadcontroller.js +1 -1
  113. package/src/comments/ui/view/basecommentthreadview.d.ts +119 -112
  114. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  115. package/src/comments/ui/view/basecommentview.d.ts +112 -112
  116. package/src/comments/ui/view/basecommentview.js +1 -1
  117. package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
  118. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  119. package/src/comments/ui/view/commentcontentview.d.ts +14 -14
  120. package/src/comments/ui/view/commentcontentview.js +1 -1
  121. package/src/comments/ui/view/commentinputview.d.ts +86 -86
  122. package/src/comments/ui/view/commentinputview.js +1 -1
  123. package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
  124. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  125. package/src/comments/ui/view/commentslistview.d.ts +100 -100
  126. package/src/comments/ui/view/commentslistview.js +1 -1
  127. package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
  128. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  129. package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
  130. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  131. package/src/comments/ui/view/commentthreadview.d.ts +118 -117
  132. package/src/comments/ui/view/commentthreadview.js +1 -1
  133. package/src/comments/ui/view/commentview.d.ts +243 -243
  134. package/src/comments/ui/view/commentview.js +1 -1
  135. package/src/comments.d.ts +35 -35
  136. package/src/comments.js +1 -1
  137. package/src/commentsonly.d.ts +33 -33
  138. package/src/commentsonly.js +1 -1
  139. package/src/config.d.ts +176 -176
  140. package/src/index.d.ts +24 -24
  141. package/src/utils/common-translations.d.ts +9 -9
  142. package/src/utils/common-translations.js +1 -1
  143. package/src/utils/createmutationobserver.d.ts +14 -14
  144. package/src/utils/createmutationobserver.js +1 -1
  145. package/theme/annotation-inline.css +2 -1
  146. package/theme/annotation.css +2 -3
  147. package/theme/comment.css +39 -38
  148. package/theme/commentinput.css +2 -1
  149. package/theme/commentmarker.css +7 -6
  150. package/theme/commentsarchive.css +2 -1
  151. package/theme/commentthread.css +68 -57
  152. package/theme/icons/add-comment.svg +1 -1
  153. package/theme/icons/comments-archive.svg +1 -1
  154. package/theme/icons/edit-comment.svg +1 -1
  155. package/theme/icons/remove-comment.svg +1 -1
  156. package/theme/sidebar-narrow.css +4 -3
  157. package/theme/sidebar.css +13 -12
@@ -1,52 +1,52 @@
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
- */
5
- import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the comments feature.
10
- * Introduced by the {@link module:comments/comments~Comments} feature.
11
- *
12
- * Read more in {@link module:comments/config~CommentsConfig}.
13
- *
14
- * ```ts
15
- * ClassicEditor
16
- * .create( {
17
- * comments: ... // Locale editor configuration.
18
- * } )
19
- * .then( ... )
20
- * .catch( ... );
21
- * ```
22
- *
23
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
24
- */
25
- comments?: CommentsConfig;
26
- /**
27
- * The configuration of the sidebar feature.
28
- * Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
29
- */
30
- sidebar?: SidebarConfig;
31
- /**
32
- * Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
33
- *
34
- * ```ts
35
- * ClassicEditor
36
- * .create( {
37
- * commentsOnly: true
38
- * } )
39
- * .then( ... )
40
- * .catch( ... );
41
- * ```
42
- */
43
- commentsOnly?: boolean;
44
- }
45
- interface PluginsMap {
46
- [Annotations.pluginName]: Annotations;
47
- [AnnotationsUIs.pluginName]: AnnotationsUIs;
48
- [EditorAnnotations.pluginName]: EditorAnnotations;
49
- [CommentsRepository.pluginName]: CommentsRepository;
50
- [CommentsUI.pluginName]: CommentsUI;
51
- }
52
- }
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
+ */
5
+ import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the comments feature.
10
+ * Introduced by the {@link module:comments/comments~Comments} feature.
11
+ *
12
+ * Read more in {@link module:comments/config~CommentsConfig}.
13
+ *
14
+ * ```ts
15
+ * ClassicEditor
16
+ * .create( {
17
+ * comments: ... // Locale editor configuration.
18
+ * } )
19
+ * .then( ... )
20
+ * .catch( ... );
21
+ * ```
22
+ *
23
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
24
+ */
25
+ comments?: CommentsConfig;
26
+ /**
27
+ * The configuration of the sidebar feature.
28
+ * Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
29
+ */
30
+ sidebar?: SidebarConfig;
31
+ /**
32
+ * Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
33
+ *
34
+ * ```ts
35
+ * ClassicEditor
36
+ * .create( {
37
+ * commentsOnly: true
38
+ * } )
39
+ * .then( ... )
40
+ * .catch( ... );
41
+ * ```
42
+ */
43
+ commentsOnly?: boolean;
44
+ }
45
+ interface PluginsMap {
46
+ [Annotations.pluginName]: Annotations;
47
+ [AnnotationsUIs.pluginName]: AnnotationsUIs;
48
+ [EditorAnnotations.pluginName]: EditorAnnotations;
49
+ [CommentsRepository.pluginName]: CommentsRepository;
50
+ [CommentsUI.pluginName]: CommentsUI;
51
+ }
52
+ }
@@ -1,35 +1,35 @@
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
- */
5
- /**
6
- * @module comments/comments/addcommentthreadcommand
7
- * @publicApi
8
- */
9
- import { Command } from 'ckeditor5/src/core';
10
- /**
11
- * Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
12
- * Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
13
- *
14
- * ```ts
15
- * // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
16
- * editor.execute( 'addCommentThread' );
17
- *
18
- * // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
19
- * editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
20
- * ```
21
- */
22
- export default class AddCommentThreadCommand extends Command {
23
- /**
24
- * @inheritDoc
25
- */
26
- refresh(): void;
27
- /**
28
- * @fires execute
29
- * @param options Options for executed command.
30
- * @param options.threadId Id of comment marker that will be added.
31
- */
32
- execute({ threadId }?: {
33
- threadId?: string | undefined;
34
- }): void;
35
- }
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
+ */
5
+ /**
6
+ * @module comments/comments/addcommentthreadcommand
7
+ * @publicApi
8
+ */
9
+ import { Command } from 'ckeditor5/src/core';
10
+ /**
11
+ * Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
12
+ * Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
13
+ *
14
+ * ```ts
15
+ * // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
16
+ * editor.execute( 'addCommentThread' );
17
+ *
18
+ * // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
19
+ * editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
20
+ * ```
21
+ */
22
+ export default class AddCommentThreadCommand extends Command {
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ refresh(): void;
27
+ /**
28
+ * @fires execute
29
+ * @param options Options for executed command.
30
+ * @param options.threadId Id of comment marker that will be added.
31
+ */
32
+ execute({ threadId }?: {
33
+ threadId?: string | undefined;
34
+ }): void;
35
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x9e75=['isEnabled','substr','comment:','schema','selection','_hasContent','editor','_trimToContent','addMarker','_itemIsContent','getLastMatchingPosition','push','getRanges','execute','model','element','backward','$textProxy','getItems'];(function(_0x1ce009,_0x9e75ee){const _0x24720f=function(_0x34b0ef){while(--_0x34b0ef){_0x1ce009['push'](_0x1ce009['shift']());}};_0x24720f(++_0x9e75ee);}(_0x9e75,0x6b));const _0x2472=function(_0x1ce009,_0x9e75ee){_0x1ce009=_0x1ce009-0x0;let _0x24720f=_0x9e75[_0x1ce009];return _0x24720f;};import{Command as _0x214934}from'ckeditor5/src/core';import{uid as _0x3b6d38}from'ckeditor5/src/utils';export default class q extends _0x214934{['refresh'](){const _0x4ac79e=this[_0x2472('0xd')][_0x2472('0x2')]['document'][_0x2472('0xb')];for(const _0x2a03e4 of _0x4ac79e[_0x2472('0x0')]())if(this[_0x2472('0xc')](_0x2a03e4))return void(this['isEnabled']=!0x0);this[_0x2472('0x7')]=!0x1;}[_0x2472('0x1')]({threadId:_0x5d2953=_0x3b6d38()}={}){const _0x42f814=this['editor']['model'],_0x17942d=[];for(const _0x550203 of _0x42f814['document']['selection'][_0x2472('0x0')]())this[_0x2472('0xc')](_0x550203)&&_0x17942d[_0x2472('0x12')](this[_0x2472('0xe')](_0x550203));_0x42f814['change'](_0x1b5227=>{for(const _0x4b2987 of _0x17942d){const _0x4d4f9e=_0x3b6d38()[_0x2472('0x8')](0x1,0x5),_0x2c66d6=_0x2472('0x9')+_0x5d2953+':'+_0x4d4f9e;_0x1b5227[_0x2472('0xf')](_0x2c66d6,{'range':_0x4b2987,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x2472('0xc')](_0x397e8e){for(const _0x257bbd of _0x397e8e[_0x2472('0x6')]())if(this[_0x2472('0x10')](_0x257bbd))return!0x0;return!0x1;}['_itemIsContent'](_0x93dcd8){return _0x93dcd8['is'](_0x2472('0x5'))||this[_0x2472('0xd')]['model'][_0x2472('0xa')]['isObject'](_0x93dcd8)&&!_0x93dcd8['is'](_0x2472('0x3'),'tableCell');}[_0x2472('0xe')](_0x5b6c36){const _0x216fad=_0x59eb65=>!this[_0x2472('0x10')](_0x59eb65['item']),_0x53b04f=_0x5b6c36['start'][_0x2472('0x11')](_0x216fad),_0x5b35ed=_0x5b6c36['end']['getLastMatchingPosition'](_0x216fad,{'direction':_0x2472('0x4')});return this['editor'][_0x2472('0x2')]['createRange'](_0x53b04f,_0x5b35ed);}}
23
+ const _0x2213=['getRanges','refresh','_trimToContent','item','end','getItems','push','schema','element','selection','model','substr','_itemIsContent','getLastMatchingPosition','addMarker','document','editor','_hasContent','isEnabled','change','comment:'];(function(_0x5690c4,_0x221336){const _0x5d784b=function(_0x5a2fef){while(--_0x5a2fef){_0x5690c4['push'](_0x5690c4['shift']());}};_0x5d784b(++_0x221336);}(_0x2213,0x1cf));const _0x5d78=function(_0x5690c4,_0x221336){_0x5690c4=_0x5690c4-0x0;let _0x5d784b=_0x2213[_0x5690c4];return _0x5d784b;};import{Command as _0x45b6be}from'ckeditor5/src/core';import{uid as _0x5f3155}from'ckeditor5/src/utils';export default class q extends _0x45b6be{[_0x5d78('0x0')](){const _0x166274=this[_0x5d78('0xf')][_0x5d78('0x9')][_0x5d78('0xe')][_0x5d78('0x8')];for(const _0xec8c2f of _0x166274[_0x5d78('0x14')]())if(this[_0x5d78('0x10')](_0xec8c2f))return void(this[_0x5d78('0x11')]=!0x0);this[_0x5d78('0x11')]=!0x1;}['execute']({threadId:_0x554e56=_0x5f3155()}={}){const _0x3b94d5=this[_0x5d78('0xf')][_0x5d78('0x9')],_0x245f3a=[];for(const _0x33be84 of _0x3b94d5[_0x5d78('0xe')][_0x5d78('0x8')][_0x5d78('0x14')]())this[_0x5d78('0x10')](_0x33be84)&&_0x245f3a[_0x5d78('0x5')](this[_0x5d78('0x1')](_0x33be84));_0x3b94d5[_0x5d78('0x12')](_0x520068=>{for(const _0x168a63 of _0x245f3a){const _0x4cb489=_0x5f3155()[_0x5d78('0xa')](0x1,0x5),_0xd59410=_0x5d78('0x13')+_0x554e56+':'+_0x4cb489;_0x520068[_0x5d78('0xd')](_0xd59410,{'range':_0x168a63,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x5d78('0x10')](_0x1818ba){for(const _0x5be2f6 of _0x1818ba[_0x5d78('0x4')]())if(this[_0x5d78('0xb')](_0x5be2f6))return!0x0;return!0x1;}[_0x5d78('0xb')](_0x567f47){return _0x567f47['is']('$textProxy')||this['editor'][_0x5d78('0x9')][_0x5d78('0x6')]['isObject'](_0x567f47)&&!_0x567f47['is'](_0x5d78('0x7'),'tableCell');}['_trimToContent'](_0x5d8416){const _0x166dbc=_0x29945c=>!this[_0x5d78('0xb')](_0x29945c[_0x5d78('0x2')]),_0x29d58b=_0x5d8416['start'][_0x5d78('0xc')](_0x166dbc),_0x121cef=_0x5d8416[_0x5d78('0x3')][_0x5d78('0xc')](_0x166dbc,{'direction':'backward'});return this[_0x5d78('0xf')][_0x5d78('0x9')]['createRange'](_0x29d58b,_0x121cef);}}
@@ -1,31 +1,31 @@
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
- */
5
- /**
6
- * @module comments/comments/commentsarchive
7
- * @publicApi
8
- */
9
- import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
10
- import { Collection } from 'ckeditor5/src/utils';
11
- import CommentsRepository, { type CommentThread } from './commentsrepository';
12
- import Annotations from '../annotations/annotations';
13
- /**
14
- * This plugin handles all operations on resolved threads needed for the comments archive.
15
- */
16
- export default class CommentsArchive extends ContextPlugin {
17
- resolvedThreads: Collection<CommentThread>;
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName(): "CommentsArchive";
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof CommentsRepository, typeof Annotations];
26
- constructor(context: Context | Editor);
27
- /**
28
- * @inheritDoc
29
- */
30
- init(): void;
31
- }
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
+ */
5
+ /**
6
+ * @module comments/comments/commentsarchive
7
+ * @publicApi
8
+ */
9
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
10
+ import { Collection } from 'ckeditor5/src/utils';
11
+ import CommentsRepository, { type CommentThread } from './commentsrepository';
12
+ import Annotations from '../annotations/annotations';
13
+ /**
14
+ * This plugin handles all operations on archived threads needed for the comments archive.
15
+ */
16
+ export default class CommentsArchive extends ContextPlugin {
17
+ archivedThreads: Collection<CommentThread>;
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): "CommentsArchive";
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): readonly [typeof CommentsRepository, typeof Annotations];
26
+ constructor(context: Context | Editor);
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ init(): void;
31
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x36f5=['highest','resolveCommentThread','activate','focus','init','get','resolvedAt','plugins','listenTo','has','collection','requires','isActive','getCommentThread','_calculatePosition','addCommentThread','resolvedThreads','context','length','remove','CommentsArchive','add','removeCommentThread','pluginName'];(function(_0x250c5b,_0x36f5cb){const _0x500eb3=function(_0x419701){while(--_0x419701){_0x250c5b['push'](_0x250c5b['shift']());}};_0x500eb3(++_0x36f5cb);}(_0x36f5,0xff));const _0x500e=function(_0x250c5b,_0x36f5cb){_0x250c5b=_0x250c5b-0x0;let _0x500eb3=_0x36f5[_0x250c5b];return _0x500eb3;};import{ContextPlugin as _0x4deb87}from'ckeditor5/src/core';import{Collection as _0x436ccc}from'ckeditor5/src/utils';import _0x3d7aff from'./commentsrepository';import _0x14ad91 from'../annotations/annotations';export default class p extends _0x4deb87{static get[_0x500e('0x8')](){return _0x500e('0x5');}static get[_0x500e('0x14')](){return[_0x3d7aff,_0x14ad91];}constructor(_0x5cee9b){super(_0x5cee9b),this[_0x500e('0x1')]=new _0x436ccc();}[_0x500e('0xd')](){const _0x2f176d=this[_0x500e('0x2')],_0x5e6692=_0x2f176d['plugins'][_0x500e('0xe')](_0x3d7aff),_0x1499bd=_0x2f176d[_0x500e('0x10')]['get'](_0x14ad91);this[_0x500e('0x11')](_0x5e6692,_0x500e('0x0'),(_0x5e4aa7,{threadId:_0x4b8840,resolvedAt:_0x560ebf,deletedAt:_0x144c6a})=>{if(_0x560ebf&&!_0x144c6a){const _0x881537=_0x5e6692[_0x500e('0x16')](_0x4b8840);this[_0x500e('0x1')][_0x500e('0x6')](_0x881537,this[_0x500e('0x17')](_0x560ebf));}}),this[_0x500e('0x11')](_0x5e6692,_0x500e('0xa'),(_0x3d4a2a,{threadId:_0x196edf,resolvedAt:_0x5eb758})=>{const _0x5c8e30=_0x5e6692[_0x500e('0x16')](_0x196edf);this[_0x500e('0x1')][_0x500e('0x6')](_0x5c8e30,this[_0x500e('0x17')](_0x5eb758));},{'priority':_0x500e('0x9')}),this['listenTo'](_0x5e6692,'reopenCommentThread',(_0x3c7c97,{threadId:_0x54bd4c})=>{const _0x3f4447=_0x5e6692[_0x500e('0x16')](_0x54bd4c);this[_0x500e('0x1')][_0x500e('0x12')](_0x3f4447)&&this['resolvedThreads'][_0x500e('0x4')](_0x3f4447);},{'priority':_0x500e('0x9')}),this[_0x500e('0x11')](_0x5e6692,_0x500e('0x7'),(_0x3b923c,{threadId:_0x317c39})=>{const _0x12f4f3=_0x5e6692[_0x500e('0x16')](_0x317c39);this[_0x500e('0x1')][_0x500e('0x12')](_0x12f4f3)&&this[_0x500e('0x1')][_0x500e('0x4')](_0x12f4f3);},{'priority':_0x500e('0x9')}),this[_0x500e('0x11')](_0x1499bd[_0x500e('0x13')],_0x500e('0xc'),(_0x5ba6b4,_0x4313d8)=>{_0x4313d8[_0x500e('0x15')]=!0x0,_0x1499bd[_0x500e('0xb')](_0x4313d8);});}[_0x500e('0x17')](_0x459034){const _0xd32a52=[...this[_0x500e('0x1')]]['findIndex'](_0x14f9a2=>_0x14f9a2[_0x500e('0xf')]<_0x459034);return _0xd32a52>-0x1?_0xd32a52:this[_0x500e('0x1')][_0x500e('0x3')];}}
23
+ const _0x3ab1=['listenTo','archivedThreads','remove','add','collection','getCommentThread','plugins','removeCommentThread','stopListening','length','archivedAt','get','isActive','init','CommentsArchive','change:archivedAt','focus','addCommentThread','context','has','_calculatePosition','pluginName','highest','activate'];(function(_0x49e76d,_0x3ab10d){const _0x54c1c5=function(_0x3f24ba){while(--_0x3f24ba){_0x49e76d['push'](_0x49e76d['shift']());}};_0x54c1c5(++_0x3ab10d);}(_0x3ab1,0x19a));const _0x54c1=function(_0x49e76d,_0x3ab10d){_0x49e76d=_0x49e76d-0x0;let _0x54c1c5=_0x3ab1[_0x49e76d];return _0x54c1c5;};import{ContextPlugin as _0x166a2b}from'ckeditor5/src/core';import{Collection as _0x2c55de}from'ckeditor5/src/utils';import _0x12f892 from'./commentsrepository';import _0x5a1702 from'../annotations/annotations';export default class p extends _0x166a2b{static get[_0x54c1('0x13')](){return _0x54c1('0xc');}static get['requires'](){return[_0x12f892,_0x5a1702];}constructor(_0x4fa177){super(_0x4fa177),this[_0x54c1('0x17')]=new _0x2c55de();}[_0x54c1('0xb')](){const _0x2e68a1=this[_0x54c1('0x10')],_0x3bcb1d=_0x2e68a1[_0x54c1('0x4')][_0x54c1('0x9')](_0x12f892),_0x5bb0e3=_0x2e68a1[_0x54c1('0x4')][_0x54c1('0x9')](_0x5a1702);this[_0x54c1('0x16')](_0x3bcb1d,_0x54c1('0xf'),(_0x41bb0c,{threadId:_0x5dbdd9})=>{const _0x27d2dd=_0x3bcb1d[_0x54c1('0x3')](_0x5dbdd9);_0x27d2dd['archivedAt']&&this[_0x54c1('0x17')][_0x54c1('0x1')](_0x27d2dd,this[_0x54c1('0x12')](_0x27d2dd[_0x54c1('0x8')])),this[_0x54c1('0x16')](_0x27d2dd,_0x54c1('0xd'),(_0x95b997,_0x74c2b7,_0x23cf04)=>{_0x23cf04?this[_0x54c1('0x17')]['has'](_0x27d2dd)||this['archivedThreads'][_0x54c1('0x1')](_0x27d2dd,this[_0x54c1('0x12')](_0x27d2dd['archivedAt'])):this[_0x54c1('0x17')][_0x54c1('0x11')](_0x27d2dd)&&this[_0x54c1('0x17')][_0x54c1('0x0')](_0x27d2dd);});}),this[_0x54c1('0x16')](_0x3bcb1d,_0x54c1('0x5'),(_0x1db089,{threadId:_0x5c89dc})=>{const _0x3160f8=_0x3bcb1d[_0x54c1('0x3')](_0x5c89dc);this[_0x54c1('0x6')](_0x3160f8),this[_0x54c1('0x17')][_0x54c1('0x11')](_0x3160f8)&&this[_0x54c1('0x17')][_0x54c1('0x0')](_0x3160f8);},{'priority':_0x54c1('0x14')}),this['listenTo'](_0x5bb0e3[_0x54c1('0x2')],_0x54c1('0xe'),(_0x2bea1d,_0x4c955)=>{_0x4c955[_0x54c1('0xa')]=!0x0,_0x5bb0e3[_0x54c1('0x15')](_0x4c955);});}[_0x54c1('0x12')](_0x349a1c){const _0x512eab=[...this[_0x54c1('0x17')]]['findIndex'](_0x3a5880=>_0x3a5880[_0x54c1('0x8')]<_0x349a1c);return _0x512eab>-0x1?_0x512eab:this[_0x54c1('0x17')][_0x54c1('0x7')];}}
@@ -1,38 +1,38 @@
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
- */
5
- /**
6
- * @module comments/comments/commentsarchiveui
7
- * @publicApi
8
- */
9
- import '../../theme/commentsarchive.css';
10
- import { Plugin, type Editor } from 'ckeditor5/src/core';
11
- import { ViewCollection } from 'ckeditor5/src/ui';
12
- import CommentsArchiveView from './ui/view/commentsarchiveview';
13
- import CommentsArchive from './commentsarchive';
14
- import type AnnotationView from '../annotations/view/annotationview';
15
- /**
16
- * Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
17
- * resolved comment thread annotation views.
18
- */
19
- export default class CommentsArchiveUI extends Plugin {
20
- commentsArchiveView: CommentsArchiveView | undefined;
21
- annotationViews: ViewCollection<AnnotationView>;
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "CommentsArchiveUI";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get requires(): readonly [typeof CommentsArchive];
30
- /**
31
- * @inheritDoc
32
- */
33
- constructor(editor: Editor);
34
- /**
35
- * @inheritDoc
36
- */
37
- init(): void;
38
- }
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
+ */
5
+ /**
6
+ * @module comments/comments/commentsarchiveui
7
+ * @publicApi
8
+ */
9
+ import '../../theme/commentsarchive.css';
10
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
11
+ import { ViewCollection } from 'ckeditor5/src/ui';
12
+ import CommentsArchiveView from './ui/view/commentsarchiveview';
13
+ import CommentsArchive from './commentsarchive';
14
+ import type AnnotationView from '../annotations/view/annotationview';
15
+ /**
16
+ * Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
17
+ * archived comment thread annotation views.
18
+ */
19
+ export default class CommentsArchiveUI extends Plugin {
20
+ commentsArchiveView: CommentsArchiveView | undefined;
21
+ annotationViews: ViewCollection<AnnotationView>;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "CommentsArchiveUI";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get requires(): readonly [typeof CommentsArchive];
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ constructor(editor: Editor);
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ init(): void;
38
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x30db=['_threadToController','ck-body','push','collection','_pendingThreads','length','mainView','collaboration.channelId','findIndex','Annotations','_calculatePosition','get','_createArchiveUIDropdown','find','annotationViews','classList','plugins','isVisible','listenTo','CommentsRepository','focusableElements','focusTracker','buttonView','contains','config','children','extendTemplate','channelId','_handleAnnotationFocusableElements','innerView','add','remove','position','locale','panelView','_visibleAnnotations','set','init','editor','filter','resolvedThreads','resolvedAt','getByInnerView','CommentsArchiveUI','change:isOpen','view','commentsArchive','commentsArchiveView'];(function(_0x1639ec,_0x30db15){const _0x1ce3db=function(_0x2790ef){while(--_0x2790ef){_0x1639ec['push'](_0x1639ec['shift']());}};_0x1ce3db(++_0x30db15);}(_0x30db,0xc1));const _0x1ce3=function(_0x1639ec,_0x30db15){_0x1639ec=_0x1639ec-0x0;let _0x1ce3db=_0x30db[_0x1639ec];return _0x1ce3db;};import'../../theme/commentsarchive.css';import{Plugin as _0x41b119}from'ckeditor5/src/core';import{createDropdown as _0x539c44,ViewCollection as _0x4a723a}from'ckeditor5/src/ui';import _0x560133 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x445600}from'../utils/common-translations';import _0x5f03d6 from'./ui/view/commentsarchiveview';import _0x2089d8 from'./commentsarchive';export default class a extends _0x41b119{static get['pluginName'](){return _0x1ce3('0x2a');}static get['requires'](){return[_0x2089d8];}constructor(_0x10b63b){super(_0x10b63b),this['annotationViews']=new _0x4a723a(),this[_0x1ce3('0x3')]=[];}[_0x1ce3('0x24')](){this[_0x1ce3('0x25')]['ui']['componentFactory']['add'](_0x1ce3('0x2d'),()=>this[_0x1ce3('0xb')]());const _0x2bf972=this[_0x1ce3('0x25')]['plugins'][_0x1ce3('0xa')](_0x2089d8),_0x3217ff=this[_0x1ce3('0x25')][_0x1ce3('0xf')][_0x1ce3('0xa')]('Annotations'),_0x298437=this[_0x1ce3('0x25')][_0x1ce3('0xf')]['get'](_0x1ce3('0x12'));this[_0x1ce3('0x11')](_0x2bf972[_0x1ce3('0x27')],_0x1ce3('0x1d'),(_0x5a7c18,_0x930dd2)=>{const _0x20fa02=this[_0x1ce3('0x25')][_0x1ce3('0x17')][_0x1ce3('0xa')](_0x1ce3('0x6'));if(!_0x20fa02||_0x930dd2[_0x1ce3('0x1a')]===_0x20fa02){const _0x5943a8=this[_0x1ce3('0x9')](_0x930dd2[_0x1ce3('0x28')]),_0x1be2e4=_0x298437[_0x1ce3('0x2f')][_0x1ce3('0xa')](_0x930dd2);if(!_0x1be2e4)return void this[_0x1ce3('0x3')][_0x1ce3('0x1')]({'thread':_0x930dd2,'position':_0x5943a8});const _0x2efc49=_0x3217ff[_0x1ce3('0x29')](_0x1be2e4['view']);_0x2efc49[_0x1ce3('0x10')]&&_0x3217ff[_0x1ce3('0x22')][_0x1ce3('0x1e')](_0x2efc49),this['annotationViews']['add'](_0x2efc49[_0x1ce3('0x2c')],_0x5943a8);}}),this[_0x1ce3('0x11')](_0x3217ff[_0x1ce3('0x2')],_0x1ce3('0x1d'),(_0x28e724,_0x4db21c)=>{const _0x2c4ce3=this['_pendingThreads'][_0x1ce3('0xc')](({thread:_0x5eb3e7})=>{const _0x2bfe21=_0x298437['_threadToController'][_0x1ce3('0xa')](_0x5eb3e7);return _0x2bfe21&&_0x4db21c[_0x1ce3('0x1c')]===_0x2bfe21[_0x1ce3('0x2c')];});_0x2c4ce3&&(this[_0x1ce3('0xd')][_0x1ce3('0x1d')](_0x4db21c['view'],_0x2c4ce3[_0x1ce3('0x1f')]),this[_0x1ce3('0x3')]['splice'](this[_0x1ce3('0x3')]['indexOf'](_0x2c4ce3),0x1));}),this[_0x1ce3('0x11')](_0x2bf972[_0x1ce3('0x27')],_0x1ce3('0x1e'),(_0x4a419b,_0x31aa3f)=>{const _0x443e65=this[_0x1ce3('0x25')][_0x1ce3('0x17')][_0x1ce3('0xa')](_0x1ce3('0x6'));if(!_0x443e65||_0x31aa3f['channelId']===_0x443e65){const _0x5a26f5=_0x298437[_0x1ce3('0x2f')][_0x1ce3('0xa')](_0x31aa3f),_0x40c45e=_0x3217ff['getByInnerView'](_0x5a26f5[_0x1ce3('0x2c')]);this['annotationViews'][_0x1ce3('0x1e')](_0x40c45e[_0x1ce3('0x2c')]),this['stopListening'](_0x40c45e['focusableElements']);}});}[_0x1ce3('0x1b')](_0x454349,_0x41e0f3){for(const _0x1a0998 of _0x41e0f3[_0x1ce3('0x13')])_0x1a0998[_0x1ce3('0xe')][_0x1ce3('0x16')](_0x1ce3('0x0'))&&_0x454349[_0x1ce3('0x14')][_0x1ce3('0x1d')](_0x1a0998);this[_0x1ce3('0x11')](_0x41e0f3[_0x1ce3('0x13')],'add',(_0x59e4c6,_0x1bafbe)=>{_0x1bafbe[_0x1ce3('0xe')]['contains'](_0x1ce3('0x0'))&&_0x454349[_0x1ce3('0x14')][_0x1ce3('0x1d')](_0x1bafbe);}),this[_0x1ce3('0x11')](_0x41e0f3['focusableElements'],_0x1ce3('0x1e'),(_0x470138,_0xee05b2)=>{_0xee05b2[_0x1ce3('0xe')][_0x1ce3('0x16')](_0x1ce3('0x0'))&&_0x454349[_0x1ce3('0x14')][_0x1ce3('0x1e')](_0xee05b2);});}[_0x1ce3('0x9')](_0x12f446){const _0x1c3264=this[_0x1ce3('0x25')][_0x1ce3('0x17')][_0x1ce3('0xa')](_0x1ce3('0x6')),_0x3a7ae2=[...this[_0x1ce3('0x25')][_0x1ce3('0xf')][_0x1ce3('0xa')](_0x2089d8)['resolvedThreads']][_0x1ce3('0x26')](_0x1639c5=>_0x1639c5[_0x1ce3('0x1a')]!==_0x1c3264)[_0x1ce3('0x7')](_0x33f0d2=>_0x33f0d2[_0x1ce3('0x28')]<_0x12f446);return _0x3a7ae2>-0x1?_0x3a7ae2:this['annotationViews'][_0x1ce3('0x4')];}[_0x1ce3('0xb')](){const _0xbc93e9=this[_0x1ce3('0x25')],_0xd69227=this[_0x1ce3('0x25')][_0x1ce3('0xf')]['get'](_0x1ce3('0x8')),_0x206a0f=_0x539c44(_0xbc93e9[_0x1ce3('0x20')]);_0x206a0f[_0x1ce3('0x15')][_0x1ce3('0x23')]({'icon':_0x560133,'label':_0x445600(_0xbc93e9[_0x1ce3('0x20')],'COMMENTS_ARCHIVE'),'tooltip':!0x0}),_0x206a0f[_0x1ce3('0x21')][_0x1ce3('0x19')]({'attributes':{'class':'ck-comments-archive-dropdown'}}),_0x206a0f['on'](_0x1ce3('0x2b'),(_0x3041a2,_0x19aada,_0x56afc3)=>{this[_0x1ce3('0x2e')]||(this['commentsArchiveView']=new _0x5f03d6(_0xbc93e9['locale'],this[_0x1ce3('0xd')])),_0x56afc3?_0x206a0f[_0x1ce3('0x21')][_0x1ce3('0x18')][_0x1ce3('0x1d')](this[_0x1ce3('0x2e')]):_0x206a0f[_0x1ce3('0x21')]['children']['remove'](this['commentsArchiveView']);});for(const _0x385db7 of this[_0x1ce3('0xd')]){const _0x3c3203=_0xd69227['getByInnerView'](_0x385db7[_0x1ce3('0x5')]);this[_0x1ce3('0x1b')](_0x206a0f,_0x3c3203);}return _0x206a0f[_0x1ce3('0x11')](this['annotationViews'],_0x1ce3('0x1d'),(_0x469701,_0x201fc3)=>{const _0x3155bf=_0xd69227['getByInnerView'](_0x201fc3[_0x1ce3('0x5')]);this['_handleAnnotationFocusableElements'](_0x206a0f,_0x3155bf);}),_0x206a0f['listenTo'](this['annotationViews'],_0x1ce3('0x1e'),(_0x71c110,_0x314f97)=>{const _0xc9734f=_0xd69227[_0x1ce3('0x29')](_0x314f97['mainView']);for(const _0x3ca9dd of _0xc9734f['focusableElements'])_0x3ca9dd['classList']['contains'](_0x1ce3('0x0'))&&_0x206a0f[_0x1ce3('0x14')][_0x1ce3('0x1e')](_0x3ca9dd);}),_0x206a0f;}}
23
+ const _0x5f3e=['change:isOpen','buttonView','archivedThreads','focusableElements','plugins','collaboration.channelId','view','stopListening','getByInnerView','_calculatePosition','commentsArchiveView','editor','ck-body','classList','init','length','Annotations','set','requires','componentFactory','_createArchiveUIDropdown','archivedAt','findIndex','remove','get','commentsArchive','extendTemplate','focusTracker','find','indexOf','listenTo','channelId','contains','annotationViews','config','isVisible','panelView','ck-comments-archive-dropdown','CommentsRepository','add','locale','push','_threadToController','mainView','children','splice','innerView','_pendingThreads','collection'];(function(_0x4dc8e8,_0x5f3ebf){const _0x2aa53d=function(_0x58ce8a){while(--_0x58ce8a){_0x4dc8e8['push'](_0x4dc8e8['shift']());}};_0x2aa53d(++_0x5f3ebf);}(_0x5f3e,0x1ab));const _0x2aa5=function(_0x4dc8e8,_0x5f3ebf){_0x4dc8e8=_0x4dc8e8-0x0;let _0x2aa53d=_0x5f3e[_0x4dc8e8];return _0x2aa53d;};import'../../theme/commentsarchive.css';import{Plugin as _0x2b717e}from'ckeditor5/src/core';import{createDropdown as _0x3f24f0,ViewCollection as _0xd17bf7}from'ckeditor5/src/ui';import _0x2e5695 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x39ca5e}from'../utils/common-translations';import _0x5b7879 from'./ui/view/commentsarchiveview';import _0x450248 from'./commentsarchive';export default class a extends _0x2b717e{static get['pluginName'](){return'CommentsArchiveUI';}static get[_0x2aa5('0x20')](){return[_0x450248];}constructor(_0x2eea13){super(_0x2eea13),this[_0x2aa5('0x2f')]=new _0xd17bf7(),this[_0x2aa5('0xc')]=[];}[_0x2aa5('0x1c')](){this[_0x2aa5('0x19')]['ui'][_0x2aa5('0x21')][_0x2aa5('0x4')](_0x2aa5('0x27'),()=>this[_0x2aa5('0x22')]());const _0x21e482=this[_0x2aa5('0x19')][_0x2aa5('0x12')][_0x2aa5('0x26')](_0x450248),_0x3a8bd8=this[_0x2aa5('0x19')][_0x2aa5('0x12')][_0x2aa5('0x26')](_0x2aa5('0x1e')),_0x3be34b=this['editor'][_0x2aa5('0x12')]['get'](_0x2aa5('0x3'));this[_0x2aa5('0x2c')](_0x21e482[_0x2aa5('0x10')],_0x2aa5('0x4'),(_0x549904,_0x59a95f)=>{const _0x4a34ab=this[_0x2aa5('0x19')]['config'][_0x2aa5('0x26')](_0x2aa5('0x13'));if(!_0x4a34ab||_0x59a95f['channelId']===_0x4a34ab){const _0x5916ad=this[_0x2aa5('0x17')](_0x59a95f[_0x2aa5('0x23')]),_0x1af775=_0x3be34b[_0x2aa5('0x7')][_0x2aa5('0x26')](_0x59a95f);if(!_0x1af775)return void this['_pendingThreads'][_0x2aa5('0x6')]({'thread':_0x59a95f,'position':_0x5916ad});const _0x229ea4=_0x3a8bd8[_0x2aa5('0x16')](_0x1af775[_0x2aa5('0x14')]);_0x229ea4[_0x2aa5('0x0')]&&_0x3a8bd8['_visibleAnnotations']['remove'](_0x229ea4),this['annotationViews'][_0x2aa5('0x4')](_0x229ea4['view'],_0x5916ad);}}),this[_0x2aa5('0x2c')](_0x3a8bd8[_0x2aa5('0xd')],'add',(_0x1b65bf,_0x8e3ba6)=>{const _0x4ccf26=this[_0x2aa5('0xc')][_0x2aa5('0x2a')](({thread:_0x5945cd})=>{const _0x8bdb35=_0x3be34b[_0x2aa5('0x7')][_0x2aa5('0x26')](_0x5945cd);return _0x8bdb35&&_0x8e3ba6[_0x2aa5('0xb')]===_0x8bdb35[_0x2aa5('0x14')];});_0x4ccf26&&(this[_0x2aa5('0x2f')][_0x2aa5('0x4')](_0x8e3ba6[_0x2aa5('0x14')],_0x4ccf26['position']),this['_pendingThreads'][_0x2aa5('0xa')](this[_0x2aa5('0xc')][_0x2aa5('0x2b')](_0x4ccf26),0x1));}),this[_0x2aa5('0x2c')](_0x21e482[_0x2aa5('0x10')],'remove',(_0x610552,_0x5a3283)=>{const _0x38b3e8=this[_0x2aa5('0x19')]['config']['get'](_0x2aa5('0x13'));if(!_0x38b3e8||_0x5a3283[_0x2aa5('0x2d')]===_0x38b3e8){const _0x22978c=_0x3be34b['_threadToController'][_0x2aa5('0x26')](_0x5a3283),_0x3623c6=_0x3a8bd8['getByInnerView'](_0x22978c[_0x2aa5('0x14')]);this['annotationViews'][_0x2aa5('0x25')](_0x3623c6[_0x2aa5('0x14')]),this[_0x2aa5('0x15')](_0x3623c6[_0x2aa5('0x11')]);}});}['_handleAnnotationFocusableElements'](_0x2616fe,_0x17d8a8){for(const _0x539d78 of _0x17d8a8[_0x2aa5('0x11')])_0x539d78[_0x2aa5('0x1b')][_0x2aa5('0x2e')](_0x2aa5('0x1a'))&&_0x2616fe[_0x2aa5('0x29')][_0x2aa5('0x4')](_0x539d78);this[_0x2aa5('0x2c')](_0x17d8a8[_0x2aa5('0x11')],_0x2aa5('0x4'),(_0x353b2a,_0x4434b6)=>{_0x4434b6[_0x2aa5('0x1b')]['contains'](_0x2aa5('0x1a'))&&_0x2616fe[_0x2aa5('0x29')][_0x2aa5('0x4')](_0x4434b6);}),this[_0x2aa5('0x2c')](_0x17d8a8[_0x2aa5('0x11')],_0x2aa5('0x25'),(_0x24b62b,_0x4bf11e)=>{_0x4bf11e['classList'][_0x2aa5('0x2e')](_0x2aa5('0x1a'))&&_0x2616fe[_0x2aa5('0x29')][_0x2aa5('0x25')](_0x4bf11e);});}['_calculatePosition'](_0x2d9763){const _0x483af8=this[_0x2aa5('0x19')][_0x2aa5('0x30')][_0x2aa5('0x26')]('collaboration.channelId'),_0x6b36fe=[...this[_0x2aa5('0x19')][_0x2aa5('0x12')][_0x2aa5('0x26')](_0x450248)[_0x2aa5('0x10')]]['filter'](_0x416fa3=>_0x416fa3[_0x2aa5('0x2d')]===_0x483af8)[_0x2aa5('0x24')](_0x711c7a=>_0x711c7a[_0x2aa5('0x23')]<_0x2d9763);return _0x6b36fe>-0x1?_0x6b36fe-0x1:this['annotationViews'][_0x2aa5('0x1d')];}[_0x2aa5('0x22')](){const _0x1f1d84=this[_0x2aa5('0x19')],_0x1ba16e=this['editor'][_0x2aa5('0x12')]['get'](_0x2aa5('0x1e')),_0x262fdb=_0x3f24f0(_0x1f1d84[_0x2aa5('0x5')]);_0x262fdb[_0x2aa5('0xf')][_0x2aa5('0x1f')]({'icon':_0x2e5695,'label':_0x39ca5e(_0x1f1d84[_0x2aa5('0x5')],'COMMENTS_ARCHIVE'),'tooltip':!0x0}),_0x262fdb[_0x2aa5('0x1')][_0x2aa5('0x28')]({'attributes':{'class':_0x2aa5('0x2')}}),_0x262fdb['on'](_0x2aa5('0xe'),(_0x2952f1,_0x1a6fcf,_0x50dc1c)=>{this[_0x2aa5('0x18')]||(this[_0x2aa5('0x18')]=new _0x5b7879(_0x1f1d84[_0x2aa5('0x5')],this['annotationViews'])),_0x50dc1c?_0x262fdb[_0x2aa5('0x1')][_0x2aa5('0x9')][_0x2aa5('0x4')](this['commentsArchiveView']):_0x262fdb['panelView'][_0x2aa5('0x9')][_0x2aa5('0x25')](this[_0x2aa5('0x18')]);});for(const _0x1e890d of this[_0x2aa5('0x2f')]){const _0x37b5e6=_0x1ba16e[_0x2aa5('0x16')](_0x1e890d['mainView']);this['_handleAnnotationFocusableElements'](_0x262fdb,_0x37b5e6);}return _0x262fdb[_0x2aa5('0x2c')](this[_0x2aa5('0x2f')],'add',(_0x4ba179,_0x54f7c2)=>{const _0x9ae6f7=_0x1ba16e[_0x2aa5('0x16')](_0x54f7c2['mainView']);this['_handleAnnotationFocusableElements'](_0x262fdb,_0x9ae6f7);}),_0x262fdb[_0x2aa5('0x2c')](this[_0x2aa5('0x2f')],_0x2aa5('0x25'),(_0x3a8fa,_0x16f634)=>{const _0x1648f3=_0x1ba16e[_0x2aa5('0x16')](_0x16f634[_0x2aa5('0x8')]);for(const _0x11f9bd of _0x1648f3[_0x2aa5('0x11')])_0x11f9bd[_0x2aa5('0x1b')][_0x2aa5('0x2e')]('ck-body')&&_0x262fdb[_0x2aa5('0x29')][_0x2aa5('0x25')](_0x11f9bd);}),_0x262fdb;}}
@@ -1,79 +1,79 @@
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
- */
5
- /**
6
- * @module comments/comments/commentsediting
7
- */
8
- import { Plugin, type Editor } from 'ckeditor5/src/core';
9
- import type { Marker } from 'ckeditor5/src/engine';
10
- import CommentsRepository from './commentsrepository';
11
- import EditorAnnotations from '../annotations/editorannotations';
12
- import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode';
13
- import '../../theme/commentmarker.css';
14
- import CommentsImportWord from './integrations/importword';
15
- /**
16
- * Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
17
- * {@link module:engine/model/markercollection~Marker comment markers}.
18
- */
19
- export default class CommentsEditing extends Plugin {
20
- /**
21
- * If set to `true`, the plugin won't load comment thread for the new marker immediately after the marker is added to the editor.
22
- * Instead, the plugin will wait until the flag will be set to `false` and then load missing comments.
23
- *
24
- * It's useful to hold fetching comments from the server when comments are used with real-time collaboration.
25
- * When a user connects to an existing document, the operations from the history need to be applied one by one.
26
- * An operation which added a new comment marker might be followed by an operation which removes that marker, so it's not
27
- * necessary to make an additional request then.
28
- *
29
- * @observable
30
- */
31
- isThreadsLoadingPaused: boolean;
32
- /**
33
- * Name of the active comment marker.
34
- *
35
- * Markers conversion checks if comment should be marked as active and adds/removes additional css class during the conversion.
36
- *
37
- * @observable
38
- */
39
- activeMarker: string | null;
40
- /**
41
- * @inheritDoc
42
- */
43
- static get requires(): readonly [typeof CommentsRepository, typeof EditorAnnotations, typeof CommentsRestrictedEditingMode, typeof CommentsImportWord];
44
- /**
45
- * @inheritDoc
46
- */
47
- static get pluginName(): "CommentsEditing";
48
- /**
49
- * @inheritDoc
50
- */
51
- constructor(editor: Editor);
52
- /**
53
- * @inheritDoc
54
- */
55
- init(): void;
56
- /**
57
- * @inheritDoc
58
- */
59
- destroy(): void;
60
- /**
61
- * Returns `true` if there is at least one marker in the content that is related to a comment thread with given `threadId`.
62
- *
63
- * @param threadId Comment thread id.
64
- */
65
- hasMarkerForId(threadId: string): boolean;
66
- /**
67
- * Returns all markers that are related to the comment thread with the given `threadId`.
68
- *
69
- * @param threadId Comment thread id.
70
- * @returns Array with all markers related to given comment thread.
71
- */
72
- getAllMarkersForId(threadId: string): Array<Marker>;
73
- /**
74
- * Scrolls editing view to the first thread marker.
75
- *
76
- * @param threadId Comment thread id.
77
- */
78
- scrollToThreadMarker(threadId: string): void;
79
- }
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
+ */
5
+ /**
6
+ * @module comments/comments/commentsediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
9
+ import type { Marker } from 'ckeditor5/src/engine';
10
+ import CommentsRepository from './commentsrepository';
11
+ import EditorAnnotations from '../annotations/editorannotations';
12
+ import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode';
13
+ import '../../theme/commentmarker.css';
14
+ import CommentsImportWord from './integrations/importword';
15
+ /**
16
+ * Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
17
+ * {@link module:engine/model/markercollection~Marker comment markers}.
18
+ */
19
+ export default class CommentsEditing extends Plugin {
20
+ /**
21
+ * If set to `true`, the plugin won't load comment thread for the new marker immediately after the marker is added to the editor.
22
+ * Instead, the plugin will wait until the flag will be set to `false` and then load missing comments.
23
+ *
24
+ * It's useful to hold fetching comments from the server when comments are used with real-time collaboration.
25
+ * When a user connects to an existing document, the operations from the history need to be applied one by one.
26
+ * An operation which added a new comment marker might be followed by an operation which removes that marker, so it's not
27
+ * necessary to make an additional request then.
28
+ *
29
+ * @observable
30
+ */
31
+ isThreadsLoadingPaused: boolean;
32
+ /**
33
+ * Name of the active comment marker.
34
+ *
35
+ * Markers conversion checks if comment should be marked as active and adds/removes additional css class during the conversion.
36
+ *
37
+ * @observable
38
+ */
39
+ activeMarker: string | null;
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ static get requires(): readonly [typeof CommentsRepository, typeof EditorAnnotations, typeof CommentsRestrictedEditingMode, typeof CommentsImportWord];
44
+ /**
45
+ * @inheritDoc
46
+ */
47
+ static get pluginName(): "CommentsEditing";
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ constructor(editor: Editor);
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ init(): void;
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ destroy(): void;
60
+ /**
61
+ * Returns `true` if there is at least one marker in the content that is related to a comment thread with given `threadId`.
62
+ *
63
+ * @param threadId Comment thread id.
64
+ */
65
+ hasMarkerForId(threadId: string): boolean;
66
+ /**
67
+ * Returns all markers that are related to the comment thread with the given `threadId`.
68
+ *
69
+ * @param threadId Comment thread id.
70
+ * @returns Array with all markers related to given comment thread.
71
+ */
72
+ getAllMarkersForId(threadId: string): Array<Marker>;
73
+ /**
74
+ * Scrolls editing view to the first thread marker.
75
+ *
76
+ * @param threadId Comment thread id.
77
+ */
78
+ scrollToThreadMarker(threadId: string): void;
79
+ }