@ckeditor/ckeditor5-comments 36.0.0 → 37.0.0-rc.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 (202) hide show
  1. package/build/comments.js +2 -2
  2. package/build/translations/af.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/bs.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de-ch.js +1 -1
  11. package/build/translations/de.js +1 -1
  12. package/build/translations/el.js +1 -1
  13. package/build/translations/en-au.js +1 -1
  14. package/build/translations/es-co.js +1 -1
  15. package/build/translations/es.js +1 -1
  16. package/build/translations/et.js +1 -1
  17. package/build/translations/fa.js +1 -1
  18. package/build/translations/fi.js +1 -1
  19. package/build/translations/fr.js +1 -1
  20. package/build/translations/gl.js +1 -1
  21. package/build/translations/he.js +1 -1
  22. package/build/translations/hi.js +1 -1
  23. package/build/translations/hr.js +1 -1
  24. package/build/translations/hu.js +1 -1
  25. package/build/translations/id.js +1 -1
  26. package/build/translations/it.js +1 -1
  27. package/build/translations/ja.js +1 -1
  28. package/build/translations/jv.js +1 -1
  29. package/build/translations/ko.js +1 -1
  30. package/build/translations/lt.js +1 -1
  31. package/build/translations/lv.js +1 -1
  32. package/build/translations/ms.js +1 -1
  33. package/build/translations/nl.js +1 -1
  34. package/build/translations/no.js +1 -1
  35. package/build/translations/pl.js +1 -1
  36. package/build/translations/pt-br.js +1 -1
  37. package/build/translations/pt.js +1 -1
  38. package/build/translations/ro.js +1 -1
  39. package/build/translations/ru.js +1 -1
  40. package/build/translations/sk.js +1 -1
  41. package/build/translations/sr-latn.js +1 -1
  42. package/build/translations/sr.js +1 -1
  43. package/build/translations/sv.js +1 -1
  44. package/build/translations/th.js +1 -1
  45. package/build/translations/tk.js +1 -1
  46. package/build/translations/tr.js +1 -1
  47. package/build/translations/tt.js +1 -1
  48. package/build/translations/ug.js +1 -1
  49. package/build/translations/uk.js +1 -1
  50. package/build/translations/ur.js +1 -1
  51. package/build/translations/vi.js +1 -1
  52. package/build/translations/zh-cn.js +1 -1
  53. package/build/translations/zh.js +1 -1
  54. package/lang/contexts.json +8 -1
  55. package/lang/translations/af.po +28 -0
  56. package/lang/translations/ar.po +28 -0
  57. package/lang/translations/bg.po +28 -0
  58. package/lang/translations/bn.po +28 -0
  59. package/lang/translations/bs.po +28 -0
  60. package/lang/translations/ca.po +28 -0
  61. package/lang/translations/cs.po +28 -0
  62. package/lang/translations/da.po +28 -0
  63. package/lang/translations/de-ch.po +28 -0
  64. package/lang/translations/de.po +28 -0
  65. package/lang/translations/el.po +28 -0
  66. package/lang/translations/en-au.po +28 -0
  67. package/lang/translations/en.po +28 -0
  68. package/lang/translations/es-co.po +28 -0
  69. package/lang/translations/es.po +28 -0
  70. package/lang/translations/et.po +28 -0
  71. package/lang/translations/fa.po +28 -0
  72. package/lang/translations/fi.po +28 -0
  73. package/lang/translations/fr.po +28 -0
  74. package/lang/translations/gl.po +28 -0
  75. package/lang/translations/he.po +28 -0
  76. package/lang/translations/hi.po +28 -0
  77. package/lang/translations/hr.po +28 -0
  78. package/lang/translations/hu.po +28 -0
  79. package/lang/translations/id.po +28 -0
  80. package/lang/translations/it.po +28 -0
  81. package/lang/translations/ja.po +28 -0
  82. package/lang/translations/jv.po +28 -0
  83. package/lang/translations/ko.po +28 -0
  84. package/lang/translations/lt.po +28 -0
  85. package/lang/translations/lv.po +28 -0
  86. package/lang/translations/ms.po +28 -0
  87. package/lang/translations/nl.po +28 -0
  88. package/lang/translations/no.po +28 -0
  89. package/lang/translations/pl.po +28 -0
  90. package/lang/translations/pt-br.po +28 -0
  91. package/lang/translations/pt.po +28 -0
  92. package/lang/translations/ro.po +28 -0
  93. package/lang/translations/ru.po +28 -0
  94. package/lang/translations/sk.po +28 -0
  95. package/lang/translations/sr-latn.po +28 -0
  96. package/lang/translations/sr.po +29 -1
  97. package/lang/translations/sv.po +28 -0
  98. package/lang/translations/th.po +28 -0
  99. package/lang/translations/tk.po +28 -0
  100. package/lang/translations/tr.po +28 -0
  101. package/lang/translations/tt.po +28 -0
  102. package/lang/translations/ug.po +28 -0
  103. package/lang/translations/uk.po +28 -0
  104. package/lang/translations/ur.po +28 -0
  105. package/lang/translations/vi.po +28 -0
  106. package/lang/translations/zh-cn.po +28 -0
  107. package/lang/translations/zh.po +28 -0
  108. package/package.json +20 -4
  109. package/src/annotations/annotation.d.ts +86 -0
  110. package/src/annotations/annotation.js +1 -1
  111. package/src/annotations/annotationcollection.d.ts +94 -0
  112. package/src/annotations/annotationcollection.js +1 -1
  113. package/src/annotations/annotations.d.ts +150 -0
  114. package/src/annotations/annotations.js +1 -1
  115. package/src/annotations/annotationsuis.d.ts +227 -0
  116. package/src/annotations/annotationsuis.js +1 -1
  117. package/src/annotations/editorannotations.d.ts +62 -0
  118. package/src/annotations/editorannotations.js +1 -1
  119. package/src/annotations/inlineannotations.d.ts +84 -0
  120. package/src/annotations/inlineannotations.js +1 -1
  121. package/src/annotations/narrowsidebar.d.ts +80 -0
  122. package/src/annotations/narrowsidebar.js +1 -1
  123. package/src/annotations/sidebar.d.ts +96 -0
  124. package/src/annotations/sidebar.js +1 -1
  125. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -0
  126. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  127. package/src/annotations/view/annotationview.d.ts +86 -0
  128. package/src/annotations/view/annotationview.js +1 -1
  129. package/src/annotations/view/sidebaritemview.d.ts +51 -0
  130. package/src/annotations/view/sidebaritemview.js +1 -1
  131. package/src/annotations/view/sidebarview.d.ts +28 -0
  132. package/src/annotations/view/sidebarview.js +1 -1
  133. package/src/annotations/widesidebar.d.ts +72 -0
  134. package/src/annotations/widesidebar.js +1 -1
  135. package/src/augmentation.d.ts +54 -0
  136. package/src/augmentation.js +23 -0
  137. package/src/comments/addcommentthreadcommand.d.ts +31 -0
  138. package/src/comments/addcommentthreadcommand.js +1 -1
  139. package/src/comments/commentsarchive.d.ts +25 -0
  140. package/src/comments/commentsarchive.js +23 -0
  141. package/src/comments/commentsarchiveui.d.ts +32 -0
  142. package/src/comments/commentsarchiveui.js +23 -0
  143. package/src/comments/commentsediting.d.ts +71 -0
  144. package/src/comments/commentsediting.js +1 -1
  145. package/src/comments/commentsrepository.d.ts +1009 -0
  146. package/src/comments/commentsrepository.js +1 -1
  147. package/src/comments/commentsui.d.ts +25 -0
  148. package/src/comments/commentsui.js +1 -1
  149. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -0
  150. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  151. package/src/comments/integrations/importword.d.ts +17 -0
  152. package/src/comments/integrations/importword.js +1 -1
  153. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -0
  154. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  155. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -0
  156. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  157. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -0
  158. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  159. package/src/comments/ui/commentthreadcontroller.d.ts +64 -0
  160. package/src/comments/ui/commentthreadcontroller.js +1 -1
  161. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -0
  162. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  163. package/src/comments/ui/view/basecommentview.d.ts +108 -0
  164. package/src/comments/ui/view/basecommentview.js +1 -1
  165. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -0
  166. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  167. package/src/comments/ui/view/commentcontentview.d.ts +10 -0
  168. package/src/comments/ui/view/commentcontentview.js +1 -1
  169. package/src/comments/ui/view/commentinputview.d.ts +76 -0
  170. package/src/comments/ui/view/commentinputview.js +1 -1
  171. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -0
  172. package/src/comments/ui/view/commentsarchiveview.js +23 -0
  173. package/src/comments/ui/view/commentslistview.d.ts +96 -0
  174. package/src/comments/ui/view/commentslistview.js +1 -1
  175. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -0
  176. package/src/comments/ui/view/commentthreadheaderview.js +23 -0
  177. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -0
  178. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  179. package/src/comments/ui/view/commentthreadview.d.ts +108 -0
  180. package/src/comments/ui/view/commentthreadview.js +1 -1
  181. package/src/comments/ui/view/commentview.d.ts +231 -0
  182. package/src/comments/ui/view/commentview.js +1 -1
  183. package/src/comments.d.ts +22 -0
  184. package/src/comments.js +1 -1
  185. package/src/commentsonly.d.ts +28 -0
  186. package/src/commentsonly.js +1 -1
  187. package/src/config.d.ts +172 -0
  188. package/src/config.js +23 -0
  189. package/src/index.d.ts +19 -0
  190. package/src/index.js +1 -1
  191. package/src/utils/common-translations.d.ts +5 -0
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/createmutationobserver.d.ts +13 -0
  194. package/src/utils/createmutationobserver.js +1 -1
  195. package/theme/annotation.css +1 -0
  196. package/theme/comment.css +31 -0
  197. package/theme/commentsarchive.css +40 -0
  198. package/theme/commentthread.css +68 -1
  199. package/theme/icons/add-comment.svg +1 -1
  200. package/theme/icons/comments-archive.svg +11 -0
  201. package/theme/icons/undo.svg +1 -0
  202. package/theme/sidebar.css +4 -0
