@ckeditor/ckeditor5-comments 34.0.0 → 34.1.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 (45) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +2 -2
  3. package/build/comments.js +1 -1
  4. package/build/translations/af.js +1 -0
  5. package/build/translations/lv.js +1 -0
  6. package/build/translations/ur.js +1 -0
  7. package/lang/translations/af.po +67 -0
  8. package/lang/translations/lv.po +68 -0
  9. package/lang/translations/ur.po +67 -0
  10. package/package.json +3 -3
  11. package/src/annotations/annotation.js +1 -1
  12. package/src/annotations/annotationcollection.js +1 -1
  13. package/src/annotations/annotations.js +1 -1
  14. package/src/annotations/annotationsuis.js +1 -1
  15. package/src/annotations/editorannotations.js +1 -1
  16. package/src/annotations/inlineannotations.js +1 -1
  17. package/src/annotations/narrowsidebar.js +1 -1
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  20. package/src/annotations/view/annotationview.js +1 -1
  21. package/src/annotations/view/sidebaritemview.js +1 -1
  22. package/src/annotations/view/sidebarview.js +1 -1
  23. package/src/annotations/widesidebar.js +1 -1
  24. package/src/comments/addcommentthreadcommand.js +1 -1
  25. package/src/comments/commentsediting.js +1 -1
  26. package/src/comments/commentsrepository.js +1 -1
  27. package/src/comments/commentsui.js +1 -1
  28. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  29. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  30. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  31. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  32. package/src/comments/ui/commentthreadcontroller.js +1 -1
  33. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  34. package/src/comments/ui/view/basecommentview.js +1 -1
  35. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  36. package/src/comments/ui/view/commentcontentview.js +1 -1
  37. package/src/comments/ui/view/commentinputview.js +1 -1
  38. package/src/comments/ui/view/commentslistview.js +1 -1
  39. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  40. package/src/comments/ui/view/commentthreadview.js +1 -1
  41. package/src/comments/ui/view/commentview.js +1 -1
  42. package/src/comments.js +1 -1
  43. package/src/commentsonly.js +1 -1
  44. package/src/utils/common-translations.js +1 -1
  45. package/src/utils/createmutationobserver.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{View as ht,ViewCollection as Bt,FocusCycler as St,ButtonView as mt}from'ckeditor5/src/ui';import{FocusTracker as _0x2949e4,KeystrokeHandler as pt}from'ckeditor5/src/utils';import{icons as Gt}from'ckeditor5/src/core';import qt from'../commenteditor/commenteditor';export default class Tt extends ht{constructor(_0x374a64,_0x3bf09a={}){super(_0x374a64);const {t:t}=_0x374a64;this['editor']=new qt(_0x3bf09a),this['keystrokes']=new pt(),this['focusTracker']=new _0x2949e4(),this['set']('value',_0x3bf09a['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',t('Reply...')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0xdffdb6,_0x2e24ba)=>{this['cancelButtonView']['fire']('execute'),_0x2e24ba();}),this['on']('submit',(_0x36c186,_0x31b09d)=>{_0x31b09d['length']>0xfde8?(alert(t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},[_0x31b09d['length'],0xfde8])),_0x36c186['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render']();const {editor:_0x26baba,element:_0x46854d}=this;this['keystrokes']['listenTo'](_0x46854d),this['focusTracker']['add'](_0x46854d),this['_editorCreationPromise']=_0x26baba['create']()['then'](()=>{_0x46854d['insertBefore'](_0x26baba['ui']['element'],_0x46854d['firstChild']),_0x26baba['model']['document']['on']('change',()=>this['value']=_0x26baba['getData']()),_0x26baba['bind']('placeholder')['to'](this),this['_initializeFocusCycling'](_0x26baba),this['fire']('editorReady');});}['focus'](){this['editor']['focus']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['isRendered']&&(await this['_editorCreationPromise'],await this['editor']['destroy']()),await super['destroy']());}['_createSubmitButton'](){const _0x297ab9=new mt(this['locale']),{t:t}=this['locale'];return _0x297ab9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x297ab9['label']=t('Submit'),_0x297ab9['icon']=Gt['check'],_0x297ab9['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x297ab9['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x54e110,_0x2e044d)=>!_0x2e044d&&!!_0x54e110['trim']()),_0x297ab9;}['_createCancelButton'](){const _0x3ab44f=new mt(this['locale']),{t:t}=this['locale'];return _0x3ab44f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3ab44f['label']=t('Cancel'),_0x3ab44f['icon']=Gt['cancel'],_0x3ab44f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3ab44f;}['_initializeFocusCycling'](_0x18fa72){const _0x48aeff=this['focusTracker'],_0x1319a3=new Bt();[_0x18fa72['ui']['view'],this['submitButtonView'],this['cancelButtonView']]['forEach'](_0x5b853e=>{_0x1319a3['add'](_0x5b853e),_0x48aeff['add'](_0x5b853e['element']);});const _0x423243=new St({'focusables':_0x1319a3,'focusTracker':_0x48aeff});this['keystrokes']['set']('tab',(_0x1016fb,_0x17f9b8)=>{_0x423243['focusNext'](),_0x17f9b8();},{'priority':'low'}),this['keystrokes']['set']('shift\x20+\x20tab',(_0x298536,_0x1aff3b)=>{_0x423243['focusPrevious'](),_0x1aff3b();},{'priority':'low'});}}
