@ckeditor/ckeditor5-comments 36.0.1 → 37.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/build/comments.js +2 -2
  2. package/build/translations/af.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/bs.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de-ch.js +1 -1
  11. package/build/translations/de.js +1 -1
  12. package/build/translations/el.js +1 -1
  13. package/build/translations/en-au.js +1 -1
  14. package/build/translations/es-co.js +1 -1
  15. package/build/translations/es.js +1 -1
  16. package/build/translations/et.js +1 -1
  17. package/build/translations/fa.js +1 -1
  18. package/build/translations/fi.js +1 -1
  19. package/build/translations/fr.js +1 -1
  20. package/build/translations/gl.js +1 -1
  21. package/build/translations/he.js +1 -1
  22. package/build/translations/hi.js +1 -1
  23. package/build/translations/hr.js +1 -1
  24. package/build/translations/hu.js +1 -1
  25. package/build/translations/id.js +1 -1
  26. package/build/translations/it.js +1 -1
  27. package/build/translations/ja.js +1 -1
  28. package/build/translations/jv.js +1 -1
  29. package/build/translations/ko.js +1 -1
  30. package/build/translations/lt.js +1 -1
  31. package/build/translations/lv.js +1 -1
  32. package/build/translations/ms.js +1 -1
  33. package/build/translations/nl.js +1 -1
  34. package/build/translations/no.js +1 -1
  35. package/build/translations/pl.js +1 -1
  36. package/build/translations/pt-br.js +1 -1
  37. package/build/translations/pt.js +1 -1
  38. package/build/translations/ro.js +1 -1
  39. package/build/translations/ru.js +1 -1
  40. package/build/translations/sk.js +1 -1
  41. package/build/translations/sr-latn.js +1 -1
  42. package/build/translations/sr.js +1 -1
  43. package/build/translations/sv.js +1 -1
  44. package/build/translations/th.js +1 -1
  45. package/build/translations/tk.js +1 -1
  46. package/build/translations/tr.js +1 -1
  47. package/build/translations/tt.js +1 -1
  48. package/build/translations/ug.js +1 -1
  49. package/build/translations/uk.js +1 -1
  50. package/build/translations/ur.js +1 -1
  51. package/build/translations/vi.js +1 -1
  52. package/build/translations/zh-cn.js +1 -1
  53. package/build/translations/zh.js +1 -1
  54. package/lang/contexts.json +8 -1
  55. package/lang/translations/af.po +28 -0
  56. package/lang/translations/ar.po +28 -0
  57. package/lang/translations/bg.po +28 -0
  58. package/lang/translations/bn.po +28 -0
  59. package/lang/translations/bs.po +28 -0
  60. package/lang/translations/ca.po +28 -0
  61. package/lang/translations/cs.po +28 -0
  62. package/lang/translations/da.po +28 -0
  63. package/lang/translations/de-ch.po +28 -0
  64. package/lang/translations/de.po +28 -0
  65. package/lang/translations/el.po +28 -0
  66. package/lang/translations/en-au.po +28 -0
  67. package/lang/translations/en.po +28 -0
  68. package/lang/translations/es-co.po +28 -0
  69. package/lang/translations/es.po +28 -0
  70. package/lang/translations/et.po +28 -0
  71. package/lang/translations/fa.po +28 -0
  72. package/lang/translations/fi.po +28 -0
  73. package/lang/translations/fr.po +28 -0
  74. package/lang/translations/gl.po +28 -0
  75. package/lang/translations/he.po +28 -0
  76. package/lang/translations/hi.po +28 -0
  77. package/lang/translations/hr.po +28 -0
  78. package/lang/translations/hu.po +28 -0
  79. package/lang/translations/id.po +28 -0
  80. package/lang/translations/it.po +28 -0
  81. package/lang/translations/ja.po +28 -0
  82. package/lang/translations/jv.po +28 -0
  83. package/lang/translations/ko.po +28 -0
  84. package/lang/translations/lt.po +28 -0
  85. package/lang/translations/lv.po +28 -0
  86. package/lang/translations/ms.po +28 -0
  87. package/lang/translations/nl.po +28 -0
  88. package/lang/translations/no.po +28 -0
  89. package/lang/translations/pl.po +28 -0
  90. package/lang/translations/pt-br.po +28 -0
  91. package/lang/translations/pt.po +28 -0
  92. package/lang/translations/ro.po +28 -0
  93. package/lang/translations/ru.po +28 -0
  94. package/lang/translations/sk.po +28 -0
  95. package/lang/translations/sr-latn.po +28 -0
  96. package/lang/translations/sr.po +29 -1
  97. package/lang/translations/sv.po +28 -0
  98. package/lang/translations/th.po +28 -0
  99. package/lang/translations/tk.po +28 -0
  100. package/lang/translations/tr.po +28 -0
  101. package/lang/translations/tt.po +28 -0
  102. package/lang/translations/ug.po +28 -0
  103. package/lang/translations/uk.po +28 -0
  104. package/lang/translations/ur.po +28 -0
  105. package/lang/translations/vi.po +28 -0
  106. package/lang/translations/zh-cn.po +28 -0
  107. package/lang/translations/zh.po +28 -0
  108. package/package.json +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 _0x1f11=['querySelector','ck-thread--active','Write\x20a\x20comment...','isSystemComment','Resolve','commentThreadInputView','_boundFirstCommentView','isConfirm','ck-thread--','addMany','high','execute','set','commentThreadHeaderView','Delete\x20comment\x20thread?','locale','label','bindTemplate','showConfirm','_createResolveButton','isActive','unbind','_bindFirstCommentView','change:isReadOnly','bind','element','tooltip','_cancelAllConfirms','cancelConfirm','isDirty','commentThreadChildren','resolveCommentThread','isResolvable','actionBar','change:isResolved','createCollection','removeCommentThread','div','getTemplate','actionIndicator','isVisible','resolveButton','length','_model','removeButton','containerElement','commentViews','ck-thread--remove-confirmation','commentsListView','get','add','placeholder','remove','fire','render','check','listenTo'];(function(_0x2d2c58,_0x1f1140){const _0x5cdaa1=function(_0x3741ca){while(--_0x3741ca){_0x2d2c58['push'](_0x2d2c58['shift']());}};_0x5cdaa1(++_0x1f1140);}(_0x1f11,0x121));const _0x5cda=function(_0x2d2c58,_0x1f1140){_0x2d2c58=_0x2d2c58-0x0;let _0x5cdaa1=_0x1f11[_0x2d2c58];return _0x5cdaa1;};import{ConfirmMixin as _0x474478}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x43c921}from'ckeditor5/src/ui';import{icons as _0x4e368f}from'ckeditor5/src/core';import _0x5ecc1a from'./basecommentthreadview';import{getTranslation as _0x3bc7d4}from'../../../utils/common-translations';export default class ct extends _0x474478(_0x5ecc1a){constructor(_0x4d9a97,_0x5e7364,_0x1d60a1,_0x4a666d){super(_0x4d9a97,_0x5e7364,_0x1d60a1,_0x4a666d),this[_0x5cda('0x1a')]=this[_0x5cda('0x1f')](),this['commentThreadChildren'][_0x5cda('0x5')]([this['commentsListView'],this[_0x5cda('0x1')]]),this[_0x5cda('0x27')]['isResolved']&&this[_0x5cda('0x1a')][_0x5cda('0x2e')](this[_0x5cda('0x9')],0x0),this[_0x5cda('0x27')]['on'](_0x5cda('0x1e'),(_0x472bda,_0x33fcbf,_0x46c87c)=>{_0x46c87c?this[_0x5cda('0x1a')][_0x5cda('0x2e')](this[_0x5cda('0x9')],0x0):this[_0x5cda('0x1a')][_0x5cda('0x30')](this['commentThreadHeaderView']);}),this[_0x5cda('0x8')]('actionIndicator',null),this[_0x5cda('0x29')]=null,this[_0x5cda('0x2')]=null,this[_0x5cda('0xb')]=_0x4d9a97,this[_0x5cda('0x25')]=this[_0x5cda('0xf')](),this['setTemplate'](this[_0x5cda('0x22')]()),this['on']('change:isActive',(_0x56f5f8,_0x4b4618,_0x2218dd)=>{_0x2218dd||this[_0x5cda('0x17')]();}),this[_0x5cda('0x34')](this['_model'],_0x5cda('0x13'),(_0x12ed72,_0xbca1eb,_0x426304)=>{_0x426304&&this[_0x5cda('0x17')]();}),this[_0x5cda('0x26')]>0x0&&this[_0x5cda('0x12')](),this[_0x5cda('0x34')](this['commentsListView']['commentViews'],_0x5cda('0x2e'),()=>{this[_0x5cda('0x12')]();});}['getTemplate'](){const _0x1f9006=this[_0x5cda('0xd')];return{'tag':'div','attributes':{'class':['ck-thread','ck-reset_all-excluded',_0x1f9006['if'](_0x5cda('0x10'),_0x5cda('0x36')),_0x1f9006['if'](_0x5cda('0x3'),_0x5cda('0x2b')),_0x1f9006['to'](_0x5cda('0x23'),_0x2c646a=>_0x2c646a?_0x5cda('0x4')+_0x2c646a:'')],'data-thread-id':this[_0x5cda('0x27')]['id'],'tabindex':-0x1},'children':[{'tag':_0x5cda('0x21'),'attributes':{'class':'ck-thread__container'},'children':this[_0x5cda('0x1a')]}]};}[_0x5cda('0x32')](){super[_0x5cda('0x32')](),this[_0x5cda('0x29')]=this[_0x5cda('0x15')][_0x5cda('0x35')]('.ck-thread__container');}[_0x5cda('0x17')](){this[_0x5cda('0x18')]();for(const _0x24e28b of this[_0x5cda('0x2c')][_0x5cda('0x2a')])_0x24e28b[_0x5cda('0x18')]();}[_0x5cda('0x12')](){const {locale:_0x5be0cb}=this,_0x47222b=this[_0x5cda('0x2c')][_0x5cda('0x2a')][_0x5cda('0x2d')](0x0);_0x47222b===this['_boundFirstCommentView']||_0x47222b[_0x5cda('0x38')]||(this[_0x5cda('0x2')]=_0x47222b,this[_0x5cda('0x11')](_0x5cda('0x23')),this[_0x5cda('0x14')](_0x5cda('0x23'))['to'](_0x47222b,'actionIndicator',_0x203728=>'remove'===_0x203728?'remove':null),_0x47222b[_0x5cda('0x2f')]=_0x3bc7d4(_0x5be0cb,_0x5cda('0x37')),_0x47222b[_0x5cda('0x28')]['on'](_0x5cda('0x7'),_0x50420b=>{_0x50420b['stop'](),this[_0x5cda('0xe')](_0x3bc7d4(_0x5be0cb,_0x5cda('0xa')),this[_0x5cda('0x29')])['then'](()=>{this[_0x5cda('0x31')](_0x5cda('0x20'));});},{'priority':_0x5cda('0x6')}),_0x47222b[_0x5cda('0x1d')][_0x5cda('0x2e')](this[_0x5cda('0x25')],0x0));}['_createResolveButton'](){const _0x30375e=new _0x43c921(this[_0x5cda('0xb')]);return _0x30375e[_0x5cda('0xc')]=_0x3bc7d4(this[_0x5cda('0xb')],_0x5cda('0x0')),_0x30375e[_0x5cda('0x16')]=_0x3bc7d4(this[_0x5cda('0xb')],_0x5cda('0x0')),_0x30375e['icon']=_0x4e368f[_0x5cda('0x33')],_0x30375e['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x30375e[_0x5cda('0x14')]('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a0c8e=>!_0x2a0c8e),_0x30375e['bind'](_0x5cda('0x24'))['to'](this[_0x5cda('0x27')],_0x5cda('0x1c'),this['_model'],'isResolved',this,_0x5cda('0x19'),(_0x52c0a7,_0xc807cb,_0x448ed9)=>_0x52c0a7&&!_0xc807cb&&!_0x448ed9),_0x30375e['on']('execute',()=>{this[_0x5cda('0x31')](_0x5cda('0x1b'),this[_0x5cda('0x27')]['id']);}),_0x30375e;}}
