@ckeditor/ckeditor5-comments 37.0.0 → 37.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.
- package/build/comments.js +1 -1
- package/package.json +3 -3
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +81 -10
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +9 -4
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +15 -7
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x30d9=['div','isActive','render','content','createCollection','ck-rounded-corners','mainView','clientHeight','ck-annotation-wrapper','height','bindTemplate','_mutationObserver','keystrokes','listenTo','clear','length','targetRect','Esc','add','element','destroy','setTemplate','set','focus','isDirty','ck-annotation-wrapper--active','fire','_updateHeight','type','detach'];(function(_0x45e1c2,_0x30d927){const _0x122adf=function(_0x2ea29e){while(--_0x2ea29e){_0x45e1c2['push'](_0x45e1c2['shift']());}};_0x122adf(++_0x30d927);}(_0x30d9,0x189));const _0x122a=function(_0x45e1c2,_0x30d927){_0x45e1c2=_0x45e1c2-0x0;let _0x122adf=_0x30d9[_0x45e1c2];return _0x122adf;};import{View as _0x5be48e}from'ckeditor5/src/ui';import{FocusTracker as _0x134843,KeystrokeHandler as _0x8a2ad5,uid as _0x56f177}from'ckeditor5/src/utils';import _0x8ad325 from'../../utils/createmutationobserver';import'../../../theme/annotation.css';export default class V extends _0x5be48e{constructor(_0x16f7ae,_0x2f1d6b){super(_0x16f7ae),this['id']=_0x56f177(),this['focusTracker']=new _0x134843(),this[_0x122a('0x9')]=new _0x8a2ad5(),this[_0x122a('0x9')][_0x122a('0x13')]('Esc',(_0x4a44e5,_0x585a12)=>this[_0x122a('0x17')](_0x122a('0xe'),_0x585a12)),this[_0x122a('0x13')](_0x122a('0xd'),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set'](_0x122a('0x6'),0x0),this[_0x122a('0x13')](_0x122a('0x1c'),!0x1),this[_0x122a('0x13')](_0x122a('0x15'),!0x1),this['set'](_0x122a('0xc'),0x0),this[_0x122a('0x13')](_0x122a('0x19'),''),this['_mutationObserver']=_0x8ad325(()=>this[_0x122a('0x18')]()),this['content']=this[_0x122a('0x1')](),this[_0x122a('0x0')][_0x122a('0xf')](_0x2f1d6b),this[_0x122a('0x3')]=_0x2f1d6b;const _0x3cf5a4=this[_0x122a('0x7')];this[_0x122a('0x12')]({'tag':_0x122a('0x1b'),'attributes':{'class':['ck',_0x122a('0x5'),_0x122a('0x2'),_0x3cf5a4['if'](_0x122a('0x1c'),_0x122a('0x16'))],'tabindex':-0x1},'children':this[_0x122a('0x0')]});}[_0x122a('0x1d')](){super[_0x122a('0x1d')](),this['focusTracker'][_0x122a('0xf')](this[_0x122a('0x10')]),this['keystrokes'][_0x122a('0xa')](this['element']),this[_0x122a('0x8')]['attach'](this['element']);}[_0x122a('0x11')](){this['content'][_0x122a('0xb')](),this[_0x122a('0x9')][_0x122a('0x11')](),this['focusTracker'][_0x122a('0x11')](),this[_0x122a('0x8')][_0x122a('0x1a')](),super[_0x122a('0x11')]();}['focus'](){this[_0x122a('0x10')][_0x122a('0x14')]();}[_0x122a('0x18')](){const _0x44edbf=this['element'][_0x122a('0x4')];_0x44edbf&&(this['height']=_0x44edbf);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2aa5=['detach','content','_mutationObserver','ck-sidebar-item--no-animation','createCollection','updateHeight','attach','destroy','element','bind','set','bottom','bindTemplate','div','height','render','top','isAnimationDisabled'];(function(_0x162903,_0x2aa5ac){const _0x368fa0=function(_0x3e6b9e){while(--_0x3e6b9e){_0x162903['push'](_0x162903['shift']());}};_0x368fa0(++_0x2aa5ac);}(_0x2aa5,0x69));const _0x368f=function(_0x162903,_0x2aa5ac){_0x162903=_0x162903-0x0;let _0x368fa0=_0x2aa5[_0x162903];return _0x368fa0;};import{View as _0x2937a6}from'ckeditor5/src/ui';import{toUnit as _0x3565b4}from'ckeditor5/src/utils';import _0x50052f from'../../utils/createmutationobserver';const At=_0x3565b4('px');export default class C extends _0x2937a6{constructor(_0x1f828f){super(_0x1f828f),this['set']('top',0x0),this[_0x368f('0xd')](_0x368f('0x11'),0x0),this[_0x368f('0xc')](_0x368f('0xe'))['to'](this,_0x368f('0x1'),this,_0x368f('0x11'),(_0xa009e5,_0x1c5112)=>_0xa009e5+_0x1c5112),this[_0x368f('0xd')](_0x368f('0x2'),!0x1),this['_mutationObserver']=_0x50052f(()=>this[_0x368f('0x8')]()),this['_targetTop']=null,this[_0x368f('0x4')]=this[_0x368f('0x7')]();const _0x5d5815=this[_0x368f('0xf')];this['setTemplate']({'tag':_0x368f('0x10'),'attributes':{'class':['ck-sidebar-item',_0x5d5815['to'](_0x368f('0x2'),_0x323429=>_0x323429?_0x368f('0x6'):'')],'style':{'top':_0x5d5815['to'](_0x368f('0x1'),_0x545f59=>At(_0x545f59))}},'children':this[_0x368f('0x4')]});}[_0x368f('0x0')](){super[_0x368f('0x0')](),this[_0x368f('0x5')][_0x368f('0x9')](this[_0x368f('0xb')]);}[_0x368f('0x8')](){const _0x1d5ac6=this[_0x368f('0xb')]['clientHeight'];_0x1d5ac6&&(this[_0x368f('0x11')]=_0x1d5ac6);}[_0x368f('0xa')](){this[_0x368f('0x4')]['clear'](),this[_0x368f('0x5')][_0x368f('0x3')](),super[_0x368f('0xa')]();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1c24=['number','ck-reset','bindTemplate','minHeight','class','ck-sidebar','setTemplate','set'];(function(_0x377431,_0x1c2441){const _0x4e06fb=function(_0x2573b3){while(--_0x2573b3){_0x377431['push'](_0x377431['shift']());}};_0x4e06fb(++_0x1c2441);}(_0x1c24,0x14d));const _0x4e06=function(_0x377431,_0x1c2441){_0x377431=_0x377431-0x0;let _0x4e06fb=_0x1c24[_0x377431];return _0x4e06fb;};import{View as _0xaf7f05}from'ckeditor5/src/ui';import{toUnit as _0x3fb3e7}from'ckeditor5/src/utils';import'../../../theme/sidebar.css';const At=_0x3fb3e7('px');export default class T extends _0xaf7f05{constructor(_0xf25959){super(_0xf25959);const _0x44a6a4=this[_0x4e06('0x5')];this[_0x4e06('0x2')](_0x4e06('0x6'),0x0),this[_0x4e06('0x2')](_0x4e06('0x7'),''),this['list']=this['createCollection'](),this[_0x4e06('0x1')]({'tag':'div','attributes':{'class':['ck',_0x4e06('0x0'),_0x4e06('0x4'),_0x44a6a4['to'](_0x4e06('0x7'))],'style':{'minHeight':_0x44a6a4['to'](_0x4e06('0x6'),_0x5bf99f=>_0x4e06('0x3')==typeof _0x5bf99f?At(_0x5bf99f+0xa):null)}},'children':this['list']});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1429=['setActiveAnnotation','switchTo','editors','ready','change:container','addEventListener','listenTo','detach','wideSidebar','remove','plugins','updateTargetRect','_activeAnnotation','widesidebar-attach-already-attached','resize','register','high','annotations','getOrderedSelectedAnnotations','refresh','uiUpdate','rearrange','_destroyEditorAnnotationsIntegration','cancel','stopListening','activeAnnotation','set:container','init','add','_refreshPositioningDebounced','_editorAnnotations','focus','EditorAnnotations','refreshPositioning','set','requires','from','context','attach','hasDomSelection','get','_attachToContainer','stop','_integrateWithEditorAnnotations','removeEventListener','addAnnotation','blur','_annotations','pluginName','destroy','widesidebar-detach-not-attached','WideSidebar','_detachFromContainer','isAttached'];(function(_0x165336,_0x14290f){const _0x49fbed=function(_0x40924d){while(--_0x40924d){_0x165336['push'](_0x165336['shift']());}};_0x49fbed(++_0x14290f);}(_0x1429,0xc1));const _0x49fb=function(_0x165336,_0x14290f){_0x165336=_0x165336-0x0;let _0x49fbed=_0x1429[_0x165336];return _0x49fbed;};import{ContextPlugin as _0x3a12e5,Context as _0x2ee9b4}from'ckeditor5/src/core';import _0x508d1c from'./annotationsuis';import _0x3f1812 from'./sidebar';import{CKEditorError as _0x5ced89,Collection as _0x21728d}from'ckeditor5/src/utils';import{debounce as _0x341554}from'lodash-es';import _0x48acd0 from'./editorannotations';export default class i extends _0x3a12e5{static get[_0x49fb('0x4')](){return[_0x3f1812,_0x508d1c];}static get[_0x49fb('0x11')](){return _0x49fb('0x14');}constructor(_0x47131b){super(_0x47131b),this[_0x49fb('0x16')]=!0x1,this[_0x49fb('0x3')](_0x49fb('0x30'),null),this[_0x49fb('0x28')]=null,this[_0x49fb('0x35')]=new _0x21728d(),this[_0x49fb('0x34')]=_0x341554(()=>{this[_0x49fb('0x28')][_0x49fb('0x2')]();},0xfa,{'leading':!0x1});}[_0x49fb('0x32')](){const _0x1c4ce1=this[_0x49fb('0x6')]['plugins'][_0x49fb('0x9')](_0x508d1c),_0x5e3c33=this['context'][_0x49fb('0x21')][_0x49fb('0x9')](_0x3f1812);_0x1c4ce1[_0x49fb('0x26')]('wideSidebar',this),_0x5e3c33['container']&&_0x1c4ce1[_0x49fb('0x18')](_0x49fb('0x1f'));}[_0x49fb('0x17')](_0x17325a){if(_0x17325a===this[_0x49fb('0x30')])return;const _0x4af443=this[_0x49fb('0x6')][_0x49fb('0x21')][_0x49fb('0x9')](_0x3f1812);_0x4af443[_0x49fb('0x23')]=_0x17325a;const _0x27a82f=this[_0x49fb('0x30')];this[_0x49fb('0x30')]=_0x17325a,_0x4af443[_0x49fb('0x2a')]({'blurredAnnotation':_0x27a82f,'activatedAnnotation':this['activeAnnotation']});}[_0x49fb('0x7')](_0x191613){this[_0x49fb('0x28')]=_0x191613;const _0x465f1=this[_0x49fb('0x6')]['plugins'][_0x49fb('0x9')](_0x3f1812);if(_0x465f1[_0x49fb('0x10')]=_0x191613,this[_0x49fb('0x16')])throw new _0x5ced89(_0x49fb('0x24'),this);this['isAttached']=!0x0,this[_0x49fb('0x1d')](_0x465f1,_0x49fb('0x31'),()=>{this[_0x49fb('0x1e')](),this[_0x49fb('0x1d')](_0x465f1,_0x49fb('0x1b'),_0x2ed381=>{_0x2ed381['off'](),this[_0x49fb('0x7')](_0x191613);});}),_0x465f1[_0x49fb('0xa')]({'viewClass':'ck-sidebar--wide'});const _0x1e19db=_0x28b025=>{_0x28b025[_0x49fb('0x22')](),_0x465f1[_0x49fb('0xe')](_0x28b025);};for(const _0x2fde58 of _0x191613)_0x1e19db(_0x2fde58);this[_0x49fb('0x1d')](_0x191613,_0x49fb('0x33'),(_0x2570c2,_0x4bf224)=>{_0x1e19db(_0x4bf224);}),this['listenTo'](_0x191613,_0x49fb('0x20'),(_0x247a13,_0x16c24e,_0x34670b)=>{_0x465f1[_0x49fb('0x2c')]({'removedAnnotation':_0x16c24e,'previousAnnotation':_0x191613[_0x49fb('0x9')](_0x34670b-0x1),'nextAnnotation':_0x191613['get'](_0x34670b+0x1)}),_0x16c24e===this[_0x49fb('0x30')]&&this[_0x49fb('0x17')](null);},{'priority':'high'}),this[_0x49fb('0x1d')](_0x191613,_0x49fb('0x0'),(_0x85a168,_0x3174e2)=>{this[_0x49fb('0x17')](_0x3174e2);}),this[_0x49fb('0x1d')](_0x191613,_0x49fb('0xf'),()=>{this[_0x49fb('0x17')](null);});const _0x144e5a=this[_0x49fb('0x6')]instanceof _0x2ee9b4?this['context'][_0x49fb('0x19')]:new _0x21728d([this['context']]);for(const _0x597c0b of _0x144e5a)this['_integrateWithEditorAnnotations'](_0x597c0b);this[_0x49fb('0x1d')](_0x144e5a,'add',(_0x181984,_0x2f91ce)=>{this[_0x49fb('0x1d')](_0x2f91ce,_0x49fb('0x1a'),()=>{this[_0x49fb('0xc')](_0x2f91ce);});}),this['listenTo'](_0x144e5a,'remove',(_0x2a2300,_0x786598)=>{_0x786598[_0x49fb('0x21')]['has'](_0x49fb('0x1'))&&this[_0x49fb('0x2d')](_0x786598[_0x49fb('0x21')]['get'](_0x49fb('0x1')));}),window[_0x49fb('0x1c')](_0x49fb('0x25'),this[_0x49fb('0x34')]),this[_0x49fb('0x28')][_0x49fb('0x2')]();}[_0x49fb('0x1e')](){if(!this['isAttached'])throw new _0x5ced89(_0x49fb('0x13'),this);this[_0x49fb('0x17')](null);const _0x157074=this['context'][_0x49fb('0x21')][_0x49fb('0x9')](_0x3f1812);_0x157074[_0x49fb('0x15')](this[_0x49fb('0x28')]),this['stopListening'](_0x157074),this[_0x49fb('0x2f')](this[_0x49fb('0x28')]),this[_0x49fb('0x6')]instanceof _0x2ee9b4&&this[_0x49fb('0x2f')](this[_0x49fb('0x6')][_0x49fb('0x19')]);for(const _0x3f2da2 of Array[_0x49fb('0x5')](this['_editorAnnotations']))this[_0x49fb('0x2d')](_0x3f2da2);window[_0x49fb('0xd')](_0x49fb('0x25'),this[_0x49fb('0x34')]),this[_0x49fb('0x34')][_0x49fb('0x2e')](),this[_0x49fb('0x30')]=null,this[_0x49fb('0x16')]=!0x1,this[_0x49fb('0x28')]=null;}[_0x49fb('0x12')](){this[_0x49fb('0x16')]&&this[_0x49fb('0x1e')]();}[_0x49fb('0xc')](_0x1617ff){const _0x58ea47=_0x1617ff[_0x49fb('0x21')][_0x49fb('0x9')](_0x48acd0);if(!_0x58ea47)return;const _0x3ad3d1=()=>{const _0x1649b2=_0x58ea47[_0x49fb('0x29')]({'annotations':this[_0x49fb('0x28')],'activeAnnotation':this['activeAnnotation']});this[_0x49fb('0x17')](_0x1649b2[0x0]||null);};this['listenTo'](_0x58ea47,_0x49fb('0x2a'),_0x3ad3d1),this[_0x49fb('0x1d')](_0x58ea47,'blur',(_0x19159a,{isAnnotationTracked:_0x16bd4f})=>{this[_0x49fb('0x30')]&&_0x16bd4f(this[_0x49fb('0x30')])&&this[_0x49fb('0x17')](null);}),this['listenTo'](_0x58ea47,_0x49fb('0x2b'),()=>{this[_0x49fb('0x34')]();}),this[_0x49fb('0x1d')](this[_0x49fb('0x28')],_0x49fb('0xf'),_0x3a3d22=>{_0x58ea47[_0x49fb('0x8')]()&&(_0x3ad3d1(),_0x3a3d22[_0x49fb('0xb')]());},{'priority':_0x49fb('0x27')}),this[_0x49fb('0x35')][_0x49fb('0x33')](_0x58ea47);}[_0x49fb('0x2d')](_0x30479c){this[_0x49fb('0x2f')](_0x30479c),this[_0x49fb('0x35')][_0x49fb('0x20')](_0x30479c);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x43db=['change','_trimToContent','_hasContent','backward','$textProxy','selection','isObject','getLastMatchingPosition','comment:','getItems','_itemIsContent','createRange','start','schema','end','push','getRanges','model','isEnabled','addMarker','document','editor','item'];(function(_0x15e883,_0x43db90){const _0x1a5123=function(_0x460b1e){while(--_0x460b1e){_0x15e883['push'](_0x15e883['shift']());}};_0x1a5123(++_0x43db90);}(_0x43db,0xc0));const _0x1a51=function(_0x15e883,_0x43db90){_0x15e883=_0x15e883-0x0;let _0x1a5123=_0x43db[_0x15e883];return _0x1a5123;};import{Command as _0xe58081}from'ckeditor5/src/core';import{uid as _0x167345}from'ckeditor5/src/utils';export default class q extends _0xe58081{['refresh'](){const _0x178c0c=this[_0x1a51('0xd')]['model'][_0x1a51('0xc')]['selection'];for(const _0x159ec9 of _0x178c0c[_0x1a51('0x8')]())if(this[_0x1a51('0x11')](_0x159ec9))return void(this['isEnabled']=!0x0);this[_0x1a51('0xa')]=!0x1;}['execute']({threadId:_0x31581f=_0x167345()}={}){const _0x313e7e=this[_0x1a51('0xd')]['model'],_0x386f92=[];for(const _0x44f0ef of _0x313e7e['document'][_0x1a51('0x14')][_0x1a51('0x8')]())this[_0x1a51('0x11')](_0x44f0ef)&&_0x386f92[_0x1a51('0x7')](this[_0x1a51('0x10')](_0x44f0ef));_0x313e7e[_0x1a51('0xf')](_0x3bc1c0=>{for(const _0x1f8c3e of _0x386f92){const _0x44f1ec=_0x167345()['substr'](0x1,0x5),_0x2eb46d=_0x1a51('0x0')+_0x31581f+':'+_0x44f1ec;_0x3bc1c0[_0x1a51('0xb')](_0x2eb46d,{'range':_0x1f8c3e,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x1a51('0x11')](_0x415397){for(const _0x870496 of _0x415397[_0x1a51('0x1')]())if(this[_0x1a51('0x2')](_0x870496))return!0x0;return!0x1;}[_0x1a51('0x2')](_0x4bd5a6){return _0x4bd5a6['is'](_0x1a51('0x13'))||this[_0x1a51('0xd')][_0x1a51('0x9')][_0x1a51('0x5')][_0x1a51('0x15')](_0x4bd5a6)&&!_0x4bd5a6['is']('element','tableCell');}['_trimToContent'](_0x55e5c8){const _0x17cb79=_0x3f006b=>!this[_0x1a51('0x2')](_0x3f006b[_0x1a51('0xe')]),_0x48b2a6=_0x55e5c8[_0x1a51('0x4')][_0x1a51('0x16')](_0x17cb79),_0x4474a5=_0x55e5c8[_0x1a51('0x6')][_0x1a51('0x16')](_0x17cb79,{'direction':_0x1a51('0x12')});return this['editor'][_0x1a51('0x9')][_0x1a51('0x3')](_0x48b2a6,_0x4474a5);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x222d=['resolveCommentThread','reopenCommentThread','resolvedAt','getCommentThread','init','remove','has','removeCommentThread','pluginName','_calculatePosition','plugins','add','CommentsArchive','listenTo','context','resolvedThreads','findIndex','get','addCommentThread','highest'];(function(_0x243112,_0x222da9){const _0x1f728e=function(_0x3ac324){while(--_0x3ac324){_0x243112['push'](_0x243112['shift']());}};_0x1f728e(++_0x222da9);}(_0x222d,0xfc));const _0x1f72=function(_0x243112,_0x222da9){_0x243112=_0x243112-0x0;let _0x1f728e=_0x222d[_0x243112];return _0x1f728e;};import{ContextPlugin as _0x19e4f1}from'ckeditor5/src/core';import{Collection as _0x4027f6}from'ckeditor5/src/utils';import _0x5814d9 from'./commentsrepository';import _0xcae30d from'../annotations/annotations';export default class p extends _0x19e4f1{static get[_0x1f72('0x10')](){return _0x1f72('0x0');}static get['requires'](){return[_0x5814d9,_0xcae30d];}constructor(_0x4deb8b){super(_0x4deb8b),this[_0x1f72('0x3')]=new _0x4027f6();}[_0x1f72('0xc')](){const _0x4e26e7=this[_0x1f72('0x2')],_0x17088c=_0x4e26e7[_0x1f72('0x12')][_0x1f72('0x5')](_0x5814d9),_0x102cd8=_0x4e26e7[_0x1f72('0x12')][_0x1f72('0x5')](_0xcae30d);this[_0x1f72('0x1')](_0x17088c,_0x1f72('0x6'),(_0x32a478,{threadId:_0x207e81,resolvedAt:_0x373275,deletedAt:_0x5ba706})=>{if(_0x373275&&!_0x5ba706){const _0x347d7e=_0x17088c['getCommentThread'](_0x207e81);this[_0x1f72('0x3')][_0x1f72('0x13')](_0x347d7e,this[_0x1f72('0x11')](_0x373275));}}),this[_0x1f72('0x1')](_0x17088c,_0x1f72('0x8'),(_0x362a00,{threadId:_0x499a4d,resolvedAt:_0x2c2cff})=>{const _0x2418be=_0x17088c[_0x1f72('0xb')](_0x499a4d);this[_0x1f72('0x3')][_0x1f72('0x13')](_0x2418be,this[_0x1f72('0x11')](_0x2c2cff));},{'priority':_0x1f72('0x7')}),this[_0x1f72('0x1')](_0x17088c,_0x1f72('0x9'),(_0x182255,{threadId:_0x58095c})=>{const _0xf6745e=_0x17088c[_0x1f72('0xb')](_0x58095c);this['resolvedThreads'][_0x1f72('0xe')](_0xf6745e)&&this[_0x1f72('0x3')][_0x1f72('0xd')](_0xf6745e);},{'priority':'highest'}),this[_0x1f72('0x1')](_0x17088c,_0x1f72('0xf'),(_0x3e644f,{threadId:_0x4b11f3})=>{const _0xf9c41c=_0x17088c[_0x1f72('0xb')](_0x4b11f3);this['resolvedThreads'][_0x1f72('0xe')](_0xf9c41c)&&this[_0x1f72('0x3')]['remove'](_0xf9c41c);},{'priority':_0x1f72('0x7')}),this[_0x1f72('0x1')](_0x102cd8['collection'],'focus',(_0x102305,_0x4b07b3)=>{_0x4b07b3['isActive']=!0x0,_0x102cd8['activate'](_0x4b07b3);});}[_0x1f72('0x11')](_0x3a435d){const _0x36798a=[...this[_0x1f72('0x3')]][_0x1f72('0x4')](_0x65d1af=>_0x65d1af[_0x1f72('0xa')]<_0x3a435d);return _0x36798a>-0x1?_0x36798a:this[_0x1f72('0x3')]['length'];}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1fc8=['listenTo','getByInnerView','children','COMMENTS_ARCHIVE','Annotations','editor','panelView','add','requires','componentFactory','_createArchiveUIDropdown','commentsArchiveView','annotationViews','CommentsRepository','isVisible','buttonView','_threadToController','view','change:isVisible','get','config','resolvedThreads','stopListening','locale','init','CommentsArchiveUI','collaboration.channelId','commentsArchive'];(function(_0x521cc6,_0x1fc8ce){const _0x4021ba=function(_0x63af71){while(--_0x63af71){_0x521cc6['push'](_0x521cc6['shift']());}};_0x4021ba(++_0x1fc8ce);}(_0x1fc8,0x1bd));const _0x4021=function(_0x521cc6,_0x1fc8ce){_0x521cc6=_0x521cc6-0x0;let _0x4021ba=_0x1fc8[_0x521cc6];return _0x4021ba;};import'../../theme/commentsarchive.css';import{Plugin as _0x4df4fc}from'ckeditor5/src/core';import{createDropdown as _0x3b561c,ViewCollection as _0x127f58}from'ckeditor5/src/ui';import _0x12aca8 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x241bea}from'../utils/common-translations';import _0x156959 from'./ui/view/commentsarchiveview';import _0x191065 from'./commentsarchive';export default class a extends _0x4df4fc{static get['pluginName'](){return _0x4021('0x0');}static get[_0x4021('0xb')](){return[_0x191065];}constructor(_0x5645ab){super(_0x5645ab),this['annotationViews']=new _0x127f58();}[_0x4021('0x1b')](){this['editor']['ui'][_0x4021('0xc')][_0x4021('0xa')](_0x4021('0x2'),()=>this[_0x4021('0xd')]());const _0x31de09=this['editor']['plugins'][_0x4021('0x16')](_0x191065),_0x25df5a=this[_0x4021('0x8')]['plugins'][_0x4021('0x16')](_0x4021('0x7')),_0x28c89d=this[_0x4021('0x8')]['plugins']['get'](_0x4021('0x10'));this['listenTo'](_0x31de09[_0x4021('0x18')],_0x4021('0xa'),(_0x2dffb3,_0x274068,_0x45e441)=>{const _0x26b67e=this[_0x4021('0x8')]['config']['get'](_0x4021('0x1'));if(!_0x26b67e||_0x274068['channelId']===_0x26b67e){const _0x286e35=_0x28c89d[_0x4021('0x13')][_0x4021('0x16')](_0x274068),_0x15c2a9=_0x25df5a['getByInnerView'](_0x286e35[_0x4021('0x14')]);_0x15c2a9[_0x4021('0x11')]?this[_0x4021('0x3')](_0x15c2a9,_0x4021('0x15'),(_0x4b277f,_0x3103db,_0x4c63e9)=>{_0x4c63e9||(this['annotationViews'][_0x4021('0xa')](_0x15c2a9[_0x4021('0x14')],_0x45e441),this[_0x4021('0x19')](_0x15c2a9));}):this['annotationViews'][_0x4021('0xa')](_0x15c2a9['view'],_0x45e441);}}),this[_0x4021('0x3')](_0x31de09[_0x4021('0x18')],'remove',(_0x35d139,_0x553e0c)=>{const _0x244a6c=this[_0x4021('0x8')][_0x4021('0x17')][_0x4021('0x16')](_0x4021('0x1'));if(!_0x244a6c||_0x553e0c['channelId']===_0x244a6c){const _0x2f8bab=_0x28c89d[_0x4021('0x13')][_0x4021('0x16')](_0x553e0c),_0x4689f4=_0x25df5a[_0x4021('0x4')](_0x2f8bab['view'])[_0x4021('0x14')];this[_0x4021('0xf')]['remove'](_0x4689f4);}});}[_0x4021('0xd')](){const _0x35d420=this[_0x4021('0x8')],_0x318af6=_0x3b561c(_0x35d420[_0x4021('0x1a')]);return _0x318af6[_0x4021('0x12')]['set']({'icon':_0x12aca8,'label':_0x241bea(_0x35d420[_0x4021('0x1a')],_0x4021('0x6')),'tooltip':!0x0}),_0x318af6['on']('change:isOpen',()=>{this[_0x4021('0xe')]||(this[_0x4021('0xe')]=new _0x156959(_0x35d420[_0x4021('0x1a')],this[_0x4021('0xf')]),_0x318af6[_0x4021('0x9')][_0x4021('0x5')][_0x4021('0xa')](this['commentsArchiveView']));}),_0x318af6;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2f5c=['set','getCommentThreads','hasCommentThread','getWalker','size','attachTo','state','dataDowncast','init','change:isThreadsLoadingPaused','$marker','change','ck-comment-marker','model','getByInnerView','has','differ','_getTargetForId','addCommentThread','comment','change:isReadOnly','getAllMarkersForId','data','add','focus','change:activeMarker','getCommentThread','ck-comment-marker--active','removeMarker','scrollToThreadMarker','_handleThreadMarker','pluginName','get','isResolved','_handleMarkerAddAndRemove','listenTo','for','createRange','once','createPositionBefore','rootName','isObject','conversion','switchReadOnly','length','from','removeCommentThread','collaboration.channelId','getChangedMarkers','removeMarker:','editing','markerName','consume','markers','activeMarker','substring','push','filter','render','_threadToController','hasMarkerForId','editor','isCollapsed','delete','markerToHighlight','_attachMarkerToThread','_detachCommentThread','ready','managedUsingOperations','getItems','item','$graveyard','_initializeMarkerConverters','isLocal','openNewCommentThread','CommentsEditing','text','view','$textProxy','low','enqueueChange','isEqual','getAttribute','plugins','hasDomSelection','markerToData','_getTextContext','createElement','start','destroy','newRange','document','end','updateMarker','isThreadsLoadingPaused','upcast','reconvertMarker','_reconvertMarkers','registerAnnotation','setContext','_attachedThreads','_hasTargetInContent','config','affectsData','schema','comment:','consumable'];(function(_0x38a813,_0x2f5c5c){const _0x5b772d=function(_0xaabea1){while(--_0xaabea1){_0x38a813['push'](_0x38a813['shift']());}};_0x5b772d(++_0x2f5c5c);}(_0x2f5c,0x152));const _0x5b77=function(_0x38a813,_0x2f5c5c){_0x38a813=_0x38a813-0x0;let _0x5b772d=_0x2f5c[_0x38a813];return _0x5b772d;};import{Plugin as _0x5d5f00}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0xf18b8}from'ckeditor5/src/utils';import _0x422b86 from'./commentsrepository';import _0x4bab68 from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x5b3977}from'ckeditor5-collaboration/src/collaboration-core';import _0x13dc1b from'../annotations/editorannotations';import _0x26c4c2 from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x42fc90 from'./integrations/importword';import _0x7fabf6 from'../annotations/annotations';export default class r extends _0x5d5f00{static get['requires'](){return[_0x422b86,_0x13dc1b,_0x26c4c2,_0x42fc90];}static get[_0x5b77('0xe')](){return _0x5b77('0x3a');}constructor(_0x5315f0){super(_0x5315f0),this[_0x5b77('0x5a')](_0x5b77('0x4d'),!0x0),_0x5315f0[_0x5b77('0x5')][_0x5b77('0x15')](_0x5b77('0x32'),()=>this[_0x5b77('0x4d')]=!0x1),this[_0x5b77('0x5a')]('activeMarker',null),this['on'](_0x5b77('0x8'),(_0x4e2693,_0x425f77,_0x54c2e4,_0x162be5)=>{const _0x2ef2fa=_0x54c2e4?tt(_0x54c2e4)['id']:null;if(_0x5315f0[_0x5b77('0x67')][_0x5b77('0x65')](()=>{if(_0x2ef2fa){const _0x170a13=this[_0x5b77('0x4')](_0x2ef2fa);for(const _0x1b700c of _0x170a13)_0x5315f0['editing'][_0x5b77('0x4f')](_0x1b700c);}if(_0x162be5){const {id:_0x1b97d4}=tt(_0x162be5),_0x32424f=this[_0x5b77('0x4')](_0x1b97d4);for(const _0x399a5e of _0x32424f)_0x5315f0[_0x5b77('0x21')][_0x5b77('0x4f')](_0x399a5e);}}),_0x2ef2fa){const _0x124296=_0x5315f0[_0x5b77('0x42')][_0x5b77('0xf')](_0x422b86)['getCommentThread'](_0x2ef2fa);_0x124296&&_0x124296[_0x5b77('0x10')]&&this[_0x5b77('0xc')](_0x2ef2fa);}}),this[_0x5b77('0x53')]=new Map();}[_0x5b77('0x62')](){const _0x61e90f=this[_0x5b77('0x2c')],_0x21347a=_0x61e90f[_0x5b77('0x42')]['get'](_0x422b86),_0x5b924d=_0x61e90f[_0x5b77('0x55')][_0x5b77('0xf')](_0x5b77('0x1e'));_0x61e90f['commands'][_0x5b77('0x6')](_0x5b77('0x1'),new _0x4bab68(_0x61e90f)),this[_0x5b77('0x12')](_0x61e90f,_0x5b77('0x3'),(_0x2a5c5e,_0xb143c7,_0x11fa43)=>{_0x21347a[_0x5b77('0x1a')](_0x11fa43,_0x61e90f[_0x5b77('0x55')][_0x5b77('0xf')](_0x5b77('0x1e')));}),this[_0x5b77('0x12')](_0x21347a,Z(_0x5b77('0x1'),_0x5b924d),(_0x39decf,{threadId:_0x3a2889})=>{const _0x3d532d=_0x61e90f[_0x5b77('0x42')][_0x5b77('0xf')](_0x13dc1b),_0x161116=this[_0x5b77('0x2c')][_0x5b77('0x42')][_0x5b77('0xf')](_0x422b86)[_0x5b77('0x9')](_0x3a2889);if(_0x161116&&_0x161116[_0x5b77('0x10')]&&!this[_0x5b77('0x53')][_0x5b77('0x69')](_0x3a2889)){const _0x4eb9e0=_0x161116[_0x5b77('0x5f')](()=>this[_0x5b77('0x0')](_0x161116['id']));_0x3d532d[_0x5b77('0x51')](_0x4eb9e0),this[_0x5b77('0x53')]['set'](_0x3a2889,[]),0x0===this[_0x5b77('0x4')](_0x3a2889)[_0x5b77('0x1b')]&&(_0x161116[_0x5b77('0x54')]=!0x1);}}),this[_0x5b77('0x12')](_0x21347a,Z(_0x5b77('0x1d'),_0x5b924d),(_0x236163,{threadId:_0x516b7a})=>{_0x61e90f[_0x5b77('0x67')][_0x5b77('0x3f')]({'isUndoable':!0x1},_0x517df7=>{const _0x139c61=this['getAllMarkersForId'](_0x516b7a);this['_attachedThreads'][_0x5b77('0x2e')](_0x516b7a);for(const _0x3f7548 of _0x139c61)_0x517df7[_0x5b77('0xb')](_0x3f7548);});},{'priority':'high'}),this[_0x5b77('0x12')](_0x21347a,Z('resolveCommentThread',_0x5b924d),(_0x2019f6,{threadId:_0x5a3a9b})=>{this['_reconvertMarkers'](_0x5a3a9b),this[_0x5b77('0x2c')][_0x5b77('0x21')][_0x5b77('0x3c')][_0x5b77('0x43')]&&this[_0x5b77('0x2c')][_0x5b77('0x21')][_0x5b77('0x3c')][_0x5b77('0x7')]();},{'priority':_0x5b77('0x3e')}),this[_0x5b77('0x12')](_0x21347a,Z('reopenCommentThread',_0x5b924d),(_0x4400c5,{threadId:_0x12f786})=>{this[_0x5b77('0x50')](_0x12f786);},{'priority':_0x5b77('0x3e')}),this[_0x5b77('0x12')](_0x21347a,Z('addComment',_0x5b924d),(_0x918476,{threadId:_0x3e3ca0,isFromAdapter:_0x553657})=>{const _0x20e43c=this[_0x5b77('0x4')](_0x3e3ca0);if(_0x553657||0x0==_0x20e43c[_0x5b77('0x1b')]||!_0x21347a[_0x5b77('0x5c')](_0x3e3ca0))return;0x1===_0x21347a[_0x5b77('0x9')](_0x3e3ca0)['length']&&_0x61e90f[_0x5b77('0x67')][_0x5b77('0x3f')]({'isUndoable':!0x1},_0x3d413f=>{for(const _0x3bef1d of _0x20e43c)_0x3d413f[_0x5b77('0x4c')](_0x3bef1d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':_0x5b77('0x3e')}),this[_0x5b77('0x37')](),this[_0x5b77('0x11')]();}[_0x5b77('0x48')](){const _0x4c382d=this[_0x5b77('0x2c')]['plugins']['get'](_0x422b86),_0x17b442=this[_0x5b77('0x2c')]['config'][_0x5b77('0xf')](_0x5b77('0x1e'));for(const _0x312dc6 of _0x4c382d[_0x5b77('0x5b')]({'channelId':_0x17b442}))_0x4c382d[_0x5b77('0x31')](_0x312dc6['id']),_0x4c382d['_threads'][_0x5b77('0x2e')](_0x312dc6['id']);super['destroy']();}['hasMarkerForId'](_0x53c08f){return this[_0x5b77('0x4')](_0x53c08f)['length']>0x0;}[_0x5b77('0x4')](_0x54b2e6){return(this[_0x5b77('0x53')][_0x5b77('0xf')](_0x54b2e6)||[])['map'](_0x11cc76=>this[_0x5b77('0x2c')][_0x5b77('0x67')][_0x5b77('0x24')][_0x5b77('0xf')](_0x11cc76))[_0x5b77('0x28')](_0x40c68c=>_0x40c68c);}[_0x5b77('0xc')](_0x2c7d19){const _0x4f3519=this[_0x5b77('0x0')](_0x2c7d19);_0x4f3519&&setTimeout(()=>{this[_0x5b77('0x25')]&&tt(this['activeMarker'])['id']===_0x2c7d19&&_0xf18b8({'target':_0x4f3519[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}[_0x5b77('0x50')](_0x528b6b){this[_0x5b77('0x2c')][_0x5b77('0x67')][_0x5b77('0x65')](()=>{for(const _0x1738e2 of this['getAllMarkersForId'](_0x528b6b))this[_0x5b77('0x2c')][_0x5b77('0x21')][_0x5b77('0x4f')](_0x1738e2);});}['_initializeMarkerConverters'](){const _0x28f5d2=this[_0x5b77('0x2c')];_0x28f5d2[_0x5b77('0x19')]['for']('editingDowncast')[_0x5b77('0x2f')]({'model':_0x5b77('0x2'),'view':(_0x538127,_0xfa86ed)=>{const {id:_0x3fe827}=tt(_0x538127[_0x5b77('0x22')]),_0xecd3e5=_0x28f5d2[_0x5b77('0x42')][_0x5b77('0xf')](_0x422b86)['getCommentThread'](_0x3fe827),_0x16b068=this[_0x5b77('0x25')]&&tt(this[_0x5b77('0x25')])['id']===_0x3fe827;if(_0xecd3e5&&_0xecd3e5[_0x5b77('0x10')]&&!_0x16b068&&_0x538127[_0x5b77('0x35')])return _0xfa86ed[_0x5b77('0x59')][_0x5b77('0x23')](_0x538127[_0x5b77('0x35')],'addMarker:'+_0x538127['markerName']),_0xfa86ed['consumable'][_0x5b77('0x23')](_0x538127[_0x5b77('0x35')],_0x5b77('0x20')+_0x538127['markerName']),{'classes':[]};const _0x56221f=[_0x5b77('0x66')];return _0x16b068&&_0x56221f[_0x5b77('0x27')](_0x5b77('0xa')),{'classes':_0x56221f,'attributes':{'data-comment':_0x3fe827}};}}),_0x28f5d2[_0x5b77('0x19')][_0x5b77('0x13')](_0x5b77('0x61'))[_0x5b77('0x44')]({'model':'comment','view':(_0x1d8c85,{options:_0x357e86})=>{const _0x543c2c=_0x28f5d2[_0x5b77('0x42')]['get'](_0x422b86),_0xbe87a4=_0x28f5d2[_0x5b77('0x67')][_0x5b77('0x24')][_0x5b77('0xf')](_0x1d8c85),{id:_0xb8ebe,part:_0x8d3071}=tt(_0x1d8c85),_0x194a99=_0x543c2c[_0x5b77('0x9')](_0xb8ebe);return _0xbe87a4&&!_0xbe87a4[_0x5b77('0x56')]||_0x194a99&&_0x194a99[_0x5b77('0x10')]&&_0x357e86['ignoreResolvedComments']?null:{'group':_0x5b77('0x2'),'name':_0x8d3071?_0xb8ebe+':'+_0x8d3071:_0xb8ebe};}}),_0x28f5d2[_0x5b77('0x19')][_0x5b77('0x13')](_0x5b77('0x4e'))['elementToElement']({'view':{'name':_0x5b77('0x2'),'attributes':{'id':/^\w/}},'model':(_0x4c2a69,{writer:_0x17192a})=>_0x17192a[_0x5b77('0x46')](_0x5b77('0x64'),{'data-name':_0x5b77('0x58')+_0x4c2a69[_0x5b77('0x41')]('id')})}),_0x28f5d2[_0x5b77('0x19')]['for'](_0x5b77('0x4e'))['dataToMarker']({'view':_0x5b77('0x2')});}[_0x5b77('0x11')](){const _0x1449ad=this[_0x5b77('0x2c')],_0x4f34cd=_0x1449ad['plugins']['get'](_0x422b86),_0xc1f62f=new Set();_0x1449ad[_0x5b77('0x67')]['document']['registerPostFixer'](_0x4471e4=>{let _0x149cf1=!0x1;for(const {name:_0x3d8f8a,data:_0x24a5b8}of _0x1449ad[_0x5b77('0x67')][_0x5b77('0x4a')][_0x5b77('0x6a')][_0x5b77('0x1f')]()){const {group:_0x521d90,id:_0x3507f8}=tt(_0x3d8f8a);let _0x282385=_0x24a5b8[_0x5b77('0x49')];if(_0x5b77('0x2')!==_0x521d90||!_0x282385)continue;const _0x544476=_0x5b77('0x36')===_0x282385['root'][_0x5b77('0x17')];_0x544476||(_0x282385=ot(_0x282385,_0x1449ad[_0x5b77('0x67')]),!_0x282385||!_0x24a5b8[_0x5b77('0x49')]||_0x282385[_0x5b77('0x40')](_0x24a5b8[_0x5b77('0x49')]))?!_0x282385||!_0x1449ad['model']['hasContent'](_0x282385)||this[_0x5b77('0x53')]['has'](_0x3507f8)&&_0x544476?(_0x4471e4[_0x5b77('0xb')](_0x3d8f8a),_0x149cf1=!0x0):_0x544476||(this[_0x5b77('0x4d')]?_0xc1f62f[_0x5b77('0x6')](_0x3d8f8a):this[_0x5b77('0xd')](_0x3d8f8a,_0x3507f8)):(_0x4471e4[_0x5b77('0x4c')](_0x3d8f8a,{'range':_0x282385}),_0x149cf1=!0x0);}return _0x149cf1;}),this['on'](_0x5b77('0x63'),(_0x2ee36e,_0x5d9e90,_0x490024)=>{if(!_0x490024&&_0xc1f62f[_0x5b77('0x5e')])for(const _0x997eab of _0xc1f62f){const {id:_0xb4e178}=tt(_0x997eab);_0xc1f62f[_0x5b77('0x2e')](_0xb4e178),_0x1449ad[_0x5b77('0x67')][_0x5b77('0x24')][_0x5b77('0xf')](_0x997eab)&&this[_0x5b77('0xd')](_0x997eab,_0xb4e178);}}),this[_0x5b77('0x12')](_0x1449ad[_0x5b77('0x67')][_0x5b77('0x4a')],_0x5b77('0x65'),(_0x2db13a,_0xb321e)=>{for(const {name:_0x818a9d,data:{newRange:_0x2f3e3f}}of _0x1449ad[_0x5b77('0x67')][_0x5b77('0x4a')][_0x5b77('0x6a')][_0x5b77('0x1f')]()){const {group:_0x4c9f40,id:_0x4d324f}=tt(_0x818a9d);if(_0x5b77('0x2')!==_0x4c9f40)continue;const _0x41c2b9=_0x4f34cd['getCommentThread'](_0x4d324f),_0x5c5113=this[_0x5b77('0x2b')](_0x4d324f);_0x41c2b9&&(_0x41c2b9[_0x5b77('0x54')]||_0x1449ad[_0x5b77('0x21')][_0x5b77('0x3c')][_0x5b77('0x15')](_0x5b77('0x29'),()=>{const _0xd24826=_0x1449ad[_0x5b77('0x42')][_0x5b77('0xf')](_0x7fabf6),_0x29b835=_0x4f34cd['_threadToController']['get'](_0x41c2b9)[_0x5b77('0x3c')];_0xd24826[_0x5b77('0x68')](_0x29b835)['refreshVisibility']();},{'priority':'low'}),_0x41c2b9[_0x5b77('0x54')]=_0x5c5113||!!_0x2f3e3f),!_0x2f3e3f&&_0xb321e[_0x5b77('0x38')]&&(_0xc1f62f[_0x5b77('0x2e')](_0x4d324f),_0x41c2b9&&!_0x41c2b9[_0x5b77('0x10')]&&!_0x5c5113&&this['_attachedThreads'][_0x5b77('0x69')](_0x4d324f)&&(this[_0x5b77('0x53')][_0x5b77('0x2e')](_0x4d324f),_0x41c2b9['resolve']()));}});}[_0x5b77('0x0')](_0x303a25){const _0x2f65d0=this[_0x5b77('0x2c')],_0x189557=this[_0x5b77('0x4')](_0x303a25);return _0x5b3977(_0x2f65d0[_0x5b77('0x21')],_0x189557);}[_0x5b77('0x45')](_0x44d5c1){const _0x511956=this[_0x5b77('0x4')](_0x44d5c1);let _0x5b4186='',_0x62634e=!0x1;for(const _0x2f039c of _0x511956){const _0x1e1a0a=_0x2f039c['getRange']();for(const _0x38e028 of Array[_0x5b77('0x1c')](_0x1e1a0a[_0x5b77('0x34')]()))_0x38e028['is'](_0x5b77('0x3d'))?(_0x5b4186&&_0x62634e&&(_0x5b4186+='\x20',_0x62634e=!0x1),_0x5b4186+=_0x38e028['data']):_0x62634e=!0x0;_0x62634e=!0x0;}return _0x5b4186[_0x5b77('0x26')](0x0,0x96);}[_0x5b77('0x30')](_0x2f4a5c,_0x225c72){const _0x25cbe2=this[_0x5b77('0x2c')],_0x308960=_0x25cbe2[_0x5b77('0x42')]['get'](_0x422b86);let _0x4f6874=_0x308960[_0x5b77('0x9')](_0x225c72);if(this['_attachedThreads'][_0x5b77('0x69')](_0x225c72)){const _0x3ea6af=this[_0x5b77('0x53')][_0x5b77('0xf')](_0x225c72);return _0x3ea6af['includes'](_0x2f4a5c)||_0x3ea6af[_0x5b77('0x27')](_0x2f4a5c),_0x4f6874;}this[_0x5b77('0x53')][_0x5b77('0x5a')](_0x225c72,[_0x2f4a5c]);const _0x5721a6=_0x25cbe2[_0x5b77('0x55')][_0x5b77('0xf')](_0x5b77('0x1e')),_0x56dd5d=_0x25cbe2['plugins']['get'](_0x13dc1b);if(_0x4f6874&&_0x4f6874[_0x5b77('0x10')])return _0x4f6874['reopen'](),_0x4f6874;return!this[_0x5b77('0x4')](_0x225c72)[0x0][_0x5b77('0x33')]?_0x25cbe2['editing'][_0x5b77('0x3c')]['once']('render',()=>{const _0x4767c6=_0x25cbe2[_0x5b77('0x42')][_0x5b77('0xf')](_0x7fabf6);_0x4f6874=_0x308960[_0x5b77('0x39')]({'channelId':_0x5721a6,'threadId':_0x225c72,'target':()=>this['_getTargetForId'](_0x225c72),'context':{'type':_0x5b77('0x3b'),'value':this[_0x5b77('0x45')](_0x225c72)}});const _0x31eee9=_0x308960[_0x5b77('0x2a')]['get'](_0x4f6874)[_0x5b77('0x3c')],_0x190191=_0x4767c6[_0x5b77('0x68')](_0x31eee9);_0x190191&&_0x56dd5d['registerAnnotation'](_0x190191);},{'priority':_0x5b77('0x3e')}):_0x308960['fetchCommentThread']({'channelId':_0x5721a6,'threadId':_0x225c72})['then'](_0x3e2406=>{if('destroyed'!==_0x25cbe2[_0x5b77('0x60')]){if(_0x4f6874=_0x3e2406,_0x4f6874){const _0x1c980e=_0x4f6874[_0x5b77('0x5f')](()=>this['_getTargetForId'](_0x225c72));_0x56dd5d[_0x5b77('0x51')](_0x1c980e);}else{const _0x3dd765=this[_0x5b77('0x4')](_0x225c72);_0x25cbe2[_0x5b77('0x67')][_0x5b77('0x65')](_0x1cfbfb=>{for(const _0x13578b of _0x3dd765)_0x1cfbfb[_0x5b77('0xb')](_0x13578b);});}}}),_0x4f6874;}[_0x5b77('0xd')](_0x5bf498,_0x4c7c0d){const _0xa31491=this[_0x5b77('0x30')](_0x5bf498,_0x4c7c0d);_0xa31491&&!_0xa31491['context']&&_0xa31491[_0x5b77('0x52')]({'type':'text','value':this[_0x5b77('0x45')](_0x4c7c0d)});}}function Z(_0x2fccb8,_0x2a1191){return _0x2a1191?_0x2fccb8+':'+_0x2a1191:_0x2fccb8;}function tt(_0x246de0){const _0x442ab5=_0x246de0['split'](':');return{'group':_0x442ab5[0x0],'id':_0x442ab5[0x1],'part':_0x442ab5[0x2]};}function ot(_0x4e5a60,_0x4454b3){const _0x1002b1=_0x4454b3[_0x5b77('0x57')],_0x9d0740=_0x4454b3[_0x5b77('0x14')](_0x4e5a60[_0x5b77('0x47')]);for(const _0x1a59bc of _0x4e5a60[_0x5b77('0x5d')]()){const {type:_0x5463a0,item:_0x580499,nextPosition:_0x34eef4}=_0x1a59bc;if(_0x5b77('0x3b')===_0x5463a0||_0x1002b1[_0x5b77('0x18')](_0x580499)){const _0x4bcf9f=_0x4454b3[_0x5b77('0x16')](_0x580499);_0x9d0740[_0x5b77('0x2d')]&&(_0x9d0740['start']=_0x4bcf9f),_0x9d0740[_0x5b77('0x4b')]=_0x34eef4;}}return _0x9d0740[_0x5b77('0x2d')]?null:_0x9d0740;}
|
|
23
|
+
const _0x197e=['addMarker:','change:isReadOnly','hasDomSelection','newRange','high','ignoreResolvedComments','getCommentThread','_threadToController','scrollToThreadMarker','config','ck-comment-marker--active','change:activeMarker','reconvertMarker','context','getAttribute','substring','dataDowncast','upcast','focus','root','model','comment','differ','fetchCommentThread','destroy','activeMarker','refreshVisibility','isResolved','once','managedUsingOperations','rootName','_detachCommentThread','pluginName','split','item','view','map','add','_threads','set','_hasTargetInContent','_attachMarkerToThread','_getTargetForId','consume','ck-comment-marker','editor','isCollapsed','push','reopenCommentThread','addCommentThread','markerToData','low','markers','change','createElement','affectsData','get','$marker','_handleMarkerAddAndRemove','hasContent','_attachedThreads','data','setContext','updateMarker','openNewCommentThread','text','conversion','start','registerAnnotation','switchReadOnly','collaboration.channelId','$graveyard','has','filter','addComment','CommentsEditing','getAllMarkersForId','removeMarker:','_handleThreadMarker','schema','length','reopen','$textProxy','removeMarker','plugins','document','editing','includes','then','destroyed','listenTo','_getTextContext','for','_reconvertMarkers','markerName','getChangedMarkers','attachTo','from','render','change:isThreadsLoadingPaused','hasCommentThread','getWalker','enqueueChange','getItems','state','elementToElement','delete','editingDowncast','isObject','dataToMarker','isEqual','isThreadsLoadingPaused','isLocal','requires','commands','consumable'];(function(_0x3033d5,_0x197e2b){const _0x315e54=function(_0x14cf6f){while(--_0x14cf6f){_0x3033d5['push'](_0x3033d5['shift']());}};_0x315e54(++_0x197e2b);}(_0x197e,0x12e));const _0x315e=function(_0x3033d5,_0x197e2b){_0x3033d5=_0x3033d5-0x0;let _0x315e54=_0x197e[_0x3033d5];return _0x315e54;};import{Plugin as _0x53d941}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x916f02}from'ckeditor5/src/utils';import _0x543420 from'./commentsrepository';import _0x1e6d09 from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x4111b3}from'ckeditor5-collaboration/src/collaboration-core';import _0x1f94fa from'../annotations/editorannotations';import _0x1ef5c2 from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x8269a from'./integrations/importword';import _0xbcf6c1 from'../annotations/annotations';export default class r extends _0x53d941{static get[_0x315e('0x2b')](){return[_0x543420,_0x1f94fa,_0x1ef5c2,_0x8269a];}static get[_0x315e('0x4e')](){return _0x315e('0x5');}constructor(_0x1f429b){super(_0x1f429b),this[_0x315e('0x55')]('isThreadsLoadingPaused',!0x0),_0x1f429b[_0x315e('0x6b')][_0x315e('0x4a')]('ready',()=>this['isThreadsLoadingPaused']=!0x1),this[_0x315e('0x55')](_0x315e('0x47'),null),this['on'](_0x315e('0x39'),(_0x1ff66b,_0xf2facb,_0x5c6d95,_0x3400a9)=>{const _0x3c8848=_0x5c6d95?tt(_0x5c6d95)['id']:null;if(_0x1f429b[_0x315e('0x42')][_0x315e('0x63')](()=>{if(_0x3c8848){const _0x33e9a8=this[_0x315e('0x6')](_0x3c8848);for(const _0x44703e of _0x33e9a8)_0x1f429b[_0x315e('0x10')]['reconvertMarker'](_0x44703e);}if(_0x3400a9){const {id:_0x2d72aa}=tt(_0x3400a9),_0x150174=this[_0x315e('0x6')](_0x2d72aa);for(const _0x3395b7 of _0x150174)_0x1f429b[_0x315e('0x10')][_0x315e('0x3a')](_0x3395b7);}}),_0x3c8848){const _0x32cde1=_0x1f429b[_0x315e('0xe')][_0x315e('0x66')](_0x543420)[_0x315e('0x34')](_0x3c8848);_0x32cde1&&_0x32cde1[_0x315e('0x49')]&&this[_0x315e('0x36')](_0x3c8848);}}),this[_0x315e('0x6a')]=new Map();}['init'](){const _0xb2876f=this[_0x315e('0x5b')],_0x408382=_0xb2876f[_0x315e('0xe')]['get'](_0x543420),_0x944476=_0xb2876f[_0x315e('0x37')]['get'](_0x315e('0x0'));_0xb2876f[_0x315e('0x2c')]['add'](_0x315e('0x5f'),new _0x1e6d09(_0xb2876f)),this[_0x315e('0x14')](_0xb2876f,_0x315e('0x2f'),(_0xd9f037,_0x5d1ae5,_0x15ae30)=>{_0x408382[_0x315e('0x73')](_0x15ae30,_0xb2876f[_0x315e('0x37')][_0x315e('0x66')](_0x315e('0x0')));}),this['listenTo'](_0x408382,Z('addCommentThread',_0x944476),(_0x119b6a,{threadId:_0x26d78e})=>{const _0x349d1a=_0xb2876f[_0x315e('0xe')][_0x315e('0x66')](_0x1f94fa),_0xe5eac9=this[_0x315e('0x5b')]['plugins'][_0x315e('0x66')](_0x543420)[_0x315e('0x34')](_0x26d78e);if(_0xe5eac9&&_0xe5eac9[_0x315e('0x49')]&&!this['_attachedThreads']['has'](_0x26d78e)){const _0x3b58de=_0xe5eac9[_0x315e('0x1a')](()=>this[_0x315e('0x58')](_0xe5eac9['id']));_0x349d1a[_0x315e('0x72')](_0x3b58de),this[_0x315e('0x6a')][_0x315e('0x55')](_0x26d78e,[]),0x0===this['getAllMarkersForId'](_0x26d78e)[_0x315e('0xa')]&&(_0xe5eac9[_0x315e('0x56')]=!0x1);}}),this[_0x315e('0x14')](_0x408382,Z('removeCommentThread',_0x944476),(_0x504a44,{threadId:_0x376e15})=>{_0xb2876f[_0x315e('0x42')]['enqueueChange']({'isUndoable':!0x1},_0x3f1843=>{const _0x5e15dd=this['getAllMarkersForId'](_0x376e15);this[_0x315e('0x6a')][_0x315e('0x24')](_0x376e15);for(const _0x4fab15 of _0x5e15dd)_0x3f1843[_0x315e('0xd')](_0x4fab15);});},{'priority':_0x315e('0x32')}),this[_0x315e('0x14')](_0x408382,Z('resolveCommentThread',_0x944476),(_0x130207,{threadId:_0x7a0fa4})=>{this['_reconvertMarkers'](_0x7a0fa4),this[_0x315e('0x5b')]['editing'][_0x315e('0x51')][_0x315e('0x30')]&&this[_0x315e('0x5b')][_0x315e('0x10')][_0x315e('0x51')][_0x315e('0x40')]();},{'priority':'low'}),this[_0x315e('0x14')](_0x408382,Z(_0x315e('0x5e'),_0x944476),(_0x450ef7,{threadId:_0x1c43b1})=>{this[_0x315e('0x17')](_0x1c43b1);},{'priority':_0x315e('0x61')}),this[_0x315e('0x14')](_0x408382,Z(_0x315e('0x4'),_0x944476),(_0x5aa108,{threadId:_0x3f9fa1,isFromAdapter:_0x34f415})=>{const _0x15f13f=this[_0x315e('0x6')](_0x3f9fa1);if(_0x34f415||0x0==_0x15f13f[_0x315e('0xa')]||!_0x408382[_0x315e('0x1e')](_0x3f9fa1))return;0x1===_0x408382[_0x315e('0x34')](_0x3f9fa1)[_0x315e('0xa')]&&_0xb2876f[_0x315e('0x42')][_0x315e('0x20')]({'isUndoable':!0x1},_0x34b6e6=>{for(const _0x5e382b of _0x15f13f)_0x34b6e6['updateMarker'](_0x5e382b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':_0x315e('0x61')}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove']();}[_0x315e('0x46')](){const _0x109295=this['editor'][_0x315e('0xe')][_0x315e('0x66')](_0x543420),_0x545897=this[_0x315e('0x5b')][_0x315e('0x37')][_0x315e('0x66')](_0x315e('0x0'));for(const _0x16d98b of _0x109295['getCommentThreads']({'channelId':_0x545897}))_0x109295[_0x315e('0x4d')](_0x16d98b['id']),_0x109295[_0x315e('0x54')][_0x315e('0x24')](_0x16d98b['id']);super[_0x315e('0x46')]();}['hasMarkerForId'](_0xe47c83){return this[_0x315e('0x6')](_0xe47c83)[_0x315e('0xa')]>0x0;}['getAllMarkersForId'](_0x3d772e){return(this['_attachedThreads'][_0x315e('0x66')](_0x3d772e)||[])[_0x315e('0x52')](_0x3e6b21=>this['editor']['model'][_0x315e('0x62')][_0x315e('0x66')](_0x3e6b21))[_0x315e('0x3')](_0x3438c4=>_0x3438c4);}['scrollToThreadMarker'](_0x23eef6){const _0x59a801=this[_0x315e('0x58')](_0x23eef6);_0x59a801&&setTimeout(()=>{this[_0x315e('0x47')]&&tt(this[_0x315e('0x47')])['id']===_0x23eef6&&_0x916f02({'target':_0x59a801[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1041f2){this[_0x315e('0x5b')][_0x315e('0x42')][_0x315e('0x63')](()=>{for(const _0x345469 of this[_0x315e('0x6')](_0x1041f2))this['editor'][_0x315e('0x10')]['reconvertMarker'](_0x345469);});}['_initializeMarkerConverters'](){const _0x182fe8=this[_0x315e('0x5b')];_0x182fe8[_0x315e('0x70')][_0x315e('0x16')](_0x315e('0x25'))['markerToHighlight']({'model':_0x315e('0x43'),'view':(_0x3b5874,_0x477cdf)=>{const {id:_0x16a386}=tt(_0x3b5874[_0x315e('0x18')]),_0x4871a9=_0x182fe8[_0x315e('0xe')]['get'](_0x543420)[_0x315e('0x34')](_0x16a386),_0x40a458=this[_0x315e('0x47')]&&tt(this[_0x315e('0x47')])['id']===_0x16a386;if(_0x4871a9&&_0x4871a9[_0x315e('0x49')]&&!_0x40a458&&_0x3b5874[_0x315e('0x50')])return _0x477cdf[_0x315e('0x2d')][_0x315e('0x59')](_0x3b5874[_0x315e('0x50')],_0x315e('0x2e')+_0x3b5874[_0x315e('0x18')]),_0x477cdf[_0x315e('0x2d')][_0x315e('0x59')](_0x3b5874[_0x315e('0x50')],_0x315e('0x7')+_0x3b5874[_0x315e('0x18')]),{'classes':[]};const _0x50f024=[_0x315e('0x5a')];return _0x40a458&&_0x50f024[_0x315e('0x5d')](_0x315e('0x38')),{'classes':_0x50f024,'attributes':{'data-comment':_0x16a386}};}}),_0x182fe8[_0x315e('0x70')][_0x315e('0x16')](_0x315e('0x3e'))[_0x315e('0x60')]({'model':_0x315e('0x43'),'view':(_0x503120,{options:_0x5a3ce1})=>{const _0x2ec688=_0x182fe8['plugins'][_0x315e('0x66')](_0x543420),_0x87239e=_0x182fe8[_0x315e('0x42')][_0x315e('0x62')][_0x315e('0x66')](_0x503120),{id:_0x1c4b85,part:_0x3f19ba}=tt(_0x503120),_0x125a53=_0x2ec688[_0x315e('0x34')](_0x1c4b85);return _0x87239e&&!_0x87239e[_0x315e('0x65')]||_0x125a53&&_0x125a53['isResolved']&&_0x5a3ce1[_0x315e('0x33')]?null:{'group':_0x315e('0x43'),'name':_0x3f19ba?_0x1c4b85+':'+_0x3f19ba:_0x1c4b85};}}),_0x182fe8[_0x315e('0x70')][_0x315e('0x16')](_0x315e('0x3f'))[_0x315e('0x23')]({'view':{'name':_0x315e('0x43'),'attributes':{'id':/^\w/}},'model':(_0x2be808,{writer:_0x40b190})=>_0x40b190[_0x315e('0x64')](_0x315e('0x67'),{'data-name':'comment:'+_0x2be808[_0x315e('0x3c')]('id')})}),_0x182fe8['conversion']['for'](_0x315e('0x3f'))[_0x315e('0x27')]({'view':_0x315e('0x43')});}[_0x315e('0x68')](){const _0x180cd9=this[_0x315e('0x5b')],_0x327ea0=_0x180cd9[_0x315e('0xe')][_0x315e('0x66')](_0x543420),_0x50c2d0=new Set();_0x180cd9['model'][_0x315e('0xf')]['registerPostFixer'](_0x537f63=>{let _0x28724e=!0x1;for(const {name:_0x52c115,data:_0x24ca57}of _0x180cd9[_0x315e('0x42')]['document'][_0x315e('0x44')][_0x315e('0x19')]()){const {group:_0x162d7e,id:_0x4cd8b0}=tt(_0x52c115);let _0x195dc5=_0x24ca57[_0x315e('0x31')];if(_0x315e('0x43')!==_0x162d7e||!_0x195dc5)continue;const _0x577365=_0x315e('0x1')===_0x195dc5[_0x315e('0x41')][_0x315e('0x4c')];_0x577365||(_0x195dc5=ot(_0x195dc5,_0x180cd9[_0x315e('0x42')]),!_0x195dc5||!_0x24ca57[_0x315e('0x31')]||_0x195dc5[_0x315e('0x28')](_0x24ca57[_0x315e('0x31')]))?!_0x195dc5||!_0x180cd9[_0x315e('0x42')][_0x315e('0x69')](_0x195dc5)||this[_0x315e('0x6a')][_0x315e('0x2')](_0x4cd8b0)&&_0x577365?(_0x537f63[_0x315e('0xd')](_0x52c115),_0x28724e=!0x0):_0x577365||(this[_0x315e('0x29')]?_0x50c2d0[_0x315e('0x53')](_0x52c115):this[_0x315e('0x8')](_0x52c115,_0x4cd8b0)):(_0x537f63[_0x315e('0x6d')](_0x52c115,{'range':_0x195dc5}),_0x28724e=!0x0);}return _0x28724e;}),this['on'](_0x315e('0x1d'),(_0x42e82e,_0x41f3fa,_0x1fda70)=>{if(!_0x1fda70&&_0x50c2d0['size'])for(const _0x4e4434 of _0x50c2d0){const {id:_0x5e0d3e}=tt(_0x4e4434);_0x50c2d0[_0x315e('0x24')](_0x5e0d3e),_0x180cd9[_0x315e('0x42')][_0x315e('0x62')]['get'](_0x4e4434)&&this['_handleThreadMarker'](_0x4e4434,_0x5e0d3e);}}),this[_0x315e('0x14')](_0x180cd9['model'][_0x315e('0xf')],_0x315e('0x63'),(_0x50fec8,_0x401915)=>{for(const {name:_0x15ff56,data:{newRange:_0x1b2f40}}of _0x180cd9[_0x315e('0x42')][_0x315e('0xf')][_0x315e('0x44')][_0x315e('0x19')]()){const {group:_0x1554cc,id:_0x30dcba}=tt(_0x15ff56);if(_0x315e('0x43')!==_0x1554cc)continue;const _0x5b25f8=_0x327ea0[_0x315e('0x34')](_0x30dcba),_0x4d48f1=this['hasMarkerForId'](_0x30dcba);_0x5b25f8&&(_0x5b25f8[_0x315e('0x56')]||_0x180cd9[_0x315e('0x10')][_0x315e('0x51')][_0x315e('0x4a')](_0x315e('0x1c'),()=>{const _0xb7f728=_0x180cd9['plugins'][_0x315e('0x66')](_0xbcf6c1),_0x25d5d9=_0x327ea0[_0x315e('0x35')][_0x315e('0x66')](_0x5b25f8)[_0x315e('0x51')];_0xb7f728['getByInnerView'](_0x25d5d9)[_0x315e('0x48')]();},{'priority':_0x315e('0x61')}),_0x5b25f8[_0x315e('0x56')]=_0x4d48f1||!!_0x1b2f40),!_0x1b2f40&&_0x401915[_0x315e('0x2a')]&&(_0x50c2d0[_0x315e('0x24')](_0x30dcba),_0x5b25f8&&!_0x5b25f8['isResolved']&&!_0x4d48f1&&this['_attachedThreads'][_0x315e('0x2')](_0x30dcba)&&(this['_attachedThreads'][_0x315e('0x24')](_0x30dcba),_0x5b25f8['resolve']()));}});}[_0x315e('0x58')](_0x2484fa){const _0x84c838=this[_0x315e('0x5b')],_0x5cf9d4=this['getAllMarkersForId'](_0x2484fa);return _0x4111b3(_0x84c838[_0x315e('0x10')],_0x5cf9d4);}[_0x315e('0x15')](_0x380bd1){const _0x3952f4=this[_0x315e('0x6')](_0x380bd1);let _0x4d9a73='',_0x14f8d0=!0x1;for(const _0x45aca0 of _0x3952f4){const _0x5afc25=_0x45aca0['getRange']();for(const _0x56534f of Array[_0x315e('0x1b')](_0x5afc25[_0x315e('0x21')]()))_0x56534f['is'](_0x315e('0xc'))?(_0x4d9a73&&_0x14f8d0&&(_0x4d9a73+='\x20',_0x14f8d0=!0x1),_0x4d9a73+=_0x56534f[_0x315e('0x6b')]):_0x14f8d0=!0x0;_0x14f8d0=!0x0;}return _0x4d9a73[_0x315e('0x3d')](0x0,0x96);}[_0x315e('0x57')](_0x1998dc,_0x3a98d8){const _0x2cce18=this['editor'],_0x5d9809=_0x2cce18[_0x315e('0xe')][_0x315e('0x66')](_0x543420);let _0x2e9a93=_0x5d9809['getCommentThread'](_0x3a98d8);if(this[_0x315e('0x6a')]['has'](_0x3a98d8)){const _0x52faeb=this['_attachedThreads'][_0x315e('0x66')](_0x3a98d8);return _0x52faeb[_0x315e('0x11')](_0x1998dc)||_0x52faeb[_0x315e('0x5d')](_0x1998dc),_0x2e9a93;}this[_0x315e('0x6a')][_0x315e('0x55')](_0x3a98d8,[_0x1998dc]);const _0x3237bc=_0x2cce18['config']['get']('collaboration.channelId'),_0x3387cb=_0x2cce18[_0x315e('0xe')]['get'](_0x1f94fa);if(_0x2e9a93&&_0x2e9a93['isResolved'])return _0x2e9a93[_0x315e('0xb')](),_0x2e9a93;return!this['getAllMarkersForId'](_0x3a98d8)[0x0][_0x315e('0x4b')]?_0x2cce18[_0x315e('0x10')][_0x315e('0x51')]['once'](_0x315e('0x1c'),()=>{const _0x5028a4=_0x2cce18['plugins'][_0x315e('0x66')](_0xbcf6c1);_0x2e9a93=_0x5d9809[_0x315e('0x6e')]({'channelId':_0x3237bc,'threadId':_0x3a98d8,'target':()=>this['_getTargetForId'](_0x3a98d8),'context':{'type':_0x315e('0x6f'),'value':this[_0x315e('0x15')](_0x3a98d8)}});const _0x26e9f2=_0x5d9809[_0x315e('0x35')][_0x315e('0x66')](_0x2e9a93)[_0x315e('0x51')],_0xaa4862=_0x5028a4['getByInnerView'](_0x26e9f2);_0xaa4862&&_0x3387cb[_0x315e('0x72')](_0xaa4862);},{'priority':'low'}):_0x5d9809[_0x315e('0x45')]({'channelId':_0x3237bc,'threadId':_0x3a98d8})[_0x315e('0x12')](_0x48f817=>{if(_0x315e('0x13')!==_0x2cce18[_0x315e('0x22')]){if(_0x2e9a93=_0x48f817,_0x2e9a93){const _0x2d8036=_0x2e9a93[_0x315e('0x1a')](()=>this[_0x315e('0x58')](_0x3a98d8));_0x3387cb[_0x315e('0x72')](_0x2d8036);}else{const _0x24840e=this['getAllMarkersForId'](_0x3a98d8);_0x2cce18[_0x315e('0x42')][_0x315e('0x63')](_0x40b267=>{for(const _0x2d1615 of _0x24840e)_0x40b267['removeMarker'](_0x2d1615);});}}}),_0x2e9a93;}[_0x315e('0x8')](_0xa9a58a,_0x14290d){const _0x2bc68d=this[_0x315e('0x57')](_0xa9a58a,_0x14290d);_0x2bc68d&&!_0x2bc68d[_0x315e('0x3b')]&&_0x2bc68d[_0x315e('0x6c')]({'type':_0x315e('0x6f'),'value':this[_0x315e('0x15')](_0x14290d)});}}function Z(_0x2cdb04,_0x572dfd){return _0x572dfd?_0x2cdb04+':'+_0x572dfd:_0x2cdb04;}function tt(_0x1ce2f0){const _0x4bea75=_0x1ce2f0[_0x315e('0x4f')](':');return{'group':_0x4bea75[0x0],'id':_0x4bea75[0x1],'part':_0x4bea75[0x2]};}function ot(_0x3317cd,_0x591b3b){const _0x3f93f6=_0x591b3b[_0x315e('0x9')],_0x18af28=_0x591b3b['createRange'](_0x3317cd[_0x315e('0x71')]);for(const _0x10d8be of _0x3317cd[_0x315e('0x1f')]()){const {type:_0x19e44f,item:_0x1e583b,nextPosition:_0x3f9541}=_0x10d8be;if('text'===_0x19e44f||_0x3f93f6[_0x315e('0x26')](_0x1e583b)){const _0x3dc3b9=_0x591b3b['createPositionBefore'](_0x1e583b);_0x18af28[_0x315e('0x5c')]&&(_0x18af28['start']=_0x3dc3b9),_0x18af28['end']=_0x3f9541;}}return _0x18af28[_0x315e('0x5c')]?null:_0x18af28;}
|
|
@@ -138,7 +138,7 @@ export default class CommentsRepository extends ContextPlugin {
|
|
|
138
138
|
* comment data will be added only in the editor and will not be sent to the adapter.
|
|
139
139
|
* @returns The added comment thread.
|
|
140
140
|
*/
|
|
141
|
-
addCommentThread({ channelId, threadId, comments, resolvedAt, resolvedBy, target, context, attributes, isResolvable, isSubmitted, isFromAdapter }?: AddCommentThreadEventData): CommentThread | undefined;
|
|
141
|
+
addCommentThread({ channelId, threadId, comments, resolvedAt, resolvedBy, target, context, attributes, isResolvable, isSubmitted, deletedAt, isFromAdapter }?: AddCommentThreadEventData): CommentThread | undefined;
|
|
142
142
|
/**
|
|
143
143
|
* Creates a new, empty comment thread.
|
|
144
144
|
*
|
|
@@ -230,6 +230,24 @@ export default class CommentsRepository extends ContextPlugin {
|
|
|
230
230
|
* @param commentThreadView Comment thread view.
|
|
231
231
|
*/
|
|
232
232
|
createCommentThreadController(commentThreadModel: CommentThread, commentThreadView: BaseCommentThreadView): CommentThreadController;
|
|
233
|
+
/**
|
|
234
|
+
* Gets permissions set for repository (or default if permissions was not set).
|
|
235
|
+
*/
|
|
236
|
+
getPermissions(channelId?: string | symbol): CommentPermissionsConfig;
|
|
237
|
+
}
|
|
238
|
+
interface CommentPermissionsConfig {
|
|
239
|
+
/**
|
|
240
|
+
* Allows for removing other users' threads.
|
|
241
|
+
*/
|
|
242
|
+
admin: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Allows for editing and removing any comments created by any user.
|
|
245
|
+
*/
|
|
246
|
+
modifyAll: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Allows for editing and removing comments created by this user.
|
|
249
|
+
*/
|
|
250
|
+
write: boolean;
|
|
233
251
|
}
|
|
234
252
|
declare const CommentThread_base: {
|
|
235
253
|
new (): import("ckeditor5/src/utils").Observable;
|
|
@@ -622,7 +640,7 @@ export type CommentThreadContext = null | {
|
|
|
622
640
|
* @param threadId The ID of the comment thread.
|
|
623
641
|
* @param isFromAdapter A flag describing whether the operation was done on a remote client (`true`) or a local one (`false`).
|
|
624
642
|
*/
|
|
625
|
-
interface BaseCommentThread {
|
|
643
|
+
export interface BaseCommentThread {
|
|
626
644
|
channelId: string | symbol;
|
|
627
645
|
threadId: string;
|
|
628
646
|
isFromAdapter?: boolean;
|
|
@@ -630,14 +648,14 @@ interface BaseCommentThread {
|
|
|
630
648
|
/**
|
|
631
649
|
* @param commentId The comment ID.
|
|
632
650
|
*/
|
|
633
|
-
interface BaseComment extends BaseCommentThread {
|
|
651
|
+
export interface BaseComment extends BaseCommentThread {
|
|
634
652
|
commentId: string;
|
|
635
653
|
}
|
|
636
654
|
/**
|
|
637
655
|
* @param content The comment content.
|
|
638
656
|
* @param attributes Comment custom attributes.
|
|
639
657
|
*/
|
|
640
|
-
interface BaseCommentData {
|
|
658
|
+
export interface BaseCommentData {
|
|
641
659
|
content: string;
|
|
642
660
|
attributes: Record<string, any>;
|
|
643
661
|
}
|
|
@@ -682,6 +700,7 @@ export type AddCommentThreadEventData = CommentThreadData & {
|
|
|
682
700
|
target?: AnnotationTarget;
|
|
683
701
|
isResolvable?: boolean;
|
|
684
702
|
isSubmitted?: boolean;
|
|
703
|
+
deletedAt?: Date | null;
|
|
685
704
|
};
|
|
686
705
|
/**
|
|
687
706
|
* Fired whenever a new comment thread is submitted and occurs after creating the first comment.
|
|
@@ -881,6 +900,20 @@ export type CommentThreadDataJSON = {
|
|
|
881
900
|
export interface CommentsAdapter {
|
|
882
901
|
/**
|
|
883
902
|
* Called whenever a new comment thread is created.
|
|
903
|
+
*
|
|
904
|
+
* The object which is passed as a parameter can contain following properties:
|
|
905
|
+
* * channelId: string | symbol;
|
|
906
|
+
* * threadId: string;
|
|
907
|
+
* * context?: {@link module:comments/comments/commentsrepository~CommentThreadContext CommentThreadContext};
|
|
908
|
+
* * comments?: Array<{@link module:comments/comments/commentsrepository~CommentDataJSON CommentDataJSON}>;
|
|
909
|
+
* * resolvedAt?: Date | null;
|
|
910
|
+
* * resolvedBy?: string | null;
|
|
911
|
+
* * attributes?: Record<string, any> | null;
|
|
912
|
+
*
|
|
913
|
+
* It should return a promise that resolves with the new comment thread data.
|
|
914
|
+
* The resolved data object should contain following properties:
|
|
915
|
+
* * threadId: string;
|
|
916
|
+
* * comments: Array<\{ commentId: string; createdAt: Date; \}>;
|
|
884
917
|
*/
|
|
885
918
|
addCommentThread: (data: Omit<CommentThreadData, 'isFromAdapter'> & {
|
|
886
919
|
comments: Array<CommentDataJSON>;
|
|
@@ -895,7 +928,12 @@ export interface CommentsAdapter {
|
|
|
895
928
|
* Called when the editor needs the data for a comment thread.
|
|
896
929
|
*
|
|
897
930
|
* It should return a promise that resolves with the comment thread data.
|
|
898
|
-
* The resolved data object should
|
|
931
|
+
* The resolved data object should contain following properties:
|
|
932
|
+
* * threadId: string;
|
|
933
|
+
* * comments: Array<\{ commentId?: string; authorId: string; createdAt: Date; content: string; attributes: Record<string, any>; \}>;
|
|
934
|
+
* * resolvedAt?: Date | null;
|
|
935
|
+
* * resolvedBy?: string | null;
|
|
936
|
+
* * attributes: Record<string, unknown>;
|
|
899
937
|
*
|
|
900
938
|
* @param data.channelId The ID of the document or context to which the comment is added.
|
|
901
939
|
* @param data.threadId The ID of the comment thread that the comment is added to.
|
|
@@ -910,13 +948,30 @@ export interface CommentsAdapter {
|
|
|
910
948
|
/**
|
|
911
949
|
* Called each time the user changes the existing comment thread.
|
|
912
950
|
*
|
|
951
|
+
* Keep in mind that for security reasons, `authorId`, `createdAt`, `resolvedBy` and `resolvedAt` properties
|
|
952
|
+
* are not passed in `updateCommentThread()` call and you should not set them as a result of this call.
|
|
953
|
+
*
|
|
913
954
|
* It updates the comment data in the database and returns a promise
|
|
914
955
|
* that will be resolved when the update is completed.
|
|
956
|
+
*
|
|
957
|
+
* The object which is passed as a parameter can contain following properties:
|
|
958
|
+
* * channelId: string | symbol;
|
|
959
|
+
* * threadId: string;
|
|
960
|
+
* * context?: {@link module:comments/comments/commentsrepository~CommentThreadContext};
|
|
961
|
+
* * attributes?: Record<string, any> | null;
|
|
915
962
|
*/
|
|
916
963
|
updateCommentThread: (data: Omit<UpdateCommentThreadEventData, 'isFromAdapter'>) => Promise<void>;
|
|
917
964
|
/**
|
|
918
965
|
* Called each time the user resolves a comment thread.
|
|
919
966
|
*
|
|
967
|
+
* Should set `resolvedAt` and `resolvedBy` properties in your database and should resolve with an object
|
|
968
|
+
* containing these two properties and returns a promise that will be resolved when the operation is completed.
|
|
969
|
+
*
|
|
970
|
+
* The resolved data object should contain following properties:
|
|
971
|
+
* * threadId: string;
|
|
972
|
+
* * resolvedAt: Date;
|
|
973
|
+
* * resolvedBy: string;
|
|
974
|
+
*
|
|
920
975
|
* @param data.channelId The ID of the document or context that the comment thread is removed from.
|
|
921
976
|
* @param data.threadId The ID of the thread to remove.
|
|
922
977
|
*/
|
|
@@ -928,6 +983,9 @@ export interface CommentsAdapter {
|
|
|
928
983
|
/**
|
|
929
984
|
* Called when the user reopens a resolved comment thread.
|
|
930
985
|
*
|
|
986
|
+
* Should set `resolvedAt` and `resolvedBy` properties to `null` in your database and returns a promise
|
|
987
|
+
* that will be resolved when the operation is completed.
|
|
988
|
+
*
|
|
931
989
|
* @param data.channelId The ID of the document or context that the comment thread is removed from.
|
|
932
990
|
* @param data.threadId The ID of the thread to remove.
|
|
933
991
|
*/
|
|
@@ -935,11 +993,6 @@ export interface CommentsAdapter {
|
|
|
935
993
|
/**
|
|
936
994
|
* Called each time the user removes a comment thread.
|
|
937
995
|
*
|
|
938
|
-
* Keep in mind that comment thread removal happens only
|
|
939
|
-
* for comment threads created outside of the editor.
|
|
940
|
-
* You do not need to implement this method if you use
|
|
941
|
-
* the comments feature inside the editor only.
|
|
942
|
-
*
|
|
943
996
|
* It should return a promise that resolves when the thread is removed.
|
|
944
997
|
*
|
|
945
998
|
* @param data.channelId The ID of the document or context that the comment thread is removed from.
|
|
@@ -968,6 +1021,17 @@ export interface CommentsAdapter {
|
|
|
968
1021
|
* and to save it as a string in your database and then to parse the
|
|
969
1022
|
* value from JSON when loading comments.
|
|
970
1023
|
*
|
|
1024
|
+
* The object which is passed as a parameter can contain following properties:
|
|
1025
|
+
* * channelId: string | symbol;
|
|
1026
|
+
* * threadId: string;
|
|
1027
|
+
* * commentId: string;
|
|
1028
|
+
* * content: string;
|
|
1029
|
+
* * attributes: Record<string, any>;
|
|
1030
|
+
*
|
|
1031
|
+
* The resolved data object should contain following properties:
|
|
1032
|
+
* * commentId: string;
|
|
1033
|
+
* * createdAt: Date;
|
|
1034
|
+
*
|
|
971
1035
|
* @param data.channelId The ID of the document or context to which the comment is added.
|
|
972
1036
|
* @param data.threadId The ID of the comment thread that the comment is added to.
|
|
973
1037
|
* @param data.commentId The comment ID.
|
|
@@ -987,6 +1051,13 @@ export interface CommentsAdapter {
|
|
|
987
1051
|
* Keep in mind that the `data` parameter only contains the
|
|
988
1052
|
* properties of a comment that have changed.
|
|
989
1053
|
*
|
|
1054
|
+
* The object which is passed as a parameter can contain following properties:
|
|
1055
|
+
* * channelId: string | symbol;
|
|
1056
|
+
* * threadId: string;
|
|
1057
|
+
* * commentId: string;
|
|
1058
|
+
* * content?: string;
|
|
1059
|
+
* * attributes?: Record<string, any>;
|
|
1060
|
+
*
|
|
990
1061
|
* @param data.channelId The ID of the document or context where the comment is updated.
|
|
991
1062
|
* @param data.threadId The ID of the comment thread where the comment is updated.
|
|
992
1063
|
* @param data.commentId The ID of the comment to update.
|