@ckeditor/ckeditor5-comments 36.0.1 → 37.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 (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 +19 -3
  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
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4ea3=['create','placeholderElement','getRoot','init','fire','config','name','placeholder','document','view','childCount','plugins','assign','get','end','defaultPlugins','getChild','editing','initPlugins','initialData','model','then','_updatePlaceholder','change','data','focus','destroy','set','createRoot','low','change:placeholder'];(function(_0x5bd152,_0x4ea333){const _0x76364c=function(_0x5d8586){while(--_0x5d8586){_0x5bd152['push'](_0x5bd152['shift']());}};_0x76364c(++_0x4ea333);}(_0x4ea3,0x1e6));const _0x7636=function(_0x5bd152,_0x4ea333){_0x5bd152=_0x5bd152-0x0;let _0x76364c=_0x4ea3[_0x5bd152];return _0x76364c;};import{Editor as _0x3ff759,DataApiMixin as _0x15d8d0}from'ckeditor5/src/core';import _0x26fea6 from'./commenteditorui';import{mix as _0x3172a6,ObservableMixin as _0x3f04de}from'ckeditor5/src/utils';import{enablePlaceholder as _0x3e8657,disablePlaceholder as _0x375a9a}from'ckeditor5/src/engine';import{Clipboard as _0x376621}from'ckeditor5/src/clipboard';import{Enter as _0x88601e,ShiftEnter as _0x858201}from'ckeditor5/src/enter';import{SelectAll as _0x10d8b9}from'ckeditor5/src/select-all';import{Typing as _0xc06e4}from'ckeditor5/src/typing';import{Undo as _0x31e916}from'ckeditor5/src/undo';import{Paragraph as _0x2e9dce}from'ckeditor5/src/paragraph';export default class Bt extends _0x3ff759{constructor(_0x58ad6e={}){(_0x58ad6e=Object[_0x7636('0x16')]({},_0x58ad6e))[_0x7636('0x15')]||(_0x58ad6e[_0x7636('0x15')]=Bt[_0x7636('0x19')]),super(_0x58ad6e),this['ui']=new _0x26fea6(this),this[_0x7636('0x6')](_0x7636('0x11'),''),this[_0x7636('0x1e')][_0x7636('0x12')]['on'](_0x7636('0x2'),()=>this[_0x7636('0x1')](),{'priority':_0x7636('0x8')}),this['on'](_0x7636('0x9'),()=>this[_0x7636('0x1')]()),this[_0x7636('0x1e')][_0x7636('0x12')][_0x7636('0x7')]();}[_0x7636('0xa')](){const _0x5b24e2=this[_0x7636('0xf')][_0x7636('0x17')](_0x7636('0x1d'))||'';return this[_0x7636('0x1c')]()[_0x7636('0x0')](()=>this['ui'][_0x7636('0xd')]())[_0x7636('0x0')](()=>this[_0x7636('0x3')][_0x7636('0xd')](_0x5b24e2))['then'](()=>this[_0x7636('0xe')]('ready'));}[_0x7636('0x5')](){return super[_0x7636('0x5')]()['then'](()=>this['ui'][_0x7636('0x5')]());}[_0x7636('0x4')](){this[_0x7636('0x1e')][_0x7636('0x2')](_0x3e41cc=>{const _0x3ff1e0=this['model'][_0x7636('0x12')]['getRoot'](),_0xf7dd74=_0x3ff1e0['getChild'](_0x3ff1e0[_0x7636('0x14')]-0x1);_0x3e41cc['setSelection'](_0xf7dd74,_0x7636('0x18')),this['editing']['view']['focus']();});}[_0x7636('0x1')](){const _0x2076b8=this[_0x7636('0x1b')][_0x7636('0x13')],_0x560ab6=_0x2076b8[_0x7636('0x12')][_0x7636('0xc')](),_0x51d25c=_0x560ab6[_0x7636('0x1a')](0x0);_0x560ab6['childCount']>0x1||!_0x51d25c||'p'!=_0x51d25c[_0x7636('0x10')]?this[_0x7636('0xb')]&&(_0x375a9a(_0x2076b8,this[_0x7636('0xb')]),this[_0x7636('0xb')]=void 0x0):(_0x3e8657({'view':_0x2076b8,'element':_0x51d25c,'text':this['placeholder'],'keepOnFocus':!0x0}),this[_0x7636('0xb')]=_0x51d25c);}}_0x3172a6(Bt,_0x3f04de),_0x3172a6(Bt,_0x15d8d0),Bt['defaultPlugins']=[_0x376621,_0x88601e,_0x858201,_0x10d8b9,_0xc06e4,_0x31e916,_0x2e9dce];
23
+ const _0x7e64=['document','create','fire','_updatePlaceholder','childCount','model','plugins','then','editing','createRoot','set','view','focus','low','init','ready','placeholderElement','change:placeholder','getRoot','destroy','config','change','data','get','getChild','placeholder','initPlugins','defaultPlugins'];(function(_0x2a96d2,_0x7e6459){const _0x50e835=function(_0x279f28){while(--_0x279f28){_0x2a96d2['push'](_0x2a96d2['shift']());}};_0x50e835(++_0x7e6459);}(_0x7e64,0x6f));const _0x50e8=function(_0x2a96d2,_0x7e6459){_0x2a96d2=_0x2a96d2-0x0;let _0x50e835=_0x7e64[_0x2a96d2];return _0x50e835;};import{Editor as _0x514df1,DataApiMixin as _0x32623c}from'ckeditor5/src/core';import _0x542e1e from'./commenteditorui';import{ObservableMixin as _0x43c56e}from'ckeditor5/src/utils';import{enablePlaceholder as _0x36d3aa,disablePlaceholder as _0x1d5217}from'ckeditor5/src/engine';import{Clipboard as _0x438d35}from'ckeditor5/src/clipboard';import{Enter as _0x5405a1,ShiftEnter as _0x283264}from'ckeditor5/src/enter';import{SelectAll as _0x19137f}from'ckeditor5/src/select-all';import{Typing as _0x112975}from'ckeditor5/src/typing';import{Undo as _0x1a0aa1}from'ckeditor5/src/undo';import{Paragraph as _0x4de2d6}from'ckeditor5/src/paragraph';const Jt=[_0x438d35,_0x5405a1,_0x283264,_0x19137f,_0x112975,_0x1a0aa1,_0x4de2d6];export default class Kt extends _0x43c56e(_0x32623c(_0x514df1)){constructor(_0x45a600={}){(_0x45a600=Object['assign']({},_0x45a600))[_0x50e8('0x7')]||(_0x45a600[_0x50e8('0x7')]=Kt['defaultPlugins']),super(_0x45a600),this['ui']=new _0x542e1e(this),this[_0x50e8('0xb')](_0x50e8('0x1a'),''),this[_0x50e8('0x6')][_0x50e8('0x1')]['on'](_0x50e8('0x16'),()=>this['_updatePlaceholder'](),{'priority':_0x50e8('0xe')}),this['on'](_0x50e8('0x12'),()=>this['_updatePlaceholder']()),this['model'][_0x50e8('0x1')][_0x50e8('0xa')]();}[_0x50e8('0x2')](){const _0x536856=this[_0x50e8('0x15')][_0x50e8('0x18')]('initialData')||'';return this[_0x50e8('0x1b')]()[_0x50e8('0x8')](()=>this['ui'][_0x50e8('0xf')]())[_0x50e8('0x8')](()=>this[_0x50e8('0x17')][_0x50e8('0xf')](_0x536856))[_0x50e8('0x8')](()=>this[_0x50e8('0x3')](_0x50e8('0x10')));}[_0x50e8('0x14')](){return super[_0x50e8('0x14')]()['then'](()=>this['ui'][_0x50e8('0x14')]());}[_0x50e8('0xd')](){this[_0x50e8('0x6')]['change'](_0x193823=>{const _0x46b3e4=this[_0x50e8('0x6')][_0x50e8('0x1')][_0x50e8('0x13')](),_0x4b6940=_0x46b3e4&&_0x46b3e4['getChild'](_0x46b3e4[_0x50e8('0x5')]-0x1);_0x193823['setSelection'](_0x4b6940,'end'),this[_0x50e8('0x9')][_0x50e8('0xc')]['focus']();});}[_0x50e8('0x4')](){const _0x521c51=this['editing'][_0x50e8('0xc')],_0x526e79=_0x521c51['document'][_0x50e8('0x13')](),_0x43451f=_0x526e79[_0x50e8('0x19')](0x0);_0x526e79['childCount']>0x1||!_0x43451f||'p'!=_0x43451f['name']?this[_0x50e8('0x11')]&&(_0x1d5217(_0x521c51,this[_0x50e8('0x11')]),this[_0x50e8('0x11')]=void 0x0):(_0x36d3aa({'view':_0x521c51,'element':_0x43451f,'text':this['placeholder'],'keepOnFocus':!0x0}),this[_0x50e8('0x11')]=_0x43451f);}}Kt[_0x50e8('0x0')]=Jt;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module comments/comments/ui/commenteditor/commenteditorui
3
+ */
4
+ import { EditorUI } from 'ckeditor5/src/ui';
5
+ import type { Editor } from 'ckeditor5/src/core';
6
+ import CommentEditorUIView from './commenteditoruiview';
7
+ export default class CommentEditorUI extends EditorUI {
8
+ /**
9
+ * The main (top–most) view of the editor UI.
10
+ */
11
+ readonly view: CommentEditorUIView;
12
+ /**
13
+ * Creates an instance of the classic editor UI class.
14
+ *
15
+ * @param editor The editor instance.
16
+ */
17
+ constructor(editor: Editor);
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ get element(): HTMLElement | null;
22
+ init(): void;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ destroy(): void;
27
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2873=['render','ready','init','document','name','fire','locale','view','isFocused','bind','getRoot','element','destroy','rootName','editable'];(function(_0x1516cb,_0x28735d){const _0x2b56e3=function(_0x2e1d4c){while(--_0x2e1d4c){_0x1516cb['push'](_0x1516cb['shift']());}};_0x2b56e3(++_0x28735d);}(_0x2873,0xbc));const _0x2b56=function(_0x1516cb,_0x28735d){_0x1516cb=_0x1516cb-0x0;let _0x2b56e3=_0x2873[_0x1516cb];return _0x2b56e3;};import{EditorUI as _0x331411}from'ckeditor5/src/ui';import _0x4d6c29 from'./commenteditoruiview';export default class xt extends _0x331411{constructor(_0x3877cc){super(_0x3877cc),this[_0x2b56('0xe')]=new _0x4d6c29(_0x3877cc[_0x2b56('0xd')],_0x3877cc['editing'][_0x2b56('0xe')]);}get[_0x2b56('0x3')](){return this[_0x2b56('0xe')][_0x2b56('0x3')];}[_0x2b56('0x9')](){const _0x5158d3=this['editor']['editing'][_0x2b56('0xe')],_0x217ce9=this['view'][_0x2b56('0x6')],_0x5ee7cb=_0x5158d3[_0x2b56('0xa')][_0x2b56('0x2')]();_0x217ce9[_0x2b56('0xb')]=_0x5ee7cb[_0x2b56('0x5')],this[_0x2b56('0xe')][_0x2b56('0x7')]();const _0x127288=_0x217ce9[_0x2b56('0x3')];this['setEditableElement'](_0x217ce9[_0x2b56('0xb')],_0x127288),this['view'][_0x2b56('0x6')][_0x2b56('0x1')](_0x2b56('0x0'))['to'](this['focusTracker']),_0x5158d3['attachDomRoot'](_0x127288),this[_0x2b56('0xc')](_0x2b56('0x8'));}[_0x2b56('0x4')](){super[_0x2b56('0x4')](),this[_0x2b56('0xe')][_0x2b56('0x4')]();}}
23
+ const _0x1227=['name','locale','ready','bind','init','editable','focusTracker','getRoot','view','attachDomRoot','editor','isFocused','element','destroy','rootName','editing','fire','document'];(function(_0x54ef3c,_0x122752){const _0x247e5b=function(_0x2bbf71){while(--_0x2bbf71){_0x54ef3c['push'](_0x54ef3c['shift']());}};_0x247e5b(++_0x122752);}(_0x1227,0x1c9));const _0x247e=function(_0x54ef3c,_0x122752){_0x54ef3c=_0x54ef3c-0x0;let _0x247e5b=_0x1227[_0x54ef3c];return _0x247e5b;};import{EditorUI as _0x27a253}from'ckeditor5/src/ui';import _0x4b3177 from'./commenteditoruiview';export default class Dt extends _0x27a253{constructor(_0x55627b){super(_0x55627b),this[_0x247e('0x1')]=new _0x4b3177(_0x55627b[_0x247e('0xc')],_0x55627b[_0x247e('0x8')][_0x247e('0x1')]);}get[_0x247e('0x5')](){return this[_0x247e('0x1')][_0x247e('0x5')];}[_0x247e('0xf')](){const _0x2c054a=this[_0x247e('0x3')][_0x247e('0x8')][_0x247e('0x1')],_0x56c9b4=this[_0x247e('0x1')][_0x247e('0x10')],_0xaa1ee5=_0x2c054a[_0x247e('0xa')][_0x247e('0x0')]();_0x56c9b4[_0x247e('0xb')]=_0xaa1ee5[_0x247e('0x7')],this[_0x247e('0x1')]['render']();const _0x16fb1b=_0x56c9b4[_0x247e('0x5')];this['setEditableElement'](_0x56c9b4['name'],_0x16fb1b),this['view'][_0x247e('0x10')][_0x247e('0xe')](_0x247e('0x4'))['to'](this[_0x247e('0x11')]),_0x2c054a[_0x247e('0x2')](_0x16fb1b),this[_0x247e('0x9')](_0x247e('0xd'));}[_0x247e('0x6')](){super[_0x247e('0x6')](),this['view']['destroy']();}}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module comments/comments/ui/commenteditor/commenteditoruiview
3
+ */
4
+ import { InlineEditableUIView, EditorUIView, type ViewCollection } from 'ckeditor5/src/ui';
5
+ import { type Locale } from 'ckeditor5/src/utils';
6
+ import type { View } from 'ckeditor5/src/engine';
7
+ export default class CommentEditorUIView extends EditorUIView {
8
+ /**
9
+ * Collection of the child views located in the main (`.ck-editor__main`)
10
+ * area of the UI.
11
+ */
12
+ readonly main: ViewCollection;
13
+ /**
14
+ * Editable UI view.
15
+ */
16
+ editable: InlineEditableUIView;
17
+ /**
18
+ * Creates an instance of the comments editor UI view.
19
+ *
20
+ * @param locale The locale instance.
21
+ * @param editingView The editing view instance this view is related to.
22
+ */
23
+ constructor(locale: Locale, editingView: View);
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ render(): void;
28
+ /**
29
+ * Focusable interface required by a FocusCycler.
30
+ */
31
+ focus(): void;
32
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x562a=['focus','createCollection','extendTemplate','ck-voice-label','setTemplate','editable','text','ck-editor__main','comment','ck-editor','ck-editor__aria-label_','cke-editor__aria-label_','main','element','Comment\x20editor','add','render'];(function(_0x56c4cc,_0x562a3c){const _0x109f50=function(_0x58b786){while(--_0x58b786){_0x56c4cc['push'](_0x56c4cc['shift']());}};_0x109f50(++_0x562a3c);}(_0x562a,0x1d0));const _0x109f=function(_0x56c4cc,_0x562a3c){_0x56c4cc=_0x56c4cc-0x0;let _0x109f50=_0x562a[_0x56c4cc];return _0x109f50;};import{InlineEditableUIView as _0x260539,EditorUIView as _0x34d7e9,LabelView as _0x3a87f0}from'ckeditor5/src/ui';import{uid as _0x7a5fb2}from'ckeditor5/src/utils';import{getTranslation as _0x214614}from'../../../utils/common-translations';export default class Et extends _0x34d7e9{constructor(_0x560a4e,_0x519cee){super(_0x560a4e);const _0xbf1f1a=_0x7a5fb2();this[_0x109f('0x7')]=this[_0x109f('0xd')](),this[_0x109f('0x0')]=new _0x260539(_0x560a4e,_0x519cee),this['_voiceLabelView']=this['_createVoiceLabel'](_0xbf1f1a,_0x560a4e),this[_0x109f('0x10')]({'tag':'div','attributes':{'class':['ck-reset',_0x109f('0x4'),'ck-rounded-corners','ck-comment__input'],'role':_0x109f('0x3'),'dir':_0x560a4e['uiLanguageDirection'],'lang':_0x560a4e['uiLanguage'],'aria-labelledby':_0x109f('0x6')+_0xbf1f1a},'children':[this['_voiceLabelView'],{'tag':'div','attributes':{'class':_0x109f('0x2'),'role':'presentation'},'children':this[_0x109f('0x7')]}]});}[_0x109f('0xb')](){super[_0x109f('0xb')](),this[_0x109f('0x7')][_0x109f('0xa')](this[_0x109f('0x0')]);}[_0x109f('0xc')](){this[_0x109f('0x0')][_0x109f('0x8')][_0x109f('0xc')]();}['_createVoiceLabel'](_0x346ec0,_0x2d15a3){const _0x3c7735=new _0x3a87f0();return _0x3c7735[_0x109f('0x1')]=_0x214614(_0x2d15a3,_0x109f('0x9')),_0x3c7735[_0x109f('0xe')]({'attributes':{'id':_0x109f('0x5')+_0x346ec0,'class':_0x109f('0xf')}}),_0x3c7735;}}
23
+ const _0x4bf2=['add','render','ck-rounded-corners','ck-voice-label','ck-editor__main','text','ck-reset','extendTemplate','Comment\x20editor','_voiceLabelView','focus','ck-editor__aria-label_','uiLanguage','editable','createCollection','presentation','uiLanguageDirection','comment','_createVoiceLabel','ck-editor','main','element','setTemplate','div','ck-comment__input'];(function(_0xb9e40a,_0x4bf208){const _0x324aab=function(_0x1f8256){while(--_0x1f8256){_0xb9e40a['push'](_0xb9e40a['shift']());}};_0x324aab(++_0x4bf208);}(_0x4bf2,0x94));const _0x324a=function(_0xb9e40a,_0x4bf208){_0xb9e40a=_0xb9e40a-0x0;let _0x324aab=_0x4bf2[_0xb9e40a];return _0x324aab;};import{InlineEditableUIView as _0xb1819b,EditorUIView as _0x4dcc54,LabelView as _0x1dbe1b}from'ckeditor5/src/ui';import{uid as _0x17b342}from'ckeditor5/src/utils';import{getTranslation as _0x428208}from'../../../utils/common-translations';export default class Nt extends _0x4dcc54{constructor(_0x324b77,_0x47a03b){super(_0x324b77);const _0x5fc859=_0x17b342();this['main']=this[_0x324a('0x10')](),this['editable']=new _0xb1819b(_0x324b77,_0x47a03b),this['_voiceLabelView']=this[_0x324a('0x14')](_0x5fc859,_0x324b77),this[_0x324a('0x18')]({'tag':_0x324a('0x0'),'attributes':{'class':[_0x324a('0x8'),_0x324a('0x15'),_0x324a('0x4'),_0x324a('0x1')],'role':_0x324a('0x13'),'dir':_0x324b77[_0x324a('0x12')],'lang':_0x324b77[_0x324a('0xe')],'aria-labelledby':'cke-editor__aria-label_'+_0x5fc859},'children':[this[_0x324a('0xb')],{'tag':_0x324a('0x0'),'attributes':{'class':_0x324a('0x6'),'role':_0x324a('0x11')},'children':this[_0x324a('0x16')]}]});}[_0x324a('0x3')](){super[_0x324a('0x3')](),this[_0x324a('0x16')][_0x324a('0x2')](this[_0x324a('0xf')]);}['focus'](){this[_0x324a('0xf')][_0x324a('0x17')][_0x324a('0xc')]();}[_0x324a('0x14')](_0x4b0346,_0x39476d){const _0x280d74=new _0x1dbe1b();return _0x280d74[_0x324a('0x7')]=_0x428208(_0x39476d,_0x324a('0xa')),_0x280d74[_0x324a('0x9')]({'attributes':{'id':_0x324a('0xd')+_0x4b0346,'class':_0x324a('0x5')}}),_0x280d74;}}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @module comments/comments/ui/commentthreadcontroller
3
+ * @publicApi
4
+ */
5
+ import type { CommentThread } from '../commentsrepository';
6
+ import type BaseCommentThreadView from './view/basecommentthreadview';
7
+ declare const CommentThreadController_base: {
8
+ new (): import("ckeditor5/src/utils").Observable;
9
+ prototype: import("ckeditor5/src/utils").Observable;
10
+ };
11
+ /**
12
+ * Controller for a comment thread.
13
+ *
14
+ * It takes a comment thread view, listens to events fired by that view and based on them performs actions on a comment thread model.
15
+ */
16
+ export default class CommentThreadController extends CommentThreadController_base {
17
+ model: CommentThread;
18
+ view: BaseCommentThreadView;
19
+ /**
20
+ * @param model Comment thread model.
21
+ * @param view Comment thread view.
22
+ */
23
+ constructor(model: CommentThread, view: BaseCommentThreadView);
24
+ /**
25
+ * Submits the comment thread.
26
+ */
27
+ submit(): void;
28
+ /**
29
+ * Removes the comment thread.
30
+ */
31
+ remove(): void;
32
+ /**
33
+ * Resolves the comment thread.
34
+ */
35
+ resolve(): void;
36
+ /**
37
+ * Reopens the comment thread.
38
+ */
39
+ reopen(): void;
40
+ /**
41
+ * Adds a comment to the comment thread.
42
+ *
43
+ * @param commentContent Comment content.
44
+ */
45
+ addComment(commentContent: string): void;
46
+ /**
47
+ * Updates a comment that belongs to the comment thread.
48
+ *
49
+ * @param commentId Id of the comment to update.
50
+ * @param commentContent Updated comment content.
51
+ */
52
+ updateComment(commentId: string, commentContent: string): void;
53
+ /**
54
+ * Removes a comment from the comment thread.
55
+ *
56
+ * @param commentId Id of the comment to remove.
57
+ */
58
+ removeComment(commentId: string): void;
59
+ /**
60
+ * Destroys `CommentThreadController` instance.
61
+ */
62
+ destroy(): void;
63
+ }
64
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x374b=['remove','update','view','stopListening','addComment','getComment','removeComment','listenTo','destroy','removeCommentThread','model','updateComment'];(function(_0x5eb7b7,_0x374b97){var _0x3430f0=function(_0x324676){while(--_0x324676){_0x5eb7b7['push'](_0x5eb7b7['shift']());}};_0x3430f0(++_0x374b97);}(_0x374b,0x1f2));var _0x3430=function(_0x5eb7b7,_0x374b97){_0x5eb7b7=_0x5eb7b7-0x0;var _0x3430f0=_0x374b[_0x5eb7b7];return _0x3430f0;};import{ObservableMixin as _0x28b3c7,mix as _0x2bc0b1}from'ckeditor5/src/utils';export default class ot{constructor(_0x5a1330,_0x3eb4a5){this['model']=_0x5a1330,this[_0x3430('0x4')]['_isAttached']=!0x0,this[_0x3430('0x8')]=_0x3eb4a5,this[_0x3430('0x1')](_0x3eb4a5,_0x3430('0x3'),()=>this[_0x3430('0x6')]()),this['listenTo'](_0x3eb4a5,_0x3430('0xa'),(_0x2a8499,_0x594e99)=>this[_0x3430('0xa')](_0x594e99)),this['listenTo'](_0x3eb4a5,'updateComment',(_0x3e67c6,_0x1bc6cf,_0x5bc003)=>this[_0x3430('0x5')](_0x1bc6cf,_0x5bc003)),this['listenTo'](_0x3eb4a5,_0x3430('0x0'),(_0x243057,_0x56f969)=>this[_0x3430('0x0')](_0x56f969));}[_0x3430('0x6')](){this[_0x3430('0x4')][_0x3430('0x6')]();}[_0x3430('0xa')](_0x45b332){this[_0x3430('0x4')]['addComment']({'content':_0x45b332,'authorId':this[_0x3430('0x8')]['_localUser']['id']});}['updateComment'](_0x1d3f0f,_0x35dd26){this[_0x3430('0x4')][_0x3430('0xb')](_0x1d3f0f)[_0x3430('0x7')]({'content':_0x35dd26});}[_0x3430('0x0')](_0x519765){this['model'][_0x3430('0xb')](_0x519765)['remove']();}[_0x3430('0x2')](){this[_0x3430('0x9')](),this[_0x3430('0x4')]['_isAttached']=!0x1;}}_0x2bc0b1(ot,_0x28b3c7);
23
+ var _0xcb7b=['submitCommentThread','resolve','updateComment','_isAttached','isResolved','_localUser','reopenCommentThread','removeCommentThread','submit','getComment','reopen','remove','resolveCommentThread','addComment','removeComment','stopListening','model','listenTo'];(function(_0x2c3260,_0xcb7bda){var _0x2f7a24=function(_0x140e1a){while(--_0x140e1a){_0x2c3260['push'](_0x2c3260['shift']());}};_0x2f7a24(++_0xcb7bda);}(_0xcb7b,0x11d));var _0x2f7a=function(_0x2c3260,_0xcb7bda){_0x2c3260=_0x2c3260-0x0;var _0x2f7a24=_0xcb7b[_0x2c3260];return _0x2f7a24;};import{ObservableMixin as _0x244d2c}from'ckeditor5/src/utils';export default class at extends _0x244d2c(){constructor(_0x398ddc,_0x322f8b){super(),this[_0x2f7a('0x1')]=_0x398ddc,this[_0x2f7a('0x1')]['_isAttached']=!0x0,this['view']=_0x322f8b,this[_0x2f7a('0x2')](_0x322f8b,_0x2f7a('0x3'),()=>this['submit']()),this[_0x2f7a('0x2')](_0x322f8b,_0x2f7a('0xa'),()=>this['remove']()),this[_0x2f7a('0x2')](_0x322f8b,_0x2f7a('0xf'),()=>this['resolve']()),this['listenTo'](_0x322f8b,_0x2f7a('0x9'),()=>this[_0x2f7a('0xd')]()),this[_0x2f7a('0x2')](_0x322f8b,_0x2f7a('0x10'),(_0x4c43b1,_0x281836)=>this[_0x2f7a('0x10')](_0x281836)),this['listenTo'](_0x322f8b,'updateComment',(_0x120dda,_0x2326f,_0x103ed4)=>this[_0x2f7a('0x5')](_0x2326f,_0x103ed4)),this[_0x2f7a('0x2')](_0x322f8b,'removeComment',(_0x52b26d,_0x32ad1b)=>this[_0x2f7a('0x11')](_0x32ad1b));}[_0x2f7a('0xb')](){this[_0x2f7a('0x1')][_0x2f7a('0xb')]();}[_0x2f7a('0xe')](){this[_0x2f7a('0x1')]['remove']();}[_0x2f7a('0x4')](){this[_0x2f7a('0x1')][_0x2f7a('0x7')]||this[_0x2f7a('0x1')][_0x2f7a('0x4')]();}[_0x2f7a('0xd')](){this['model'][_0x2f7a('0x7')]&&this[_0x2f7a('0x1')][_0x2f7a('0xd')]();}['addComment'](_0x5be4df){this[_0x2f7a('0x1')]['addComment']({'content':_0x5be4df,'authorId':this['view'][_0x2f7a('0x8')]['id']});}[_0x2f7a('0x5')](_0x2f1512,_0x119ec3){this[_0x2f7a('0x1')][_0x2f7a('0xc')](_0x2f1512)['update']({'content':_0x119ec3});}[_0x2f7a('0x11')](_0xb82bf){this[_0x2f7a('0x1')]['getComment'](_0xb82bf)['remove']();}['destroy'](){this[_0x2f7a('0x0')](),this[_0x2f7a('0x1')][_0x2f7a('0x6')]=!0x1;}}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @module comments/comments/ui/view/basecommentthreadview
3
+ * @publicApi
4
+ */
5
+ import { View } from 'ckeditor5/src/ui';
6
+ import type { Locale } from 'ckeditor5/src/utils';
7
+ import CommentThreadInputView from './commentthreadinputview';
8
+ import CommentsListView from './commentslistview';
9
+ import CommentThreadHeaderView from './commentthreadheaderview';
10
+ import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
11
+ import type { CommentThread } from '../../commentsrepository';
12
+ import type { CommentThreadConfig } from '../../../config';
13
+ /**
14
+ * An abstract comment thread view class that should be used as a base for comment thread view implementations.
15
+ * It provides some behaviors, flags and building blocks to use when creating a custom comment thread view class.
16
+ *
17
+ * For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view Custom annotation view} guide.
18
+ */
19
+ export default class BaseCommentThreadView extends View {
20
+ locale: Locale;
21
+ /**
22
+ * Informs whether the comment thread view is in active state ("highlighted").
23
+ * A comment thread view is in this state when it is focused or was activated by the user in any other way.
24
+ *
25
+ * @observable
26
+ */
27
+ isActive: boolean;
28
+ /**
29
+ * Informs whether the comment thread has any changes that have not been saved.
30
+ *
31
+ * @observable
32
+ */
33
+ isDirty: boolean;
34
+ /**
35
+ * The number of comments.
36
+ *
37
+ * @observable
38
+ */
39
+ readonly length: number;
40
+ /**
41
+ * The list of comment views. It should be used as a part of the view template.
42
+ *
43
+ * @readonly
44
+ */
45
+ readonly commentsListView: CommentsListView;
46
+ /**
47
+ * The comment thread header. It should be used as a part of the view template.
48
+ * This header is used only for resolved comment threads.
49
+ *
50
+ * @readonly
51
+ */
52
+ readonly commentThreadHeaderView: CommentThreadHeaderView;
53
+ /**
54
+ * The comment input area view. It should be used as a part of the view template.
55
+ *
56
+ * @readonly
57
+ */
58
+ readonly commentThreadInputView: CommentThreadInputView;
59
+ /**
60
+ * @param locale The localization service instance.
61
+ * @param model The model on which the view will base.
62
+ * @param localUser The current local user.
63
+ * @param config Additional view configuration.
64
+ */
65
+ constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
66
+ /**
67
+ * Focuses the view.
68
+ */
69
+ focus(): void;
70
+ /**
71
+ * @inheritDoc
72
+ */
73
+ destroy(): void;
74
+ }
75
+ /**
76
+ * Fired when a user created a first comment in the comment thread. Then the comment thread is submitted and saved.
77
+ *
78
+ * @eventName ~BaseCommentThreadView#submitCommentThread
79
+ */
80
+ export type UISubmitCommentThreadEvent = {
81
+ name: 'submitCommentThread';
82
+ args: [];
83
+ };
84
+ /**
85
+ * Fired when a user performed an action that should lead to removing the comment thread.
86
+ *
87
+ * This event is not fired by default by any component created by `BaseCommentThreadView`.
88
+ * If you create a view class extending `BaseCommentThreadView`, you should provide
89
+ * a UI element that will fire this event.
90
+ *
91
+ * This event is fired by default when an empty comment thread view (with no comments)
92
+ * loses focus.
93
+ *
94
+ * @eventName ~BaseCommentThreadView#removeCommentThread
95
+ */
96
+ export type UIRemoveCommentThreadEvent = {
97
+ name: 'removeCommentThread';
98
+ args: [];
99
+ };
100
+ /**
101
+ * Fired when a user performed an action that should lead to resolve the comment thread.
102
+ *
103
+ * @eventName ~BaseCommentThreadView#resolveCommentThread
104
+ */
105
+ export type UIResolveCommentThreadEvent = {
106
+ name: 'resolveCommentThread';
107
+ args: [id: string];
108
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4f87=['cancel','placeholder','isReadOnly','_createCommentThreadInputView','set','focus','disabledSubmit','Reply...','assign','fire','element','length','commentThreadInputView','_config','addComment','stop','change:isActive','destroy','commentsListView','isDirty','removeComment','locale','value','_localUser','submit','hasDirtyComment','delegate','_model','commentInputView','updateComment','removeCommentThread','bind','isActive','Write\x20a\x20comment...'];(function(_0x5bb518,_0x4f87f3){const _0xd06874=function(_0x2453f6){while(--_0x2453f6){_0x5bb518['push'](_0x5bb518['shift']());}};_0xd06874(++_0x4f87f3);}(_0x4f87,0x1e5));const _0xd068=function(_0x5bb518,_0x4f87f3){_0x5bb518=_0x5bb518-0x0;let _0xd06874=_0x4f87[_0x5bb518];return _0xd06874;};import{View as _0x12b732}from'ckeditor5/src/ui';import _0x88cc88 from'./commentthreadinputview';import _0x11d658 from'./commentslistview';import{getTranslation as _0x3fb138}from'../../../utils/common-translations';export default class Rt extends _0x12b732{constructor(_0x538012,_0x392717,_0x42c1ef,_0x17dc66){super(_0x538012),this[_0xd068('0x1d')](_0xd068('0x17'),!0x1),this[_0xd068('0x1d')]('isDirty',!0x1),this[_0xd068('0x12')]=_0x392717,this[_0xd068('0xe')]=_0x42c1ef,this['_config']=_0x17dc66,this[_0xd068('0x9')]=new _0x11d658(_0x538012,_0x392717,Object[_0xd068('0x21')]({'CommentView':this[_0xd068('0x4')]['CommentView']},_0x17dc66)),this[_0xd068('0x9')]['delegate'](_0xd068('0xb'))['to'](this),this[_0xd068('0x9')][_0xd068('0x11')](_0xd068('0x14'))['to'](this),this[_0xd068('0x9')][_0xd068('0x16')](_0xd068('0x17'))['to'](this),this[_0xd068('0x1d')](_0xd068('0x2'),this['commentsListView'][_0xd068('0x2')]),this[_0xd068('0x16')](_0xd068('0x2'))['to'](this[_0xd068('0x9')],'length'),this[_0xd068('0x3')]=this['_createCommentThreadInputView'](),this['on'](_0xd068('0xb'),()=>this['focus']()),this[_0xd068('0x16')](_0xd068('0xa'))['to'](this[_0xd068('0x9')],_0xd068('0x10'),this[_0xd068('0x3')]['commentInputView'],_0xd068('0xd'),(_0xc55d26,_0x44cc22)=>_0xc55d26||!!_0x44cc22);}[_0xd068('0x1e')](){this[_0xd068('0x1')][_0xd068('0x1e')]();}[_0xd068('0x8')](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),this[_0xd068('0x3')][_0xd068('0x8')](),super[_0xd068('0x8')]();}[_0xd068('0x1c')](){const _0x46f5ee=new _0x88cc88(this[_0xd068('0xc')],this[_0xd068('0xe')],this['_config']['editorConfig']),_0x236c10=_0x46f5ee[_0xd068('0x13')];return _0x46f5ee[_0xd068('0x16')]('showInput')['to'](this,'isActive',this[_0xd068('0x12')],_0xd068('0x1b'),_0x236c10,_0xd068('0xd'),(_0x20a792,_0x3183c1,_0x3141c0)=>!!_0x3141c0||_0x20a792&&!_0x3183c1),_0x236c10[_0xd068('0x16')](_0xd068('0x1a'))['to'](this,'length',_0x1b895=>_0x3fb138(this[_0xd068('0xc')],_0x1b895?_0xd068('0x20'):_0xd068('0x18'))),_0x236c10['on'](_0xd068('0xf'),(_0x2e4e34,_0x49a14d)=>{this['fire'](_0xd068('0x5'),_0x49a14d);}),_0x236c10['on'](_0xd068('0x19'),()=>{this[_0xd068('0x1e')]();}),_0x236c10['bind'](_0xd068('0x1f'))['to'](this[_0xd068('0x12')],'isReadOnly'),_0x236c10['on'](_0xd068('0x19'),_0x28a3c2=>{0x0==this[_0xd068('0x2')]&&(this[_0xd068('0x0')](_0xd068('0x15')),_0x28a3c2[_0xd068('0x6')]());}),this['on'](_0xd068('0x7'),(_0x12c58f,_0x47ccce,_0x176aed)=>{_0x176aed||this[_0xd068('0x2')]||_0x236c10['value']||this[_0xd068('0x0')](_0xd068('0x15'));}),_0x46f5ee;}}
23
+ const _0x4e24=['locale','_model','stop','cancel','CommentView','fire','bind','removeCommentThread','value','delegate','set','disabledSubmit','showInput','focus','isReadOnly','removeComment','commentsListView','placeholder','commentThreadInputView','commentInputView','isResolved','_config','Reply...','isDirty','destroy','_createCommentThreadInputView','element','isActive','reopenCommentThread','Reply\x20to\x20reopen\x20discussion...','length','isSubmitted','editorConfig','_localUser','resolveCommentThread','resolvedAt','isResolvable','commentThreadHeaderView'];(function(_0xd65c1d,_0x4e24a4){const _0x3891ab=function(_0x93e95a){while(--_0x93e95a){_0xd65c1d['push'](_0xd65c1d['shift']());}};_0x3891ab(++_0x4e24a4);}(_0x4e24,0x9c));const _0x3891=function(_0xd65c1d,_0x4e24a4){_0xd65c1d=_0xd65c1d-0x0;let _0x3891ab=_0x4e24[_0xd65c1d];return _0x3891ab;};import{View as _0x2d2da1}from'ckeditor5/src/ui';import _0x1ac2c8 from'./commentthreadinputview';import _0x4e761f from'./commentslistview';import _0xf3f1b9 from'./commentthreadheaderview';import{getTranslation as _0x45a22c}from'../../../utils/common-translations';export default class Rt extends _0x2d2da1{constructor(_0x1968b2,_0x5ec83c,_0x365248,_0x50c0a5){super(_0x1968b2),this[_0x3891('0x6')](_0x3891('0x17'),!0x1),this[_0x3891('0x6')](_0x3891('0x13'),!0x1),this[_0x3891('0x23')]=_0x5ec83c,this[_0x3891('0x1d')]=_0x365248,this[_0x3891('0x11')]=_0x50c0a5,this[_0x3891('0x21')]=new _0xf3f1b9(_0x1968b2,_0x5ec83c),this[_0x3891('0x21')][_0x3891('0x5')](_0x3891('0x18'))['to'](this),this[_0x3891('0xc')]=new _0x4e761f(_0x1968b2,_0x5ec83c,Object['assign']({'CommentView':this['_config'][_0x3891('0x0')]},_0x50c0a5)),this[_0x3891('0xc')]['delegate'](_0x3891('0xb'))['to'](this),this[_0x3891('0xc')][_0x3891('0x5')]('updateComment')['to'](this),this['commentsListView']['delegate'](_0x3891('0x1e'))['to'](this),this[_0x3891('0xc')][_0x3891('0x2')](_0x3891('0x17'))['to'](this),this[_0x3891('0x6')](_0x3891('0x1a'),this['commentsListView']['length']),this[_0x3891('0x2')](_0x3891('0x1a'))['to'](this[_0x3891('0xc')],_0x3891('0x1a')),this[_0x3891('0xe')]=this['_createCommentThreadInputView'](),this['on'](_0x3891('0xb'),()=>this[_0x3891('0x9')]()),this[_0x3891('0x2')](_0x3891('0x13'))['to'](this[_0x3891('0xc')],'hasDirtyComment',this[_0x3891('0xe')][_0x3891('0xf')],_0x3891('0x4'),(_0xf88c20,_0x185b6c)=>_0xf88c20||!!_0x185b6c);}[_0x3891('0x9')](){this[_0x3891('0x16')][_0x3891('0x9')]();}[_0x3891('0x14')](){this[_0x3891('0x13')]=!0x1,this[_0x3891('0xc')]['destroy'](),this[_0x3891('0xe')][_0x3891('0x14')](),super[_0x3891('0x14')]();}[_0x3891('0x15')](){const _0x4e6c1f=new _0x1ac2c8(this[_0x3891('0x22')],this[_0x3891('0x1d')],this[_0x3891('0x11')][_0x3891('0x1c')]),_0x30b771=_0x4e6c1f[_0x3891('0xf')];return _0x4e6c1f[_0x3891('0x2')](_0x3891('0x8'))['to'](this,_0x3891('0x17'),this['_model'],_0x3891('0xa'),this[_0x3891('0x23')],_0x3891('0x20'),_0x30b771,_0x3891('0x4'),(_0x382407,_0x5c898a,_0x50ad01,_0x31eb13)=>!!_0x31eb13||_0x50ad01||_0x382407&&!_0x5c898a),_0x30b771['bind'](_0x3891('0xd'))['to'](this,_0x3891('0x1a'),this['_model'],_0x3891('0x20'),this[_0x3891('0x23')],_0x3891('0x1f'),(_0x1e8b03,_0x34f6a4,_0x57ebc8)=>{let _0x23c539;return _0x23c539=_0x57ebc8&&_0x34f6a4?_0x3891('0x19'):_0x1e8b03?_0x3891('0x12'):'Write\x20a\x20comment...',_0x45a22c(this[_0x3891('0x22')],_0x23c539);}),_0x30b771['on']('submit',(_0x21ca6f,_0x316c44)=>{this[_0x3891('0x1')]('addComment',_0x316c44),this[_0x3891('0x23')][_0x3891('0x10')]&&this[_0x3891('0x23')]['isResolvable']&&this[_0x3891('0x1')](_0x3891('0x18'),this['_model']['id']),this[_0x3891('0x23')][_0x3891('0x1b')]||this[_0x3891('0x1')]('submitCommentThread');}),_0x30b771['on'](_0x3891('0x25'),()=>{this[_0x3891('0x9')]();}),_0x30b771['bind'](_0x3891('0x7'))['to'](this[_0x3891('0x23')],_0x3891('0xa')),_0x30b771['on'](_0x3891('0x25'),_0x161b2e=>{0x0==this[_0x3891('0x1a')]&&(this[_0x3891('0x1')](_0x3891('0x3')),_0x161b2e[_0x3891('0x24')]());}),this['on']('change:isActive',(_0x53abc4,_0x4e0355,_0x457d52)=>{_0x457d52||this[_0x3891('0x1a')]||_0x30b771[_0x3891('0x4')]||this[_0x3891('0x1')]('removeCommentThread');}),_0x4e6c1f;}}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @module comments/comments/ui/view/basecommentview
3
+ * @publicApi
4
+ */
5
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
6
+ import type { Locale } from 'ckeditor5/src/utils';
7
+ import type { Comment } from '../../commentsrepository';
8
+ import type { CommentViewConfig } from '../../../config';
9
+ /**
10
+ * An abstract comment view class that should be used as a base for comment view implementations.
11
+ *
12
+ * It provides some behaviors, flags and building blocks to use when creating a custom comment view class.
13
+ */
14
+ export default class BaseCommentView extends View {
15
+ locale: Locale;
16
+ /**
17
+ * Informs whether the comment view is in the editing mode.
18
+ *
19
+ * @observable
20
+ */
21
+ isEditMode: boolean;
22
+ /**
23
+ * Flag indicating whether the comment view displays an actual comment (`false`) or is a system message (`true`).
24
+ * System message comment should not include any UI elements which allow for editing the comment as it is not an actual comment.
25
+ *
26
+ * @readonly
27
+ */
28
+ isSystemComment: boolean;
29
+ /**
30
+ * Stores the currently displayed sub-view.
31
+ *
32
+ * This is a collection that always includes one view: comment content view or comment input view.
33
+ * Depending whether the comment is in editing mode or not, one of the views is in the collection.
34
+ * When the comment mode changes, the content of this collection also changes.
35
+ *
36
+ * By default, the comment is in the "content mode" and this view collection stores the comment content view.
37
+ */
38
+ readonly visibleView: ViewCollection;
39
+ /**
40
+ * @param locale The localization service instance.
41
+ * @param model The model on which the view will base.
42
+ * @param config Additional view configuration.
43
+ */
44
+ constructor(locale: Locale, model: Comment, config: CommentViewConfig);
45
+ /**
46
+ * Expands the view.
47
+ */
48
+ expand(): void;
49
+ /**
50
+ * Collapses the view.
51
+ */
52
+ collapse(): void;
53
+ /**
54
+ * Focuses the view.
55
+ */
56
+ focus(): void;
57
+ /**
58
+ * @inheritDoc
59
+ */
60
+ destroy(): Promise<void>;
61
+ /**
62
+ * Switches the comment to the editing mode.
63
+ */
64
+ switchToEditMode(): void;
65
+ /**
66
+ * Switches the comment back from the editing mode to the content display mode.
67
+ */
68
+ switchToDisplayMode(): void;
69
+ }
70
+ /**
71
+ * Fired when a user performed an action that should lead to creating a new comment in the comment thread.
72
+ *
73
+ * This event is fired by default when the comment input field of the comment thread is submitted.
74
+ *
75
+ * @eventName ~BaseCommentView#addComment
76
+ * @param content The content of the new comment.
77
+ */
78
+ export type UIAddCommentEvent = {
79
+ name: 'addComment';
80
+ args: [content: string];
81
+ };
82
+ /**
83
+ * Fired when a user performed an action that should lead to updating the comment content.
84
+ *
85
+ * This event is fired by default when the comment input field of a comment is submitted.
86
+ *
87
+ * @param commentId The ID of the updated comment.
88
+ * @param commentContent The updated comment content.
89
+ * @eventName ~BaseCommentView#updateComment
90
+ */
91
+ export type UIUpdateCommentEvent = {
92
+ name: 'updateComment';
93
+ args: [commentId: string, commentContent: string];
94
+ };
95
+ /**
96
+ * Fired when a user performed an action that should lead to removing a comment.
97
+ *
98
+ * This event is not fired by default by any component created by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}.
99
+ * If you create a view class extending {@link module:comments/comments/ui/view/basecommentview~BaseCommentView} you should provide
100
+ * a UI element that will fire this event.
101
+ *
102
+ * @param commentId The ID of the removed comment.
103
+ * @eventName ~BaseCommentView#removeComment
104
+ */
105
+ export type UIRemoveCommentEvent = {
106
+ name: 'removeComment';
107
+ args: [commentId: string];
108
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4539=['set','editorConfig','element','createEditor','collapse','disabledSubmit','_createCommentContentView','_model','_config','maxCommentCharsWhenCollapsed','value','initialData','bind','content','focus','add','isReadOnly','switchToDisplayMode','locale','isCollapsed','get','visibleView','isEditMode','editorReady','switchToEditMode','expand','once','_createCommentInputView','destroy','fire','submit'];(function(_0x1036e2,_0x4539e4){const _0x1d387c=function(_0x44ef21){while(--_0x44ef21){_0x1036e2['push'](_0x1036e2['shift']());}};_0x1d387c(++_0x4539e4);}(_0x4539,0x68));const _0x1d38=function(_0x1036e2,_0x4539e4){_0x1036e2=_0x1036e2-0x0;let _0x1d387c=_0x4539[_0x1036e2];return _0x1d387c;};import{View as _0x130eae}from'ckeditor5/src/ui';import{trimHtml as _0x38d826}from'ckeditor5-collaboration/src/collaboration-core';import _0x222bf0 from'./commentcontentview';import _0x5d60c9 from'./commentinputview';export default class Gt extends _0x130eae{constructor(_0x27b2ad,_0x5482b1,_0x583154){super(_0x27b2ad),this[_0x1d38('0x1b')]=_0x5482b1,this['_config']=_0x583154,this[_0x1d38('0x14')](_0x1d38('0xb'),!0x1),this[_0x1d38('0x14')](_0x1d38('0x8'),!0x0),this[_0x1d38('0xa')]=this['createCollection'](),this[_0x1d38('0xa')][_0x1d38('0x4')](this['_createCommentContentView']());}[_0x1d38('0xe')](){this['isCollapsed']=!0x1;}[_0x1d38('0x18')](){this['isEditMode']||(this[_0x1d38('0x8')]=!0x0);}[_0x1d38('0x3')](){this[_0x1d38('0x16')][_0x1d38('0x3')]();}async[_0x1d38('0x11')](){await this[_0x1d38('0xa')][_0x1d38('0x9')](0x0)[_0x1d38('0x11')](),super['destroy']();}[_0x1d38('0xd')](){this[_0x1d38('0xb')]||(this[_0x1d38('0xb')]=!0x0,this[_0x1d38('0xa')]['remove'](0x0)[_0x1d38('0x11')](),this[_0x1d38('0xa')]['add'](this['_createCommentInputView']()));}[_0x1d38('0x6')](){this[_0x1d38('0xb')]&&(this[_0x1d38('0xb')]=!0x1,this['visibleView']['remove'](0x0)[_0x1d38('0x11')](),this[_0x1d38('0xa')][_0x1d38('0x4')](this[_0x1d38('0x1a')]()));}[_0x1d38('0x1a')](){const _0x54d3a3=new _0x222bf0(this['locale']);return _0x54d3a3['bind'](_0x1d38('0x2'))['to'](this[_0x1d38('0x1b')],'content',this,_0x1d38('0x8'),(_0x16ec12,_0x3177b4)=>_0x3177b4?_0x38d826(_0x16ec12,{'limit':this[_0x1d38('0x1c')][_0x1d38('0x1d')]}):_0x16ec12),_0x54d3a3;}[_0x1d38('0x10')](){this['_config'][_0x1d38('0x15')]||(this[_0x1d38('0x1c')][_0x1d38('0x15')]={}),this[_0x1d38('0x1c')][_0x1d38('0x15')][_0x1d38('0x0')]=this[_0x1d38('0x1b')][_0x1d38('0x2')];const _0x462ede=new _0x5d60c9(this[_0x1d38('0x7')],this['_config'][_0x1d38('0x15')]);return _0x462ede[_0x1d38('0x1e')]=this[_0x1d38('0x1b')][_0x1d38('0x2')],_0x462ede[_0x1d38('0x1')](_0x1d38('0x19'))['to'](this[_0x1d38('0x1b')],_0x1d38('0x5')),_0x462ede['on'](_0x1d38('0x13'),(_0x15260d,_0x223083)=>{this[_0x1d38('0x12')]('updateComment',this[_0x1d38('0x1b')]['id'],_0x223083),this[_0x1d38('0x6')](),this[_0x1d38('0x3')]();}),_0x462ede['on']('cancel',()=>{this[_0x1d38('0x6')](),this[_0x1d38('0x3')]();}),_0x462ede[_0x1d38('0xf')](_0x1d38('0xc'),()=>{_0x462ede[_0x1d38('0x3')]();}),_0x462ede[_0x1d38('0x17')](),_0x462ede;}}
23
+ const _0x4cdd=['fire','set','isEditMode','disabledSubmit','editorReady','switchToDisplayMode','switchToEditMode','submit','isCollapsed','value','focus','add','once','updateComment','expand','createCollection','initialData','isReadOnly','_createCommentInputView','_createCommentContentView','maxCommentCharsWhenCollapsed','destroy','collapse','_model','element','cancel','remove','visibleView','_config','content','bind','isSystemComment','createEditor','editorConfig'];(function(_0x16bcaa,_0x4cdda0){const _0x1a7525=function(_0x4f2cbb){while(--_0x4f2cbb){_0x16bcaa['push'](_0x16bcaa['shift']());}};_0x1a7525(++_0x4cdda0);}(_0x4cdd,0xc3));const _0x1a75=function(_0x16bcaa,_0x4cdda0){_0x16bcaa=_0x16bcaa-0x0;let _0x1a7525=_0x4cdd[_0x16bcaa];return _0x1a7525;};import{View as _0x5b09c1}from'ckeditor5/src/ui';import{trimHtml as _0x1f0fea}from'ckeditor5-collaboration/src/collaboration-core';import _0x1860c6 from'./commentcontentview';import _0x594e2b from'./commentinputview';export default class Xt extends _0x5b09c1{constructor(_0x34fa7a,_0x16d474,_0x476ca1){super(_0x34fa7a),this[_0x1a75('0x20')]=_0x16d474,this[_0x1a75('0x3')]=_0x476ca1,this[_0x1a75('0x6')]=!!this[_0x1a75('0x3')]['isSystemComment'],this[_0x1a75('0xa')](_0x1a75('0xb'),!0x1),this['set'](_0x1a75('0x11'),!0x0),this[_0x1a75('0x2')]=this[_0x1a75('0x18')](),this[_0x1a75('0x2')][_0x1a75('0x14')](this[_0x1a75('0x1c')]());}[_0x1a75('0x17')](){this[_0x1a75('0x11')]=!0x1;}[_0x1a75('0x1f')](){this[_0x1a75('0xb')]||(this[_0x1a75('0x11')]=!0x0);}[_0x1a75('0x13')](){this[_0x1a75('0x21')][_0x1a75('0x13')]();}async[_0x1a75('0x1e')](){await this['visibleView']['get'](0x0)['destroy'](),super[_0x1a75('0x1e')]();}[_0x1a75('0xf')](){this[_0x1a75('0xb')]||(this[_0x1a75('0xb')]=!0x0,this[_0x1a75('0x2')][_0x1a75('0x1')](0x0)[_0x1a75('0x1e')](),this['visibleView'][_0x1a75('0x14')](this[_0x1a75('0x1b')]()));}[_0x1a75('0xe')](){this['isEditMode']&&(this[_0x1a75('0xb')]=!0x1,this['visibleView'][_0x1a75('0x1')](0x0)[_0x1a75('0x1e')](),this['visibleView'][_0x1a75('0x14')](this[_0x1a75('0x1c')]()));}[_0x1a75('0x1c')](){const _0x28a7fe=new _0x1860c6(this['locale']);return _0x28a7fe[_0x1a75('0x5')]('content')['to'](this[_0x1a75('0x20')],_0x1a75('0x4'),this,_0x1a75('0x11'),(_0x8e2801,_0x1ff090)=>_0x1ff090?_0x1f0fea(_0x8e2801,{'limit':this[_0x1a75('0x3')][_0x1a75('0x1d')]}):_0x8e2801),_0x28a7fe;}[_0x1a75('0x1b')](){this['_config']['editorConfig']||(this[_0x1a75('0x3')][_0x1a75('0x8')]={}),this[_0x1a75('0x3')][_0x1a75('0x8')][_0x1a75('0x19')]=this[_0x1a75('0x20')]['content'];const _0x53a92e=new _0x594e2b(this['locale'],this['_config']['editorConfig']);return _0x53a92e[_0x1a75('0x12')]=this[_0x1a75('0x20')]['content'],_0x53a92e[_0x1a75('0x5')](_0x1a75('0xc'))['to'](this[_0x1a75('0x20')],_0x1a75('0x1a')),_0x53a92e['on'](_0x1a75('0x10'),(_0x279474,_0x158872)=>{this[_0x1a75('0x9')](_0x1a75('0x16'),this[_0x1a75('0x20')]['id'],_0x158872),this[_0x1a75('0xe')](),this[_0x1a75('0x13')]();}),_0x53a92e['on'](_0x1a75('0x0'),()=>{this['switchToDisplayMode'](),this[_0x1a75('0x13')]();}),_0x53a92e[_0x1a75('0x15')](_0x1a75('0xd'),()=>{_0x53a92e['focus']();}),_0x53a92e[_0x1a75('0x7')](),_0x53a92e;}}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @module comments/comments/ui/view/collapsedcommentsview
3
+ */
4
+ import { View } from 'ckeditor5/src/ui';
5
+ import type { Locale } from 'ckeditor5/src/utils';
6
+ export default class CollapsedCommentsView extends View {
7
+ count: number | undefined;
8
+ constructor(locale: Locale);
9
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2ea3=['count','setTemplate','bindTemplate','NUMBER_OF_COMMENTS'];(function(_0x5311d1,_0x2ea334){const _0x1e5cee=function(_0x4817e3){while(--_0x4817e3){_0x5311d1['push'](_0x5311d1['shift']());}};_0x1e5cee(++_0x2ea334);}(_0x2ea3,0x1c1));const _0x1e5c=function(_0x5311d1,_0x2ea334){_0x5311d1=_0x5311d1-0x0;let _0x1e5cee=_0x2ea3[_0x5311d1];return _0x1e5cee;};import{View as _0x20fcf0}from'ckeditor5/src/ui';import{getTranslation as _0x187678}from'../../../utils/common-translations';export default class Nt extends _0x20fcf0{constructor(_0x4b5ce9){super(_0x4b5ce9);const _0x1e44d3=this[_0x1e5c('0x1')];this['set']('count'),this[_0x1e5c('0x0')]({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1e44d3['to'](_0x1e5c('0x3'),_0x3c8bc6=>_0x187678(_0x4b5ce9,_0x1e5c('0x2'),_0x3c8bc6))}]});}}
23
+ const _0x33f7=['set','count','NUMBER_OF_COMMENTS','ck-thread__comment-count','bindTemplate','setTemplate'];(function(_0x168f63,_0x33f7f8){const _0x42a6e6=function(_0x4b35b4){while(--_0x4b35b4){_0x168f63['push'](_0x168f63['shift']());}};_0x42a6e6(++_0x33f7f8);}(_0x33f7,0xc2));const _0x42a6=function(_0x168f63,_0x33f7f8){_0x168f63=_0x168f63-0x0;let _0x42a6e6=_0x33f7[_0x168f63];return _0x42a6e6;};import{View as _0x5e1670}from'ckeditor5/src/ui';import{getTranslation as _0x2d90ff}from'../../../utils/common-translations';export default class Yt extends _0x5e1670{constructor(_0x5b09a2){super(_0x5b09a2);const _0xc3dc66=this[_0x42a6('0x2')];this[_0x42a6('0x4')](_0x42a6('0x5'),void 0x0),this[_0x42a6('0x3')]({'tag':'li','attributes':{'class':_0x42a6('0x1')},'children':[{'text':_0xc3dc66['to'](_0x42a6('0x5'),_0x480486=>_0x2d90ff(_0x5b09a2,_0x42a6('0x0'),_0x480486))}]});}}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentcontentview
3
+ */
4
+ import { View } from 'ckeditor5/src/ui';
5
+ import type { Locale } from 'ckeditor5/src/utils';
6
+ export default class CommentContentView extends View {
7
+ content: string;
8
+ constructor(locale: Locale);
9
+ render(): void;
10
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x35c3=['innerHTML','setTemplate','div','ck-comment__content','render','element','content','set'];(function(_0x31f0eb,_0x35c355){var _0x5a934f=function(_0x3abcdd){while(--_0x3abcdd){_0x31f0eb['push'](_0x31f0eb['shift']());}};_0x5a934f(++_0x35c355);}(_0x35c3,0x135));var _0x5a93=function(_0x31f0eb,_0x35c355){_0x31f0eb=_0x31f0eb-0x0;var _0x5a934f=_0x35c3[_0x31f0eb];return _0x5a934f;};import{View as _0x3ac39a}from'ckeditor5/src/ui';export default class Tt extends _0x3ac39a{constructor(_0x288377){super(_0x288377),this[_0x5a93('0x2')](_0x5a93('0x1'),''),this[_0x5a93('0x4')]({'tag':_0x5a93('0x5'),'attributes':{'class':[_0x5a93('0x6'),'ck-annotation__content']}});}[_0x5a93('0x7')](){super[_0x5a93('0x7')](),this['on']('change:content',(_0x1a91c0,_0x10bd86,_0x5f48f4)=>{this[_0x5a93('0x0')]['innerHTML']=_0x5f48f4;}),this[_0x5a93('0x0')][_0x5a93('0x3')]=this['content'];}}
23
+ var _0x4736=['setTemplate','innerHTML','content','change:content','render','set','element','ck-annotation__content'];(function(_0x13cf8,_0x473678){var _0x520d2e=function(_0x46cfd3){while(--_0x46cfd3){_0x13cf8['push'](_0x13cf8['shift']());}};_0x520d2e(++_0x473678);}(_0x4736,0x64));var _0x520d=function(_0x13cf8,_0x473678){_0x13cf8=_0x13cf8-0x0;var _0x520d2e=_0x4736[_0x13cf8];return _0x520d2e;};import{View as _0x57da40}from'ckeditor5/src/ui';export default class Ut extends _0x57da40{constructor(_0xb9b57f){super(_0xb9b57f),this[_0x520d('0x1')](_0x520d('0x6'),''),this[_0x520d('0x4')]({'tag':'div','attributes':{'class':['ck-comment__content',_0x520d('0x3')]}});}[_0x520d('0x0')](){super[_0x520d('0x0')](),this['on'](_0x520d('0x7'),(_0x2454b7,_0x20befa,_0x5ca9cd)=>{this[_0x520d('0x2')][_0x520d('0x5')]=_0x5ca9cd;}),this['element'][_0x520d('0x5')]=this[_0x520d('0x6')];}}