@@ -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 _0x418d=['_createDropdown','ck-annotation__main','items','isVisible','attributes','resolvedAt','ck-comment--edit','threeVerticalDots','ck-comment','remove','element','isSystemComment','ck-annotation__info','ck-annotation','name','ck-annotation__actions','ck-annotation__user','some','authoredAt','isExternal','switchToEditMode','mouseenter','visibleView','panelPosition','buttonView','_config','ck-comment__info-name','actionBar','isConfirm','source','ck-comment--remove-confirmation','editButton','ck-comment__main','_model','removeButton','_attachActions','ck-annotation__actions--hidden','dropdown','extendTemplate','actionIndicator','ck-comment--','getExternalCommentNote','setTemplate','userView','isEditMode','importWord','@external','span','Remove','div','isRemovable','blur','isReadOnly','isEditable','createCollection','ck-comment__external','edit','getTemplate','panelView','placeholder','length','set','creator','ck-annotation__info-time','author','ck-comment--remove','isEnabled','bind','listenTo','locale','ck-comment__info-time','Reply...','Delete\x20comment?','withText','execute','showConfirm','_createCommentInputView','icon','label','EXTERNAL_IMPORT_WORD_COMMENT','ck-comment__actions','EXTERNAL_IMPORT_WORD_AVATAR','ck-comment__user','change:isVisible','time','render','EXTERNAL_AVATAR','_createEditButton','add','_createRemoveButton','push','mouseleave','Show\x20more\x20items','fire'];(function(_0x179787,_0x418dce){const _0x4d3d5b=function(_0x3c0303){while(--_0x3c0303){_0x179787['push'](_0x179787['shift']());}};_0x4d3d5b(++_0x418dce);}(_0x418d,0xc7));const _0x4d3d=function(_0x179787,_0x418dce){_0x179787=_0x179787-0x0;let _0x4d3d5b=_0x418d[_0x179787];return _0x4d3d5b;};import{ButtonView as _0x204e98,createDropdown as _0xff33e9,ListView as _0x593086,ListItemView as _0xf849bc}from'ckeditor5/src/ui';import{icons as _0x1dc253}from'ckeditor5/src/core';import{UserView as _0x3ee701,ConfirmMixin as _0x28c9d6}from'ckeditor5-collaboration/src/collaboration-core';import _0x268a7b from'./basecommentview';import _0x412cab from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0xd8bb4e}from'../../../utils/common-translations';export default class lt extends _0x28c9d6(_0x268a7b){constructor(_0x19c4b0,_0x4f1de5,_0x290fab){super(_0x19c4b0,_0x4f1de5,_0x290fab),this[_0x4d3d('0x32')](_0x4d3d('0x1c'),null),this[_0x4d3d('0x32')](_0x4d3d('0x30'),_0xd8bb4e(_0x19c4b0,_0x4d3d('0x3c'))),this[_0x4d3d('0x38')](_0x4d3d('0x7'))['to'](_0x4f1de5),this[_0x4d3d('0x38')](_0x4d3d('0x58'))['to'](_0x4f1de5),this[_0x4d3d('0x10')]=this['createCollection'](),this[_0x4d3d('0x0')]||(this[_0x4d3d('0x14')]=this[_0x4d3d('0x4c')](),this[_0x4d3d('0x17')]=this[_0x4d3d('0x4e')](),this[_0x4d3d('0x55')]=this[_0x4d3d('0x2b')](),this[_0x4d3d('0x55')]['addMany']([this[_0x4d3d('0x14')],this['removeButton']]),this[_0x4d3d('0x1a')]=this['_createDropdown'](),this[_0x4d3d('0x10')][_0x4d3d('0x4d')](this['dropdown'])),this[_0x4d3d('0x20')]=new _0x3ee701(_0x19c4b0,_0x4f1de5['author'],this['getUserViewNotificationText']()),this['userView'][_0x4d3d('0x1b')]({'attributes':{'class':[_0x4d3d('0x47'),_0x4d3d('0x5')]}}),this['listenTo'](_0x4f1de5,'change:isRemovable',()=>this['cancelConfirm']()),this[_0x4d3d('0x1f')](this[_0x4d3d('0x2e')]());}['getTemplate'](){const _0x5c9ad8=this['bindTemplate'],_0x385859=[{'tag':_0x4d3d('0x26'),'attributes':{'class':['ck-comment__info',_0x4d3d('0x1')]},'children':[{'tag':_0x4d3d('0x24'),'children':[{'text':this[_0x4d3d('0x20')]['name']}],'attributes':{'class':[_0x4d3d('0xf'),'ck-annotation__info-name']}},{'tag':_0x4d3d('0x49'),'attributes':{'datetime':_0x5c9ad8['to'](_0x4d3d('0x7')),'class':[_0x4d3d('0x3b'),_0x4d3d('0x34')]},'children':[{'text':_0x5c9ad8['to'](_0x4d3d('0x7'),_0x71d5d6=>this[_0x4d3d('0xe')]['formatDateTime'](_0x71d5d6))}]}]},{'tag':'div','attributes':{'class':[_0x4d3d('0x45'),_0x4d3d('0x4'),_0x5c9ad8['if']('isEditMode','ck-comment__actions--hidden'),_0x5c9ad8['if'](_0x4d3d('0x21'),_0x4d3d('0x19'))]},'children':this[_0x4d3d('0x10')]},{'tag':_0x4d3d('0x26'),'attributes':{'class':['ck-annotation__content-wrapper']},'children':this[_0x4d3d('0xb')]}];return this[_0x4d3d('0x16')][_0x4d3d('0x8')]&&_0x385859[_0x4d3d('0x4f')]({'tag':_0x4d3d('0x26'),'attributes':{'class':[_0x4d3d('0x2c')]},'children':[{'text':this[_0x4d3d('0x1e')]()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x5c9ad8['if'](_0x4d3d('0x11'),_0x4d3d('0x13'))],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':[_0x4d3d('0x5b'),_0x4d3d('0x2'),_0x5c9ad8['if']('isEditMode',_0x4d3d('0x59')),_0x5c9ad8['if'](_0x4d3d('0x0'),'ck-comment--info'),_0x5c9ad8['to'](_0x4d3d('0x1c'),_0x4ac92a=>_0x4ac92a?_0x4d3d('0x1d')+_0x4ac92a:'')],'data-author-id':this[_0x4d3d('0x16')][_0x4d3d('0x35')]['id'],'data-comment-id':this[_0x4d3d('0x16')]['id']},'children':[this[_0x4d3d('0x20')],{'tag':_0x4d3d('0x26'),'attributes':{'class':[_0x4d3d('0x15'),_0x4d3d('0x54')]},'children':_0x385859}]}]};}[_0x4d3d('0x4c')](){const _0xffa0e4=new _0x204e98(this[_0x4d3d('0x3a')]);return _0xffa0e4[_0x4d3d('0x43')]=_0xd8bb4e(this[_0x4d3d('0x3a')],'Edit'),_0xffa0e4['icon']=_0x1dc253['pencil'],_0xffa0e4['withText']=!0x0,_0xffa0e4[_0x4d3d('0x1b')]({'attributes':{'class':_0x4d3d('0x59')}}),_0xffa0e4[_0x4d3d('0x38')](_0x4d3d('0x37'))['to'](this['_model'],_0x4d3d('0x29'),_0x4bdd17=>!_0x4bdd17),_0xffa0e4[_0x4d3d('0x38')](_0x4d3d('0x56'))['to'](this[_0x4d3d('0x16')],_0x4d3d('0x2a')),_0xffa0e4['on'](_0x4d3d('0x3f'),()=>this[_0x4d3d('0x9')]()),_0xffa0e4;}['_createRemoveButton'](){const _0x59f8f0=new _0x204e98(this['locale']);return _0x59f8f0[_0x4d3d('0x43')]=_0xd8bb4e(this[_0x4d3d('0x3a')],_0x4d3d('0x25')),_0x59f8f0[_0x4d3d('0x42')]=_0x412cab,_0x59f8f0[_0x4d3d('0x3e')]=!0x0,_0x59f8f0[_0x4d3d('0x1b')]({'attributes':{'class':_0x4d3d('0x36')}}),_0x59f8f0[_0x4d3d('0x38')](_0x4d3d('0x37'))['to'](this[_0x4d3d('0x16')],_0x4d3d('0x29'),_0x12dd1a=>!_0x12dd1a),_0x59f8f0[_0x4d3d('0x38')]('isVisible')['to'](this['_model'],_0x4d3d('0x27')),_0x59f8f0['on'](_0x4d3d('0x3f'),()=>{this[_0x4d3d('0x40')](_0xd8bb4e(this[_0x4d3d('0x3a')],_0x4d3d('0x3d')),this[_0x4d3d('0x5d')])['then'](()=>{this[_0x4d3d('0x52')]('removeComment',this[_0x4d3d('0x16')]['id']);});}),_0x59f8f0;}[_0x4d3d('0x53')](){const _0x155f71=_0xff33e9(this[_0x4d3d('0x3a')]),_0x495836=_0x155f71[_0x4d3d('0x2f')]['children'],_0x505ee1=new _0x593086(this['locale']),_0x1ed2a2=(_0x157fb1,_0x150733=-0x1)=>{const _0x5c9f7d=new _0xf849bc(this[_0x4d3d('0x3a')]);_0x5c9f7d['children'][_0x4d3d('0x4d')](_0x157fb1);const _0xc7b912=_0x150733>-0x1?_0x150733:_0x505ee1[_0x4d3d('0x55')][_0x4d3d('0x31')];_0x505ee1[_0x4d3d('0x55')][_0x4d3d('0x4d')](_0x5c9f7d,_0xc7b912),_0x155f71['listenTo'](_0x157fb1,'change:isEnabled',()=>{_0x155f71[_0x4d3d('0x37')]=[...this[_0x4d3d('0x55')]][_0x4d3d('0x6')](_0xdd7733=>_0xdd7733[_0x4d3d('0x37')]);}),_0x155f71[_0x4d3d('0x39')](_0x157fb1,_0x4d3d('0x48'),()=>{_0x155f71[_0x4d3d('0xd')][_0x4d3d('0x56')]=[...this[_0x4d3d('0x55')]]['some'](_0x174a97=>_0x174a97[_0x4d3d('0x56')]);});};_0x155f71[_0x4d3d('0xc')]='sw',_0x155f71[_0x4d3d('0xd')][_0x4d3d('0x32')]({'label':_0xd8bb4e(this['locale'],_0x4d3d('0x51')),'icon':_0x1dc253[_0x4d3d('0x5a')]}),_0x155f71[_0x4d3d('0x37')]=[...this['items']][_0x4d3d('0x6')](_0x5de2a4=>_0x5de2a4['isEnabled']),_0x155f71[_0x4d3d('0xd')][_0x4d3d('0x56')]=[...this[_0x4d3d('0x55')]][_0x4d3d('0x6')](_0x298df4=>_0x298df4[_0x4d3d('0x56')]);for(const _0x8083d6 of this[_0x4d3d('0x55')])_0x1ed2a2(_0x8083d6);return _0x495836[_0x4d3d('0x4d')](_0x505ee1),_0x155f71[_0x4d3d('0x39')](this[_0x4d3d('0x55')],_0x4d3d('0x4d'),(_0x30f355,_0x463c7f,_0x2dd260)=>{_0x1ed2a2(_0x463c7f,_0x2dd260);}),_0x155f71[_0x4d3d('0x39')](this['items'],_0x4d3d('0x5c'),(_0x521fc8,_0x43e5ee,_0x190fad)=>{_0x505ee1[_0x4d3d('0x55')]['remove'](_0x190fad);}),_0x155f71;}[_0x4d3d('0x18')](_0x5b8add,_0xf2a4cc){const _0x5d541f=_0x5b8add&&_0x5b8add['element'];_0x5d541f&&(this[_0x4d3d('0x39')](_0x5d541f,_0x4d3d('0xa'),()=>this[_0x4d3d('0x1c')]=_0xf2a4cc),this[_0x4d3d('0x39')](_0x5d541f,'focus',()=>this[_0x4d3d('0x1c')]=_0xf2a4cc),this[_0x4d3d('0x39')](_0x5d541f,_0x4d3d('0x50'),()=>this[_0x4d3d('0x1c')]=null),this[_0x4d3d('0x39')](_0x5d541f,_0x4d3d('0x28'),()=>this['actionIndicator']=null));}[_0x4d3d('0x41')](){const _0x2f89d3=super[_0x4d3d('0x41')]();return _0x2f89d3[_0x4d3d('0x38')]('placeholder')['to'](this),_0x2f89d3;}['getExternalCommentNote'](){return _0x4d3d('0x22')===this['_model']['attributes']['@external']['source']?_0xd8bb4e(this[_0x4d3d('0x3a')],_0x4d3d('0x44')):_0xd8bb4e(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this[_0x4d3d('0x16')][_0x4d3d('0x8')]?'importWord'===this[_0x4d3d('0x16')][_0x4d3d('0x57')][_0x4d3d('0x23')][_0x4d3d('0x12')]?_0xd8bb4e(this[_0x4d3d('0x3a')],_0x4d3d('0x46'),this[_0x4d3d('0x16')][_0x4d3d('0x33')][_0x4d3d('0x3')]):_0xd8bb4e(this[_0x4d3d('0x3a')],_0x4d3d('0x4b'),this['_model'][_0x4d3d('0x33')]['name']):null;}[_0x4d3d('0x4a')](){super[_0x4d3d('0x4a')](),this[_0x4d3d('0x18')](this[_0x4d3d('0x14')],_0x4d3d('0x2d')),this['_attachActions'](this[_0x4d3d('0x17')],_0x4d3d('0x5c'));}}
@@ -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 _0x17a1=['pluginName','requires'];(function(_0x10e61d,_0x17a1fd){var _0x409905=function(_0x5c5b76){while(--_0x5c5b76){_0x10e61d['push'](_0x10e61d['shift']());}};_0x409905(++_0x17a1fd);}(_0x17a1,0xab));var _0x4099=function(_0x10e61d,_0x17a1fd){_0x10e61d=_0x10e61d-0x0;var _0x409905=_0x17a1[_0x10e61d];return _0x409905;};import{Plugin as _0x4adab4}from'ckeditor5/src/core';import _0x3d7f4a from'./comments/commentsrepository';import _0x469f49 from'./comments/commentsediting';import _0x12bf43 from'./comments/commentsui';import _0x124d5f from'./commentsonly';import _0x570825 from'./annotations/widesidebar';import _0x3c3870 from'./annotations/narrowsidebar';import _0x432eca from'./annotations/inlineannotations';import _0x21e10f from'./comments/commentsarchiveui';import _0x824c5d from'./comments/commentsarchive';export default class f extends _0x4adab4{static get[_0x4099('0x0')](){return[_0x3d7f4a,_0x469f49,_0x12bf43,_0x824c5d,_0x21e10f,_0x124d5f,_0x570825,_0x3c3870,_0x432eca];}static get[_0x4099('0x1')](){return'Comments';}}
@@ -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 _0x4dca=['stopListening','pluginName','commentsOnlyMode','requires','plugins','commentsOnly','delete','forceDisabled','view','_enableCommentsOnlyMode','change:isEnabled','affectsData','DragDrop','listenTo','config','stop','clearForceDisabled','has','editor','addCommentThread','get','afterInit','_disableCommentsOnlyMode','isEnabled','highest','document','editing','set','commands'];(function(_0x555372,_0x4dca72){const _0x26fdf9=function(_0x39ca2c){while(--_0x39ca2c){_0x555372['push'](_0x555372['shift']());}};_0x26fdf9(++_0x4dca72);}(_0x4dca,0x1ca));const _0x26fd=function(_0x555372,_0x4dca72){_0x555372=_0x555372-0x0;let _0x26fdf9=_0x4dca[_0x555372];return _0x26fdf9;};import{Plugin as _0x1134d3}from'ckeditor5/src/core';import _0xc23100 from'./comments/commentsediting';export default class n extends _0x1134d3{static get[_0x26fd('0x7')](){return'CommentsOnly';}static get[_0x26fd('0x9')](){return[_0xc23100];}constructor(_0x16a99e){super(_0x16a99e),this[_0x26fd('0x4')](_0x26fd('0x0'),!0x1),this['on'](_0x26fd('0x10'),(_0x263533,_0x59e7c7,_0x22ae74)=>{_0x22ae74?this['_enableCommentsOnlyMode']():this[_0x26fd('0x1c')]();});}[_0x26fd('0x1b')](){!this[_0x26fd('0x0')]&&this[_0x26fd('0x18')][_0x26fd('0x14')][_0x26fd('0x1a')](_0x26fd('0xb'))&&(this['isEnabled']=!0x0);}[_0x26fd('0xf')](){for(const [_0x55e8c5,_0x3f53a1]of this[_0x26fd('0x18')][_0x26fd('0x5')])_0x3f53a1[_0x26fd('0x11')]&&_0x26fd('0x19')!==_0x55e8c5&&_0x3f53a1[_0x26fd('0xd')](_0x26fd('0x8'));this[_0x26fd('0x18')][_0x26fd('0xa')][_0x26fd('0x17')](_0x26fd('0x12'))&&this[_0x26fd('0x18')][_0x26fd('0xa')][_0x26fd('0x1a')](_0x26fd('0x12'))[_0x26fd('0xd')]('commentsOnlyMode');const _0x56af2c=this[_0x26fd('0x18')][_0x26fd('0x3')]['view'][_0x26fd('0x2')];this[_0x26fd('0x13')](_0x56af2c,'cut',_0x5eee6b=>_0x5eee6b[_0x26fd('0x15')](),{'priority':_0x26fd('0x1')}),this['listenTo'](_0x56af2c,'clipboardInput',_0xdaa47c=>_0xdaa47c[_0x26fd('0x15')](),{'priority':_0x26fd('0x1')}),this[_0x26fd('0x13')](_0x56af2c,_0x26fd('0xc'),_0xc15f68=>_0xc15f68[_0x26fd('0x15')](),{'priority':_0x26fd('0x1')});}[_0x26fd('0x1c')](){for(const [_0x7d9bec,_0x137c45]of this[_0x26fd('0x18')][_0x26fd('0x5')])_0x137c45[_0x26fd('0x11')]&&_0x26fd('0x19')!==_0x7d9bec&&_0x137c45[_0x26fd('0x16')](_0x26fd('0x8'));this[_0x26fd('0x6')](this['editor'][_0x26fd('0x3')][_0x26fd('0xe')][_0x26fd('0x2')]);}}
@@ -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{};