@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
24 lines • 11.8 kB
JavaScript
/*
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x16821e=_0x149d;(function(_0x41ac02,_0x1f6784){const _0x22baf0=_0x149d,_0x4a1c16=_0x41ac02();while(!![]){try{const _0x280d70=-parseInt(_0x22baf0(0x15a))/0x1*(-parseInt(_0x22baf0(0x128))/0x2)+-parseInt(_0x22baf0(0x152))/0x3*(parseInt(_0x22baf0(0x11e))/0x4)+-parseInt(_0x22baf0(0x172))/0x5+-parseInt(_0x22baf0(0x145))/0x6+-parseInt(_0x22baf0(0x17b))/0x7+parseInt(_0x22baf0(0x17e))/0x8+-parseInt(_0x22baf0(0x182))/0x9*(-parseInt(_0x22baf0(0x14b))/0xa);if(_0x280d70===_0x1f6784)break;else _0x4a1c16['push'](_0x4a1c16['shift']());}catch(_0x2dd846){_0x4a1c16['push'](_0x4a1c16['shift']());}}}(_0xf78d,0xe719d));import{IconRemoveComment as _0x46c9c3,IconPencil as _0x18598e,IconThreeVerticalDots as _0x4884f3}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a2fff,createDropdown as _0x20b63a,ListView as _0x1eabfa,ListItemView as _0x45230f,focusChildOnDropdownOpen as _0x21c79b}from'ckeditor5/src/ui.js';import{UserView as _0x3e93e8,ConfirmMixin as _0x282330,LateFocusDropdownButtonView as _0x4d5306}from'ckeditor5-collaboration/src/collaboration-core.js';import{BaseCommentView as _0x12e922}from'./basecommentview.js';import{getTranslation as _0x3d18ec}from'../../../utils/common-translations.js';function _0x149d(_0x278b62,_0x59c00a){const _0xf78da4=_0xf78d();return _0x149d=function(_0x149d89,_0x24dde5){_0x149d89=_0x149d89-0x11d;let _0x2c98bf=_0xf78da4[_0x149d89];return _0x2c98bf;},_0x149d(_0x278b62,_0x59c00a);}export class CommentView extends/* #__PURE__ -- */
_0x282330(_0x12e922){[_0x16821e(0x147)];[_0x16821e(0x14d)];constructor(_0x3427c9,_0x1179f8,_0x20ba47){const _0x52ca54=_0x16821e;super(_0x3427c9,_0x1179f8,_0x20ba47),this[_0x52ca54(0x167)](_0x52ca54(0x187),null),this[_0x52ca54(0x167)](_0x52ca54(0x12f),_0x3d18ec(_0x3427c9,_0x52ca54(0x15e))),this[_0x52ca54(0x150)](_0x52ca54(0x16c))['to'](_0x1179f8),this[_0x52ca54(0x150)](_0x52ca54(0x186))['to'](_0x1179f8),this[_0x52ca54(0x147)]=this[_0x52ca54(0x15f)](),this[_0x52ca54(0x139)]||(this[_0x52ca54(0x151)]=this[_0x52ca54(0x154)](),this[_0x52ca54(0x132)]=this[_0x52ca54(0x13a)](),this[_0x52ca54(0x134)]=this[_0x52ca54(0x15f)](),this[_0x52ca54(0x134)][_0x52ca54(0x16d)]([this[_0x52ca54(0x151)],this[_0x52ca54(0x132)]]),this[_0x52ca54(0x120)]=this[_0x52ca54(0x129)](),this[_0x52ca54(0x147)][_0x52ca54(0x169)](this[_0x52ca54(0x120)]),this[_0x52ca54(0x13b)][_0x52ca54(0x169)](this[_0x52ca54(0x120)])),this[_0x52ca54(0x14d)]=new _0x3e93e8(_0x3427c9,_0x1179f8[_0x52ca54(0x181)],this[_0x52ca54(0x159)]()),this[_0x52ca54(0x14d)][_0x52ca54(0x175)]({'attributes':{'class':[_0x52ca54(0x158),_0x52ca54(0x192)],'aria-hidden':!0x0}}),this[_0x52ca54(0x164)](_0x1179f8,_0x52ca54(0x143),()=>this[_0x52ca54(0x15c)]()),this[_0x52ca54(0x13d)](this[_0x52ca54(0x13f)]());}[_0x16821e(0x13f)](){const _0x3e1c83=_0x16821e,_0x149107=this[_0x3e1c83(0x16f)],_0x5a9287=[{'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x15d),_0x3e1c83(0x177)]},'children':[{'tag':_0x3e1c83(0x12d),'children':[{'text':this[_0x3e1c83(0x14d)][_0x3e1c83(0x149)]}],'attributes':{'class':[_0x3e1c83(0x18a),_0x3e1c83(0x176)],'data-cke-tooltip-text':this[_0x3e1c83(0x14d)][_0x3e1c83(0x149)]}},{'tag':_0x3e1c83(0x12b),'attributes':{'datetime':_0x149107['to'](_0x3e1c83(0x16c)),'class':[_0x3e1c83(0x161),_0x3e1c83(0x133)]},'children':[{'text':_0x149107['to'](_0x3e1c83(0x16c),_0x23ed6b=>this[_0x3e1c83(0x11d)][_0x3e1c83(0x123)](_0x23ed6b))}]}]},{'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x188),_0x3e1c83(0x183),_0x149107['if'](_0x3e1c83(0x18b),_0x3e1c83(0x14f)),_0x149107['if'](_0x3e1c83(0x18b),_0x3e1c83(0x155))]},'children':this[_0x3e1c83(0x147)]},{'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x185)]},'children':this[_0x3e1c83(0x144)]},this[_0x3e1c83(0x189)]];return this[_0x3e1c83(0x156)][_0x3e1c83(0x137)]&&_0x5a9287[_0x3e1c83(0x12c)]({'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x130)]},'children':[{'text':this[_0x3e1c83(0x12a)]()}]}),{'tag':'li','attributes':{'class':[_0x3e1c83(0x166)],'tabindex':-0x1,'aria-label':_0x149107['to'](_0x3e1c83(0x124)),'aria-describedby':this[_0x3e1c83(0x189)]['id'],'role':_0x3e1c83(0x165)},'children':[{'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x179),_0x3e1c83(0x18f),_0x149107['if'](_0x3e1c83(0x18b),_0x3e1c83(0x17f)),_0x149107['if'](_0x3e1c83(0x139),_0x3e1c83(0x157)),_0x149107['to'](_0x3e1c83(0x187),_0x448d25=>_0x448d25?_0x3e1c83(0x127)+_0x448d25:'')],'data-author-id':this[_0x3e1c83(0x156)][_0x3e1c83(0x181)]['id'],'data-comment-id':this[_0x3e1c83(0x156)]['id'],'role':_0x3e1c83(0x15b)},'children':[this[_0x3e1c83(0x14d)],{'tag':_0x3e1c83(0x138),'attributes':{'class':[_0x3e1c83(0x162),_0x3e1c83(0x163)]},'children':_0x5a9287}]}]};}[_0x16821e(0x154)](){const _0x57b00f=_0x16821e,_0x5993ea=new _0x3a2fff(this[_0x57b00f(0x18e)]);return _0x5993ea[_0x57b00f(0x135)]=_0x3d18ec(this[_0x57b00f(0x18e)],_0x57b00f(0x141)),_0x5993ea[_0x57b00f(0x171)]=_0x18598e,_0x5993ea[_0x57b00f(0x146)]=!0x0,_0x5993ea[_0x57b00f(0x175)]({'attributes':{'class':_0x57b00f(0x17f)}}),_0x5993ea[_0x57b00f(0x150)](_0x57b00f(0x13c))['to'](this[_0x57b00f(0x156)],_0x57b00f(0x126),_0x31d102=>!_0x31d102),_0x5993ea[_0x57b00f(0x150)](_0x57b00f(0x13e))['to'](this[_0x57b00f(0x156)],_0x57b00f(0x160)),_0x5993ea['on'](_0x57b00f(0x17d),()=>this[_0x57b00f(0x170)]()),_0x5993ea;}[_0x16821e(0x13a)](){const _0x472744=_0x16821e,_0x4cf399=new _0x3a2fff(this[_0x472744(0x18e)]);return _0x4cf399[_0x472744(0x135)]=_0x3d18ec(this[_0x472744(0x18e)],_0x472744(0x140)),_0x4cf399[_0x472744(0x171)]=_0x46c9c3,_0x4cf399[_0x472744(0x146)]=!0x0,_0x4cf399[_0x472744(0x175)]({'attributes':{'class':_0x472744(0x12e)}}),_0x4cf399[_0x472744(0x150)](_0x472744(0x13c))['to'](this[_0x472744(0x156)],_0x472744(0x126),_0x577eac=>!_0x577eac),_0x4cf399[_0x472744(0x150)](_0x472744(0x13e))['to'](this[_0x472744(0x156)],_0x472744(0x121)),_0x4cf399['on'](_0x472744(0x17d),()=>{const _0x212394=_0x472744;this[_0x212394(0x18d)](_0x3d18ec(this[_0x212394(0x18e)],_0x212394(0x142)),this[_0x212394(0x122)])[_0x212394(0x174)](()=>{const _0x5cf20f=_0x212394;this[_0x5cf20f(0x14e)](_0x5cf20f(0x184),this[_0x5cf20f(0x156)]['id']);});}),_0x4cf399;}[_0x16821e(0x129)](){const _0x57cbd5=_0x16821e,_0x2454f4=_0x20b63a(this[_0x57cbd5(0x18e)],_0x4d5306),_0xb530b2=_0x2454f4[_0x57cbd5(0x131)][_0x57cbd5(0x16e)],_0x2f22ab=new _0x1eabfa(this[_0x57cbd5(0x18e)]),_0x41d95c=_0x2454f4[_0x57cbd5(0x16f)];_0x21c79b(_0x2454f4,()=>this[_0x57cbd5(0x134)][_0x57cbd5(0x178)](_0x4d7282=>_0x4d7282[_0x57cbd5(0x13e)])),_0x2454f4[_0x57cbd5(0x175)]({'attributes':{'class':[_0x41d95c['if'](_0x57cbd5(0x13e),_0x57cbd5(0x168),_0x226d5d=>!_0x226d5d)]}});const _0x4edd53=(_0x5d30c8,_0x1e6f7a=-0x1)=>{const _0x240153=_0x57cbd5,_0x1e80ae=new _0x45230f(this[_0x240153(0x18e)]);_0x1e80ae[_0x240153(0x16e)][_0x240153(0x169)](_0x5d30c8);const _0x2de169=_0x1e6f7a>-0x1?_0x1e6f7a:_0x2f22ab[_0x240153(0x134)][_0x240153(0x125)];_0x2f22ab[_0x240153(0x134)][_0x240153(0x169)](_0x1e80ae,_0x2de169);const _0x162e77=Array[_0x240153(0x190)](this[_0x240153(0x134)]);_0x2454f4[_0x240153(0x153)](_0x240153(0x13c),_0x240153(0x13e)),_0x2454f4[_0x240153(0x150)](_0x240153(0x13c))[_0x240153(0x14c)](_0x162e77,_0x240153(0x13c),(..._0x475f53)=>_0x475f53[_0x240153(0x11f)](_0x42a17b=>_0x42a17b)),_0x2454f4[_0x240153(0x150)](_0x240153(0x13e))[_0x240153(0x14c)](_0x162e77,_0x240153(0x13e),(..._0x5aafd8)=>_0x5aafd8[_0x240153(0x11f)](_0x4c3066=>_0x4c3066));};_0x2454f4[_0x57cbd5(0x17a)]='sw',_0x2454f4[_0x57cbd5(0x16b)][_0x57cbd5(0x167)]({'label':_0x3d18ec(this[_0x57cbd5(0x18e)],_0x57cbd5(0x17c)),'icon':_0x4884f3});for(const _0x17eb41 of this[_0x57cbd5(0x134)])_0x4edd53(_0x17eb41);return _0xb530b2[_0x57cbd5(0x169)](_0x2f22ab),_0x2454f4[_0x57cbd5(0x164)](this[_0x57cbd5(0x134)],_0x57cbd5(0x169),(_0x5b252f,_0x231688,_0x388c78)=>{_0x4edd53(_0x231688,_0x388c78);}),_0x2454f4[_0x57cbd5(0x164)](this[_0x57cbd5(0x134)],_0x57cbd5(0x16a),(_0x22dca1,_0x4ed15d,_0x25c839)=>{const _0x5634f=_0x57cbd5;_0x2f22ab[_0x5634f(0x134)][_0x5634f(0x16a)](_0x25c839);}),_0x2454f4;}[_0x16821e(0x14a)](_0x3268e6,_0x20e49f){const _0x1c7e34=_0x16821e,_0x24927a=_0x3268e6&&_0x3268e6[_0x1c7e34(0x122)];_0x24927a&&(this[_0x1c7e34(0x164)](_0x24927a,_0x1c7e34(0x173),()=>this[_0x1c7e34(0x187)]=_0x20e49f),this[_0x1c7e34(0x164)](_0x24927a,_0x1c7e34(0x191),()=>this[_0x1c7e34(0x187)]=_0x20e49f),this[_0x1c7e34(0x164)](_0x24927a,_0x1c7e34(0x136),()=>this[_0x1c7e34(0x187)]=null),this[_0x1c7e34(0x164)](_0x24927a,_0x1c7e34(0x193),()=>this[_0x1c7e34(0x187)]=null));}[_0x16821e(0x18c)](){const _0x40bff9=_0x16821e,_0x4e8840=super[_0x40bff9(0x18c)]();return _0x4e8840[_0x40bff9(0x150)](_0x40bff9(0x12f))['to'](this),_0x4e8840;}[_0x16821e(0x180)](){const _0x2df4f8=_0x16821e;super[_0x2df4f8(0x180)](),this[_0x2df4f8(0x14a)](this[_0x2df4f8(0x151)],_0x2df4f8(0x148)),this[_0x2df4f8(0x14a)](this[_0x2df4f8(0x132)],_0x2df4f8(0x16a));}}function _0xf78d(){const _0x3d429c=['set','ck-hidden','add','remove','buttonView','authoredAt','addMany','children','bindTemplate','switchToEditMode','icon','6694270yXlOpm','mouseenter','then','extendTemplate','ck-annotation__info-name','ck-annotation__info','find','ck-comment','panelPosition','4373012CnPQUG','Show\x20more\x20items','execute','11958536BcDoHW','ck-comment--edit','render','author','9tVvPoC','ck-annotation__actions','removeComment','ck-annotation__content-wrapper','resolvedAt','actionIndicator','ck-comment__actions','ariaDescriptionView','ck-comment__info-name','isEditMode','_createCommentInputView','showConfirm','locale','ck-annotation','from','focus','ck-annotation__user','blur','_config','20CfkJRM','some','dropdown','isRemovable','element','formatDateTime','ariaLabel','length','isReadOnly','ck-comment--','330HUoSnL','_createDropdown','getExternalCommentNote','time','push','span','ck-comment--remove','placeholder','ck-comment__external','panelView','removeButton','ck-annotation__info-time','items','label','mouseleave','isExternal','div','isSystemComment','_createRemoveButton','focusables','isEnabled','setTemplate','isVisible','getTemplate','Remove','Edit','Delete\x20comment?','change:isRemovable','visibleView','1862580shbEdN','withText','actionBar','edit','name','_attachActions','305170JpgSwG','toMany','userView','fire','ck-comment__actions--hidden','bind','editButton','58779tTdiwd','unbind','_createEditButton','ck-annotation__actions--hidden','_model','ck-comment--info','ck-comment__user','getUserViewNotificationText','10868DVWTtI','group','cancelConfirm','ck-comment__info','Reply...','createCollection','isEditable','ck-comment__info-time','ck-comment__main','ck-annotation__main','listenTo','listitem','ck-comment__wrapper'];_0xf78d=function(){return _0x3d429c;};return _0xf78d();}