@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
24 lines • 11.9 kB
JavaScript
/*
* Copyright (c) 2003-2025, 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 _0x410657=_0x2d5b;(function(_0x1b3068,_0x58aff4){const _0x12540d=_0x2d5b,_0x3340c0=_0x1b3068();while(!![]){try{const _0x16418f=-parseInt(_0x12540d(0x246))/0x1+-parseInt(_0x12540d(0x23c))/0x2+-parseInt(_0x12540d(0x20d))/0x3*(parseInt(_0x12540d(0x251))/0x4)+parseInt(_0x12540d(0x25c))/0x5+parseInt(_0x12540d(0x201))/0x6*(parseInt(_0x12540d(0x205))/0x7)+parseInt(_0x12540d(0x221))/0x8+parseInt(_0x12540d(0x214))/0x9*(parseInt(_0x12540d(0x224))/0xa);if(_0x16418f===_0x58aff4)break;else _0x3340c0['push'](_0x3340c0['shift']());}catch(_0x1973e8){_0x3340c0['push'](_0x3340c0['shift']());}}}(_0x3730,0x94d37));function _0x2d5b(_0x8fdae9,_0x301600){const _0x37307a=_0x3730();return _0x2d5b=function(_0x2d5bb3,_0xdae0f2){_0x2d5bb3=_0x2d5bb3-0x1eb;let _0x21a1c7=_0x37307a[_0x2d5bb3];return _0x21a1c7;},_0x2d5b(_0x8fdae9,_0x301600);}import{IconRemoveComment as _0x2b0d75,IconPencil as _0x415073,IconThreeVerticalDots as _0x5a6980}from'ckeditor5/src/icons.js';import{ButtonView as _0x32e9c9,createDropdown as _0x417841,ListView as _0x438a90,ListItemView as _0x49951b,focusChildOnDropdownOpen as _0x7a839}from'ckeditor5/src/ui.js';import{UserView as _0x41c470,ConfirmMixin as _0x4bb69f,LateFocusDropdownButtonView as _0x48a01a}from'ckeditor5-collaboration/src/collaboration-core.js';import{BaseCommentView as _0x23bd5d}from'./basecommentview.js';function _0x3730(){const _0x3057f2=['edit','ck-annotation__main','setTemplate','ck-comment__actions','push','bind','ariaLabel','toMany','icon','isConfirm','isVisible','isSystemComment','name','750WJMbGB','ck-comment__wrapper','Show\x20more\x20items','blur','28490ZiRHXr','dropdown','resolvedAt','removeButton','placeholder','ck-annotation__actions--hidden','ck-annotation__actions','ck-comment--','153GjRGex','from','items','isEnabled','render','_createEditButton','ck-comment__main','898659uUsvwe','isExternal','ck-comment__info-time','mouseenter','group','_attachActions','then','add','isEditMode','set','ck-hidden','ck-comment__actions--hidden','change:isRemovable','8865296ugenGU','_createCommentInputView','Delete\x20comment?','70MQJZpE','ck-comment__external','label','createCollection','_createDropdown','ck-comment__info','listitem','isRemovable','focusables','find','authoredAt','showConfirm','ck-comment--edit','children','unbind','isEditable','ck-comment--info','ariaDescriptionView','_createRemoveButton','ck-annotation__info','fire','locale','ck-annotation__info-name','addMany','1828988WdMgfY','_model','Remove','switchToEditMode','removeComment','panelView','Edit','time','ck-comment__user','ck-annotation__info-time','1156672ZVPMyU','_config','ck-annotation__user','ck-comment--remove-confirmation','element','div','bindTemplate','ck-annotation','some','userView','actionBar','58308jljKdv','visibleView','execute','length','focus','extendTemplate','ck-comment__info-name','getTemplate','withText','isReadOnly','ck-annotation__content-wrapper','5541575FozXBN','ck-comment','remove','buttonView','formatDateTime','listenTo','ck-comment--remove','mouseleave','actionIndicator','getUserViewNotificationText','editButton','panelPosition','cancelConfirm','span','Reply...','author','getExternalCommentNote'];_0x3730=function(){return _0x3057f2;};return _0x3730();}import{getTranslation as _0x6fcef5}from'../../../utils/common-translations.js';export class CommentView extends/* #__PURE__ -- */
_0x4bb69f(_0x23bd5d){[_0x410657(0x250)];[_0x410657(0x24f)];constructor(_0x5ae0a8,_0x56f3aa,_0x3bb98e){const _0x137b86=_0x410657;super(_0x5ae0a8,_0x56f3aa,_0x3bb98e),this[_0x137b86(0x21d)](_0x137b86(0x1eb),null),this[_0x137b86(0x21d)](_0x137b86(0x209),_0x6fcef5(_0x5ae0a8,_0x137b86(0x1f1))),this[_0x137b86(0x1f9)](_0x137b86(0x22e))['to'](_0x56f3aa),this[_0x137b86(0x1f9)](_0x137b86(0x207))['to'](_0x56f3aa),this[_0x137b86(0x250)]=this[_0x137b86(0x227)](),this[_0x137b86(0x1ff)]||(this[_0x137b86(0x1ed)]=this[_0x137b86(0x212)](),this[_0x137b86(0x208)]=this[_0x137b86(0x236)](),this[_0x137b86(0x20f)]=this[_0x137b86(0x227)](),this[_0x137b86(0x20f)][_0x137b86(0x23b)]([this[_0x137b86(0x1ed)],this[_0x137b86(0x208)]]),this[_0x137b86(0x206)]=this[_0x137b86(0x228)](),this[_0x137b86(0x250)][_0x137b86(0x21b)](this[_0x137b86(0x206)]),this[_0x137b86(0x22c)][_0x137b86(0x21b)](this[_0x137b86(0x206)])),this[_0x137b86(0x24f)]=new _0x41c470(_0x5ae0a8,_0x56f3aa[_0x137b86(0x1f2)],this[_0x137b86(0x1ec)]()),this[_0x137b86(0x24f)][_0x137b86(0x256)]({'attributes':{'class':[_0x137b86(0x244),_0x137b86(0x248)],'aria-hidden':!0x0}}),this[_0x137b86(0x261)](_0x56f3aa,_0x137b86(0x220),()=>this[_0x137b86(0x1ef)]()),this[_0x137b86(0x1f6)](this[_0x137b86(0x258)]());}[_0x410657(0x258)](){const _0x3b33ce=_0x410657,_0x27c84d=this[_0x3b33ce(0x24c)],_0x50c088=[{'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x229),_0x3b33ce(0x237)]},'children':[{'tag':_0x3b33ce(0x1f0),'children':[{'text':this[_0x3b33ce(0x24f)][_0x3b33ce(0x200)]}],'attributes':{'class':[_0x3b33ce(0x257),_0x3b33ce(0x23a)],'data-cke-tooltip-text':this[_0x3b33ce(0x24f)][_0x3b33ce(0x200)]}},{'tag':_0x3b33ce(0x243),'attributes':{'datetime':_0x27c84d['to'](_0x3b33ce(0x22e)),'class':[_0x3b33ce(0x216),_0x3b33ce(0x245)]},'children':[{'text':_0x27c84d['to'](_0x3b33ce(0x22e),_0x3bb6af=>this[_0x3b33ce(0x247)][_0x3b33ce(0x260)](_0x3bb6af))}]}]},{'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x1f7),_0x3b33ce(0x20b),_0x27c84d['if'](_0x3b33ce(0x21c),_0x3b33ce(0x21f)),_0x27c84d['if'](_0x3b33ce(0x21c),_0x3b33ce(0x20a))]},'children':this[_0x3b33ce(0x250)]},{'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x25b)]},'children':this[_0x3b33ce(0x252)]},this[_0x3b33ce(0x235)]];return this[_0x3b33ce(0x23d)][_0x3b33ce(0x215)]&&_0x50c088[_0x3b33ce(0x1f8)]({'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x225)]},'children':[{'text':this[_0x3b33ce(0x1f3)]()}]}),{'tag':'li','attributes':{'class':[_0x3b33ce(0x202),_0x27c84d['if'](_0x3b33ce(0x1fd),_0x3b33ce(0x249))],'tabindex':-0x1,'aria-label':_0x27c84d['to'](_0x3b33ce(0x1fa)),'aria-describedby':this[_0x3b33ce(0x235)]['id'],'role':_0x3b33ce(0x22a)},'children':[{'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x25d),_0x3b33ce(0x24d),_0x27c84d['if'](_0x3b33ce(0x21c),_0x3b33ce(0x230)),_0x27c84d['if'](_0x3b33ce(0x1ff),_0x3b33ce(0x234)),_0x27c84d['to'](_0x3b33ce(0x1eb),_0x510787=>_0x510787?_0x3b33ce(0x20c)+_0x510787:'')],'data-author-id':this[_0x3b33ce(0x23d)][_0x3b33ce(0x1f2)]['id'],'data-comment-id':this[_0x3b33ce(0x23d)]['id'],'role':_0x3b33ce(0x218)},'children':[this[_0x3b33ce(0x24f)],{'tag':_0x3b33ce(0x24b),'attributes':{'class':[_0x3b33ce(0x213),_0x3b33ce(0x1f5)]},'children':_0x50c088}]}]};}[_0x410657(0x212)](){const _0x18980f=_0x410657,_0x12f88b=new _0x32e9c9(this[_0x18980f(0x239)]);return _0x12f88b[_0x18980f(0x226)]=_0x6fcef5(this[_0x18980f(0x239)],_0x18980f(0x242)),_0x12f88b[_0x18980f(0x1fc)]=_0x415073,_0x12f88b[_0x18980f(0x259)]=!0x0,_0x12f88b[_0x18980f(0x256)]({'attributes':{'class':_0x18980f(0x230)}}),_0x12f88b[_0x18980f(0x1f9)](_0x18980f(0x210))['to'](this[_0x18980f(0x23d)],_0x18980f(0x25a),_0x491012=>!_0x491012),_0x12f88b[_0x18980f(0x1f9)](_0x18980f(0x1fe))['to'](this[_0x18980f(0x23d)],_0x18980f(0x233)),_0x12f88b['on'](_0x18980f(0x253),()=>this[_0x18980f(0x23f)]()),_0x12f88b;}[_0x410657(0x236)](){const _0x354139=_0x410657,_0x422777=new _0x32e9c9(this[_0x354139(0x239)]);return _0x422777[_0x354139(0x226)]=_0x6fcef5(this[_0x354139(0x239)],_0x354139(0x23e)),_0x422777[_0x354139(0x1fc)]=_0x2b0d75,_0x422777[_0x354139(0x259)]=!0x0,_0x422777[_0x354139(0x256)]({'attributes':{'class':_0x354139(0x262)}}),_0x422777[_0x354139(0x1f9)](_0x354139(0x210))['to'](this[_0x354139(0x23d)],_0x354139(0x25a),_0x32ac17=>!_0x32ac17),_0x422777[_0x354139(0x1f9)](_0x354139(0x1fe))['to'](this[_0x354139(0x23d)],_0x354139(0x22b)),_0x422777['on'](_0x354139(0x253),()=>{const _0x431a07=_0x354139;this[_0x431a07(0x22f)](_0x6fcef5(this[_0x431a07(0x239)],_0x431a07(0x223)),this[_0x431a07(0x24a)])[_0x431a07(0x21a)](()=>{const _0x3e7dfc=_0x431a07;this[_0x3e7dfc(0x238)](_0x3e7dfc(0x240),this[_0x3e7dfc(0x23d)]['id']);});}),_0x422777;}[_0x410657(0x228)](){const _0x2e08c3=_0x410657,_0x192505=_0x417841(this[_0x2e08c3(0x239)],_0x48a01a),_0x28f76e=_0x192505[_0x2e08c3(0x241)][_0x2e08c3(0x231)],_0x5b6385=new _0x438a90(this[_0x2e08c3(0x239)]),_0x18cb58=_0x192505[_0x2e08c3(0x24c)];_0x7a839(_0x192505,()=>this[_0x2e08c3(0x20f)][_0x2e08c3(0x22d)](_0x1693b7=>_0x1693b7[_0x2e08c3(0x1fe)])),_0x192505[_0x2e08c3(0x256)]({'attributes':{'class':[_0x18cb58['if'](_0x2e08c3(0x1fe),_0x2e08c3(0x21e),_0xc214f5=>!_0xc214f5)]}});const _0x4cf5bb=(_0x2c99e7,_0x4db83d=-0x1)=>{const _0x1deaf7=_0x2e08c3,_0x1938c5=new _0x49951b(this[_0x1deaf7(0x239)]);_0x1938c5[_0x1deaf7(0x231)][_0x1deaf7(0x21b)](_0x2c99e7);const _0xe54d82=_0x4db83d>-0x1?_0x4db83d:_0x5b6385[_0x1deaf7(0x20f)][_0x1deaf7(0x254)];_0x5b6385[_0x1deaf7(0x20f)][_0x1deaf7(0x21b)](_0x1938c5,_0xe54d82);const _0x41d781=Array[_0x1deaf7(0x20e)](this[_0x1deaf7(0x20f)]);_0x192505[_0x1deaf7(0x232)](_0x1deaf7(0x210),_0x1deaf7(0x1fe)),_0x192505[_0x1deaf7(0x1f9)](_0x1deaf7(0x210))[_0x1deaf7(0x1fb)](_0x41d781,_0x1deaf7(0x210),(..._0x312ec5)=>_0x312ec5[_0x1deaf7(0x24e)](_0x491f7f=>_0x491f7f)),_0x192505[_0x1deaf7(0x1f9)](_0x1deaf7(0x1fe))[_0x1deaf7(0x1fb)](_0x41d781,_0x1deaf7(0x1fe),(..._0x41aa80)=>_0x41aa80[_0x1deaf7(0x24e)](_0xd618af=>_0xd618af));};_0x192505[_0x2e08c3(0x1ee)]='sw',_0x192505[_0x2e08c3(0x25f)][_0x2e08c3(0x21d)]({'label':_0x6fcef5(this[_0x2e08c3(0x239)],_0x2e08c3(0x203)),'icon':_0x5a6980});for(const _0xe4bcc3 of this[_0x2e08c3(0x20f)])_0x4cf5bb(_0xe4bcc3);return _0x28f76e[_0x2e08c3(0x21b)](_0x5b6385),_0x192505[_0x2e08c3(0x261)](this[_0x2e08c3(0x20f)],_0x2e08c3(0x21b),(_0x4f01a8,_0x38ddc2,_0x1cacf4)=>{_0x4cf5bb(_0x38ddc2,_0x1cacf4);}),_0x192505[_0x2e08c3(0x261)](this[_0x2e08c3(0x20f)],_0x2e08c3(0x25e),(_0x1b20d9,_0x4c9624,_0x416a4f)=>{const _0x3474a2=_0x2e08c3;_0x5b6385[_0x3474a2(0x20f)][_0x3474a2(0x25e)](_0x416a4f);}),_0x192505;}[_0x410657(0x219)](_0x50d88a,_0x1ef71c){const _0x5014e8=_0x410657,_0x4e0d56=_0x50d88a&&_0x50d88a[_0x5014e8(0x24a)];_0x4e0d56&&(this[_0x5014e8(0x261)](_0x4e0d56,_0x5014e8(0x217),()=>this[_0x5014e8(0x1eb)]=_0x1ef71c),this[_0x5014e8(0x261)](_0x4e0d56,_0x5014e8(0x255),()=>this[_0x5014e8(0x1eb)]=_0x1ef71c),this[_0x5014e8(0x261)](_0x4e0d56,_0x5014e8(0x263),()=>this[_0x5014e8(0x1eb)]=null),this[_0x5014e8(0x261)](_0x4e0d56,_0x5014e8(0x204),()=>this[_0x5014e8(0x1eb)]=null));}[_0x410657(0x222)](){const _0x3aef02=_0x410657,_0x416a53=super[_0x3aef02(0x222)]();return _0x416a53[_0x3aef02(0x1f9)](_0x3aef02(0x209))['to'](this),_0x416a53;}[_0x410657(0x211)](){const _0x4d8a29=_0x410657;super[_0x4d8a29(0x211)](),this[_0x4d8a29(0x219)](this[_0x4d8a29(0x1ed)],_0x4d8a29(0x1f4)),this[_0x4d8a29(0x219)](this[_0x4d8a29(0x208)],_0x4d8a29(0x25e));}}