@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 _0x28c2=['set','containerElement','isConfirm','isActive','.ck-thread__container','locale','ck-thread--','removeButton','getTemplate','showConfirm','fire','div','change:isActive','removeCommentThread','actionIndicator','placeholder','add','render','then','ck-thread','bindTemplate','ck-thread__container','change:isReadOnly','_boundFirstCommentView','bind','commentThreadInputView','high','element','commentViews','cancelConfirm','stop','remove','listenTo','ck-thread--active','_cancelAllConfirms','commentsListView','_bindFirstCommentView','setTemplate','_model','Write\x20a\x20comment...'];(function(_0x1ea8f1,_0x28c262){const _0x2054a2=function(_0x1efd05){while(--_0x1efd05){_0x1ea8f1['push'](_0x1ea8f1['shift']());}};_0x2054a2(++_0x28c262);}(_0x28c2,0xe4));const _0x2054=function(_0x1ea8f1,_0x28c262){_0x1ea8f1=_0x1ea8f1-0x0;let _0x2054a2=_0x28c2[_0x1ea8f1];return _0x2054a2;};import{mix as _0x126413}from'ckeditor5/src/utils';import{ConfirmMixin as _0x506442}from'ckeditor5-collaboration/src/collaboration-core';import _0x12bdc1 from'./basecommentthreadview';import{getTranslation as _0x1b642a}from'../../../utils/common-translations';export default class it extends _0x12bdc1{constructor(_0x1625d8,_0x539216,_0x330df8,_0x239b9a){super(_0x1625d8,_0x539216,_0x330df8,_0x239b9a),this[_0x2054('0xc')](_0x2054('0x1a'),null),this[_0x2054('0xd')]=null,this[_0x2054('0x23')]=null,this[_0x2054('0x11')]=_0x1625d8,this[_0x2054('0x9')](this['getTemplate']()),this['on'](_0x2054('0x18'),(_0x5d74a5,_0x5ab79a,_0x263e0c)=>{_0x263e0c||this['_cancelAllConfirms']();}),this[_0x2054('0x4')](this[_0x2054('0xa')],_0x2054('0x22'),(_0x19c588,_0x330de3,_0x5a9abc)=>{_0x5a9abc&&this[_0x2054('0x6')]();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this[_0x2054('0x7')][_0x2054('0x0')],_0x2054('0x1c'),()=>{this[_0x2054('0x8')]();});}[_0x2054('0x14')](){const _0x36e441=this[_0x2054('0x20')];return{'tag':_0x2054('0x17'),'attributes':{'class':[_0x2054('0x1f'),_0x36e441['if'](_0x2054('0xf'),_0x2054('0x5')),_0x36e441['if'](_0x2054('0xe'),'ck-thread--remove-confirmation'),_0x36e441['to'](_0x2054('0x1a'),_0x4098e4=>_0x4098e4?_0x2054('0x12')+_0x4098e4:'')],'data-thread-id':this[_0x2054('0xa')]['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':_0x2054('0x21')},'children':[this['commentsListView'],this[_0x2054('0x25')]]}]};}[_0x2054('0x1d')](){super[_0x2054('0x1d')](),this[_0x2054('0xd')]=this[_0x2054('0x27')]['querySelector'](_0x2054('0x10'));}[_0x2054('0x6')](){this[_0x2054('0x1')]();for(const _0x105428 of this['commentsListView'][_0x2054('0x0')])_0x105428[_0x2054('0x1')]();}['_bindFirstCommentView'](){const {locale:_0x5e790f}=this,_0x4099ad=this[_0x2054('0x7')][_0x2054('0x0')]['get'](0x0);_0x4099ad!==this['_boundFirstCommentView']&&(this[_0x2054('0x23')]=_0x4099ad,this['unbind']('actionIndicator'),this[_0x2054('0x24')](_0x2054('0x1a'))['to'](_0x4099ad,_0x2054('0x1a'),_0x1c96a8=>_0x2054('0x3')===_0x1c96a8?'remove':null),_0x4099ad[_0x2054('0x1b')]=_0x1b642a(_0x5e790f,_0x2054('0xb')),_0x4099ad[_0x2054('0x13')]['on']('execute',_0x52b7e2=>{_0x52b7e2[_0x2054('0x2')](),this[_0x2054('0x15')](_0x1b642a(_0x5e790f,'Delete\x20comment\x20thread?'),this[_0x2054('0xd')])[_0x2054('0x1e')](()=>{this[_0x2054('0x16')](_0x2054('0x19'));});},{'priority':_0x2054('0x26')}));}}_0x126413(it,_0x506442);
23
+ const _0x21da=['ck-thread--remove-confirmation','isVisible','Write\x20a\x20comment...','locale','actionBar','Resolve','commentsListView','set','commentThreadInputView','setTemplate','execute','isActive','commentThreadChildren','change:isReadOnly','removeButton','remove','isResolved','icon','commentThreadHeaderView','extendTemplate','removeCommentThread','isDirty','ck-thread','get','_cancelAllConfirms','add','bind','querySelector','_createResolveButton','unbind','resolveButton','isEnabled','getTemplate','isSystemComment','label','fire','render','bindTemplate','createCollection','commentViews','actionIndicator','div','check','element','_model','_bindFirstCommentView','ck-comment--resolve','_boundFirstCommentView','change:isResolved','ck-thread__container','.ck-thread__container','cancelConfirm','containerElement','placeholder','listenTo','change:isActive','Delete\x20comment\x20thread?','then','length'];(function(_0x3fc470,_0x21da7b){const _0x414829=function(_0x11d55e){while(--_0x11d55e){_0x3fc470['push'](_0x3fc470['shift']());}};_0x414829(++_0x21da7b);}(_0x21da,0x170));const _0x4148=function(_0x3fc470,_0x21da7b){_0x3fc470=_0x3fc470-0x0;let _0x414829=_0x21da[_0x3fc470];return _0x414829;};import{ConfirmMixin as _0x434c6d}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0xe3176}from'ckeditor5/src/ui';import{icons as _0x2e62d6}from'ckeditor5/src/core';import _0x5a8fb7 from'./basecommentthreadview';import{getTranslation as _0x4f2fd7}from'../../../utils/common-translations';export default class ct extends _0x434c6d(_0x5a8fb7){constructor(_0x6430ee,_0x4b31e9,_0x581cd0,_0x4b72d3){super(_0x6430ee,_0x4b31e9,_0x581cd0,_0x4b72d3),this[_0x4148('0x39')]=this[_0x4148('0x18')](),this['commentThreadChildren']['addMany']([this[_0x4148('0x33')],this[_0x4148('0x35')]]),this['_model'][_0x4148('0x2')]&&this['commentThreadChildren'][_0x4148('0xb')](this[_0x4148('0x4')],0x0),this[_0x4148('0x1e')]['on'](_0x4148('0x22'),(_0x26de21,_0x55d550,_0x3f5b11)=>{_0x3f5b11?this['commentThreadChildren'][_0x4148('0xb')](this[_0x4148('0x4')],0x0):this[_0x4148('0x39')][_0x4148('0x1')](this[_0x4148('0x4')]);}),this[_0x4148('0x34')](_0x4148('0x1a'),null),this[_0x4148('0x26')]=null,this[_0x4148('0x21')]=null,this[_0x4148('0x30')]=_0x6430ee,this[_0x4148('0x10')]=this[_0x4148('0xe')](),this[_0x4148('0x36')](this[_0x4148('0x12')]()),this['on'](_0x4148('0x29'),(_0x4e7afc,_0x3fb688,_0x2c67f4)=>{_0x2c67f4||this['_cancelAllConfirms']();}),this[_0x4148('0x28')](this['_model'],_0x4148('0x3a'),(_0x5e2ea2,_0x5d4be8,_0x38f957)=>{_0x38f957&&this[_0x4148('0xa')]();}),this[_0x4148('0x2c')]>0x0&&this[_0x4148('0x1f')](),this['listenTo'](this[_0x4148('0x33')][_0x4148('0x19')],_0x4148('0xb'),()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x184c06=this[_0x4148('0x17')];return{'tag':_0x4148('0x1b'),'attributes':{'class':[_0x4148('0x8'),'ck-reset_all-excluded',_0x184c06['if'](_0x4148('0x38'),'ck-thread--active'),_0x184c06['if']('isConfirm',_0x4148('0x2d')),_0x184c06['to'](_0x4148('0x1a'),_0x4af892=>_0x4af892?'ck-thread--'+_0x4af892:'')],'data-thread-id':this[_0x4148('0x1e')]['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':_0x4148('0x23')},'children':this[_0x4148('0x39')]}]};}[_0x4148('0x16')](){super[_0x4148('0x16')](),this[_0x4148('0x26')]=this[_0x4148('0x1d')][_0x4148('0xd')](_0x4148('0x24'));}[_0x4148('0xa')](){this['cancelConfirm']();for(const _0x39d3b5 of this['commentsListView'][_0x4148('0x19')])_0x39d3b5[_0x4148('0x25')]();}['_bindFirstCommentView'](){const {locale:_0x10f0cb}=this,_0x369344=this[_0x4148('0x33')][_0x4148('0x19')][_0x4148('0x9')](0x0);_0x369344===this[_0x4148('0x21')]||_0x369344[_0x4148('0x13')]||(this[_0x4148('0x21')]=_0x369344,this[_0x4148('0xf')](_0x4148('0x1a')),this[_0x4148('0xc')]('actionIndicator')['to'](_0x369344,_0x4148('0x1a'),_0x3567d7=>_0x4148('0x1')===_0x3567d7?_0x4148('0x1'):null),_0x369344[_0x4148('0x27')]=_0x4f2fd7(_0x10f0cb,_0x4148('0x2f')),_0x369344[_0x4148('0x0')]['on'](_0x4148('0x37'),_0x5b485e=>{_0x5b485e['stop'](),this['showConfirm'](_0x4f2fd7(_0x10f0cb,_0x4148('0x2a')),this[_0x4148('0x26')])[_0x4148('0x2b')](()=>{this[_0x4148('0x15')](_0x4148('0x6'));});},{'priority':'high'}),_0x369344[_0x4148('0x31')][_0x4148('0xb')](this['resolveButton'],0x0));}[_0x4148('0xe')](){const _0x4db766=new _0xe3176(this[_0x4148('0x30')]);return _0x4db766[_0x4148('0x14')]=_0x4f2fd7(this[_0x4148('0x30')],_0x4148('0x32')),_0x4db766['tooltip']=_0x4f2fd7(this[_0x4148('0x30')],'Resolve'),_0x4db766[_0x4148('0x3')]=_0x2e62d6[_0x4148('0x1c')],_0x4db766[_0x4148('0x5')]({'attributes':{'class':_0x4148('0x20')}}),_0x4db766[_0x4148('0xc')](_0x4148('0x11'))['to'](this[_0x4148('0x1e')],'isReadOnly',_0x5cbbf7=>!_0x5cbbf7),_0x4db766[_0x4148('0xc')](_0x4148('0x2e'))['to'](this[_0x4148('0x1e')],'isResolvable',this[_0x4148('0x1e')],_0x4148('0x2'),this,_0x4148('0x7'),(_0x1e3213,_0x389cfe,_0x53967a)=>_0x1e3213&&!_0x389cfe&&!_0x53967a),_0x4db766['on'](_0x4148('0x37'),()=>{this[_0x4148('0x15')]('resolveCommentThread',this[_0x4148('0x1e')]['id']);}),_0x4db766;}}
@@ -0,0 +1,231 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentview
3
+ * @publicApi
4
+ */
5
+ import { type Locale } from 'ckeditor5/src/utils';
6
+ import { ButtonView, type TemplateDefinition, type ViewCollection, type DropdownView } from 'ckeditor5/src/ui';
7
+ import { UserView } from 'ckeditor5-collaboration/src/collaboration-core';
8
+ import BaseCommentView from './basecommentview';
9
+ import type { Comment } from '../../commentsrepository';
10
+ import type CommentInputView from './commentinputview';
11
+ import type { CommentViewConfig } from '../../../config';
12
+ declare const CommentView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
13
+ /**
14
+ * The default view for comment.
15
+ */
16
+ export default class CommentView extends CommentView_base {
17
+ locale: Locale;
18
+ isConfirm: boolean;
19
+ cancelConfirm: () => void;
20
+ showConfirm: (key: string, element: unknown) => Promise<void>;
21
+ /**
22
+ * A property used by the template.
23
+ *
24
+ * It works as a visual indicator for the user that an action is about to be performed.
25
+ * The value of this property is used in setting the CSS class.
26
+ * The property is used when the user interacts with the view.
27
+ *
28
+ * @observable
29
+ */
30
+ actionIndicator: string | null;
31
+ /**
32
+ * Comment editor placeholder value.
33
+ *
34
+ * @observable
35
+ */
36
+ placeholder: string;
37
+ /**
38
+ * Comment creation date.
39
+ *
40
+ * @observable
41
+ */
42
+ authoredAt: Date;
43
+ /**
44
+ * Comment resolved date.
45
+ *
46
+ * @observable
47
+ */
48
+ resolvedAt: Date | null;
49
+ /**
50
+ * Collection for action bar elements.
51
+ */
52
+ actionBar: ViewCollection;
53
+ /**
54
+ * View collection which holds all the comments dropdown elements.
55
+ */
56
+ items: ViewCollection<ButtonView>;
57
+ /**
58
+ * Dropdown containing comment action buttons.
59
+ */
60
+ dropdown: DropdownView;
61
+ /**
62
+ * Edit button view. Edit button switches the comment to the editing mode.
63
+ */
64
+ editButton: ButtonView;
65
+ /**
66
+ * Remove button view. Remove button shows a confirmation box that fires the `removeComment` event when submitted.
67
+ */
68
+ removeButton: ButtonView;
69
+ /**
70
+ * User view for the comment. Presents the comment author.
71
+ */
72
+ userView: UserView;
73
+ /**
74
+ * @inheritDoc
75
+ */
76
+ constructor(locale: Locale, model: Comment, config: CommentViewConfig);
77
+ /**
78
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
79
+ *
80
+ * Overwrite this method if you want to set a custom template for the comment view.
81
+ *
82
+ * The default template looks as follows:
83
+ *
84
+ * ```ts
85
+ * const bind = this.bindTemplate;
86
+ *
87
+ * {
88
+ * tag: 'li',
89
+ *
90
+ * attributes: {
91
+ * class: [
92
+ * 'ck-comment__wrapper',
93
+ * bind.if( 'isConfirm', 'ck-comment--remove-confirmation' )
94
+ * ],
95
+ * tabindex: -1
96
+ * },
97
+ *
98
+ * children: [
99
+ * {
100
+ * tag: 'div',
101
+ *
102
+ * attributes: {
103
+ * class: [
104
+ * 'ck-comment',
105
+ * 'ck-annotation',
106
+ * bind.if( 'isEditMode', 'ck-comment--edit' ),
107
+ * bind.to( 'actionIndicator', value => value ? `ck-comment--${ value }` : '' )
108
+ * ],
109
+ * 'data-author-id': this._model.author.id,
110
+ * 'data-comment-id': this._model.id
111
+ * },
112
+ *
113
+ * children: [
114
+ * this.userView,
115
+ * {
116
+ * tag: 'div',
117
+ *
118
+ * attributes: {
119
+ * class: [ 'ck-comment__main', 'ck-annotation__main' ]
120
+ * },
121
+ *
122
+ * children: [
123
+ * {
124
+ * tag: 'div',
125
+ *
126
+ * attributes: {
127
+ * class: [ 'ck-comment__info', 'ck-annotation__info' ]
128
+ * },
129
+ *
130
+ * children: [
131
+ * {
132
+ * tag: 'span',
133
+ *
134
+ * children: [
135
+ * {
136
+ * text: this.userView.name
137
+ * }
138
+ * ],
139
+ *
140
+ * attributes: {
141
+ * class: [ 'ck-comment__info-name', 'ck-annotation__info-name' ]
142
+ * }
143
+ * },
144
+ * {
145
+ * tag: 'time',
146
+ *
147
+ * attributes: {
148
+ * datetime: bind.to( 'authoredAt' ),
149
+ * class: [ 'ck-comment__info-time', 'ck-annotation__info-time' ]
150
+ * },
151
+ *
152
+ * children: [
153
+ * {
154
+ * text: bind.to( 'authoredAt', value => this._config.formatDateTime( value ) )
155
+ * }
156
+ * ]
157
+ * }
158
+ * ]
159
+ * },
160
+ * {
161
+ * tag: 'div',
162
+ *
163
+ * attributes: {
164
+ * class: [
165
+ * 'ck-comment__actions',
166
+ * 'ck-annotation__actions',
167
+ * bind.if( 'isEditMode', 'ck-comment__actions--hidden' ),
168
+ * bind.if( 'isEditMode', 'ck-annotation__actions--hidden' )
169
+ * ]
170
+ * },
171
+ *
172
+ * children: [
173
+ * this.editButton,
174
+ * this.removeButton
175
+ * ]
176
+ * },
177
+ * {
178
+ * tag: 'div',
179
+ *
180
+ * attributes: {
181
+ * class: [ 'ck-annotation__content-wrapper' ]
182
+ * },
183
+ *
184
+ * children: this.visibleView
185
+ * },
186
+ * {
187
+ * tag: 'div',
188
+ *
189
+ * attributes: {
190
+ * class: [ 'ck-comment__external' ]
191
+ * },
192
+ *
193
+ * children: [ {
194
+ * text: getTranslation( this.locale, 'EXTERNAL_COMMENT' )
195
+ * } ]
196
+ * }
197
+ * ]
198
+ * }
199
+ *
200
+ * ]
201
+ * }
202
+ * ]
203
+ * }
204
+ * ```
205
+ *
206
+ * @returns Definition of comment thread view's template.
207
+ */
208
+ getTemplate(): TemplateDefinition;
209
+ /**
210
+ * @inheritDoc
211
+ */
212
+ protected _createCommentInputView(): CommentInputView;
213
+ /**
214
+ * Gets the translated note which indicates that the comment comes from an external source.
215
+ */
216
+ getExternalCommentNote(): string;
217
+ /**
218
+ * Gets the translated notification text which indicates that author name comes from an external source.
219
+ */
220
+ getUserViewNotificationText(): string | null;
221
+ /**
222
+ * @inheritDoc
223
+ */
224
+ render(): void;
225
+ }
226
+ declare module 'ckeditor5/src/ui' {
227
+ interface DropdownView {
228
+ isVisible: boolean;
229
+ }
230
+ }
231
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2bd9=['extendTemplate','placeholder','ck-comment--remove','cancelConfirm','creator','ck-comment__user','ck-annotation__content-wrapper','ck-annotation__actions--hidden','locale','EXTERNAL_COMMENT','ck-comment__actions','isVisible','getExternalCommentNote','ck-comment__info-name','isRemovable','actionIndicator','_createRemoveButton','fire','ck-comment--','then','isReadOnly','ck-comment__actions--hidden','editButton','blur','removeButton','ck-annotation__info-name','ck-annotation__actions','Delete\x20comment?','ck-comment__main','icon','change:isRemovable','mouseleave','render','isEditMode','Remove','_model','_createEditButton','formatDateTime','pencil','bindTemplate','execute','set','element','authoredAt','EXTERNAL_IMPORT_WORD_AVATAR','label','EXTERNAL_IMPORT_WORD_COMMENT','edit','Edit','bind','ck-comment__info-time','getTemplate','div','ck-comment__external','getUserViewNotificationText','ck-comment__wrapper','isEditable','visibleView','attributes','_createCommentInputView','push','focus','isExternal','mouseenter','switchToEditMode','showConfirm','remove','EXTERNAL_AVATAR','userView','_attachActions','_config','isConfirm','time','author','importWord','ck-annotation__info-time','ck-comment--edit','listenTo','ck-annotation'];(function(_0x3e0304,_0x2bd9f5){const _0x1e9361=function(_0x503b85){while(--_0x503b85){_0x3e0304['push'](_0x3e0304['shift']());}};_0x1e9361(++_0x2bd9f5);}(_0x2bd9,0x168));const _0x1e93=function(_0x3e0304,_0x2bd9f5){_0x3e0304=_0x3e0304-0x0;let _0x1e9361=_0x2bd9[_0x3e0304];return _0x1e9361;};import{mix as _0x53506f}from'ckeditor5/src/utils';import{ButtonView as _0x6ab18b}from'ckeditor5/src/ui';import{icons as _0x375560}from'ckeditor5/src/core';import{UserView as _0x2ff62a,ConfirmMixin as _0xe1f3b3}from'ckeditor5-collaboration/src/collaboration-core';import _0x5c4c45 from'./basecommentview';import _0x3a01bc from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x4b4e96}from'../../../utils/common-translations';export default class rt extends _0x5c4c45{constructor(_0x465856,_0x6ca9db,_0x34ddf4){super(_0x465856,_0x6ca9db,_0x34ddf4),this['set'](_0x1e93('0x32'),null),this[_0x1e93('0x4c')](_0x1e93('0x24'),_0x4b4e96(_0x465856,'Reply...')),this[_0x1e93('0x4c')](_0x1e93('0x4e'),null),this['bind'](_0x1e93('0x4e'))['to'](_0x6ca9db),this[_0x1e93('0x39')]=this[_0x1e93('0x47')](),this[_0x1e93('0x3b')]=this['_createRemoveButton'](),this[_0x1e93('0x18')]=new _0x2ff62a(_0x465856,_0x6ca9db[_0x1e93('0x1d')],this[_0x1e93('0xa')]()),this['userView']['extendTemplate']({'attributes':{'class':[_0x1e93('0x28'),'ck-annotation__user']}}),this[_0x1e93('0x21')](_0x6ca9db,_0x1e93('0x41'),()=>this[_0x1e93('0x26')]()),this['setTemplate'](this[_0x1e93('0x7')]());}[_0x1e93('0x7')](){const _0x1c57f1=this[_0x1e93('0x4a')],_0x223904=[{'tag':_0x1e93('0x8'),'attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this[_0x1e93('0x18')]['name']}],'attributes':{'class':[_0x1e93('0x30'),_0x1e93('0x3c')]}},{'tag':_0x1e93('0x1c'),'attributes':{'datetime':_0x1c57f1['to']('authoredAt'),'class':[_0x1e93('0x6'),_0x1e93('0x1f')]},'children':[{'text':_0x1c57f1['to'](_0x1e93('0x4e'),_0x48b640=>this[_0x1e93('0x1a')][_0x1e93('0x48')](_0x48b640))}]}]},{'tag':'div','attributes':{'class':[_0x1e93('0x2d'),_0x1e93('0x3d'),_0x1c57f1['if'](_0x1e93('0x44'),_0x1e93('0x38')),_0x1c57f1['if'](_0x1e93('0x44'),_0x1e93('0x2a'))]},'children':[this[_0x1e93('0x39')],this[_0x1e93('0x3b')]]},{'tag':_0x1e93('0x8'),'attributes':{'class':[_0x1e93('0x29')]},'children':this[_0x1e93('0xd')]}];return this[_0x1e93('0x46')][_0x1e93('0x12')]&&_0x223904[_0x1e93('0x10')]({'tag':_0x1e93('0x8'),'attributes':{'class':[_0x1e93('0x9')]},'children':[{'text':this[_0x1e93('0x2f')]()}]}),{'tag':'li','attributes':{'class':[_0x1e93('0xb'),_0x1c57f1['if'](_0x1e93('0x1b'),'ck-comment--remove-confirmation')],'tabindex':-0x1},'children':[{'tag':_0x1e93('0x8'),'attributes':{'class':['ck-comment',_0x1e93('0x22'),_0x1c57f1['if']('isEditMode',_0x1e93('0x20')),_0x1c57f1['to'](_0x1e93('0x32'),_0xfd4ff8=>_0xfd4ff8?_0x1e93('0x35')+_0xfd4ff8:'')],'data-author-id':this[_0x1e93('0x46')][_0x1e93('0x1d')]['id'],'data-comment-id':this['_model']['id']},'children':[this['userView'],{'tag':'div','attributes':{'class':[_0x1e93('0x3f'),'ck-annotation__main']},'children':_0x223904}]}]};}[_0x1e93('0x47')](){const _0x43ef8e=new _0x6ab18b(this[_0x1e93('0x2b')]);return _0x43ef8e['label']=_0x4b4e96(this[_0x1e93('0x2b')],_0x1e93('0x4')),_0x43ef8e[_0x1e93('0x40')]=_0x375560[_0x1e93('0x49')],_0x43ef8e[_0x1e93('0x23')]({'attributes':{'class':_0x1e93('0x20')}}),_0x43ef8e[_0x1e93('0x5')]('isEnabled')['to'](this['_model'],_0x1e93('0x37'),_0xd24f17=>!_0xd24f17),_0x43ef8e[_0x1e93('0x5')](_0x1e93('0x2e'))['to'](this[_0x1e93('0x46')],_0x1e93('0xc')),_0x43ef8e['on'](_0x1e93('0x4b'),()=>this[_0x1e93('0x14')]()),_0x43ef8e;}[_0x1e93('0x33')](){const _0x4830aa=new _0x6ab18b(this['locale']);return _0x4830aa[_0x1e93('0x1')]=_0x4b4e96(this[_0x1e93('0x2b')],_0x1e93('0x45')),_0x4830aa[_0x1e93('0x40')]=_0x3a01bc,_0x4830aa[_0x1e93('0x23')]({'attributes':{'class':_0x1e93('0x25')}}),_0x4830aa[_0x1e93('0x5')]('isEnabled')['to'](this[_0x1e93('0x46')],_0x1e93('0x37'),_0x5ce09d=>!_0x5ce09d),_0x4830aa[_0x1e93('0x5')](_0x1e93('0x2e'))['to'](this[_0x1e93('0x46')],_0x1e93('0x31')),_0x4830aa['on'](_0x1e93('0x4b'),()=>{this[_0x1e93('0x15')](_0x4b4e96(this['locale'],_0x1e93('0x3e')),this[_0x1e93('0x4d')])[_0x1e93('0x36')](()=>{this[_0x1e93('0x34')]('removeComment',this['_model']['id']);});}),_0x4830aa;}['_attachActions'](_0x3ab93b,_0x45b1f3){this[_0x1e93('0x21')](_0x3ab93b,_0x1e93('0x13'),()=>this[_0x1e93('0x32')]=_0x45b1f3),this['listenTo'](_0x3ab93b,_0x1e93('0x11'),()=>this[_0x1e93('0x32')]=_0x45b1f3),this['listenTo'](_0x3ab93b,_0x1e93('0x42'),()=>this[_0x1e93('0x32')]=null),this['listenTo'](_0x3ab93b,_0x1e93('0x3a'),()=>this['actionIndicator']=null);}[_0x1e93('0xf')](){const _0x3bae17=super[_0x1e93('0xf')]();return _0x3bae17[_0x1e93('0x5')](_0x1e93('0x24'))['to'](this),_0x3bae17;}[_0x1e93('0x2f')](){return'importWord'===this[_0x1e93('0x46')][_0x1e93('0xe')]['@external']['source']?_0x4b4e96(this['locale'],_0x1e93('0x2')):_0x4b4e96(this[_0x1e93('0x2b')],_0x1e93('0x2c'));}[_0x1e93('0xa')](){return this[_0x1e93('0x46')][_0x1e93('0x12')]?_0x1e93('0x1e')===this[_0x1e93('0x46')][_0x1e93('0xe')]['@external']['source']?_0x4b4e96(this[_0x1e93('0x2b')],_0x1e93('0x0'),this[_0x1e93('0x46')][_0x1e93('0x27')]['name']):_0x4b4e96(this['locale'],_0x1e93('0x17'),this['_model'][_0x1e93('0x27')]['name']):null;}[_0x1e93('0x43')](){super['render'](),this['_attachActions'](this['editButton'][_0x1e93('0x4d')],_0x1e93('0x3')),this[_0x1e93('0x19')](this['removeButton'][_0x1e93('0x4d')],_0x1e93('0x16'));}}_0x53506f(rt,_0xe1f3b3);
23
+ const _0x56ac=['set','isVisible','Edit','ck-comment--edit','isEditMode','isExternal','creator','EXTERNAL_COMMENT','EXTERNAL_AVATAR','panelView','ck-annotation__actions','placeholder','editButton','actionIndicator','getUserViewNotificationText','source','ck-annotation','_model','length','addMany','render','children','attributes','div','userView','ck-comment--remove','author','mouseleave','isReadOnly','ck-comment__info','isEnabled','listenTo','ck-comment--remove-confirmation','ck-comment__info-time','focus','buttonView','showConfirm','execute','removeButton','remove','name','mouseenter','getTemplate','span','actionBar','element','importWord','ck-comment__actions','isConfirm','then','label','pencil','locale','_createCommentInputView','ck-annotation__content-wrapper','some','change:isRemovable','_attachActions','ck-comment__info-name','createCollection','ck-annotation__actions--hidden','withText','Show\x20more\x20items','extendTemplate','visibleView','isSystemComment','ck-comment--info','authoredAt','isEditable','bind','ck-comment__main','@external','items','isRemovable','_config','getExternalCommentNote','cancelConfirm','change:isVisible','_createRemoveButton','ck-annotation__info','_createEditButton','icon','_createDropdown','EXTERNAL_IMPORT_WORD_AVATAR','add','dropdown','resolvedAt','ck-comment__wrapper','edit'];(function(_0x4af85f,_0x56ac97){const _0x2565f1=function(_0x3ef609){while(--_0x3ef609){_0x4af85f['push'](_0x4af85f['shift']());}};_0x2565f1(++_0x56ac97);}(_0x56ac,0x19f));const _0x2565=function(_0x4af85f,_0x56ac97){_0x4af85f=_0x4af85f-0x0;let _0x2565f1=_0x56ac[_0x4af85f];return _0x2565f1;};import{ButtonView as _0x35b50e,createDropdown as _0x15901f,ListView as _0xbb2021,ListItemView as _0x297ea2}from'ckeditor5/src/ui';import{icons as _0x43724f}from'ckeditor5/src/core';import{UserView as _0x3170c7,ConfirmMixin as _0xbbc6a4}from'ckeditor5-collaboration/src/collaboration-core';import _0x471eff from'./basecommentview';import _0x50a064 from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x5819f2}from'../../../utils/common-translations';export default class lt extends _0xbbc6a4(_0x471eff){constructor(_0x596a82,_0x409bc4,_0x66e3c9){super(_0x596a82,_0x409bc4,_0x66e3c9),this[_0x2565('0x1e')](_0x2565('0x2b'),null),this['set']('placeholder',_0x5819f2(_0x596a82,'Reply...')),this[_0x2565('0xa')](_0x2565('0x8'))['to'](_0x409bc4),this[_0x2565('0xa')](_0x2565('0x1b'))['to'](_0x409bc4),this[_0x2565('0x4a')]=this[_0x2565('0x0')](),this[_0x2565('0x6')]||(this[_0x2565('0x2a')]=this['_createEditButton'](),this[_0x2565('0x44')]=this[_0x2565('0x13')](),this['items']=this['createCollection'](),this[_0x2565('0xd')][_0x2565('0x31')]([this['editButton'],this[_0x2565('0x44')]]),this[_0x2565('0x1a')]=this['_createDropdown'](),this[_0x2565('0x4a')][_0x2565('0x19')](this[_0x2565('0x1a')])),this['userView']=new _0x3170c7(_0x596a82,_0x409bc4['author'],this['getUserViewNotificationText']()),this[_0x2565('0x36')][_0x2565('0x4')]({'attributes':{'class':['ck-comment__user','ck-annotation__user']}}),this['listenTo'](_0x409bc4,_0x2565('0x56'),()=>this[_0x2565('0x11')]()),this['setTemplate'](this[_0x2565('0x48')]());}[_0x2565('0x48')](){const _0x34e08d=this['bindTemplate'],_0x515131=[{'tag':'div','attributes':{'class':[_0x2565('0x3b'),_0x2565('0x14')]},'children':[{'tag':_0x2565('0x49'),'children':[{'text':this[_0x2565('0x36')][_0x2565('0x46')]}],'attributes':{'class':[_0x2565('0x58'),'ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x34e08d['to'](_0x2565('0x8')),'class':[_0x2565('0x3f'),'ck-annotation__info-time']},'children':[{'text':_0x34e08d['to'](_0x2565('0x8'),_0x17533b=>this[_0x2565('0xf')]['formatDateTime'](_0x17533b))}]}]},{'tag':'div','attributes':{'class':[_0x2565('0x4d'),_0x2565('0x28'),_0x34e08d['if'](_0x2565('0x22'),'ck-comment__actions--hidden'),_0x34e08d['if'](_0x2565('0x22'),_0x2565('0x1'))]},'children':this[_0x2565('0x4a')]},{'tag':_0x2565('0x35'),'attributes':{'class':[_0x2565('0x54')]},'children':this[_0x2565('0x5')]}];return this[_0x2565('0x2f')][_0x2565('0x23')]&&_0x515131['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this[_0x2565('0x10')]()}]}),{'tag':'li','attributes':{'class':[_0x2565('0x1c'),_0x34e08d['if'](_0x2565('0x4e'),_0x2565('0x3e'))],'tabindex':-0x1},'children':[{'tag':_0x2565('0x35'),'attributes':{'class':['ck-comment',_0x2565('0x2e'),_0x34e08d['if']('isEditMode',_0x2565('0x21')),_0x34e08d['if'](_0x2565('0x6'),_0x2565('0x7')),_0x34e08d['to'](_0x2565('0x2b'),_0x2e9715=>_0x2e9715?'ck-comment--'+_0x2e9715:'')],'data-author-id':this[_0x2565('0x2f')][_0x2565('0x38')]['id'],'data-comment-id':this['_model']['id']},'children':[this[_0x2565('0x36')],{'tag':_0x2565('0x35'),'attributes':{'class':[_0x2565('0xb'),'ck-annotation__main']},'children':_0x515131}]}]};}[_0x2565('0x15')](){const _0x3a7bca=new _0x35b50e(this[_0x2565('0x52')]);return _0x3a7bca[_0x2565('0x50')]=_0x5819f2(this[_0x2565('0x52')],_0x2565('0x20')),_0x3a7bca[_0x2565('0x16')]=_0x43724f[_0x2565('0x51')],_0x3a7bca[_0x2565('0x2')]=!0x0,_0x3a7bca[_0x2565('0x4')]({'attributes':{'class':_0x2565('0x21')}}),_0x3a7bca[_0x2565('0xa')]('isEnabled')['to'](this['_model'],_0x2565('0x3a'),_0x44341d=>!_0x44341d),_0x3a7bca[_0x2565('0xa')](_0x2565('0x1f'))['to'](this[_0x2565('0x2f')],_0x2565('0x9')),_0x3a7bca['on'](_0x2565('0x43'),()=>this['switchToEditMode']()),_0x3a7bca;}[_0x2565('0x13')](){const _0x506eaa=new _0x35b50e(this[_0x2565('0x52')]);return _0x506eaa[_0x2565('0x50')]=_0x5819f2(this[_0x2565('0x52')],'Remove'),_0x506eaa[_0x2565('0x16')]=_0x50a064,_0x506eaa['withText']=!0x0,_0x506eaa['extendTemplate']({'attributes':{'class':_0x2565('0x37')}}),_0x506eaa[_0x2565('0xa')](_0x2565('0x3c'))['to'](this[_0x2565('0x2f')],_0x2565('0x3a'),_0x3565b9=>!_0x3565b9),_0x506eaa['bind'](_0x2565('0x1f'))['to'](this[_0x2565('0x2f')],_0x2565('0xe')),_0x506eaa['on'](_0x2565('0x43'),()=>{this[_0x2565('0x42')](_0x5819f2(this[_0x2565('0x52')],'Delete\x20comment?'),this[_0x2565('0x4b')])[_0x2565('0x4f')](()=>{this['fire']('removeComment',this[_0x2565('0x2f')]['id']);});}),_0x506eaa;}[_0x2565('0x17')](){const _0x4eef91=_0x15901f(this['locale']),_0x4247e0=_0x4eef91[_0x2565('0x27')]['children'],_0x33db4b=new _0xbb2021(this[_0x2565('0x52')]),_0x3a451a=(_0x5732bb,_0x3fe66a=-0x1)=>{const _0x7cabff=new _0x297ea2(this[_0x2565('0x52')]);_0x7cabff[_0x2565('0x33')][_0x2565('0x19')](_0x5732bb);const _0x1fedf0=_0x3fe66a>-0x1?_0x3fe66a:_0x33db4b[_0x2565('0xd')][_0x2565('0x30')];_0x33db4b[_0x2565('0xd')][_0x2565('0x19')](_0x7cabff,_0x1fedf0),_0x4eef91[_0x2565('0x3d')](_0x5732bb,'change:isEnabled',()=>{_0x4eef91[_0x2565('0x3c')]=[...this[_0x2565('0xd')]][_0x2565('0x55')](_0x48b8cf=>_0x48b8cf['isEnabled']);}),_0x4eef91[_0x2565('0x3d')](_0x5732bb,_0x2565('0x12'),()=>{_0x4eef91['buttonView']['isVisible']=[...this['items']][_0x2565('0x55')](_0x2240af=>_0x2240af[_0x2565('0x1f')]);});};_0x4eef91['panelPosition']='sw',_0x4eef91[_0x2565('0x41')][_0x2565('0x1e')]({'label':_0x5819f2(this['locale'],_0x2565('0x3')),'icon':_0x43724f['threeVerticalDots']}),_0x4eef91[_0x2565('0x3c')]=[...this[_0x2565('0xd')]]['some'](_0x37be0f=>_0x37be0f[_0x2565('0x3c')]),_0x4eef91[_0x2565('0x41')][_0x2565('0x1f')]=[...this['items']][_0x2565('0x55')](_0x457dde=>_0x457dde[_0x2565('0x1f')]);for(const _0x56365c of this['items'])_0x3a451a(_0x56365c);return _0x4247e0['add'](_0x33db4b),_0x4eef91['listenTo'](this[_0x2565('0xd')],_0x2565('0x19'),(_0x398ebe,_0x409ee4,_0xf3411b)=>{_0x3a451a(_0x409ee4,_0xf3411b);}),_0x4eef91[_0x2565('0x3d')](this[_0x2565('0xd')],_0x2565('0x45'),(_0xf53f09,_0x4f8d1d,_0x59e6a8)=>{_0x33db4b[_0x2565('0xd')]['remove'](_0x59e6a8);}),_0x4eef91;}[_0x2565('0x57')](_0x210a0f,_0x4ef1d7){const _0x851492=_0x210a0f&&_0x210a0f[_0x2565('0x4b')];_0x851492&&(this['listenTo'](_0x851492,_0x2565('0x47'),()=>this[_0x2565('0x2b')]=_0x4ef1d7),this[_0x2565('0x3d')](_0x851492,_0x2565('0x40'),()=>this[_0x2565('0x2b')]=_0x4ef1d7),this[_0x2565('0x3d')](_0x851492,_0x2565('0x39'),()=>this[_0x2565('0x2b')]=null),this[_0x2565('0x3d')](_0x851492,'blur',()=>this[_0x2565('0x2b')]=null));}[_0x2565('0x53')](){const _0x5d59f7=super[_0x2565('0x53')]();return _0x5d59f7[_0x2565('0xa')](_0x2565('0x29'))['to'](this),_0x5d59f7;}[_0x2565('0x10')](){return'importWord'===this[_0x2565('0x2f')][_0x2565('0x34')][_0x2565('0xc')][_0x2565('0x2d')]?_0x5819f2(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):_0x5819f2(this[_0x2565('0x52')],_0x2565('0x25'));}[_0x2565('0x2c')](){return this['_model'][_0x2565('0x23')]?_0x2565('0x4c')===this['_model'][_0x2565('0x34')][_0x2565('0xc')][_0x2565('0x2d')]?_0x5819f2(this[_0x2565('0x52')],_0x2565('0x18'),this[_0x2565('0x2f')]['creator'][_0x2565('0x46')]):_0x5819f2(this[_0x2565('0x52')],_0x2565('0x26'),this['_model'][_0x2565('0x24')][_0x2565('0x46')]):null;}['render'](){super[_0x2565('0x32')](),this['_attachActions'](this[_0x2565('0x2a')],_0x2565('0x1d')),this[_0x2565('0x57')](this[_0x2565('0x44')],'remove');}}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @module comments/comments
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
6
+ /**
7
+ * The comments plugin, which brings both the UI part and the editing part of this feature.
8
+ *
9
+ * It registers {@link module:comments/comments/addcommentthreadcommand~AddCommentThreadCommand the `AddCommentThreadCommand` command}.
10
+ *
11
+ * To learn more about the comments feature refer to the {@glink features/collaboration/comments/comments Comments} guide.
12
+ */
13
+ export default class Comments extends Plugin {
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get requires(): PluginDependencies;
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): 'Comments';
22
+ }
package/src/comments.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3c67=['Comments','pluginName'];(function(_0x2034dd,_0x3c67a1){var _0x541e17=function(_0x5c03d3){while(--_0x5c03d3){_0x2034dd['push'](_0x2034dd['shift']());}};_0x541e17(++_0x3c67a1);}(_0x3c67,0xeb));var _0x541e=function(_0x2034dd,_0x3c67a1){_0x2034dd=_0x2034dd-0x0;var _0x541e17=_0x3c67[_0x2034dd];return _0x541e17;};import{Plugin as _0x3cb9d8}from'ckeditor5/src/core';import _0x5528e9 from'./comments/commentsrepository';import _0x1e78ca from'./comments/commentsediting';import _0x150365 from'./comments/commentsui';import _0x555682 from'./commentsonly';import _0x1b494c from'./annotations/widesidebar';import _0x177f4a from'./annotations/narrowsidebar';import _0x7ad4d5 from'./annotations/inlineannotations';export default class c extends _0x3cb9d8{static get['requires'](){return[_0x5528e9,_0x1e78ca,_0x150365,_0x555682,_0x1b494c,_0x177f4a,_0x7ad4d5];}static get[_0x541e('0x0')](){return _0x541e('0x1');}}
23
+ var _0x4d7f=['requires','Comments'];(function(_0x11f95b,_0x4d7f32){var _0x4a099a=function(_0x11c6f){while(--_0x11c6f){_0x11f95b['push'](_0x11f95b['shift']());}};_0x4a099a(++_0x4d7f32);}(_0x4d7f,0xaf));var _0x4a09=function(_0x11f95b,_0x4d7f32){_0x11f95b=_0x11f95b-0x0;var _0x4a099a=_0x4d7f[_0x11f95b];return _0x4a099a;};import{Plugin as _0x5343d}from'ckeditor5/src/core';import _0x3c1f82 from'./comments/commentsrepository';import _0x26c783 from'./comments/commentsediting';import _0x76131c from'./comments/commentsui';import _0x4aab22 from'./commentsonly';import _0x1c4963 from'./annotations/widesidebar';import _0x599477 from'./annotations/narrowsidebar';import _0x5d40a0 from'./annotations/inlineannotations';import _0x2273f0 from'./comments/commentsarchiveui';import _0x1ce012 from'./comments/commentsarchive';export default class f extends _0x5343d{static get[_0x4a09('0x1')](){return[_0x3c1f82,_0x26c783,_0x76131c,_0x1ce012,_0x2273f0,_0x4aab22,_0x1c4963,_0x599477,_0x5d40a0];}static get['pluginName'](){return _0x4a09('0x0');}}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @module comments/commentsonly
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
6
+ /**
7
+ * The `CommentsOnly` plugin allows you to put the editor in a mode where a user can only add, edit or delete comments.
8
+ *
9
+ * Check the {@glink features/collaboration/comments/comments-only-mode Comments-only mode} guide to learn how to use this plugin.
10
+ */
11
+ export default class CommentsOnly extends Plugin {
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ static get pluginName(): 'CommentsOnly';
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get requires(): PluginDependencies;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ constructor(editor: Editor);
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ afterInit(): void;
28
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x107a=['commentsOnly','isEnabled','get','addCommentThread','plugins','pluginName','clearForceDisabled','delete','CommentsOnly','commentsOnlyMode','highest','editing','forceDisabled','editor','document','stop','afterInit','view','_enableCommentsOnlyMode','config','listenTo','clipboardInput','commands','set','DragDrop','_disableCommentsOnlyMode'];(function(_0x4b42e6,_0x107a90){const _0x3356b7=function(_0x1448c7){while(--_0x1448c7){_0x4b42e6['push'](_0x4b42e6['shift']());}};_0x3356b7(++_0x107a90);}(_0x107a,0x1a0));const _0x3356=function(_0x4b42e6,_0x107a90){_0x4b42e6=_0x4b42e6-0x0;let _0x3356b7=_0x107a[_0x4b42e6];return _0x3356b7;};import{Plugin as _0x174458}from'ckeditor5/src/core';import _0x16f913 from'./comments/commentsediting';export default class e extends _0x174458{static get[_0x3356('0x5')](){return _0x3356('0x8');}static get['requires'](){return[_0x16f913];}constructor(_0x1c062c){super(_0x1c062c),this[_0x3356('0x17')](_0x3356('0x1'),null),this['on']('change:isEnabled',(_0x16bdb7,_0x5799e1,_0x1f6cfd)=>{_0x1f6cfd?this[_0x3356('0x12')]():this[_0x3356('0x19')]();});}[_0x3356('0x10')](){null===this[_0x3356('0x1')]&&(this[_0x3356('0x1')]=!!this[_0x3356('0xd')][_0x3356('0x13')][_0x3356('0x2')](_0x3356('0x0')));}[_0x3356('0x12')](){for(const [_0x1986ff,_0x9d97a4]of this['editor']['commands'])_0x9d97a4['affectsData']&&_0x3356('0x3')!==_0x1986ff&&_0x9d97a4[_0x3356('0xc')]('commentsOnlyMode');this[_0x3356('0xd')]['plugins']['has']('DragDrop')&&this['editor'][_0x3356('0x4')][_0x3356('0x2')](_0x3356('0x18'))[_0x3356('0xc')](_0x3356('0x9'));const _0x4ad6de=this[_0x3356('0xd')][_0x3356('0xb')][_0x3356('0x11')][_0x3356('0xe')];this[_0x3356('0x14')](_0x4ad6de,'cut',_0x505c95=>_0x505c95[_0x3356('0xf')](),{'priority':_0x3356('0xa')}),this[_0x3356('0x14')](_0x4ad6de,_0x3356('0x15'),_0x1320e3=>_0x1320e3[_0x3356('0xf')](),{'priority':_0x3356('0xa')}),this[_0x3356('0x14')](_0x4ad6de,_0x3356('0x7'),_0x20974c=>_0x20974c[_0x3356('0xf')](),{'priority':_0x3356('0xa')});}[_0x3356('0x19')](){for(const [_0x304aee,_0x3a2546]of this[_0x3356('0xd')][_0x3356('0x16')])_0x3a2546['affectsData']&&_0x3356('0x3')!==_0x304aee&&_0x3a2546[_0x3356('0x6')]('commentsOnlyMode');this['stopListening'](this[_0x3356('0xd')][_0x3356('0xb')]['view'][_0x3356('0xe')]);}}
23
+ const _0x3f45=['requires','view','has','document','CommentsOnly','highest','stop','_disableCommentsOnlyMode','addCommentThread','commentsOnlyMode','clipboardInput','commands','change:isEnabled','stopListening','DragDrop','config','editing','pluginName','_enableCommentsOnlyMode','listenTo','cut','isEnabled','affectsData','editor','plugins'];(function(_0x543f17,_0x3f4520){const _0x4272ae=function(_0x38fe36){while(--_0x38fe36){_0x543f17['push'](_0x543f17['shift']());}};_0x4272ae(++_0x3f4520);}(_0x3f45,0x1c6));const _0x4272=function(_0x543f17,_0x3f4520){_0x543f17=_0x543f17-0x0;let _0x4272ae=_0x3f45[_0x543f17];return _0x4272ae;};import{Plugin as _0x2bed2d}from'ckeditor5/src/core';import _0x41da6e from'./comments/commentsediting';export default class n extends _0x2bed2d{static get[_0x4272('0xd')](){return _0x4272('0x0');}static get[_0x4272('0x15')](){return[_0x41da6e];}constructor(_0x47098a){super(_0x47098a),this['set'](_0x4272('0x11'),!0x1),this['on'](_0x4272('0x8'),(_0x289b7d,_0x49b512,_0x318c08)=>{_0x318c08?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this[_0x4272('0x13')][_0x4272('0xb')]['get']('commentsOnly')&&(this[_0x4272('0x11')]=!0x0);}[_0x4272('0xe')](){for(const [_0x5ad78b,_0x4049f9]of this[_0x4272('0x13')][_0x4272('0x7')])_0x4049f9[_0x4272('0x12')]&&_0x4272('0x4')!==_0x5ad78b&&_0x4049f9['forceDisabled'](_0x4272('0x5'));this[_0x4272('0x13')][_0x4272('0x14')][_0x4272('0x17')]('DragDrop')&&this[_0x4272('0x13')][_0x4272('0x14')]['get'](_0x4272('0xa'))['forceDisabled'](_0x4272('0x5'));const _0x4c8622=this[_0x4272('0x13')][_0x4272('0xc')]['view'][_0x4272('0x18')];this[_0x4272('0xf')](_0x4c8622,_0x4272('0x10'),_0x4bf385=>_0x4bf385[_0x4272('0x2')](),{'priority':_0x4272('0x1')}),this[_0x4272('0xf')](_0x4c8622,_0x4272('0x6'),_0x3baaff=>_0x3baaff['stop'](),{'priority':_0x4272('0x1')}),this['listenTo'](_0x4c8622,'delete',_0x5913e5=>_0x5913e5[_0x4272('0x2')](),{'priority':_0x4272('0x1')});}[_0x4272('0x3')](){for(const [_0x310bb9,_0x53376b]of this[_0x4272('0x13')]['commands'])_0x53376b['affectsData']&&_0x4272('0x4')!==_0x310bb9&&_0x53376b['clearForceDisabled'](_0x4272('0x5'));this[_0x4272('0x9')](this[_0x4272('0x13')][_0x4272('0xc')][_0x4272('0x16')][_0x4272('0x18')]);}}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * @module comments/config
3
+ * @publicApi
4
+ */
5
+ import type { EditorConfig } from 'ckeditor5/src/core';
6
+ import type CommentView from './comments/ui/view/commentview';
7
+ import type BaseCommentThreadView from './comments/ui/view/basecommentthreadview';
8
+ /**
9
+ * The configuration of the comments feature.
10
+ *
11
+ * ```ts
12
+ * ClassicEditor.create( {
13
+ * comments: ... // Comments feature configuration.
14
+ * } )
15
+ * .then( ... )
16
+ * .catch( ... );
17
+ * ```
18
+ *
19
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
20
+ */
21
+ export interface CommentsConfig {
22
+ /**
23
+ * The total number of comments shown when the thread view is collapsed.
24
+ *
25
+ * The comments are displayed in the following way:
26
+ *
27
+ * * The first comment is displayed.
28
+ * * Some comments may be hidden (collapsed).
29
+ * * An appropriate number of the most recent comments is displayed.
30
+ *
31
+ * For example, when this parameter is set to 3, when collapsed,
32
+ * the thread view will display the first comment and two most recent comments.
33
+ *
34
+ * Defaults to `2`.
35
+ */
36
+ maxCommentsWhenCollapsed?: number;
37
+ /**
38
+ * The maximum total weight of a thread before the thread becomes collapsed when it is not active:
39
+ *
40
+ * * Thread weight is a sum of the weight of its comments.
41
+ * * Comment weight is equal to the comment length.
42
+ * * The minimal comment weight is 200.
43
+ *
44
+ * Defaults to `500`.
45
+ */
46
+ maxThreadTotalWeight?: number;
47
+ /**
48
+ * The maximum number of characters displayed in a comment when the thread view is collapsed.
49
+ * Longer comments will be trimmed.
50
+ *
51
+ * Defaults to `140`.
52
+ */
53
+ maxCommentCharsWhenCollapsed?: number;
54
+ /**
55
+ * A view class to be used to create comment views.
56
+ *
57
+ * {@link module:comments/comments/ui/view/commentview~CommentView} is used by default when this property is not set.
58
+ */
59
+ CommentView?: typeof CommentView;
60
+ /**
61
+ * A view class to be used to create comment thread views
62
+ * (used as annotations - in sidebar balloons or in inline annotations).
63
+ *
64
+ * {@link module:comments/comments/ui/view/commentthreadview~CommentThreadView} is used by default
65
+ * when this property is not set.
66
+ */
67
+ CommentThreadView?: typeof BaseCommentThreadView;
68
+ /**
69
+ * Configuration for the comments editor.
70
+ *
71
+ * By using this property, you can customize the editor instance used in the comments
72
+ * reply field (e.g. by adding plugins or changing features configuration).
73
+ *
74
+ * To use the default configuration (allows only for text input, no formatting), you can pass `{}`
75
+ * to the comments editor configuration.
76
+ *
77
+ * ```ts
78
+ * ClassicEditor.create( element, {
79
+ * comments: {
80
+ * editorConfig: {}
81
+ * }
82
+ * } );
83
+ * ```
84
+ *
85
+ * To provide a better experience, you may add more plugins, that will extend the default editor configuration.
86
+ *
87
+ * ```ts
88
+ * import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
89
+ * import List from '@ckeditor/ckeditor5-list/src/list';
90
+ * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
91
+ * import Italic from '@ckeditor/ckeditor5-italic/src/italic';
92
+ *
93
+ * ClassicEditor
94
+ * .create( {
95
+ * comments: {
96
+ * editorConfig: {
97
+ * extraPlugins: [ Autoformat, Bold, Italic, List ]
98
+ * }
99
+ * }
100
+ * } )
101
+ * ```
102
+ *
103
+ * Importing plugins may not be possible in some scenarios (e.g. when using a build created by the online builder tool).
104
+ * In that case, it is possible to get the plugin constructors from the editor builtin plugins.
105
+ *
106
+ * ```ts
107
+ * const extraCommentsPlugins = ClassicEditor.builtinPlugins.filter( plugin => {
108
+ * return [ 'Bold', 'Italic', Autoformat, List ].includes( plugin.pluginName );
109
+ * } );
110
+ *
111
+ *
112
+ * ClassicEditor
113
+ * .create( {
114
+ * comments: {
115
+ * editorConfig: {
116
+ * extraPlugins: extraCommentsPlugins
117
+ * }
118
+ * }
119
+ * } )
120
+ * .then( ... )
121
+ * .catch( ... );
122
+ * ```
123
+ */
124
+ editorConfig?: EditorConfig;
125
+ /**
126
+ * A function that takes a `Date` object, formats it to a desired string and returns it.
127
+ * It should be used when displaying the comment creation date.
128
+ */
129
+ formatDateTime?: (date: Date) => string;
130
+ }
131
+ /**
132
+ * The configuration of the sidebar feature.
133
+ *
134
+ * ```ts
135
+ * ClassicEditor
136
+ * .create( {
137
+ * sidebar: {
138
+ * // Sidebar feature configuration.
139
+ * }
140
+ * } )
141
+ * .then( ... )
142
+ * .catch( ... );
143
+ * ```
144
+ *
145
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
146
+ */
147
+ export interface SidebarConfig {
148
+ /**
149
+ * DOM element into which the sidebar will be inserted.
150
+ */
151
+ container?: HTMLElement;
152
+ /**
153
+ * Changes how the annotations are positioned inside the sidebar.
154
+ *
155
+ * If set to `true`, the top annotation in the sidebar will never be scrolled
156
+ * above the top edge of the sidebar (which would make it hidden).
157
+ *
158
+ * On the other hand, with this setting enabled, if there is not enough space,
159
+ * annotations will not be positioned exactly next to their linked elements
160
+ * when selected.
161
+ *
162
+ * @default false
163
+ */
164
+ preventScrollOutOfView?: boolean;
165
+ }
166
+ export type CommentThreadConfig = Required<Omit<CommentsConfig, 'CommentThreadView'>>;
167
+ export type CommentViewConfig = Required<Pick<CommentsConfig, 'maxCommentCharsWhenCollapsed' | 'formatDateTime' | 'editorConfig'>> & {
168
+ /**
169
+ * Defines whether the comment is created by the system.
170
+ */
171
+ isSystemComment?: boolean;
172
+ };
package/src/config.js ADDED
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};