@@ -36,14 +36,30 @@ msgctxt "The placeholder for the reply field."
36
36
  msgid "Reply..."
37
37
  msgstr "Відповісти..."
38
38
 
39
+ msgctxt "The placeholder for the reply field when the comment thread is resolved."
40
+ msgid "Reply to reopen discussion..."
41
+ msgstr "Відповісти, щоб відновити обговорення..."
42
+
39
43
  msgctxt "The placeholder for the new commend field."
40
44
  msgid "Write a comment..."
41
45
  msgstr "Написати коментар..."
42
46
 
47
+ msgctxt "The information that comment was made on element and has no context"
48
+ msgid "Comment was made on an element"
49
+ msgstr "Було зроблено коментар до елемента"
50
+
43
51
  msgctxt "The label for the button that enables editing a comment."
44
52
  msgid "Edit"
45
53
  msgstr "Редагувати"
46
54
 
55
+ msgctxt "The label for the button that resolves a comment thread."
56
+ msgid "Resolve"
57
+ msgstr "Вирішити"
58
+
59
+ msgctxt "The label for the button that reopens a resolved comment thread."
60
+ msgid "Reopen"
61
+ msgstr "Відновити"
62
+
47
63
  msgctxt "The label for the button that deletes a comment."
48
64
  msgid "Remove"
49
65
  msgstr "Видалити"
@@ -60,6 +76,10 @@ msgctxt "The confirmation message shown after pressing the delete comment thread
60
76
  msgid "Delete comment thread?"
61
77
  msgstr "Видати ланцюжок коментарів?"
62
78
 
79
+ msgctxt "A message informing that the comment has been resolved"
80
+ msgid "Marked as resolved"
81
+ msgstr "Позначено як вирішене"
82
+
63
83
  msgctxt "The tooltip for the comment toolbar button."
64
84
  msgid "Comment"
65
85
  msgstr "Коментар"
@@ -83,3 +103,11 @@ msgstr "Показане ім'я автора походить із зовніш
83
103
  msgctxt "The additional information that displayed author name comes from imported Word file."
84
104
  msgid "EXTERNAL_IMPORT_WORD_AVATAR"
85
105
  msgstr "Показане ім'я автора походить із документу Word імпортованого %0"
106
+
107
+ msgctxt "The label for the comments archive dropdown UI."
108
+ msgid "COMMENTS_ARCHIVE"
109
+ msgstr "Архів коментарів"
110
+
111
+ msgctxt "The information that comments archive is empty."
112
+ msgid "EMPTY_COMMENTS_ARCHIVE"
113
+ msgstr "Немає архівних гілок коментарів."
@@ -34,14 +34,30 @@ msgctxt "The placeholder for the reply field."
34
34
  msgid "Reply..."
35
35
  msgstr "جواب۔۔۔"
36
36
 
37
+ msgctxt "The placeholder for the reply field when the comment thread is resolved."
38
+ msgid "Reply to reopen discussion..."
39
+ msgstr ""
40
+
37
41
  msgctxt "The placeholder for the new commend field."
38
42
  msgid "Write a comment..."
39
43
  msgstr "تبصرہ کریں۔۔۔"
40
44
 
45
+ msgctxt "The information that comment was made on element and has no context"
46
+ msgid "Comment was made on an element"
47
+ msgstr ""
48
+
41
49
  msgctxt "The label for the button that enables editing a comment."
42
50
  msgid "Edit"
43
51
  msgstr "ترمیم"
44
52
 
53
+ msgctxt "The label for the button that resolves a comment thread."
54
+ msgid "Resolve"
55
+ msgstr ""
56
+
57
+ msgctxt "The label for the button that reopens a resolved comment thread."
58
+ msgid "Reopen"
59
+ msgstr ""
60
+
45
61
  msgctxt "The label for the button that deletes a comment."