23
+ const _0x319e=['_createCancelButton','submitButtonView','focusPrevious','add','editor','create','stop','trim','low','insertBefore','focusNext','Cancel','shift\x20+\x20tab','document','_editorCreationPromise','icon','change','set','initialData','length','bind','TOO_LONG_COMMENT_ALERT','focusTracker','model','high','keystrokes','ck-comment__input-actions--cancel','_isDestroyed','extendTemplate','value','element','setData','submit','destroy','ck-comment__input-actions','disabledSubmit','fire','ck-comment__input-actions--active','cancelButtonView','placeholder','label','then','Reply...','_createSubmitButton','cancel','forEach','tab','Submit','isRendered','_initializeFocusCycling','getData','view','ck-comment__input-actions--submit','bindTemplate','editorReady','ck-comment__input-wrapper','Esc','focus','showButtons','execute'];(function(_0x2b6b1c,_0x319e52){const _0x478a93=function(_0xa9c7fd){while(--_0xa9c7fd){_0x2b6b1c['push'](_0x2b6b1c['shift']());}};_0x478a93(++_0x319e52);}(_0x319e,0x11a));const _0x478a=function(_0x2b6b1c,_0x319e52){_0x2b6b1c=_0x2b6b1c-0x0;let _0x478a93=_0x319e[_0x2b6b1c];return _0x478a93;};import{View as _0x25f8b7,ViewCollection as _0x53cfcb,FocusCycler as _0x30ca6f,ButtonView as _0x107732}from'ckeditor5/src/ui';import{FocusTracker as _0x3a57c9,KeystrokeHandler as _0x472aa8}from'ckeditor5/src/utils';import{icons as _0x40ff7e}from'ckeditor5/src/core';import _0x319118 from'../commenteditor/commenteditor';import{getTranslation as _0xf86d64}from'../../../utils/common-translations';export default class Tt extends _0x25f8b7{constructor(_0x1f1807,_0x54370b={}){super(_0x1f1807),this['editor']=new _0x319118(_0x54370b),this[_0x478a('0x2b')]=new _0x472aa8(),this[_0x478a('0x28')]=new _0x3a57c9(),this[_0x478a('0x23')](_0x478a('0x2f'),_0x54370b[_0x478a('0x24')]||''),this[_0x478a('0x23')](_0x478a('0x35'),!0x1),this[_0x478a('0x23')](_0x478a('0x10'),!0x0),this[_0x478a('0x23')]('placeholder',_0xf86d64(_0x1f1807,_0x478a('0x0'))),this[_0x478a('0x13')]=this['_createSubmitButton'](),this[_0x478a('0x38')]=this['_createCancelButton'](),this['setTemplate']({'tag':'div','attributes':{'class':[_0x478a('0xd')]},'children':[{'tag':'div','attributes':{'class':[_0x478a('0x34'),this[_0x478a('0xb')]['if'](_0x478a('0x10'),_0x478a('0x37'))]},'children':[this[_0x478a('0x13')],this[_0x478a('0x38')]]}]}),this['keystrokes'][_0x478a('0x23')](_0x478a('0xe'),(_0x461b10,_0x382d08)=>{this[_0x478a('0x38')]['fire'](_0x478a('0x11')),_0x382d08();}),this['on'](_0x478a('0x32'),(_0x5e3c87,_0xef63ad)=>{_0xef63ad[_0x478a('0x25')]>0xfde8?(alert(_0xf86d64(_0x1f1807,_0x478a('0x27'),[_0xef63ad[_0x478a('0x25')],0xfde8])),_0x5e3c87[_0x478a('0x18')]()):this[_0x478a('0x16')][_0x478a('0x31')]('');},{'priority':_0x478a('0x2a')});}['render'](){super['render']();const {editor:_0x16d278,element:_0x1807d2}=this;this[_0x478a('0x2b')]['listenTo'](_0x1807d2),this[_0x478a('0x28')][_0x478a('0x15')](_0x1807d2),this[_0x478a('0x20')]=_0x16d278[_0x478a('0x17')]()[_0x478a('0x3b')](()=>{_0x1807d2[_0x478a('0x1b')](_0x16d278['ui'][_0x478a('0x30')],_0x1807d2['firstChild']),_0x16d278[_0x478a('0x29')][_0x478a('0x1f')]['on'](_0x478a('0x22'),()=>this[_0x478a('0x2f')]=_0x16d278[_0x478a('0x8')]()),_0x16d278[_0x478a('0x26')](_0x478a('0x39'))['to'](this),this[_0x478a('0x7')](_0x16d278),this['fire'](_0x478a('0xc'));});}[_0x478a('0xf')](){this[_0x478a('0x16')]['focus']();}async[_0x478a('0x33')](){this[_0x478a('0x2d')]||(this[_0x478a('0x2d')]=!0x0,this[_0x478a('0x6')]&&(await this[_0x478a('0x20')],await this[_0x478a('0x16')][_0x478a('0x33')]()),await super[_0x478a('0x33')]());}[_0x478a('0x1')](){const {locale:_0x3de5e2}=this,_0x28beac=new _0x107732(_0x3de5e2);return _0x28beac[_0x478a('0x2e')]({'attributes':{'class':[_0x478a('0xa')]}}),_0x28beac[_0x478a('0x3a')]=_0xf86d64(_0x3de5e2,_0x478a('0x5')),_0x28beac[_0x478a('0x21')]=_0x40ff7e['check'],_0x28beac['on']('execute',()=>{this[_0x478a('0x36')](_0x478a('0x32'),this[_0x478a('0x2f')]);}),_0x28beac[_0x478a('0x26')]('isEnabled')['to'](this,'value',this,_0x478a('0x35'),(_0x3b0dae,_0x41b67c)=>!_0x41b67c&&!!_0x3b0dae[_0x478a('0x19')]()),_0x28beac;}[_0x478a('0x12')](){const {locale:_0x3f5ebe}=this,_0x48171c=new _0x107732(_0x3f5ebe);return _0x48171c[_0x478a('0x2e')]({'attributes':{'class':[_0x478a('0x2c')]}}),_0x48171c[_0x478a('0x3a')]=_0xf86d64(_0x3f5ebe,_0x478a('0x1d')),_0x48171c[_0x478a('0x21')]=_0x40ff7e[_0x478a('0x2')],_0x48171c['on']('execute',()=>{this[_0x478a('0x16')][_0x478a('0x31')](''),this[_0x478a('0x36')](_0x478a('0x2'));}),_0x48171c;}[_0x478a('0x7')](_0x4cd98a){const _0x328db9=this[_0x478a('0x28')],_0x150d0d=new _0x53cfcb();[_0x4cd98a['ui'][_0x478a('0x9')],this[_0x478a('0x13')],this['cancelButtonView']][_0x478a('0x3')](_0x2a74d6=>{_0x150d0d['add'](_0x2a74d6),_0x328db9['add'](_0x2a74d6[_0x478a('0x30')]);});const _0x5a8ac8=new _0x30ca6f({'focusables':_0x150d0d,'focusTracker':_0x328db9});this[_0x478a('0x2b')][_0x478a('0x23')](_0x478a('0x4'),(_0x70228d,_0x38d65a)=>{_0x5a8ac8[_0x478a('0x1c')](),_0x38d65a();},{'priority':_0x478a('0x1a')}),this[_0x478a('0x2b')][_0x478a('0x23')](_0x478a('0x1e'),(_0x4a80f6,_0x277a9b)=>{_0x5a8ac8[_0x478a('0x14')](),_0x277a9b();},{'priority':_0x478a('0x1a')});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3668=['collapse','editorConfig','weight','remove','_rearrangeCollapse','_shouldCollapse','from','bind','destroy','createCollection','visibleViews','formatDateTime','commentViews','_handleRemoveCommentModel','refreshVisibleViews','_updateHasDirtyComment','comments','removeComment','count','render','delete','hasDirtyComment','change:hasDirtyComment','isActive','_config','viewUid','_model','change:isEditMode','CommentView','expand','_collapsedCommentsView','maxThreadTotalWeight','set','maxCommentCharsWhenCollapsed','isEditMode','_rearrangeExpand','get','ck-thread__comments','locale','delegate','updateComment','commentUpdated','setTemplate','element','maxCommentsWhenCollapsed','add','listenTo','_handleNewCommentModel','stopListening','insert','length'];(function(_0x225b3e,_0x3668d2){const _0x2150fe=function(_0x3034c8){while(--_0x3034c8){_0x225b3e['push'](_0x225b3e['shift']());}};_0x2150fe(++_0x3668d2);}(_0x3668,0xf4));const _0x2150=function(_0x225b3e,_0x3668d2){_0x225b3e=_0x225b3e-0x0;let _0x2150fe=_0x3668[_0x225b3e];return _0x2150fe;};import{View as _0x5bd7ed}from'ckeditor5/src/ui';import{diff as _0x27a70e,Collection as _0x19170b}from'ckeditor5/src/utils';import _0x3319dd from'./collapsedcommentsview';export default class ct extends _0x5bd7ed{constructor(_0x5673f2,_0x34e2e9,_0x56410d){super(_0x5673f2),this[_0x2150('0x2b')](_0x2150('0x20'),!0x1),this[_0x2150('0x2b')]('length',_0x34e2e9[_0x2150('0x1b')][_0x2150('0xa')]),this[_0x2150('0x2b')](_0x2150('0x22'),!0x1),this[_0x2150('0x25')]=_0x34e2e9,this[_0x2150('0x23')]=_0x56410d,this['commentViews']=this[_0x2150('0x14')](),this[_0x2150('0x15')]=this[_0x2150('0x14')](),this[_0x2150('0x29')]=new _0x3319dd(_0x5673f2),this[_0x2150('0x29')][_0x2150('0x12')](_0x2150('0x1d'))['to'](this,_0x2150('0xa'),_0x51f9fb=>_0x51f9fb-this['_config'][_0x2150('0x4')]);for(const _0x7a7f6e of _0x34e2e9[_0x2150('0x1b')])this[_0x2150('0x7')](_0x7a7f6e);this[_0x2150('0x6')](_0x34e2e9['comments'],_0x2150('0x5'),(_0x49166c,_0x1c7b3a)=>{this[_0x2150('0xa')]++,this['_handleNewCommentModel'](_0x1c7b3a),this[_0x2150('0x19')]();}),this[_0x2150('0x6')](_0x34e2e9[_0x2150('0x1b')],_0x2150('0xe'),(_0x52092f,_0x4e1df4)=>{this[_0x2150('0xa')]--,this[_0x2150('0x18')](_0x4e1df4),this['refreshVisibleViews']();}),this['listenTo'](_0x34e2e9,_0x2150('0x1'),()=>this[_0x2150('0x19')]()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on'](_0x2150('0x21'),()=>this[_0x2150('0x19')]()),this[_0x2150('0x2')]({'tag':'ul','attributes':{'class':[_0x2150('0x30')]},'children':this[_0x2150('0x15')]});}get[_0x2150('0x10')](){return this[_0x2150('0x25')][_0x2150('0xd')]>this[_0x2150('0x23')][_0x2150('0x2a')]&&!this[_0x2150('0x22')]&&!this[_0x2150('0x20')];}[_0x2150('0x1e')](){super[_0x2150('0x1e')](),this[_0x2150('0x19')]();}['focus'](){this[_0x2150('0x3')]['focus']();}['destroy'](){this['_collapsedCommentsView'][_0x2150('0x13')]();for(const _0x4a1a60 of this[_0x2150('0x17')])_0x4a1a60[_0x2150('0x13')]();super['destroy']();}[_0x2150('0x19')](){this['_shouldCollapse']?this[_0x2150('0xf')]():this[_0x2150('0x2e')]();}[_0x2150('0x7')](_0x2dc06c){const _0x26d130=new this[(_0x2150('0x23'))][(_0x2150('0x27'))](this[_0x2150('0x31')],_0x2dc06c,{'maxCommentCharsWhenCollapsed':this[_0x2150('0x23')][_0x2150('0x2c')],'formatDateTime':this['_config'][_0x2150('0x16')],'editorConfig':this[_0x2150('0x23')][_0x2150('0xc')]});_0x26d130[_0x2150('0x24')]=_0x2dc06c['id'],_0x26d130['delegate'](_0x2150('0x1c'))['to'](this),_0x26d130[_0x2150('0x32')](_0x2150('0x0'))['to'](this),this[_0x2150('0x6')](_0x26d130,_0x2150('0x26'),()=>this[_0x2150('0x1a')]()),this[_0x2150('0x17')]['add'](_0x26d130);}['_handleRemoveCommentModel'](_0x1c8c73){const _0x24f7fb=this['commentViews'][_0x2150('0xe')](_0x1c8c73['id']);this[_0x2150('0x8')](_0x24f7fb),_0x24f7fb[_0x2150('0x2d')]&&this[_0x2150('0x1a')](),_0x24f7fb['destroy']();}[_0x2150('0x1a')](){this[_0x2150('0x20')]=Array['from'](this[_0x2150('0x17')])['some'](_0x4d879e=>_0x4d879e[_0x2150('0x2d')]);}['_rearrangeCollapse'](){const _0x2a9272=function(_0x3c8ed3){const _0x31d901=new _0x19170b();for(const _0x11b52f of _0x3c8ed3)_0x31d901['add'](_0x11b52f);return _0x31d901;}(this[_0x2150('0x17')]),_0x3a9b8e=this[_0x2150('0x29')][_0x2150('0x1d')];for(let _0x3cc20c=0x1;_0x3cc20c<=_0x3a9b8e;_0x3cc20c++)_0x2a9272[_0x2150('0xe')](0x1);for(const _0x4dad2d of _0x2a9272)_0x4dad2d[_0x2150('0xb')]();_0x3a9b8e>0x0&&_0x2a9272[_0x2150('0x5')](this[_0x2150('0x29')],0x1),Ut(_0x27a70e(Array[_0x2150('0x11')](this['visibleViews']),Array[_0x2150('0x11')](_0x2a9272)),this[_0x2150('0x15')],_0x2a9272);}['_rearrangeExpand'](){Ut(_0x27a70e(Array[_0x2150('0x11')](this[_0x2150('0x15')]),Array[_0x2150('0x11')](this[_0x2150('0x17')])),this['visibleViews'],this['commentViews']);for(const _0x3eae68 of this[_0x2150('0x15')])_0x3eae68[_0x2150('0x28')]();}}function Ut(_0x3ab9ad,_0x377459,_0x5af95d){let _0x497c2f=0x0;for(const _0x551ef6 of _0x3ab9ad)switch(_0x551ef6){case _0x2150('0x9'):_0x377459[_0x2150('0x5')](_0x5af95d[_0x2150('0x2f')](_0x497c2f),_0x497c2f),_0x497c2f++;break;case _0x2150('0x1f'):_0x377459[_0x2150('0xe')](_0x497c2f);break;case'equal':_0x497c2f++;}}
23
+ const _0x4b59=['from','refreshVisibleViews','viewUid','destroy','_updateHasDirtyComment','createCollection','_rearrangeExpand','_handleRemoveCommentModel','element','some','_config','visibleViews','listenTo','length','_shouldCollapse','isActive','ck-thread__comments','equal','hasDirtyComment','change:isEditMode','set','_rearrangeCollapse','isEditMode','_collapsedCommentsView','comments','add','commentViews','formatDateTime','remove','expand','commentUpdated','focus','maxCommentCharsWhenCollapsed','count','render','insert','updateComment','removeComment','delete','stopListening','change:hasDirtyComment','_handleNewCommentModel'];(function(_0x4cde7c,_0x4b5941){const _0x229c0a=function(_0x309521){while(--_0x309521){_0x4cde7c['push'](_0x4cde7c['shift']());}};_0x229c0a(++_0x4b5941);}(_0x4b59,0x1a7));const _0x229c=function(_0x4cde7c,_0x4b5941){_0x4cde7c=_0x4cde7c-0x0;let _0x229c0a=_0x4b59[_0x4cde7c];return _0x229c0a;};import{View as _0x49ff2a}from'ckeditor5/src/ui';import{diff as _0x112b46,Collection as _0x5e293a}from'ckeditor5/src/utils';import _0x2a3ef9 from'./collapsedcommentsview';export default class L extends _0x49ff2a{constructor(_0x5438de,_0x91f125,_0x2479fe){super(_0x5438de),this['set'](_0x229c('0xf'),!0x1),this['set'](_0x229c('0xa'),_0x91f125[_0x229c('0x15')][_0x229c('0xa')]),this[_0x229c('0x11')](_0x229c('0xc'),!0x1),this['_model']=_0x91f125,this[_0x229c('0x7')]=_0x2479fe,this[_0x229c('0x17')]=this[_0x229c('0x2')](),this[_0x229c('0x8')]=this['createCollection'](),this[_0x229c('0x14')]=new _0x2a3ef9(_0x5438de),this[_0x229c('0x14')]['bind']('count')['to'](this,_0x229c('0xa'),_0xbc2dae=>_0xbc2dae-this[_0x229c('0x7')]['maxCommentsWhenCollapsed']);for(const _0x5b4ef5 of _0x91f125[_0x229c('0x15')])this[_0x229c('0x26')](_0x5b4ef5);this[_0x229c('0x9')](_0x91f125['comments'],_0x229c('0x16'),(_0xee5a27,_0x24d4db)=>{this[_0x229c('0xa')]++,this['_handleNewCommentModel'](_0x24d4db),this[_0x229c('0x28')]();}),this[_0x229c('0x9')](_0x91f125[_0x229c('0x15')],_0x229c('0x19'),(_0xb4910b,_0x3e3a2d)=>{this[_0x229c('0xa')]--,this['_handleRemoveCommentModel'](_0x3e3a2d),this['refreshVisibleViews']();}),this['listenTo'](_0x91f125,_0x229c('0x1b'),()=>this[_0x229c('0x28')]()),this['on']('change:isActive',()=>this[_0x229c('0x28')]()),this['on'](_0x229c('0x25'),()=>this[_0x229c('0x28')]()),this['setTemplate']({'tag':'ul','attributes':{'class':[_0x229c('0xd')]},'children':this[_0x229c('0x8')]});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this[_0x229c('0xc')]&&!this['hasDirtyComment'];}['render'](){super[_0x229c('0x1f')](),this[_0x229c('0x28')]();}[_0x229c('0x1c')](){this[_0x229c('0x5')][_0x229c('0x1c')]();}[_0x229c('0x0')](){this['_collapsedCommentsView'][_0x229c('0x0')]();for(const _0x9ec08c of this[_0x229c('0x17')])_0x9ec08c[_0x229c('0x0')]();super['destroy']();}[_0x229c('0x28')](){this[_0x229c('0xb')]?this['_rearrangeCollapse']():this[_0x229c('0x3')]();}['_handleNewCommentModel'](_0x29ce2a){const _0xc99503=new this[(_0x229c('0x7'))]['CommentView'](this['locale'],_0x29ce2a,{'maxCommentCharsWhenCollapsed':this['_config'][_0x229c('0x1d')],'formatDateTime':this[_0x229c('0x7')][_0x229c('0x18')],'editorConfig':this[_0x229c('0x7')]['editorConfig']});_0xc99503[_0x229c('0x29')]=_0x29ce2a['id'],_0xc99503['delegate'](_0x229c('0x22'))['to'](this),_0xc99503['delegate'](_0x229c('0x21'))['to'](this),this['listenTo'](_0xc99503,_0x229c('0x10'),()=>this['_updateHasDirtyComment']()),this[_0x229c('0x17')][_0x229c('0x16')](_0xc99503);}[_0x229c('0x4')](_0x4c5f37){const _0x18e6e5=this[_0x229c('0x17')][_0x229c('0x19')](_0x4c5f37['id']);this[_0x229c('0x24')](_0x18e6e5),_0x18e6e5['isEditMode']&&this[_0x229c('0x1')](),_0x18e6e5[_0x229c('0x0')]();}[_0x229c('0x1')](){this[_0x229c('0xf')]=Array[_0x229c('0x27')](this['commentViews'])[_0x229c('0x6')](_0x23475c=>_0x23475c[_0x229c('0x13')]);}[_0x229c('0x12')](){const _0x157708=function(_0x105662){const _0x174a4c=new _0x5e293a();for(const _0x452fe6 of _0x105662)_0x174a4c[_0x229c('0x16')](_0x452fe6);return _0x174a4c;}(this[_0x229c('0x17')]),_0x1c2340=this[_0x229c('0x14')][_0x229c('0x1e')];for(let _0x19c22e=0x1;_0x19c22e<=_0x1c2340;_0x19c22e++)_0x157708['remove'](0x1);for(const _0x1d3af2 of _0x157708)_0x1d3af2['collapse']();_0x1c2340>0x0&&_0x157708['add'](this[_0x229c('0x14')],0x1),Ut(_0x112b46(Array['from'](this['visibleViews']),Array['from'](_0x157708)),this['visibleViews'],_0x157708);}['_rearrangeExpand'](){Ut(_0x112b46(Array[_0x229c('0x27')](this['visibleViews']),Array[_0x229c('0x27')](this['commentViews'])),this[_0x229c('0x8')],this[_0x229c('0x17')]);for(const _0x416b8a of this[_0x229c('0x8')])_0x416b8a[_0x229c('0x1a')]();}}function Ut(_0x57d874,_0x2ddecf,_0x765b31){let _0xaaef07=0x0;for(const _0x3b21e6 of _0x57d874)switch(_0x3b21e6){case _0x229c('0x20'):_0x2ddecf[_0x229c('0x16')](_0x765b31['get'](_0xaaef07),_0xaaef07),_0xaaef07++;break;case _0x229c('0x23'):_0x2ddecf[_0x229c('0x19')](_0xaaef07);break;case _0x229c('0xe'):_0xaaef07++;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5d2d=['then','showInput','ck-comment__input-container','setTemplate','commentInputView','div','bindTemplate','userView','bind','ck-comment__input-container--active','extendTemplate','set','showButtons','destroy','ck-thread__user'];(function(_0xc6d9aa,_0x5d2d6e){var _0x330cc7=function(_0x35fa3e){while(--_0x35fa3e){_0xc6d9aa['push'](_0xc6d9aa['shift']());}};_0x330cc7(++_0x5d2d6e);}(_0x5d2d,0x98));var _0x330c=function(_0xc6d9aa,_0x5d2d6e){_0xc6d9aa=_0xc6d9aa-0x0;var _0x330cc7=_0x5d2d[_0xc6d9aa];return _0x330cc7;};import{View as _0x5a00ca}from'ckeditor5/src/ui';import _0x1ac974 from'./commentinputview';import{UserView as _0x3d7bc8}from'ckeditor5-collaboration/src/collaboration-core';export default class dt extends _0x5a00ca{constructor(_0x47d8fd,_0x530ddc,_0x4404c0){super(_0x47d8fd),this[_0x330c('0x2')]=new _0x1ac974(_0x47d8fd,_0x4404c0),this[_0x330c('0x2')][_0x330c('0x6')](_0x330c('0xa'))['to'](this[_0x330c('0x2')]['focusTracker'],'isFocused',this[_0x330c('0x2')],'value',(_0x3a8e16,_0x56cdd9)=>_0x3a8e16||!!_0x56cdd9),this[_0x330c('0x9')](_0x330c('0xe'),!0x1),this[_0x330c('0x5')]=new _0x3d7bc8(_0x47d8fd,_0x530ddc),this[_0x330c('0x5')][_0x330c('0x8')]({'attributes':{'class':_0x330c('0xc')}}),this[_0x330c('0x2')][_0x330c('0x8')]({'attributes':{'class':'ck-thread__input'}}),this[_0x330c('0x1')]({'tag':_0x330c('0x3'),'attributes':{'class':[_0x330c('0x0'),this[_0x330c('0x4')]['if'](_0x330c('0xe'),_0x330c('0x7'))]},'children':[this[_0x330c('0x5')],this[_0x330c('0x2')]]});}[_0x330c('0xb')](){return this[_0x330c('0x2')][_0x330c('0xb')]()[_0x330c('0xd')](()=>super[_0x330c('0xb')]());}}
23
+ var _0x2daa=['commentInputView','showInput','isFocused','destroy','bindTemplate','ck-thread__user','value','showButtons','userView','setTemplate','ck-thread__input','bind','extendTemplate','set','ck-comment__input-container--active','div','ck-comment__input-container','then'];(function(_0xd49cb0,_0x2daac7){var _0x3f18a1=function(_0x34b68f){while(--_0x34b68f){_0xd49cb0['push'](_0xd49cb0['shift']());}};_0x3f18a1(++_0x2daac7);}(_0x2daa,0x9b));var _0x3f18=function(_0xd49cb0,_0x2daac7){_0xd49cb0=_0xd49cb0-0x0;var _0x3f18a1=_0x2daa[_0xd49cb0];return _0x3f18a1;};import{View as _0x332d95}from'ckeditor5/src/ui';import _0x49ab72 from'./commentinputview';import{UserView as _0x35cbcd}from'ckeditor5-collaboration/src/collaboration-core';export default class z extends _0x332d95{constructor(_0x231cce,_0x4637cf,_0x335fb7){super(_0x231cce),this[_0x3f18('0x7')]=new _0x49ab72(_0x231cce,_0x335fb7),this[_0x3f18('0x7')][_0x3f18('0x0')](_0x3f18('0xe'))['to'](this[_0x3f18('0x7')]['focusTracker'],_0x3f18('0x9'),this['commentInputView'],_0x3f18('0xd'),(_0x1d1714,_0x3b4f1c)=>_0x1d1714||!!_0x3b4f1c),this[_0x3f18('0x2')](_0x3f18('0x8'),!0x1),this['userView']=new _0x35cbcd(_0x231cce,_0x4637cf),this[_0x3f18('0xf')][_0x3f18('0x1')]({'attributes':{'class':_0x3f18('0xc')}}),this[_0x3f18('0x7')]['extendTemplate']({'attributes':{'class':_0x3f18('0x11')}}),this[_0x3f18('0x10')]({'tag':_0x3f18('0x4'),'attributes':{'class':[_0x3f18('0x5'),this[_0x3f18('0xb')]['if'](_0x3f18('0x8'),_0x3f18('0x3'))]},'children':[this[_0x3f18('0xf')],this[_0x3f18('0x7')]]});}[_0x3f18('0xa')](){return this[_0x3f18('0x7')][_0x3f18('0xa')]()[_0x3f18('0x6')](()=>super[_0x3f18('0xa')]());}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{mix as _0x23b50a}from'ckeditor5/src/utils';import{ConfirmMixin as Wt}from'ckeditor5-collaboration/src/collaboration-core';import Rt from'./basecommentthreadview';export default class nt extends Rt{constructor(_0x5cfe3b,_0x33e49e,_0x47d701,_0x4e76e2){super(_0x5cfe3b,_0x33e49e,_0x47d701,_0x4e76e2),this['set']('actionIndicator',null),this['containerElement']=null,this['locale']=_0x5cfe3b,this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x442347,_0x5d51e1,_0x2f112e)=>{_0x2f112e||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x524558,_0x466f88,_0x57e8ac)=>{_0x57e8ac&&this['_cancelAllConfirms']();}),this['length']>0x0?this['_bindFirstCommentView']():this['listenTo'](this['commentsListView']['commentViews'],'add',_0x532627=>{this['_bindFirstCommentView'](),_0x532627['off']();});}['getTemplate'](){const _0x2f83dd=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck-thread',_0x2f83dd['if']('isActive','ck-thread--active'),_0x2f83dd['if']('isConfirm','ck-thread--remove-confirmation'),_0x2f83dd['to']('actionIndicator',_0x1e563f=>_0x1e563f?'ck-thread--'+_0x1e563f:'')],'data-thread-id':this['_model']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':[this['commentsListView'],this['commentThreadInputView']]}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container');}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x1bf5e7 of this['commentsListView']['commentViews'])_0x1bf5e7['cancelConfirm']();}['_bindFirstCommentView'](){const {t:t}=this['locale'],_0x5df131=this['commentsListView']['commentViews']['get'](0x0);this['bind']('actionIndicator')['to'](_0x5df131,'actionIndicator',_0x1c09a8=>'remove'===_0x1c09a8?'remove':null),_0x5df131['placeholder']=t('Write\x20a\x20comment...'),_0x5df131['removeButton']['on']('execute',_0x34b031=>{_0x34b031['stop'](),this['showConfirm'](t('Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'});}}_0x23b50a(nt,Wt);
23
+ const _0x5775=['Delete\x20comment\x20thread?','actionIndicator','length','.ck-thread__container','Write\x20a\x20comment...','ck-thread--active','setTemplate','removeCommentThread','change:isActive','ck-thread','isActive','_model','off','getTemplate','stop','bind','_cancelAllConfirms','placeholder','add','locale','ck-thread--remove-confirmation','execute','removeButton','remove','querySelector','containerElement','listenTo','isConfirm','showConfirm','fire','set','change:isReadOnly','cancelConfirm','_bindFirstCommentView','commentViews','get','commentsListView'];(function(_0x43ca61,_0x57756f){const _0x63eb7f=function(_0x313c45){while(--_0x313c45){_0x43ca61['push'](_0x43ca61['shift']());}};_0x63eb7f(++_0x57756f);}(_0x5775,0x181));const _0x63eb=function(_0x43ca61,_0x57756f){_0x43ca61=_0x43ca61-0x0;let _0x63eb7f=_0x5775[_0x43ca61];return _0x63eb7f;};import{mix as _0x3968c1}from'ckeditor5/src/utils';import{ConfirmMixin as _0x40e657}from'ckeditor5-collaboration/src/collaboration-core';import _0x21dca3 from'./basecommentthreadview';import{getTranslation as _0x26c5f5}from'../../../utils/common-translations';export default class M extends _0x21dca3{constructor(_0x1bcad2,_0x33dace,_0x254a00,_0x5e87a3){super(_0x1bcad2,_0x33dace,_0x254a00,_0x5e87a3),this[_0x63eb('0xf')]('actionIndicator',null),this[_0x63eb('0xa')]=null,this[_0x63eb('0x4')]=_0x1bcad2,this[_0x63eb('0x1c')](this[_0x63eb('0x23')]()),this['on'](_0x63eb('0x1e'),(_0x4f67de,_0x5c5e2b,_0x287fd4)=>{_0x287fd4||this[_0x63eb('0x1')]();}),this['listenTo'](this['_model'],_0x63eb('0x10'),(_0x255d48,_0x250566,_0x3cb6da)=>{_0x3cb6da&&this[_0x63eb('0x1')]();}),this[_0x63eb('0x18')]>0x0?this[_0x63eb('0x12')]():this[_0x63eb('0xb')](this[_0x63eb('0x15')][_0x63eb('0x13')],_0x63eb('0x3'),_0x3b6dda=>{this[_0x63eb('0x12')](),_0x3b6dda[_0x63eb('0x22')]();});}[_0x63eb('0x23')](){const _0x497455=this['bindTemplate'];return{'tag':'div','attributes':{'class':[_0x63eb('0x1f'),_0x497455['if'](_0x63eb('0x20'),_0x63eb('0x1b')),_0x497455['if'](_0x63eb('0xc'),_0x63eb('0x5')),_0x497455['to'](_0x63eb('0x17'),_0x727d23=>_0x727d23?'ck-thread--'+_0x727d23:'')],'data-thread-id':this[_0x63eb('0x21')]['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':[this[_0x63eb('0x15')],this['commentThreadInputView']]}]};}['render'](){super['render'](),this[_0x63eb('0xa')]=this['element'][_0x63eb('0x9')](_0x63eb('0x19'));}['_cancelAllConfirms'](){this[_0x63eb('0x11')]();for(const _0x5d6a70 of this[_0x63eb('0x15')][_0x63eb('0x13')])_0x5d6a70[_0x63eb('0x11')]();}[_0x63eb('0x12')](){const {locale:_0x291d78}=this,_0x86288e=this['commentsListView'][_0x63eb('0x13')][_0x63eb('0x14')](0x0);this[_0x63eb('0x0')](_0x63eb('0x17'))['to'](_0x86288e,'actionIndicator',_0x6870aa=>_0x63eb('0x8')===_0x6870aa?_0x63eb('0x8'):null),_0x86288e[_0x63eb('0x2')]=_0x26c5f5(_0x291d78,_0x63eb('0x1a')),_0x86288e[_0x63eb('0x7')]['on'](_0x63eb('0x6'),_0x56a763=>{_0x56a763[_0x63eb('0x24')](),this[_0x63eb('0xd')](_0x26c5f5(_0x291d78,_0x63eb('0x16')),this[_0x63eb('0xa')])['then'](()=>{this[_0x63eb('0xe')](_0x63eb('0x1d'));});},{'priority':'high'});}}_0x3968c1(M,_0x40e657);
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{mix as _0x191255}from'ckeditor5/src/utils';import{ButtonView as mt}from'ckeditor5/src/ui';import{icons as Gt}from'ckeditor5/src/core';import{UserView as It,ConfirmMixin as Wt}from'ckeditor5-collaboration/src/collaboration-core';import Vt from'./basecommentview';import Jt from'../../../../theme/icons/remove-comment.svg';export default class ot extends Vt{constructor(_0x4e6cee,_0x189c42,_0x4f426e){super(_0x4e6cee,_0x189c42,_0x4f426e);const {t:t}=this['locale'];this['set']('actionIndicator',null),this['set']('placeholder',t('Reply...')),this['set']('createdAt',null),this['bind']('createdAt')['to'](_0x189c42),this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['userView']=new It(_0x4e6cee,_0x189c42['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user']}}),this['listenTo'](_0x189c42,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1a0af4=this['bindTemplate'];return{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1a0af4['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1a0af4['if']('isEditMode','ck-comment--edit'),_0x1a0af4['to']('actionIndicator',_0x5b9824=>_0x5b9824?'ck-comment--'+_0x5b9824:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x1a0af4['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1a0af4['to']('createdAt',_0x51fed3=>this['_config']['formatDateTime'](_0x51fed3))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1a0af4['if']('isEditMode','ck-comment__actions--hidden'),_0x1a0af4['if']('isEditMode','ck-annotation__actions--hidden')]},'children':[this['editButton'],this['removeButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']}]}]}]};}['_createEditButton'](){const {t:t}=this['locale'],_0x1e1916=new mt(this['locale']);return _0x1e1916['label']=t('Edit'),_0x1e1916['icon']=Gt['pencil'],_0x1e1916['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1e1916['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x15f2b1=>!_0x15f2b1),_0x1e1916['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1e1916['on']('execute',()=>this['switchToEditMode']()),_0x1e1916;}['_createRemoveButton'](){const {t:t}=this['locale'],_0xaeb519=new mt(this['locale']);return _0xaeb519['label']=t('Remove'),_0xaeb519['icon']=Jt,_0xaeb519['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xaeb519['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x117c75=>!_0x117c75),_0xaeb519['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xaeb519['on']('execute',()=>{this['showConfirm'](t('Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xaeb519;}['_attachActions'](_0x4bf817,_0x4e6825){this['listenTo'](_0x4bf817,'mouseenter',()=>this['actionIndicator']=_0x4e6825),this['listenTo'](_0x4bf817,'focus',()=>this['actionIndicator']=_0x4e6825),this['listenTo'](_0x4bf817,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4bf817,'blur',()=>this['actionIndicator']=null);}['_createCommentInputView'](){const _0xc0a757=super['_createCommentInputView']();return _0xc0a757['bind']('placeholder')['to'](this),_0xc0a757;}['render'](){super['render'](),this['_attachActions'](this['editButton']['element'],'edit'),this['_attachActions'](this['removeButton']['element'],'remove');}}_0x191255(ot,Wt);
23
+ const _0x38d0=['ck-comment__info-time','extendTemplate','_createRemoveButton','name','ck-comment--remove-confirmation','createdAt','Delete\x20comment?','div','ck-annotation__actions','ck-annotation__user','element','fire','listenTo','ck-comment__main','placeholder','switchToEditMode','cancelConfirm','ck-comment__user','setTemplate','bind','userView','isEditable','formatDateTime','Reply...','edit','isRemovable','_createCommentInputView','render','removeButton','ck-comment--edit','ck-comment--remove','ck-comment--','ck-annotation__info-time','mouseleave','ck-annotation__main','ck-comment__info','ck-annotation__content-wrapper','Remove','isEditMode','remove','ck-comment__wrapper','icon','_createEditButton','showConfirm','isConfirm','set','ck-comment','pencil','removeComment','actionIndicator','isEnabled','ck-annotation__actions--hidden','isVisible','then','ck-comment__actions--hidden','visibleView','_model','_attachActions','locale','ck-comment__info-name','editButton','author','execute','label'];(function(_0x43a6dd,_0x38d03e){const _0x3773d1=function(_0x1b541b){while(--_0x1b541b){_0x43a6dd['push'](_0x43a6dd['shift']());}};_0x3773d1(++_0x38d03e);}(_0x38d0,0x180));const _0x3773=function(_0x43a6dd,_0x38d03e){_0x43a6dd=_0x43a6dd-0x0;let _0x3773d1=_0x38d0[_0x43a6dd];return _0x3773d1;};import{mix as _0x27eef6}from'ckeditor5/src/utils';import{ButtonView as _0x685a9e}from'ckeditor5/src/ui';import{icons as _0x116a90}from'ckeditor5/src/core';import{UserView as _0x3863a5,ConfirmMixin as _0x48ae5a}from'ckeditor5-collaboration/src/collaboration-core';import _0x5a149c from'./basecommentview';import _0x3731de from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x4656f7}from'../../../utils/common-translations';export default class R extends _0x5a149c{constructor(_0x1f46d1,_0x49c388,_0x2956ad){super(_0x1f46d1,_0x49c388,_0x2956ad),this[_0x3773('0x2d')](_0x3773('0x31'),null),this['set']('placeholder',_0x4656f7(_0x1f46d1,_0x3773('0x17'))),this['set']('createdAt',null),this[_0x3773('0x13')](_0x3773('0x5'))['to'](_0x49c388),this['editButton']=this[_0x3773('0x2a')](),this[_0x3773('0x1c')]=this[_0x3773('0x2')](),this[_0x3773('0x14')]=new _0x3863a5(_0x1f46d1,_0x49c388[_0x3773('0x3d')]),this[_0x3773('0x14')][_0x3773('0x1')]({'attributes':{'class':[_0x3773('0x11'),_0x3773('0x9')]}}),this[_0x3773('0xc')](_0x49c388,'change:isRemovable',()=>this[_0x3773('0x10')]()),this[_0x3773('0x12')](this['getTemplate']());}['getTemplate'](){const _0x3fccac=this['bindTemplate'];return{'tag':'li','attributes':{'class':[_0x3773('0x28'),_0x3fccac['if'](_0x3773('0x2c'),_0x3773('0x4'))],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':[_0x3773('0x2e'),'ck-annotation',_0x3fccac['if'](_0x3773('0x26'),_0x3773('0x1d')),_0x3fccac['to'](_0x3773('0x31'),_0x20cb09=>_0x20cb09?_0x3773('0x1f')+_0x20cb09:'')],'data-author-id':this['_model'][_0x3773('0x3d')]['id'],'data-comment-id':this['_model']['id']},'children':[this[_0x3773('0x14')],{'tag':'div','attributes':{'class':[_0x3773('0xd'),_0x3773('0x22')]},'children':[{'tag':_0x3773('0x7'),'attributes':{'class':[_0x3773('0x23'),'ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this[_0x3773('0x14')][_0x3773('0x3')]}],'attributes':{'class':[_0x3773('0x3b'),'ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x3fccac['to'](_0x3773('0x5')),'class':[_0x3773('0x0'),_0x3773('0x20')]},'children':[{'text':_0x3fccac['to'](_0x3773('0x5'),_0x59195d=>this['_config'][_0x3773('0x16')](_0x59195d))}]}]},{'tag':_0x3773('0x7'),'attributes':{'class':['ck-comment__actions',_0x3773('0x8'),_0x3fccac['if'](_0x3773('0x26'),_0x3773('0x36')),_0x3fccac['if'](_0x3773('0x26'),_0x3773('0x33'))]},'children':[this[_0x3773('0x3c')],this[_0x3773('0x1c')]]},{'tag':_0x3773('0x7'),'attributes':{'class':[_0x3773('0x24')]},'children':this[_0x3773('0x37')]}]}]}]};}[_0x3773('0x2a')](){const _0x513cc1=new _0x685a9e(this[_0x3773('0x3a')]);return _0x513cc1[_0x3773('0x3f')]=_0x4656f7(this[_0x3773('0x3a')],'Edit'),_0x513cc1[_0x3773('0x29')]=_0x116a90[_0x3773('0x2f')],_0x513cc1[_0x3773('0x1')]({'attributes':{'class':'ck-comment--edit'}}),_0x513cc1['bind']('isEnabled')['to'](this[_0x3773('0x38')],'isReadOnly',_0x25a976=>!_0x25a976),_0x513cc1[_0x3773('0x13')](_0x3773('0x34'))['to'](this['_model'],_0x3773('0x15')),_0x513cc1['on'](_0x3773('0x3e'),()=>this[_0x3773('0xf')]()),_0x513cc1;}[_0x3773('0x2')](){const _0x3e6ce4=new _0x685a9e(this['locale']);return _0x3e6ce4[_0x3773('0x3f')]=_0x4656f7(this[_0x3773('0x3a')],_0x3773('0x25')),_0x3e6ce4[_0x3773('0x29')]=_0x3731de,_0x3e6ce4[_0x3773('0x1')]({'attributes':{'class':_0x3773('0x1e')}}),_0x3e6ce4[_0x3773('0x13')](_0x3773('0x32'))['to'](this['_model'],'isReadOnly',_0x828ba8=>!_0x828ba8),_0x3e6ce4['bind'](_0x3773('0x34'))['to'](this[_0x3773('0x38')],_0x3773('0x19')),_0x3e6ce4['on']('execute',()=>{this[_0x3773('0x2b')](_0x4656f7(this[_0x3773('0x3a')],_0x3773('0x6')),this[_0x3773('0xa')])[_0x3773('0x35')](()=>{this[_0x3773('0xb')](_0x3773('0x30'),this['_model']['id']);});}),_0x3e6ce4;}[_0x3773('0x39')](_0x945ecc,_0x50fbdd){this['listenTo'](_0x945ecc,'mouseenter',()=>this[_0x3773('0x31')]=_0x50fbdd),this[_0x3773('0xc')](_0x945ecc,'focus',()=>this[_0x3773('0x31')]=_0x50fbdd),this[_0x3773('0xc')](_0x945ecc,_0x3773('0x21'),()=>this[_0x3773('0x31')]=null),this[_0x3773('0xc')](_0x945ecc,'blur',()=>this[_0x3773('0x31')]=null);}[_0x3773('0x1a')](){const _0x1f3f21=super[_0x3773('0x1a')]();return _0x1f3f21['bind'](_0x3773('0xe'))['to'](this),_0x1f3f21;}[_0x3773('0x1b')](){super[_0x3773('0x1b')](),this[_0x3773('0x39')](this[_0x3773('0x3c')][_0x3773('0xa')],_0x3773('0x18')),this['_attachActions'](this['removeButton']['element'],_0x3773('0x27'));}}_0x27eef6(R,_0x48ae5a);
package/src/comments.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x47cb=['Comments','pluginName'];(function(_0xe9bf64,_0x47cb46){var _0xe646fc=function(_0x51dc50){while(--_0x51dc50){_0xe9bf64['push'](_0xe9bf64['shift']());}};_0xe646fc(++_0x47cb46);}(_0x47cb,0xa1));var _0xe646=function(_0xe9bf64,_0x47cb46){_0xe9bf64=_0xe9bf64-0x0;var _0xe646fc=_0x47cb[_0xe9bf64];return _0xe646fc;};import{Plugin as _0xf52208}from'ckeditor5/src/core';import _0x5cb3cc from'./comments/commentsrepository';import _0x47ab0a from'./comments/commentsediting';import _0x4d6834 from'./comments/commentsui';import _0xd64a0d from'./commentsonly';import _0x4aae4d from'./annotations/widesidebar';import _0x348547 from'./annotations/narrowsidebar';import _0x23f0c5 from'./annotations/inlineannotations';export default class c extends _0xf52208{static get['requires'](){return[_0x5cb3cc,_0x47ab0a,_0x4d6834,_0xd64a0d,_0x4aae4d,_0x348547,_0x23f0c5];}static get[_0xe646('0x0')](){return _0xe646('0x1');}}
23
+ var _0x3355=['Comments','pluginName','requires'];(function(_0x1db8cf,_0x33552d){var _0x4dd703=function(_0x5468c7){while(--_0x5468c7){_0x1db8cf['push'](_0x1db8cf['shift']());}};_0x4dd703(++_0x33552d);}(_0x3355,0xe0));var _0x4dd7=function(_0x1db8cf,_0x33552d){_0x1db8cf=_0x1db8cf-0x0;var _0x4dd703=_0x3355[_0x1db8cf];return _0x4dd703;};import{Plugin as _0x24e048}from'ckeditor5/src/core';import _0xeb67bc from'./comments/commentsrepository';import _0x15739b from'./comments/commentsediting';import _0x51e817 from'./comments/commentsui';import _0x5dd03d from'./commentsonly';import _0x2ed951 from'./annotations/widesidebar';import _0x208f3a from'./annotations/narrowsidebar';import _0x1ab717 from'./annotations/inlineannotations';export default class c extends _0x24e048{static get[_0x4dd7('0x0')](){return[_0xeb67bc,_0x15739b,_0x51e817,_0x5dd03d,_0x2ed951,_0x208f3a,_0x1ab717];}static get[_0x4dd7('0x2')](){return _0x4dd7('0x1');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3314=['commentsOnlyMode','delete','addCommentThread','listenTo','view','pluginName','highest','get','clipboardInput','requires','editor','afterInit','editing','config','stop','set','clearForceDisabled','commentsOnly','affectsData','change:isEnabled','commands','isEnabled','forceDisabled','CommentsOnly','plugins','document','DragDrop','cut'];(function(_0x1d3cd9,_0x33140e){const _0x84cc91=function(_0x2c6427){while(--_0x2c6427){_0x1d3cd9['push'](_0x1d3cd9['shift']());}};_0x84cc91(++_0x33140e);}(_0x3314,0xde));const _0x84cc=function(_0x1d3cd9,_0x33140e){_0x1d3cd9=_0x1d3cd9-0x0;let _0x84cc91=_0x3314[_0x1d3cd9];return _0x84cc91;};import{Plugin as _0x3efed5}from'ckeditor5/src/core';import _0x571ab4 from'./comments/commentsediting';export default class e extends _0x3efed5{static get[_0x84cc('0x7')](){return _0x84cc('0x19');}static get[_0x84cc('0xb')](){return[_0x571ab4];}constructor(_0x410184){super(_0x410184),this[_0x84cc('0x11')]('isEnabled',null),this['on'](_0x84cc('0x15'),(_0x26208e,_0x412ef1,_0x3daf3f)=>{_0x3daf3f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}[_0x84cc('0xd')](){null===this[_0x84cc('0x17')]&&(this[_0x84cc('0x17')]=!!this[_0x84cc('0xc')][_0x84cc('0xf')][_0x84cc('0x9')](_0x84cc('0x13')));}['_enableCommentsOnlyMode'](){for(const [_0x195cd3,_0x34ed44]of this[_0x84cc('0xc')]['commands'])_0x34ed44[_0x84cc('0x14')]&&_0x84cc('0x4')!==_0x195cd3&&_0x34ed44[_0x84cc('0x18')](_0x84cc('0x2'));this[_0x84cc('0xc')]['plugins']['has']('DragDrop')&&this['editor'][_0x84cc('0x1a')][_0x84cc('0x9')](_0x84cc('0x0'))[_0x84cc('0x18')]('commentsOnlyMode');const _0x5403de=this[_0x84cc('0xc')][_0x84cc('0xe')][_0x84cc('0x6')]['document'];this[_0x84cc('0x5')](_0x5403de,_0x84cc('0x1'),_0x59d969=>_0x59d969[_0x84cc('0x10')](),{'priority':'highest'}),this[_0x84cc('0x5')](_0x5403de,_0x84cc('0xa'),_0x4f4563=>_0x4f4563[_0x84cc('0x10')](),{'priority':_0x84cc('0x8')}),this['listenTo'](_0x5403de,_0x84cc('0x3'),_0x3fbad5=>_0x3fbad5[_0x84cc('0x10')](),{'priority':_0x84cc('0x8')});}['_disableCommentsOnlyMode'](){for(const [_0x9d9766,_0x2224ee]of this[_0x84cc('0xc')][_0x84cc('0x16')])_0x2224ee[_0x84cc('0x14')]&&_0x84cc('0x4')!==_0x9d9766&&_0x2224ee[_0x84cc('0x12')](_0x84cc('0x2'));this['stopListening'](this['editor'][_0x84cc('0xe')]['view'][_0x84cc('0x1b')]);}}
23
+ const _0x5879=['get','config','clearForceDisabled','plugins','_disableCommentsOnlyMode','listenTo','affectsData','view','commentsOnly','addCommentThread','document','set','stopListening','forceDisabled','commentsOnlyMode','editor','editing','isEnabled','commands','highest','has','requires','_enableCommentsOnlyMode','stop','cut'];(function(_0x7c1826,_0x587939){const _0x40e8a3=function(_0x396bfd){while(--_0x396bfd){_0x7c1826['push'](_0x7c1826['shift']());}};_0x40e8a3(++_0x587939);}(_0x5879,0x84));const _0x40e8=function(_0x7c1826,_0x587939){_0x7c1826=_0x7c1826-0x0;let _0x40e8a3=_0x5879[_0x7c1826];return _0x40e8a3;};import{Plugin as _0x4d0f1f}from'ckeditor5/src/core';import _0x43173d from'./comments/commentsediting';export default class e extends _0x4d0f1f{static get['pluginName'](){return'CommentsOnly';}static get[_0x40e8('0xe')](){return[_0x43173d];}constructor(_0x38a4f2){super(_0x38a4f2),this[_0x40e8('0x4')]('isEnabled',null),this['on']('change:isEnabled',(_0x345d92,_0x155712,_0x2215c8)=>{_0x2215c8?this[_0x40e8('0xf')]():this[_0x40e8('0x16')]();});}['afterInit'](){null===this[_0x40e8('0xa')]&&(this['isEnabled']=!!this[_0x40e8('0x8')][_0x40e8('0x13')][_0x40e8('0x12')](_0x40e8('0x1')));}['_enableCommentsOnlyMode'](){for(const [_0x438816,_0x26dbd7]of this[_0x40e8('0x8')][_0x40e8('0xb')])_0x26dbd7[_0x40e8('0x18')]&&_0x40e8('0x2')!==_0x438816&&_0x26dbd7[_0x40e8('0x6')](_0x40e8('0x7'));this['editor'][_0x40e8('0x15')][_0x40e8('0xd')]('DragDrop')&&this[_0x40e8('0x8')][_0x40e8('0x15')][_0x40e8('0x12')]('DragDrop')['forceDisabled'](_0x40e8('0x7'));const _0x1b3148=this['editor'][_0x40e8('0x9')]['view']['document'];this[_0x40e8('0x17')](_0x1b3148,_0x40e8('0x11'),_0xd70501=>_0xd70501[_0x40e8('0x10')](),{'priority':'highest'}),this[_0x40e8('0x17')](_0x1b3148,'clipboardInput',_0x31794f=>_0x31794f[_0x40e8('0x10')](),{'priority':_0x40e8('0xc')}),this[_0x40e8('0x17')](_0x1b3148,'delete',_0x5a6a96=>_0x5a6a96['stop'](),{'priority':_0x40e8('0xc')});}[_0x40e8('0x16')](){for(const [_0x5c34ed,_0x25f653]of this['editor']['commands'])_0x25f653[_0x40e8('0x18')]&&_0x40e8('0x2')!==_0x5c34ed&&_0x25f653[_0x40e8('0x14')](_0x40e8('0x7'));this[_0x40e8('0x5')](this[_0x40e8('0x8')][_0x40e8('0x9')][_0x40e8('0x0')][_0x40e8('0x3')]);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x263b39,_0xcd0479){const t=_0x263b39['t'];if('PENDING_ACTION_COMMENT_THREAD'==_0xcd0479)return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});}
23
+ export function getTranslation(_0x2ac5fd,_0x1c07f9,_0x318695){const t=_0x2ac5fd['t'];switch(_0x1c07f9){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Remove':return t('Remove');case'Submit':return t('Submit');case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x318695);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x318695);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x7808=['type','childList','observe','disconnect','attributeName','attributes'];(function(_0x167f8b,_0x7808f3){const _0x194aa4=function(_0x36985d){while(--_0x36985d){_0x167f8b['push'](_0x167f8b['shift']());}};_0x194aa4(++_0x7808f3);}(_0x7808,0xc2));const _0x194a=function(_0x167f8b,_0x7808f3){_0x167f8b=_0x167f8b-0x0;let _0x194aa4=_0x7808[_0x167f8b];return _0x194aa4;};import{throttle as _0x14e8c7}from'lodash-es';export default function ut(_0x266595){const _0x294357=_0x14e8c7(_0x266595,0x1e),_0xb9acf=new MutationObserver(_0x4b565e=>{for(const _0x2251ff of _0x4b565e)(_0x194a('0x3')==_0x2251ff['type']&&'class'==_0x2251ff[_0x194a('0x2')]||_0x194a('0x5')==_0x2251ff[_0x194a('0x4')])&&_0x294357();});return{'attach'(_0x110746){_0xb9acf[_0x194a('0x0')](_0x110746,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0});},'detach'(){_0xb9acf[_0x194a('0x1')](),_0x294357['cancel']();}};}
23
+ const _0x1cfe=['disconnect','attributeName','class','cancel','attributes','type'];(function(_0x280552,_0x1cfee4){const _0x795e7b=function(_0x2e817e){while(--_0x2e817e){_0x280552['push'](_0x280552['shift']());}};_0x795e7b(++_0x1cfee4);}(_0x1cfe,0x10c));const _0x795e=function(_0x280552,_0x1cfee4){_0x280552=_0x280552-0x0;let _0x795e7b=_0x1cfe[_0x280552];return _0x795e7b;};import{throttle as _0x2825e2}from'lodash-es';export default function ut(_0x16d61e){const _0x24aa2=_0x2825e2(_0x16d61e,0x1e),_0x5052a4=new MutationObserver(_0x43f2a9=>{for(const _0x1573b6 of _0x43f2a9)(_0x795e('0x0')==_0x1573b6[_0x795e('0x1')]&&_0x795e('0x4')==_0x1573b6[_0x795e('0x3')]||'childList'==_0x1573b6[_0x795e('0x1')])&&_0x24aa2();});return{'attach'(_0x276237){_0x5052a4['observe'](_0x276237,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0});},'detach'(){_0x5052a4[_0x795e('0x2')](),_0x24aa2[_0x795e('0x5')]();}};}