46
62
  msgid "Remove"
47
63
  msgstr "حذف کریں"
@@ -58,6 +74,10 @@ msgctxt "The confirmation message shown after pressing the delete comment thread
58
74
  msgid "Delete comment thread?"
59
75
  msgstr "تبصرے کا دھاگہ حذف کریں؟"
60
76
 
77
+ msgctxt "A message informing that the comment has been resolved"
78
+ msgid "Marked as resolved"
79
+ msgstr ""
80
+
61
81
  msgctxt "The tooltip for the comment toolbar button."
62
82
  msgid "Comment"
63
83
  msgstr "تبصرہ"
@@ -81,3 +101,11 @@ msgstr ""
81
101
  msgctxt "The additional information that displayed author name comes from imported Word file."
82
102
  msgid "EXTERNAL_IMPORT_WORD_AVATAR"
83
103
  msgstr ""
104
+
105
+ msgctxt "The label for the comments archive dropdown UI."
106
+ msgid "COMMENTS_ARCHIVE"
107
+ msgstr ""
108
+
109
+ msgctxt "The information that comments archive is empty."
110
+ msgid "EMPTY_COMMENTS_ARCHIVE"
111
+ msgstr ""
@@ -33,14 +33,30 @@ msgctxt "The placeholder for the reply field."
33
33
  msgid "Reply..."
34
34
  msgstr "Trả lời..."
35
35
 
36
+ msgctxt "The placeholder for the reply field when the comment thread is resolved."
37
+ msgid "Reply to reopen discussion..."
38
+ msgstr "Trả lời để mở lại cuộc thảo luận..."
39
+
36
40
  msgctxt "The placeholder for the new commend field."
37
41
  msgid "Write a comment..."
38
42
  msgstr "Viết bình luận..."
39
43
 
44
+ msgctxt "The information that comment was made on element and has no context"
45
+ msgid "Comment was made on an element"
46
+ msgstr "Bình luận được tạo trên một yếu tố"
47
+
40
48
  msgctxt "The label for the button that enables editing a comment."
41
49
  msgid "Edit"
42
50
  msgstr "Chỉnh sửa"
43
51
 
52
+ msgctxt "The label for the button that resolves a comment thread."
53
+ msgid "Resolve"
54
+ msgstr "Xử lí"
55
+
56
+ msgctxt "The label for the button that reopens a resolved comment thread."
57
+ msgid "Reopen"
58
+ msgstr "Mở lại"
59
+
44
60
  msgctxt "The label for the button that deletes a comment."
45
61
  msgid "Remove"
46
62
  msgstr "Xóa"
@@ -57,6 +73,10 @@ msgctxt "The confirmation message shown after pressing the delete comment thread
57
73
  msgid "Delete comment thread?"
58
74
  msgstr "Xóa chuỗi bình luận?"
59
75
 
76
+ msgctxt "A message informing that the comment has been resolved"
77
+ msgid "Marked as resolved"
78
+ msgstr "Đánh dấu là đã xử lí"
79
+
60
80
  msgctxt "The tooltip for the comment toolbar button."
61
81
  msgid "Comment"
62
82
  msgstr "Bình luận"
@@ -80,3 +100,11 @@ msgstr "Tên tác giả được hiển thị đến từ nguồn bên ngoài (
80
100
  msgctxt "The additional information that displayed author name comes from imported Word file."
81
101
  msgid "EXTERNAL_IMPORT_WORD_AVATAR"
82
102
  msgstr "Tên tác giả được hiển thị đến từ một tài liệu Word do %0 nhập"
103
+
104
+ msgctxt "The label for the comments archive dropdown UI."
105
+ msgid "COMMENTS_ARCHIVE"
106
+ msgstr "Kho lưu trữ bình luận"
107
+
108
+ msgctxt "The information that comments archive is empty."
109
+ msgid "EMPTY_COMMENTS_ARCHIVE"
110
+ msgstr "Không có chủ đề bình luận nào được lưu trữ."
@@ -33,14 +33,30 @@ msgctxt "The placeholder for the reply field."
33
33
  msgid "Reply..."
34
34
  msgstr "回复..."
35
35
 
36
+ msgctxt "The placeholder for the reply field when the comment thread is resolved."
37
+ msgid "Reply to reopen discussion..."
38
+ msgstr "回复以重新开启讨论……"
39
+
36
40
  msgctxt "The placeholder for the new commend field."
37
41
  msgid "Write a comment..."
38
42
  msgstr "编写评论..."
39
43
 
44
+ msgctxt "The information that comment was made on element and has no context"
45
+ msgid "Comment was made on an element"
46
+ msgstr "对元素进行了评论"
47
+
40
48
  msgctxt "The label for the button that enables editing a comment."
41
49
  msgid "Edit"
42
50
  msgstr "编辑"
43
51
 
52
+ msgctxt "The label for the button that resolves a comment thread."
53
+ msgid "Resolve"
54
+ msgstr "解决"
55
+
56
+ msgctxt "The label for the button that reopens a resolved comment thread."
57
+ msgid "Reopen"
58
+ msgstr "重新开启"
59
+
44
60
  msgctxt "The label for the button that deletes a comment."
45
61
  msgid "Remove"
46
62
  msgstr "删除"
@@ -57,6 +73,10 @@ msgctxt "The confirmation message shown after pressing the delete comment thread
57
73
  msgid "Delete comment thread?"
58
74
  msgstr "删除这组评论?"
59
75
 
76
+ msgctxt "A message informing that the comment has been resolved"
77
+ msgid "Marked as resolved"
78
+ msgstr "标记为已解决"
79
+
60
80
  msgctxt "The tooltip for the comment toolbar button."
61
81
  msgid "Comment"
62
82
  msgstr "评论"
@@ -80,3 +100,11 @@ msgstr "显示的作者名来自(%0 添加的)外部来源"
80
100
  msgctxt "The additional information that displayed author name comes from imported Word file."
81
101
  msgid "EXTERNAL_IMPORT_WORD_AVATAR"
82
102
  msgstr "显示的作者名来自 %0 导入的 Word 文件"
103
+
104
+ msgctxt "The label for the comments archive dropdown UI."
105
+ msgid "COMMENTS_ARCHIVE"
106
+ msgstr "评论存档"
107
+
108
+ msgctxt "The information that comments archive is empty."
109
+ msgid "EMPTY_COMMENTS_ARCHIVE"
110
+ msgstr "没有已存档的评论。"
@@ -33,14 +33,30 @@ msgctxt "The placeholder for the reply field."
33
33
  msgid "Reply..."
34
34
  msgstr "回覆..."
35
35
 
36
+ msgctxt "The placeholder for the reply field when the comment thread is resolved."
37
+ msgid "Reply to reopen discussion..."
38
+ msgstr "回覆以重新開啟討論..."
39
+
36
40
  msgctxt "The placeholder for the new commend field."
37
41
  msgid "Write a comment..."
38
42
  msgstr "撰寫留言..."
39
43
 
44
+ msgctxt "The information that comment was made on element and has no context"
45
+ msgid "Comment was made on an element"
46
+ msgstr "對元件進行的留言"
47
+
40
48
  msgctxt "The label for the button that enables editing a comment."
41
49
  msgid "Edit"
42
50
  msgstr "編輯"
43
51
 
52
+ msgctxt "The label for the button that resolves a comment thread."
53
+ msgid "Resolve"
54
+ msgstr "解決"
55
+
56
+ msgctxt "The label for the button that reopens a resolved comment thread."
57
+ msgid "Reopen"
58
+ msgstr "重新開啟"
59
+
44
60
  msgctxt "The label for the button that deletes a comment."
45
61
  msgid "Remove"
46
62
  msgstr "刪除"
@@ -57,6 +73,10 @@ msgctxt "The confirmation message shown after pressing the delete comment thread
57
73
  msgid "Delete comment thread?"
58
74
  msgstr "刪除討論串?"
59
75
 
76
+ msgctxt "A message informing that the comment has been resolved"
77
+ msgid "Marked as resolved"
78
+ msgstr "已標記為解決"
79
+
60
80
  msgctxt "The tooltip for the comment toolbar button."
61
81
  msgid "Comment"
62
82
  msgstr "留言"
@@ -80,3 +100,11 @@ msgstr "顯示的作者名稱來自外部來源(由 %0 新增)"
80
100
  msgctxt "The additional information that displayed author name comes from imported Word file."
81
101
  msgid "EXTERNAL_IMPORT_WORD_AVATAR"
82
102
  msgstr "顯示的作者名稱來自由 %0 匯入的 Word 文件"
103
+
104
+ msgctxt "The label for the comments archive dropdown UI."
105
+ msgid "COMMENTS_ARCHIVE"
106
+ msgstr "留言封存紀錄"
107
+
108
+ msgctxt "The information that comments archive is empty."
109
+ msgid "EMPTY_COMMENTS_ARCHIVE"
110
+ msgstr "無封存的留言串。"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-comments",
3
- "version": "36.0.0",
3
+ "version": "37.0.0-rc.0",
4
4
  "description": "Collaborative comments feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -30,9 +30,25 @@
30
30
  "discussions"
31
31
  ],
32
32
  "main": "src/index.js",
33
+ "files": [
34
+ "build",
35
+ "lang",
36
+ "src/**/*.js",
37
+ "src/**/*.d.ts",
38
+ "theme",
39
+ "ckeditor5-metadata.json",
40
+ "CHANGELOG.md"
41
+ ],
42
+ "scripts": {
43
+ "dll:build": "webpack",
44
+ "build": "tsc -p ./tsconfig.json",
45
+ "postversion": "npm run build"
46
+ },
33
47
  "dependencies": {
34
- "ckeditor5": "^36.0.0",
35
- "ckeditor5-collaboration": "^36.0.0",
48
+ "ckeditor5": "^37.0.0-rc.0",
49
+ "ckeditor5-collaboration": "^36.0.1",
36
50
  "lodash-es": "^4.17.11"
37
- }
51
+ },
52
+ "types": "src/index.d.ts",
53
+ "obfuscated": true
38
54
  }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @module comments/annotations/annotation
3
+ * @publicApi
4
+ */
5
+ import { Rect, Collection } from 'ckeditor5/src/utils';
6
+ import type { View } from 'ckeditor5/src/ui';
7
+ import type AnnotationView from './view/annotationview';
8
+ import type { AnnotationOptions } from './annotations';
9
+ declare const Annotation_base: {
10
+ new (): import("ckeditor5/src/utils").Observable;
11
+ prototype: import("ckeditor5/src/utils").Observable;
12
+ };
13
+ /**
14
+ * Represents an annotation.
15
+ *
16
+ * Annotation is an entity that combines an {@link module:comments/annotations/view/annotationview~AnnotationView}
17
+ * and an annotation target (a DOM element or a {@link module:utils/dom/rect~Rect}) to which the annotation is bound.
18
+ */
19
+ export default class Annotation extends Annotation_base {
20
+ /**
21
+ * The visibility of the annotation. Annotations that are not visible, are filtered from Annotation UI collections.
22
+ *
23
+ * @observable
24
+ */
25
+ isVisible: boolean;
26
+ /**
27
+ * The annotation view.
28
+ */
29
+ view: AnnotationView;
30
+ /**
31
+ * A collection of DOM elements which, when focused, make the annotation active.
32
+ *
33
+ * By default, this collection only contains the annotation view element.
34
+ * It can be extended with custom targets that will be tracked by the annotation focus tracking system.
35
+ */
36
+ focusableElements: Collection<HTMLElement>;
37
+ /**
38
+ * Creates an instance of the {@link module:comments/annotations/annotation~Annotation}.
39
+ */
40
+ constructor({ view, target, type, isVisible }: AnnotationOptions);
41
+ /**
42
+ * The type of the annotation.
43
+ */
44
+ get type(): string;
45
+ /**
46
+ * The annotation inner view.
47
+ *
48
+ * It is the view that is wrapped by the annotation view.*
49
+ */
50
+ get innerView(): View;
51
+ /**
52
+ * The annotation target to which the annotation view should be pinned.
53
+ *
54
+ * It can be an array of DOM elements or {@link module:utils/dom/rect~Rect a rect instance} or `null`.
55
+ */
56
+ get target(): Rect | Array<HTMLElement> | null;
57
+ /**
58
+ * The position and dimensions of the annotation target to which the annotation is bound.
59
+ */
60
+ get targetRect(): Rect | null;
61
+ /**
62
+ * The state of the annotation.
63
+ */
64
+ get isActive(): boolean;
65
+ set isActive(value: boolean);
66
+ /**
67
+ * Updates the target rect in the annotation view instance.
68
+ */
69
+ updateTargetRect(): void;
70
+ /**
71
+ * Clears all event listeners and internal collections.
72
+ */
73
+ destroy(): void;
74
+ /**
75
+ * Refreshes the visibility of the annotation based on the visibility of the annotation target.
76
+ *
77
+ * It sets the {@link #isVisible} property when the target is not attached to DOM or if the target or its descendant has
78
+ * set the `display` attribute to `none`.
79
+ *
80
+ * This method only updates an annotation if the annotation target is an HTML Element.
81
+ */
82
+ refreshVisibility(): void;
83
+ }
84
+ type Target = Rect | HTMLElement | null;
85
+ export type AnnotationTarget = Target | (() => Target | Array<Target>);
86
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x321a=['render','focusTracker','_target','getClientRects','targetRect','isVisible','focusableElements','refreshVisibility','type','annotation-invalid-target','nodeType','isActive','remove','offsetParent','add','object','length','_assertCorrectTarget','view','destroy','target','stopListening','set','_getNormalizedTarget','innerView','item','filter','_type','function'];(function(_0x1850db,_0x321a8b){const _0x34caee=function(_0x196779){while(--_0x196779){_0x1850db['push'](_0x1850db['shift']());}};_0x34caee(++_0x321a8b);}(_0x321a,0xca));const _0x34ca=function(_0x1850db,_0x321a8b){_0x1850db=_0x1850db-0x0;let _0x34caee=_0x321a[_0x1850db];return _0x34caee;};import{CKEditorError as _0x5682de,Rect as _0x29e2ab,Collection as _0x5f5cbd,mix as _0x14f43c,ObservableMixin as _0x4ca73a}from'ckeditor5/src/utils';export default class d{constructor({view:_0x32f7d7,target:_0x398ded,type:_0x106baa,isVisible:_0x108ea8=!0x0}){this['view']=_0x32f7d7,this[_0x34ca('0x13')]['element']||this[_0x34ca('0x13')][_0x34ca('0x1')](),this['_type']=_0x106baa,this[_0x34ca('0x3')]=_0x398ded,d['_assertCorrectTarget'](this[_0x34ca('0x18')]()),this['focusableElements']=new _0x5f5cbd([this[_0x34ca('0x13')]['element']],{'idProperty':'_id'}),this['focusableElements']['on'](_0x34ca('0xf'),(_0x2adcbf,_0x23cf7c)=>{this[_0x34ca('0x13')][_0x34ca('0x2')][_0x34ca('0xf')](_0x23cf7c);}),this[_0x34ca('0x7')]['on'](_0x34ca('0xd'),(_0x3f97ad,_0x320fc4)=>{this['view'][_0x34ca('0x2')]['remove'](_0x320fc4);}),this[_0x34ca('0x17')]('isVisible',_0x108ea8);}get[_0x34ca('0x9')](){return _0x34ca('0x0')==typeof this[_0x34ca('0x1c')]?this[_0x34ca('0x1c')]():this[_0x34ca('0x1c')];}get[_0x34ca('0x19')](){return this[_0x34ca('0x13')]['mainView'];}get[_0x34ca('0x15')](){const _0x5586ed=this[_0x34ca('0x18')]();return d[_0x34ca('0x12')](_0x5586ed),_0x5586ed;}get[_0x34ca('0x5')](){const _0xf6e53c=this['target'];if(null===_0xf6e53c)return null;if(_0xf6e53c instanceof _0x29e2ab)return _0xf6e53c;const _0x3af952=_0xf6e53c[_0x34ca('0x1b')](_0x55e904=>function(_0x13369b){const _0x26bfe8=_0x13369b[_0x34ca('0xe')];if(_0x26bfe8)return!0x0;const _0x3a857e=_0x13369b[_0x34ca('0x4')]()[_0x34ca('0x1a')](0x0);return!!_0x3a857e;}(_0x55e904));return 0x0===_0x3af952[_0x34ca('0x11')]?null:new _0x29e2ab(_0x3af952[0x0][_0x34ca('0x4')]()[_0x34ca('0x1a')](0x0));}get[_0x34ca('0xc')](){return this[_0x34ca('0x13')][_0x34ca('0xc')];}set[_0x34ca('0xc')](_0x1ddfe4){this[_0x34ca('0x13')][_0x34ca('0xc')]=_0x1ddfe4,this[_0x34ca('0x13')]['mainView'][_0x34ca('0xc')]=_0x1ddfe4;}['updateTargetRect'](){this[_0x34ca('0x13')][_0x34ca('0x5')]=this[_0x34ca('0x5')];}[_0x34ca('0x14')](){this[_0x34ca('0x7')]['stopListening'](),this[_0x34ca('0x7')]['clear'](),this[_0x34ca('0x16')]();}[_0x34ca('0x8')](){this[_0x34ca('0x6')]=!!this['targetRect'];}static[_0x34ca('0x12')](_0x4e4cf7){if(!(null===_0x4e4cf7||_0x4e4cf7 instanceof _0x29e2ab||Array['isArray'](_0x4e4cf7)&&_0x4e4cf7['every'](_0x370473=>p(_0x370473))))throw new _0x5682de(_0x34ca('0xa'),null,{'target':_0x4e4cf7});}[_0x34ca('0x18')](){let _0x199f4b=_0x34ca('0x0')==typeof this[_0x34ca('0x3')]?this['_target']():this[_0x34ca('0x3')];return _0x199f4b=p(_0x199f4b)?[_0x199f4b]:_0x199f4b,_0x199f4b;}}function p(_0x3625b5){return null!==_0x3625b5&&_0x34ca('0x10')==typeof _0x3625b5&&0x1===_0x3625b5[_0x34ca('0xb')];}_0x14f43c(d,_0x4ca73a);
23
+ const _0x46d3=['destroy','item','length','target','focusableElements','object','nodeType','_getNormalizedTarget','getClientRects','function','remove','set','type','targetRect','_type','isActive','mainView','view','render','updateTargetRect','isVisible','_assertCorrectTarget','stopListening','clear','_target','element','refreshVisibility','annotation-invalid-target','focusTracker','filter','add','every','isArray','innerView','offsetParent'];(function(_0x5d6fec,_0x46d389){const _0x6269ac=function(_0x2c6a42){while(--_0x2c6a42){_0x5d6fec['push'](_0x5d6fec['shift']());}};_0x6269ac(++_0x46d389);}(_0x46d3,0x1ec));const _0x6269=function(_0x5d6fec,_0x46d389){_0x5d6fec=_0x5d6fec-0x0;let _0x6269ac=_0x46d3[_0x5d6fec];return _0x6269ac;};import{CKEditorError as _0x1539dc,Rect as _0x36c313,Collection as _0x135bc6,ObservableMixin as _0x89f78f}from'ckeditor5/src/utils';export default class d extends _0x89f78f(){constructor({view:_0x3121cd,target:_0xbeae3c,type:_0x22ed43,isVisible:_0x1a70f1=!0x0}){super(),this[_0x6269('0xf')]=_0x3121cd,this[_0x6269('0xf')][_0x6269('0x17')]||this[_0x6269('0xf')][_0x6269('0x10')](),this[_0x6269('0xc')]=_0x22ed43,this[_0x6269('0x16')]=_0xbeae3c,d[_0x6269('0x13')](this['_getNormalizedTarget']()),this[_0x6269('0x2')]=new _0x135bc6([this[_0x6269('0xf')]['element']],{'idProperty':'_id'}),this[_0x6269('0x2')]['on'](_0x6269('0x1c'),(_0x46a262,_0xa602f1)=>{this['view']['focusTracker']['add'](_0xa602f1);}),this['focusableElements']['on'](_0x6269('0x8'),(_0x5ac726,_0x3d4ed1)=>{this['view'][_0x6269('0x1a')][_0x6269('0x8')](_0x3d4ed1);}),this[_0x6269('0x9')]('isVisible',_0x1a70f1);}get[_0x6269('0xa')](){return _0x6269('0x7')==typeof this[_0x6269('0xc')]?this[_0x6269('0xc')]():this[_0x6269('0xc')];}get[_0x6269('0x1f')](){return this['view'][_0x6269('0xe')];}get['target'](){const _0x35d2ed=this[_0x6269('0x5')]();return d[_0x6269('0x13')](_0x35d2ed),_0x35d2ed;}get[_0x6269('0xb')](){const _0x5ecea1=this[_0x6269('0x1')];if(null===_0x5ecea1)return null;if(_0x5ecea1 instanceof _0x36c313)return _0x5ecea1;const _0x3048cd=_0x5ecea1[_0x6269('0x1b')](_0x33ee5e=>function(_0x53ec07){const _0x239967=_0x53ec07[_0x6269('0x20')];if(_0x239967)return!0x0;const _0x53f635=_0x53ec07['getClientRects']()[_0x6269('0x22')](0x0);return!!_0x53f635;}(_0x33ee5e));return 0x0===_0x3048cd[_0x6269('0x0')]?null:new _0x36c313(_0x3048cd[0x0][_0x6269('0x6')]()[_0x6269('0x22')](0x0));}get['isActive'](){return this['view'][_0x6269('0xd')];}set[_0x6269('0xd')](_0x1a0a6c){this[_0x6269('0xf')][_0x6269('0xd')]=_0x1a0a6c,this[_0x6269('0xf')]['mainView'][_0x6269('0xd')]=_0x1a0a6c;}[_0x6269('0x11')](){this[_0x6269('0xf')][_0x6269('0xb')]=this[_0x6269('0xb')];}[_0x6269('0x21')](){this['focusableElements'][_0x6269('0x14')](),this[_0x6269('0x2')][_0x6269('0x15')](),this[_0x6269('0x14')]();}[_0x6269('0x18')](){this[_0x6269('0x12')]=!!this[_0x6269('0xb')];}static[_0x6269('0x13')](_0x1afe33){if(!(null===_0x1afe33||_0x1afe33 instanceof _0x36c313||Array[_0x6269('0x1e')](_0x1afe33)&&_0x1afe33[_0x6269('0x1d')](_0x2e1f6b=>y(_0x2e1f6b))))throw new _0x1539dc(_0x6269('0x19'),null,{'target':_0x1afe33});}[_0x6269('0x5')](){const _0x5327c8=_0x6269('0x7')==typeof this[_0x6269('0x16')]?this[_0x6269('0x16')]():this[_0x6269('0x16')];return y(_0x5327c8)?[_0x5327c8]:_0x5327c8;}}function y(_0x18ab9d){return null!==_0x18ab9d&&_0x6269('0x3')==typeof _0x18ab9d&&_0x6269('0x4')in _0x18ab9d&&0x1===_0x18ab9d['nodeType'];}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @module comments/annotations/annotationcollection
3
+ * @publicApi
4
+ */
5
+ import { Collection } from 'ckeditor5/src/utils';
6
+ import type { View } from 'ckeditor5/src/ui';
7
+ import type Annotation from './annotation';
8
+ /**
9
+ * A collection of {@link module:comments/annotations/annotation~Annotation annotations}.
10
+ *
11
+ * It implements methods for managing annotations and creates a focus tracker for them to make it easier to manage
12
+ * the focus for all annotations.
13
+ *
14
+ * `AnnotationCollection` fires {@link module:comments/annotations/annotationcollection~AnnotationCollection#event:focus} when an annotation
15
+ * becomes focused and {@link module:comments/annotations/annotationcollection~AnnotationCollection#event:blur} when all annotations
16
+ * lose focus.
17
+ */
18
+ export default class AnnotationCollection extends Collection<Annotation> {
19
+ /**
20
+ * @param annotations Initial annotations.
21
+ */
22
+ constructor(annotations?: Iterable<Annotation>);
23
+ /**
24
+ * Equals to `true` when one of the annotation in the collection is focused.
25
+ */
26
+ get isFocused(): boolean;
27
+ /**
28
+ * Adds an annotation to the collection.
29
+ */
30
+ add(annotation: Annotation): this;
31
+ /**
32
+ * Removes the annotation from the collection.
33
+ */
34
+ remove(annotation: Annotation): Annotation;
35
+ /**
36
+ * Gets the annotation for a given annotation view's inner view.
37
+ */
38
+ getByInnerView(innerView: View): Annotation | undefined;
39
+ /**
40
+ * Gets the annotation for a given annotation view.
41
+ */
42
+ getByView(view: View): Annotation | undefined;
43
+ /**
44
+ * Destroys all bindings and clears the collection.
45
+ */
46
+ destroy(): void;
47
+ /**
48
+ * Refreshes the positioning of all annotations and sorts them topmost and leftmost.
49
+ */
50
+ refreshPositioning(): void;
51
+ }
52
+ /**
53
+ * Fired when an annotation becomes active.
54
+ *
55
+ * @eventName ~AnnotationCollection#focus
56
+ * @param annotation An annotation that was focused.
57
+ */
58
+ export type AnnotationFocusEvent = {
59
+ name: 'focus';
60
+ args: [annotation: Annotation];
61
+ };
62
+ /**
63
+ * Fired when all annotations become blurred.
64
+ *
65
+ * @eventName ~AnnotationCollection#blur
66
+ */
67
+ export type AnnotationBlurEvent = {
68
+ name: 'blur';
69
+ args: [];
70
+ };
71
+ /**
72
+ * A helper function that binds two {@link module:comments/annotations/annotationcollection~AnnotationCollection AnnotationCollection}s
73
+ * and allows filtering items based on the passed callback.
74
+ *
75
+ * Since {@link module:comments/annotations/annotationcollection~AnnotationCollection#refreshPositioning}
76
+ * sorts the annotations by removing and inserting items, the binding implemented by the `bindTo()` method is lost. This is why
77
+ * this helper needs to be used.
78
+ *
79
+ * This helper is used by the annotations UIs to filter which annotations from the
80
+ * {@link module:comments/annotations/annotations~Annotations#collection main annotation collection} should be handled by
81
+ * a given annotations UI.
82
+ *
83
+ * @param `options.source` The source collection
84
+ * from which the annotations will be taken.
85
+ * @param `options.target` The target collection
86
+ * that will be synced to the source collection.
87
+ * @param options.filter Filtering function that gets an annotation and should return `true` if the annotation should be
88
+ * copied to the `target` collection.
89
+ */
90
+ export declare function bindAnnotationCollections({ source, target, filter }: {
91
+ source: AnnotationCollection;
92
+ target: AnnotationCollection;
93
+ filter: (annotation: Annotation) => boolean;
94
+ }): void;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2611=['focusTracker','getByView','from','change:isFocused','updateTargetRect','focus','_viewToAnnotation','getIndex','annotationcollection-not-existing-item','view','destroy','_innerViewToAnnotation','getByInnerView','targetRect','get','add','_focusTracker','_getOrderInContent','fire','top','length','sort','refreshPositioning','delete','focusableElements','stopListening','set','left','isFocused','clear','has','innerView','listenTo','remove'];(function(_0x5da147,_0x261194){const _0x3488e5=function(_0x675327){while(--_0x675327){_0x5da147['push'](_0x5da147['shift']());}};_0x3488e5(++_0x261194);}(_0x2611,0x1ed));const _0x3488=function(_0x5da147,_0x261194){_0x5da147=_0x5da147-0x0;let _0x3488e5=_0x2611[_0x5da147];return _0x3488e5;};import{CKEditorError as _0x419ecb,Collection as _0x226793,FocusTracker as _0x2cf184}from'ckeditor5/src/utils';export default class x extends _0x226793{constructor(_0x24b295=[]){super(),this[_0x3488('0x1c')]=new Map(),this[_0x3488('0x17')]=new Map(),this[_0x3488('0x21')]=new _0x2cf184(),this['_focusTracker']['on'](_0x3488('0x14'),(_0x46d0c5,_0x520e65,_0xad8de5)=>{_0xad8de5||this[_0x3488('0x1')]('blur');});for(const _0x2d4d7e of _0x24b295)this[_0x3488('0x20')](_0x2d4d7e);}get[_0x3488('0xb')](){return this[_0x3488('0x21')]['isFocused'];}[_0x3488('0x20')](_0x35e265){if(this[_0x3488('0xd')](_0x35e265))throw new _0x419ecb('annotationcollection-duplicated-item',null);this[_0x3488('0x1c')][_0x3488('0x9')](_0x35e265[_0x3488('0xe')],_0x35e265),this[_0x3488('0x17')][_0x3488('0x9')](_0x35e265['view'],_0x35e265);for(const _0x1adecb of _0x35e265[_0x3488('0x7')])this[_0x3488('0x21')][_0x3488('0x20')](_0x1adecb);this[_0x3488('0xf')](_0x35e265[_0x3488('0x7')],'add',(_0x4bd646,_0x10fbc7)=>{this[_0x3488('0x21')][_0x3488('0x20')](_0x10fbc7);}),this['listenTo'](_0x35e265['focusableElements'],_0x3488('0x10'),(_0x5668bb,_0x769dca)=>{this[_0x3488('0x21')][_0x3488('0x10')](_0x769dca);}),this[_0x3488('0xf')](_0x35e265[_0x3488('0x1a')]['focusTracker'],_0x3488('0x14'),(_0x1b8dab,_0x59695f,_0xbd595a)=>{_0xbd595a&&this[_0x3488('0x1')](_0x3488('0x16'),_0x35e265);}),_0x35e265[_0x3488('0x15')]();const _0x1ab64d=this[_0x3488('0x0')](_0x35e265[_0x3488('0x1a')][_0x3488('0x1e')]);super[_0x3488('0x20')](_0x35e265,_0x1ab64d);}[_0x3488('0x10')](_0x246b03){if(!this[_0x3488('0xd')](_0x246b03))throw new _0x419ecb(_0x3488('0x19'),null);this[_0x3488('0x8')](_0x246b03[_0x3488('0x1a')][_0x3488('0x11')]),this[_0x3488('0x8')](_0x246b03['focusableElements']);for(const _0x16e9eb of _0x246b03[_0x3488('0x7')])this[_0x3488('0x21')][_0x3488('0x10')](_0x16e9eb);this[_0x3488('0x17')]['delete'](_0x246b03['view']),this[_0x3488('0x1c')][_0x3488('0x6')](_0x246b03[_0x3488('0xe')]),super[_0x3488('0x10')](_0x246b03);}[_0x3488('0x1d')](_0x3872c7){return this[_0x3488('0x1c')][_0x3488('0x1f')](_0x3872c7);}[_0x3488('0x12')](_0x41b485){return this[_0x3488('0x17')][_0x3488('0x1f')](_0x41b485);}[_0x3488('0x1b')](){super[_0x3488('0xc')](),this['stopListening'](),this[_0x3488('0x1c')][_0x3488('0xc')](),this[_0x3488('0x17')][_0x3488('0xc')](),this[_0x3488('0x21')][_0x3488('0x1b')]();}[_0x3488('0x5')](){for(const _0xc87489 of this)_0xc87489['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4a6265=Array[_0x3488('0x13')](this)[_0x3488('0x4')]((_0x2b3786,_0x4fbf21)=>y(_0x2b3786[_0x3488('0x1a')][_0x3488('0x1e')],_0x4fbf21[_0x3488('0x1a')][_0x3488('0x1e')]));for(let _0x5c57f4=_0x4a6265[_0x3488('0x3')]-0x1;_0x5c57f4>0x0;_0x5c57f4--){const _0x4e1b0c=_0x4a6265[_0x5c57f4];_0x5c57f4!==this[_0x3488('0x18')](_0x4e1b0c)&&(this[_0x3488('0x10')](_0x4e1b0c),this[_0x3488('0x20')](_0x4e1b0c,_0x5c57f4));}}[_0x3488('0x0')](_0x37f587){let _0x42d576=0x0;if(!_0x37f587)return this['_items'][_0x3488('0x3')];for(const _0x154246 of this){const _0x1fb0fa=_0x154246[_0x3488('0x1a')][_0x3488('0x1e')];if(_0x1fb0fa){if(y(_0x37f587,_0x1fb0fa)<0x0)return _0x42d576;_0x42d576++;}}return _0x42d576;}}export function bindAnnotationCollections({source:_0xacc18c,target:_0x51f0ba,filter:_0x181bc6}){for(const _0x2df24b of _0xacc18c)_0x181bc6(_0x2df24b)&&_0x51f0ba['add'](_0x2df24b);_0x51f0ba[_0x3488('0xf')](_0xacc18c,_0x3488('0x20'),(_0x354467,_0x2793ce)=>{_0x181bc6(_0x2793ce)&&_0x51f0ba['add'](_0x2793ce);}),_0x51f0ba[_0x3488('0xf')](_0xacc18c,'remove',(_0x5a81df,_0xb9b778)=>{_0x51f0ba[_0x3488('0xd')](_0xb9b778)&&_0x51f0ba[_0x3488('0x10')](_0xb9b778);});}function y(_0x69897,_0x433adb){if(null===_0x69897&&null===_0x433adb)return 0x0;if(null===_0x69897)return-0x1;if(null===_0x433adb)return 0x1;const _0x16477d=_0x69897[_0x3488('0x2')]-_0x433adb[_0x3488('0x2')];return 0x0==_0x16477d?_0x69897[_0x3488('0xa')]-_0x433adb[_0x3488('0xa')]:_0x16477d;}
23
+ const _0x5ec4=['fire','refreshPositioning','left','view','get','_sort','targetRect','clear','from','blur','sort','has','listenTo','_innerViewToAnnotation','_getOrderInContent','getByInnerView','_viewToAnnotation','destroy','focus','annotationcollection-not-existing-item','stopListening','_focusTracker','set','top','updateTargetRect','add','remove','focusableElements','delete','focusTracker','length'];(function(_0x2e07ce,_0x5ec45a){const _0x3feed2=function(_0x3fa998){while(--_0x3fa998){_0x2e07ce['push'](_0x2e07ce['shift']());}};_0x3feed2(++_0x5ec45a);}(_0x5ec4,0x125));const _0x3fee=function(_0x2e07ce,_0x5ec45a){_0x2e07ce=_0x2e07ce-0x0;let _0x3feed2=_0x5ec4[_0x2e07ce];return _0x3feed2;};import{CKEditorError as _0xb63554,Collection as _0x183b29,FocusTracker as _0x474772}from'ckeditor5/src/utils';export default class x extends _0x183b29{constructor(_0x8c8ce8=[]){super(),this[_0x3fee('0x1e')]=new Map(),this[_0x3fee('0x2')]=new Map(),this[_0x3fee('0x7')]=new _0x474772(),this[_0x3fee('0x7')]['on']('change:isFocused',(_0x4a9bb2,_0x161061,_0x300280)=>{_0x300280||this[_0x3fee('0x11')](_0x3fee('0x1a'));});for(const _0x129225 of _0x8c8ce8)this[_0x3fee('0xb')](_0x129225);}get['isFocused'](){return this[_0x3fee('0x7')]['isFocused'];}[_0x3fee('0xb')](_0xdbba77){if(this[_0x3fee('0x1c')](_0xdbba77))throw new _0xb63554('annotationcollection-duplicated-item',null);this[_0x3fee('0x1e')][_0x3fee('0x8')](_0xdbba77['innerView'],_0xdbba77),this[_0x3fee('0x2')][_0x3fee('0x8')](_0xdbba77['view'],_0xdbba77);for(const _0x3118c of _0xdbba77[_0x3fee('0xd')])this[_0x3fee('0x7')][_0x3fee('0xb')](_0x3118c);this[_0x3fee('0x1d')](_0xdbba77[_0x3fee('0xd')],_0x3fee('0xb'),(_0x5e396c,_0x1828ab)=>{this[_0x3fee('0x7')]['add'](_0x1828ab);}),this['listenTo'](_0xdbba77[_0x3fee('0xd')],_0x3fee('0xc'),(_0x2e32ae,_0x1cdf9f)=>{this[_0x3fee('0x7')]['remove'](_0x1cdf9f);}),this[_0x3fee('0x1d')](_0xdbba77[_0x3fee('0x14')][_0x3fee('0xf')],'change:isFocused',(_0x1ac2a6,_0x305934,_0x4a4804)=>{_0x4a4804&&this[_0x3fee('0x11')](_0x3fee('0x4'),_0xdbba77);}),_0xdbba77['updateTargetRect']();const _0x5ebffb=this[_0x3fee('0x0')](_0xdbba77['view']['targetRect']);return super[_0x3fee('0xb')](_0xdbba77,_0x5ebffb);}[_0x3fee('0xc')](_0x3e3177){if(!this[_0x3fee('0x1c')](_0x3e3177))throw new _0xb63554(_0x3fee('0x5'),null);this[_0x3fee('0x6')](_0x3e3177[_0x3fee('0x14')][_0x3fee('0xf')]),this['stopListening'](_0x3e3177['focusableElements']);for(const _0x4e9d0f of _0x3e3177['focusableElements'])this[_0x3fee('0x7')][_0x3fee('0xc')](_0x4e9d0f);return this[_0x3fee('0x2')][_0x3fee('0xe')](_0x3e3177[_0x3fee('0x14')]),this[_0x3fee('0x1e')]['delete'](_0x3e3177['innerView']),super[_0x3fee('0xc')](_0x3e3177);}[_0x3fee('0x1')](_0x1f33e9){return this[_0x3fee('0x1e')][_0x3fee('0x15')](_0x1f33e9);}['getByView'](_0x48beea){return this[_0x3fee('0x2')][_0x3fee('0x15')](_0x48beea);}[_0x3fee('0x3')](){super[_0x3fee('0x18')](),this[_0x3fee('0x6')](),this['_innerViewToAnnotation'][_0x3fee('0x18')](),this[_0x3fee('0x2')][_0x3fee('0x18')](),this[_0x3fee('0x7')][_0x3fee('0x3')]();}[_0x3fee('0x12')](){for(const _0x133a22 of this)_0x133a22[_0x3fee('0xa')]();this['_sort']();}[_0x3fee('0x16')](){const _0x5f503f=Array[_0x3fee('0x19')](this)[_0x3fee('0x1b')]((_0x590d51,_0x3d3e5a)=>v(_0x590d51[_0x3fee('0x14')][_0x3fee('0x17')],_0x3d3e5a['view']['targetRect']));for(let _0x5eec74=_0x5f503f[_0x3fee('0x10')]-0x1;_0x5eec74>0x0;_0x5eec74--){const _0x521219=_0x5f503f[_0x5eec74];_0x5eec74!==this['getIndex'](_0x521219)&&(this[_0x3fee('0xc')](_0x521219),this[_0x3fee('0xb')](_0x521219));}}[_0x3fee('0x0')](_0x4658de){let _0x449265=0x0;if(!_0x4658de)return this['length'];for(const _0xfb4d65 of this){const _0x474041=_0xfb4d65[_0x3fee('0x14')]['targetRect'];if(_0x474041){if(v(_0x4658de,_0x474041)<0x0)return _0x449265;_0x449265++;}}return _0x449265;}}export function bindAnnotationCollections({source:_0x331057,target:_0xb3610f,filter:_0x5cd02e}){for(const _0xac8d85 of _0x331057)_0x5cd02e(_0xac8d85)&&_0xb3610f['add'](_0xac8d85);_0xb3610f[_0x3fee('0x1d')](_0x331057,_0x3fee('0xb'),(_0x21b4c9,_0xae82a3)=>{_0x5cd02e(_0xae82a3)&&_0xb3610f['add'](_0xae82a3);}),_0xb3610f['listenTo'](_0x331057,_0x3fee('0xc'),(_0xf9dd0d,_0x1c4bfb)=>{_0xb3610f['has'](_0x1c4bfb)&&_0xb3610f['remove'](_0x1c4bfb);});}function v(_0x57e9a9,_0x3e7471){if(null===_0x57e9a9&&null===_0x3e7471)return 0x0;if(null===_0x57e9a9)return-0x1;if(null===_0x3e7471)return 0x1;const _0x37bc59=_0x57e9a9[_0x3fee('0x9')]-_0x3e7471[_0x3fee('0x9')];return 0x0==_0x37bc59?_0x57e9a9[_0x3fee('0x13')]-_0x3e7471[_0x3fee('0x13')]:_0x37bc59;}