@ckeditor/ckeditor5-comments 38.0.1 → 38.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/build/translations/en-au.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -0
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +111 -0
- package/package.json +10 -8
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +4 -3
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +4 -3
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +6 -4
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +6 -5
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +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.d.ts +6 -5
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +6 -4
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +6 -4
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +7 -3
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +9 -5
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +7 -3
- 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.d.ts +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.js +1 -1
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +12 -3
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +4 -3
- package/src/commentsonly.js +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.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 _0x2536=['remove','listenTo','collection','init','_calculatePosition','add','CommentsArchive','activate','resolvedThreads','plugins','reopenCommentThread','getCommentThread','length','context','has','isActive','resolvedAt','get','highest'];(function(_0x845369,_0x2536a9){const _0x4b88ec=function(_0x3d07a4){while(--_0x3d07a4){_0x845369['push'](_0x845369['shift']());}};_0x4b88ec(++_0x2536a9);}(_0x2536,0x86));const _0x4b88=function(_0x845369,_0x2536a9){_0x845369=_0x845369-0x0;let _0x4b88ec=_0x2536[_0x845369];return _0x4b88ec;};import{ContextPlugin as _0x8c6582}from'ckeditor5/src/core';import{Collection as _0x130512}from'ckeditor5/src/utils';import _0x304420 from'./commentsrepository';import _0x26ada5 from'../annotations/annotations';export default class p extends _0x8c6582{static get['pluginName'](){return _0x4b88('0x5');}static get['requires'](){return[_0x304420,_0x26ada5];}constructor(_0x480e7b){super(_0x480e7b),this[_0x4b88('0x7')]=new _0x130512();}[_0x4b88('0x2')](){const _0x1f46b9=this[_0x4b88('0xc')],_0x3a7724=_0x1f46b9[_0x4b88('0x8')][_0x4b88('0x10')](_0x304420),_0x2ed6ba=_0x1f46b9[_0x4b88('0x8')]['get'](_0x26ada5);this[_0x4b88('0x0')](_0x3a7724,'addCommentThread',(_0x255a45,{threadId:_0x553f7f,resolvedAt:_0x5dc5ea,deletedAt:_0x571cb1})=>{if(_0x5dc5ea&&!_0x571cb1){const _0x330e5b=_0x3a7724[_0x4b88('0xa')](_0x553f7f);this['resolvedThreads'][_0x4b88('0x4')](_0x330e5b,this['_calculatePosition'](_0x5dc5ea));}}),this['listenTo'](_0x3a7724,'resolveCommentThread',(_0x383e97,{threadId:_0x37a05f,resolvedAt:_0x58e24b})=>{const _0x5a0249=_0x3a7724[_0x4b88('0xa')](_0x37a05f);this[_0x4b88('0x7')]['add'](_0x5a0249,this[_0x4b88('0x3')](_0x58e24b));},{'priority':_0x4b88('0x11')}),this[_0x4b88('0x0')](_0x3a7724,_0x4b88('0x9'),(_0x22042d,{threadId:_0x485189})=>{const _0x590d9f=_0x3a7724[_0x4b88('0xa')](_0x485189);this[_0x4b88('0x7')]['has'](_0x590d9f)&&this[_0x4b88('0x7')]['remove'](_0x590d9f);},{'priority':'highest'}),this[_0x4b88('0x0')](_0x3a7724,'removeCommentThread',(_0x20e087,{threadId:_0x2ff1c7})=>{const _0x23b206=_0x3a7724[_0x4b88('0xa')](_0x2ff1c7);this[_0x4b88('0x7')][_0x4b88('0xd')](_0x23b206)&&this[_0x4b88('0x7')][_0x4b88('0x12')](_0x23b206);},{'priority':_0x4b88('0x11')}),this['listenTo'](_0x2ed6ba[_0x4b88('0x1')],'focus',(_0x5b944a,_0x594909)=>{_0x594909[_0x4b88('0xe')]=!0x0,_0x2ed6ba[_0x4b88('0x6')](_0x594909);});}[_0x4b88('0x3')](_0x58103d){const _0x551f9c=[...this[_0x4b88('0x7')]]['findIndex'](_0x11ec91=>_0x11ec91[_0x4b88('0xf')]<_0x58103d);return _0x551f9c>-0x1?_0x551f9c:this[_0x4b88('0x7')][_0x4b88('0xb')];}}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module comments/comments/commentsarchiveui
|
|
3
|
+
* @publicApi
|
|
3
4
|
*/
|
|
4
5
|
import '../../theme/commentsarchive.css';
|
|
5
|
-
import { Plugin, type
|
|
6
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
6
7
|
import { ViewCollection } from 'ckeditor5/src/ui';
|
|
7
8
|
import CommentsArchiveView from './ui/view/commentsarchiveview';
|
|
9
|
+
import CommentsArchive from './commentsarchive';
|
|
8
10
|
import type AnnotationView from '../annotations/view/annotationview';
|
|
9
11
|
/**
|
|
10
12
|
* Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
|
|
11
|
-
*
|
|
13
|
+
* resolved comment thread annotation views.
|
|
12
14
|
*/
|
|
13
15
|
export default class CommentsArchiveUI extends Plugin {
|
|
14
16
|
commentsArchiveView: CommentsArchiveView | undefined;
|
|
@@ -16,11 +18,11 @@ export default class CommentsArchiveUI extends Plugin {
|
|
|
16
18
|
/**
|
|
17
19
|
* @inheritDoc
|
|
18
20
|
*/
|
|
19
|
-
static get pluginName():
|
|
21
|
+
static get pluginName(): "CommentsArchiveUI";
|
|
20
22
|
/**
|
|
21
23
|
* @inheritDoc
|
|
22
24
|
*/
|
|
23
|
-
static get requires():
|
|
25
|
+
static get requires(): readonly [typeof CommentsArchive];
|
|
24
26
|
/**
|
|
25
27
|
* @inheritDoc
|
|
26
28
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xb963=['findIndex','_createArchiveUIDropdown','remove','requires','Annotations','_calculatePosition','panelView','change:isFocused','componentFactory','plugins','getByInnerView','focusTracker','commentsArchiveView','change:isOpen','push','render','pluginName','locale','collection','commentsArchive','add','resolvedAt','_threadToController','children','get','collaboration.channelId','view','resolvedThreads','CommentsArchiveUI','splice','isOpen','.ck.ck-body','channelId','annotationViews','ck-comments-archive-dropdown','listenTo','querySelectorAll','element','_pendingThreads','CommentsRepository','innerView','mousedown','config','forEach','set','stopListening','editor','isVisible','COMMENTS_ARCHIVE','init'];(function(_0x1be040,_0xb9638e){const _0x439bea=function(_0x5bf6b0){while(--_0x5bf6b0){_0x1be040['push'](_0x1be040['shift']());}};_0x439bea(++_0xb9638e);}(_0xb963,0xd9));const _0x439b=function(_0x1be040,_0xb9638e){_0x1be040=_0x1be040-0x0;let _0x439bea=_0xb963[_0x1be040];return _0x439bea;};import'../../theme/commentsarchive.css';import{Plugin as _0x42f914}from'ckeditor5/src/core';import{createDropdown as _0x1b1610,clickOutsideHandler as _0x13ec50,ViewCollection as _0x1a4881}from'ckeditor5/src/ui';import _0x26838a from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x1b30dd}from'../utils/common-translations';import _0x515253 from'./ui/view/commentsarchiveview';import _0x5bb960 from'./commentsarchive';export default class a extends _0x42f914{static get[_0x439b('0x31')](){return _0x439b('0xb');}static get[_0x439b('0x24')](){return[_0x5bb960];}constructor(_0x3e356a){super(_0x3e356a),this['annotationViews']=new _0x1a4881(),this[_0x439b('0x15')]=[];}[_0x439b('0x20')](){this['editor']['ui'][_0x439b('0x29')][_0x439b('0x3')](_0x439b('0x2'),()=>this[_0x439b('0x22')]());const _0x2b3e20=this['editor']['plugins'][_0x439b('0x7')](_0x5bb960),_0x5e388b=this[_0x439b('0x1d')][_0x439b('0x2a')][_0x439b('0x7')](_0x439b('0x25')),_0x103c1b=this[_0x439b('0x1d')][_0x439b('0x2a')][_0x439b('0x7')](_0x439b('0x16'));this[_0x439b('0x12')](_0x2b3e20[_0x439b('0xa')],_0x439b('0x3'),(_0x53cc6f,_0x20f0f2)=>{const _0x3376ae=this[_0x439b('0x1d')][_0x439b('0x19')][_0x439b('0x7')]('collaboration.channelId');if(!_0x3376ae||_0x20f0f2[_0x439b('0xf')]===_0x3376ae){const _0x219b06=this[_0x439b('0x26')](_0x20f0f2[_0x439b('0x4')]),_0x113df4=_0x103c1b[_0x439b('0x5')]['get'](_0x20f0f2);if(!_0x113df4)return void this[_0x439b('0x15')][_0x439b('0x2f')]({'thread':_0x20f0f2,'position':_0x219b06});const _0x5a1401=_0x5e388b[_0x439b('0x2b')](_0x113df4[_0x439b('0x9')]);_0x5a1401[_0x439b('0x1e')]&&_0x5e388b['_visibleAnnotations']['remove'](_0x5a1401),this[_0x439b('0x10')][_0x439b('0x3')](_0x5a1401[_0x439b('0x9')],_0x219b06);}}),this[_0x439b('0x12')](_0x5e388b[_0x439b('0x1')],_0x439b('0x3'),(_0xd988eb,_0xed4351)=>{this[_0x439b('0x15')][_0x439b('0x1a')](({thread:_0x476a31,position:_0x570aff},_0x172fa6)=>{const _0x3f0e9c=_0x103c1b['_threadToController'][_0x439b('0x7')](_0x476a31);_0x3f0e9c&&_0xed4351[_0x439b('0x17')]===_0x3f0e9c['view']&&(this[_0x439b('0x10')][_0x439b('0x3')](_0xed4351[_0x439b('0x9')],_0x570aff),this['_pendingThreads'][_0x439b('0xc')](_0x172fa6,0x1));});}),this['listenTo'](_0x2b3e20[_0x439b('0xa')],_0x439b('0x23'),(_0x194918,_0x2dab73)=>{const _0x553146=this[_0x439b('0x1d')]['config']['get'](_0x439b('0x8'));if(!_0x553146||_0x2dab73[_0x439b('0xf')]===_0x553146){const _0x2cf4fd=_0x103c1b[_0x439b('0x5')][_0x439b('0x7')](_0x2dab73),_0x471d42=_0x5e388b['getByInnerView'](_0x2cf4fd[_0x439b('0x9')])['view'];this[_0x439b('0x10')][_0x439b('0x23')](_0x471d42);}});}[_0x439b('0x26')](_0x16a0f0){const _0x241420=this['editor'][_0x439b('0x19')][_0x439b('0x7')](_0x439b('0x8')),_0x72f41f=[...this[_0x439b('0x1d')][_0x439b('0x2a')][_0x439b('0x7')](_0x5bb960)[_0x439b('0xa')]]['filter'](_0xf974bf=>_0xf974bf[_0x439b('0xf')]!==_0x241420)[_0x439b('0x21')](_0x5e065d=>_0x5e065d[_0x439b('0x4')]<_0x16a0f0);return _0x72f41f>-0x1?_0x72f41f:this[_0x439b('0x10')]['length'];}[_0x439b('0x22')](){const _0x24a2d8=this[_0x439b('0x1d')],_0x1d02b3=_0x1b1610(_0x24a2d8[_0x439b('0x0')]);return _0x1d02b3['on'](_0x439b('0x30'),()=>{_0x1d02b3[_0x439b('0x1c')](document,_0x439b('0x18')),_0x13ec50({'emitter':_0x1d02b3,'activator':()=>_0x1d02b3[_0x439b('0xd')],'callback':()=>{_0x1d02b3[_0x439b('0xd')]=!0x1;},'contextElements':()=>[_0x1d02b3[_0x439b('0x14')],...document[_0x439b('0x13')](_0x439b('0xe'))]});}),_0x1d02b3[_0x439b('0x2c')]['on'](_0x439b('0x28'),_0x2f257e=>{_0x2f257e['stop']();},{'priority':'high'}),_0x1d02b3['buttonView'][_0x439b('0x1b')]({'icon':_0x26838a,'label':_0x1b30dd(_0x24a2d8[_0x439b('0x0')],_0x439b('0x1f')),'tooltip':!0x0}),_0x1d02b3[_0x439b('0x27')]['extendTemplate']({'attributes':{'class':_0x439b('0x11')}}),_0x1d02b3['on'](_0x439b('0x2e'),(_0x5e9311,_0x370615,_0x218ae5)=>{this[_0x439b('0x2d')]||(this[_0x439b('0x2d')]=new _0x515253(_0x24a2d8['locale'],this['annotationViews'])),_0x218ae5?_0x1d02b3[_0x439b('0x27')][_0x439b('0x6')][_0x439b('0x3')](this[_0x439b('0x2d')]):_0x1d02b3['panelView'][_0x439b('0x6')][_0x439b('0x23')](this[_0x439b('0x2d')]);}),_0x1d02b3;}}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module comments/comments/commentsediting
|
|
3
3
|
*/
|
|
4
|
-
import { Plugin, type
|
|
4
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
5
5
|
import type { Marker } from 'ckeditor5/src/engine';
|
|
6
|
+
import CommentsRepository from './commentsrepository';
|
|
7
|
+
import EditorAnnotations from '../annotations/editorannotations';
|
|
8
|
+
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode';
|
|
6
9
|
import '../../theme/commentmarker.css';
|
|
10
|
+
import CommentsImportWord from './integrations/importword';
|
|
7
11
|
/**
|
|
8
12
|
* Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
|
|
9
13
|
* {@link module:engine/model/markercollection~Marker comment markers}.
|
|
@@ -32,11 +36,11 @@ export default class CommentsEditing extends Plugin {
|
|
|
32
36
|
/**
|
|
33
37
|
* @inheritDoc
|
|
34
38
|
*/
|
|
35
|
-
static get requires():
|
|
39
|
+
static get requires(): readonly [typeof CommentsRepository, typeof EditorAnnotations, typeof CommentsRestrictedEditingMode, typeof CommentsImportWord];
|
|
36
40
|
/**
|
|
37
41
|
* @inheritDoc
|
|
38
42
|
*/
|
|
39
|
-
static get pluginName():
|
|
43
|
+
static get pluginName(): "CommentsEditing";
|
|
40
44
|
/**
|
|
41
45
|
* @inheritDoc
|
|
42
46
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x1b47=['markers','reopenCommentThread','isCollapsed','isEqual','end','high','markerToData','ck-comment-marker--active','_threads','set','push','addComment','get','upcast','_hasTargetInContent','refreshVisibility','comment:','getItems','plugins','consumable','_attachedThreads','root','setContext','_initializeMarkerConverters','registerAnnotation','includes','comment','has','scrollToThreadMarker','resolve','markerName','length','addCommentThread','newRange','delete','editor','text','$textProxy','getCommentThread','activeMarker','isResolved','editing','view','attachTo','once','collaboration.channelId','createRange','removeMarker','filter','change:isReadOnly','data','focus','then','_attachMarkerToThread','low','document','dataToMarker','schema','getAttribute','from','conversion','registerPostFixer','getCommentThreads','removeCommentThread','map','getChangedMarkers','differ','getAllMarkersForId','getWalker','ignoreResolvedComments','addMarker:','dataDowncast','getByInnerView','_threadToController','commands','add','hasMarkerForId','for','fetchCommentThread','model','$graveyard','_getTextContext','substring','reconvertMarker','createPositionBefore','CommentsEditing','consume','_handleThreadMarker','affectsData','config','ck-comment-marker','size','editingDowncast','start','elementToElement','destroy','enqueueChange','listenTo','hasDomSelection','createElement','split','change','ready','_handleMarkerAddAndRemove','getRange','resolveCommentThread','item','managedUsingOperations','render','isThreadsLoadingPaused','_getTargetForId','updateMarker','$marker'];(function(_0xdec847,_0x1b474a){const _0x4d0f3e=function(_0x53b8ca){while(--_0x53b8ca){_0xdec847['push'](_0xdec847['shift']());}};_0x4d0f3e(++_0x1b474a);}(_0x1b47,0x9e));const _0x4d0f=function(_0xdec847,_0x1b474a){_0xdec847=_0xdec847-0x0;let _0x4d0f3e=_0x1b47[_0xdec847];return _0x4d0f3e;};import{Plugin as _0x4497cf}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x2f7256}from'ckeditor5/src/utils';import _0x54e255 from'./commentsrepository';import _0x522ff5 from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x253c05}from'ckeditor5-collaboration/src/collaboration-core';import _0x1c74e4 from'../annotations/editorannotations';import _0x4fa397 from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x5def8f from'./integrations/importword';import _0x39f743 from'../annotations/annotations';export default class r extends _0x4497cf{static get['requires'](){return[_0x54e255,_0x1c74e4,_0x4fa397,_0x5def8f];}static get['pluginName'](){return _0x4d0f('0x28');}constructor(_0x3b4047){super(_0x3b4047),this['set'](_0x4d0f('0x40'),!0x0),_0x3b4047[_0x4d0f('0x5')]['once'](_0x4d0f('0x39'),()=>this['isThreadsLoadingPaused']=!0x1),this['set'](_0x4d0f('0x6b'),null),this['on']('change:activeMarker',(_0x2d95f2,_0x196811,_0xb4823,_0xa65089)=>{const _0xa5af14=_0xb4823?ot(_0xb4823)['id']:null;if(_0x3b4047[_0x4d0f('0x22')][_0x4d0f('0x38')](()=>{if(_0xa5af14){const _0x54bbd3=this['getAllMarkersForId'](_0xa5af14);for(const _0x59c37b of _0x54bbd3)_0x3b4047[_0x4d0f('0x6d')][_0x4d0f('0x26')](_0x59c37b);}if(_0xa65089){const {id:_0x16edd4}=ot(_0xa65089),_0x55a47a=this[_0x4d0f('0x16')](_0x16edd4);for(const _0x567aed of _0x55a47a)_0x3b4047[_0x4d0f('0x6d')][_0x4d0f('0x26')](_0x567aed);}}),_0xa5af14){const _0xe8c19f=_0x3b4047[_0x4d0f('0x56')]['get'](_0x54e255)[_0x4d0f('0x6a')](_0xa5af14);_0xe8c19f&&_0xe8c19f['isResolved']&&this['scrollToThreadMarker'](_0xa5af14);}}),this['_attachedThreads']=new Map();}['init'](){const _0x11cb71=this['editor'],_0x4b81c3=_0x11cb71[_0x4d0f('0x56')]['get'](_0x54e255),_0x1772e6=_0x11cb71[_0x4d0f('0x2c')][_0x4d0f('0x50')](_0x4d0f('0x0'));_0x11cb71[_0x4d0f('0x1d')][_0x4d0f('0x1e')](_0x4d0f('0x64'),new _0x522ff5(_0x11cb71)),this[_0x4d0f('0x34')](_0x11cb71,_0x4d0f('0x4'),(_0x587a4b,_0x448975,_0x5e55d8)=>{_0x4b81c3['switchReadOnly'](_0x5e55d8,_0x11cb71['config'][_0x4d0f('0x50')](_0x4d0f('0x0')));}),this['listenTo'](_0x4b81c3,tt(_0x4d0f('0x64'),_0x1772e6),(_0x108ac3,{threadId:_0x23c8a9})=>{const _0xc8f2e8=_0x11cb71[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x1c74e4),_0x359402=this[_0x4d0f('0x67')][_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255)['getCommentThread'](_0x23c8a9);if(_0x359402&&_0x359402['isResolved']&&!this[_0x4d0f('0x58')][_0x4d0f('0x5f')](_0x23c8a9)){const _0x477c36=_0x359402[_0x4d0f('0x6f')](()=>this[_0x4d0f('0x41')](_0x359402['id']));_0xc8f2e8['registerAnnotation'](_0x477c36),this['_attachedThreads']['set'](_0x23c8a9,[]),0x0===this[_0x4d0f('0x16')](_0x23c8a9)[_0x4d0f('0x63')]&&(_0x359402[_0x4d0f('0x52')]=!0x1);}}),this[_0x4d0f('0x34')](_0x4b81c3,tt(_0x4d0f('0x12'),_0x1772e6),(_0x3d4f65,{threadId:_0x5c06e2})=>{_0x11cb71[_0x4d0f('0x22')]['enqueueChange']({'isUndoable':!0x1},_0x2b5c7c=>{const _0xc3827=this[_0x4d0f('0x16')](_0x5c06e2);this[_0x4d0f('0x58')]['delete'](_0x5c06e2);for(const _0x235029 of _0xc3827)_0x2b5c7c[_0x4d0f('0x2')](_0x235029);});},{'priority':_0x4d0f('0x49')}),this[_0x4d0f('0x34')](_0x4b81c3,tt(_0x4d0f('0x3c'),_0x1772e6),(_0x3ca3a9,{threadId:_0x1fe638})=>{this['_reconvertMarkers'](_0x1fe638),this[_0x4d0f('0x67')][_0x4d0f('0x6d')][_0x4d0f('0x6e')][_0x4d0f('0x35')]&&this[_0x4d0f('0x67')][_0x4d0f('0x6d')][_0x4d0f('0x6e')][_0x4d0f('0x6')]();},{'priority':_0x4d0f('0x9')}),this[_0x4d0f('0x34')](_0x4b81c3,tt(_0x4d0f('0x45'),_0x1772e6),(_0x316ebd,{threadId:_0x391091})=>{this['_reconvertMarkers'](_0x391091);},{'priority':_0x4d0f('0x9')}),this[_0x4d0f('0x34')](_0x4b81c3,tt(_0x4d0f('0x4f'),_0x1772e6),(_0x571ec1,{threadId:_0xbe6e7a,isFromAdapter:_0xf7a045})=>{const _0x4f858a=this[_0x4d0f('0x16')](_0xbe6e7a);if(_0xf7a045||0x0==_0x4f858a[_0x4d0f('0x63')]||!_0x4b81c3['hasCommentThread'](_0xbe6e7a))return;0x1===_0x4b81c3[_0x4d0f('0x6a')](_0xbe6e7a)[_0x4d0f('0x63')]&&_0x11cb71[_0x4d0f('0x22')][_0x4d0f('0x33')]({'isUndoable':!0x1},_0x407873=>{for(const _0x3a8885 of _0x4f858a)_0x407873[_0x4d0f('0x42')](_0x3a8885,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':_0x4d0f('0x9')}),this[_0x4d0f('0x5b')](),this[_0x4d0f('0x3a')]();}['destroy'](){const _0x4eed6e=this[_0x4d0f('0x67')][_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255),_0x541492=this[_0x4d0f('0x67')][_0x4d0f('0x2c')][_0x4d0f('0x50')]('collaboration.channelId');for(const _0x28bdfd of _0x4eed6e[_0x4d0f('0x11')]({'channelId':_0x541492}))_0x4eed6e['_detachCommentThread'](_0x28bdfd['id']),_0x4eed6e[_0x4d0f('0x4c')][_0x4d0f('0x66')](_0x28bdfd['id']);super[_0x4d0f('0x32')]();}['hasMarkerForId'](_0xf7f0de){return this[_0x4d0f('0x16')](_0xf7f0de)[_0x4d0f('0x63')]>0x0;}['getAllMarkersForId'](_0x65e10d){return(this[_0x4d0f('0x58')][_0x4d0f('0x50')](_0x65e10d)||[])[_0x4d0f('0x13')](_0x2ba522=>this[_0x4d0f('0x67')][_0x4d0f('0x22')][_0x4d0f('0x44')]['get'](_0x2ba522))[_0x4d0f('0x3')](_0x3c58f3=>_0x3c58f3);}[_0x4d0f('0x60')](_0x32867f){const _0x1dca8f=this[_0x4d0f('0x41')](_0x32867f);_0x1dca8f&&setTimeout(()=>{this['activeMarker']&&ot(this[_0x4d0f('0x6b')])['id']===_0x32867f&&_0x2f7256({'target':_0x1dca8f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x10d04a){this[_0x4d0f('0x67')][_0x4d0f('0x22')][_0x4d0f('0x38')](()=>{for(const _0x3eb0b8 of this[_0x4d0f('0x16')](_0x10d04a))this[_0x4d0f('0x67')][_0x4d0f('0x6d')][_0x4d0f('0x26')](_0x3eb0b8);});}['_initializeMarkerConverters'](){const _0x10d465=this[_0x4d0f('0x67')];_0x10d465[_0x4d0f('0xf')][_0x4d0f('0x20')](_0x4d0f('0x2f'))['markerToHighlight']({'model':_0x4d0f('0x5e'),'view':(_0xc8a9cc,_0x46d62b)=>{const {id:_0x190907}=ot(_0xc8a9cc['markerName']),_0x4ed419=_0x10d465[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255)[_0x4d0f('0x6a')](_0x190907),_0x44117a=this[_0x4d0f('0x6b')]&&ot(this['activeMarker'])['id']===_0x190907;if(_0x4ed419&&_0x4ed419[_0x4d0f('0x6c')]&&!_0x44117a&&_0xc8a9cc[_0x4d0f('0x3d')])return _0x46d62b[_0x4d0f('0x57')][_0x4d0f('0x29')](_0xc8a9cc['item'],_0x4d0f('0x19')+_0xc8a9cc[_0x4d0f('0x62')]),_0x46d62b[_0x4d0f('0x57')]['consume'](_0xc8a9cc['item'],'removeMarker:'+_0xc8a9cc[_0x4d0f('0x62')]),{'classes':[]};const _0x43fd99=[_0x4d0f('0x2d')];return _0x44117a&&_0x43fd99['push'](_0x4d0f('0x4b')),{'classes':_0x43fd99,'attributes':{'data-comment':_0x190907}};}}),_0x10d465['conversion'][_0x4d0f('0x20')](_0x4d0f('0x1a'))[_0x4d0f('0x4a')]({'model':_0x4d0f('0x5e'),'view':(_0x41bd4d,{options:_0x4b1b5e})=>{const _0x22e6b7=_0x10d465[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255),_0x5257ea=_0x10d465[_0x4d0f('0x22')][_0x4d0f('0x44')][_0x4d0f('0x50')](_0x41bd4d),{id:_0x365e69,part:_0x27d53f}=ot(_0x41bd4d),_0x46a712=_0x22e6b7[_0x4d0f('0x6a')](_0x365e69);return _0x5257ea&&!_0x5257ea[_0x4d0f('0x2b')]||_0x46a712&&_0x46a712[_0x4d0f('0x6c')]&&_0x4b1b5e[_0x4d0f('0x18')]?null:{'group':_0x4d0f('0x5e'),'name':_0x27d53f?_0x365e69+':'+_0x27d53f:_0x365e69};}}),_0x10d465[_0x4d0f('0xf')][_0x4d0f('0x20')](_0x4d0f('0x51'))[_0x4d0f('0x31')]({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x13b1c1,{writer:_0x1feda6})=>_0x1feda6[_0x4d0f('0x36')](_0x4d0f('0x43'),{'data-name':_0x4d0f('0x54')+_0x13b1c1[_0x4d0f('0xd')]('id')})}),_0x10d465['conversion'][_0x4d0f('0x20')]('upcast')[_0x4d0f('0xb')]({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1f20d2=this[_0x4d0f('0x67')],_0x46ee56=_0x1f20d2[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255),_0x5c6d21=new Set();_0x1f20d2['model']['document'][_0x4d0f('0x10')](_0x1860a8=>{let _0x293d94=!0x1;for(const {name:_0x28399d,data:_0x2e08ee}of _0x1f20d2['model'][_0x4d0f('0xa')][_0x4d0f('0x15')][_0x4d0f('0x14')]()){const {group:_0xbeb272,id:_0x1cb389}=ot(_0x28399d);let _0xe2cceb=_0x2e08ee['newRange'];if(_0x4d0f('0x5e')!==_0xbeb272||!_0xe2cceb)continue;const _0xe8d1d1=_0x4d0f('0x23')===_0xe2cceb[_0x4d0f('0x59')]['rootName'];_0xe8d1d1||(_0xe2cceb=et(_0xe2cceb,_0x1f20d2['model']),!_0xe2cceb||!_0x2e08ee[_0x4d0f('0x65')]||_0xe2cceb[_0x4d0f('0x47')](_0x2e08ee['newRange']))?!_0xe2cceb||!_0x1f20d2[_0x4d0f('0x22')]['hasContent'](_0xe2cceb)||this[_0x4d0f('0x58')][_0x4d0f('0x5f')](_0x1cb389)&&_0xe8d1d1?(_0x1860a8[_0x4d0f('0x2')](_0x28399d),_0x293d94=!0x0):_0xe8d1d1||(this[_0x4d0f('0x40')]?_0x5c6d21['add'](_0x28399d):this[_0x4d0f('0x2a')](_0x28399d,_0x1cb389)):(_0x1860a8[_0x4d0f('0x42')](_0x28399d,{'range':_0xe2cceb}),_0x293d94=!0x0);}return _0x293d94;}),this['on']('change:isThreadsLoadingPaused',(_0x5132ef,_0x3667ad,_0x3a81b8)=>{if(!_0x3a81b8&&_0x5c6d21[_0x4d0f('0x2e')])for(const _0x130e0d of _0x5c6d21){const {id:_0x294a99}=ot(_0x130e0d);_0x5c6d21[_0x4d0f('0x66')](_0x294a99),_0x1f20d2['model'][_0x4d0f('0x44')]['get'](_0x130e0d)&&this[_0x4d0f('0x2a')](_0x130e0d,_0x294a99);}}),this['listenTo'](_0x1f20d2[_0x4d0f('0x22')][_0x4d0f('0xa')],'change',(_0x316967,_0x20d34e)=>{for(const {name:_0x658046,data:{newRange:_0x33fc49}}of _0x1f20d2['model'][_0x4d0f('0xa')][_0x4d0f('0x15')][_0x4d0f('0x14')]()){const {group:_0x53ecf9,id:_0xb4f7d2}=ot(_0x658046);if(_0x4d0f('0x5e')!==_0x53ecf9)continue;const _0x45eaa3=_0x46ee56['getCommentThread'](_0xb4f7d2),_0x3ec9f9=this[_0x4d0f('0x1f')](_0xb4f7d2);_0x45eaa3&&(_0x45eaa3[_0x4d0f('0x52')]||_0x1f20d2[_0x4d0f('0x6d')][_0x4d0f('0x6e')]['once'](_0x4d0f('0x3f'),()=>{const _0x5a32b7=_0x1f20d2[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x39f743),_0xdfecb9=_0x46ee56[_0x4d0f('0x1c')][_0x4d0f('0x50')](_0x45eaa3)[_0x4d0f('0x6e')];_0x5a32b7[_0x4d0f('0x1b')](_0xdfecb9)[_0x4d0f('0x53')]();},{'priority':_0x4d0f('0x9')}),_0x45eaa3[_0x4d0f('0x52')]=_0x3ec9f9||!!_0x33fc49),!_0x33fc49&&_0x20d34e['isLocal']&&(_0x5c6d21[_0x4d0f('0x66')](_0xb4f7d2),_0x45eaa3&&!_0x45eaa3[_0x4d0f('0x6c')]&&!_0x3ec9f9&&this[_0x4d0f('0x58')]['has'](_0xb4f7d2)&&(this[_0x4d0f('0x58')]['delete'](_0xb4f7d2),_0x45eaa3[_0x4d0f('0x61')]()));}});}[_0x4d0f('0x41')](_0x51636f){const _0x17808d=this[_0x4d0f('0x67')],_0x418222=this['getAllMarkersForId'](_0x51636f);return _0x253c05(_0x17808d[_0x4d0f('0x6d')],_0x418222);}[_0x4d0f('0x24')](_0x494309){const _0x22afbd=this['getAllMarkersForId'](_0x494309);let _0x140d36='',_0x1b69bc=!0x1;for(const _0x1a2042 of _0x22afbd){const _0x51d069=_0x1a2042[_0x4d0f('0x3b')]();for(const _0x119c68 of Array[_0x4d0f('0xe')](_0x51d069[_0x4d0f('0x55')]()))_0x119c68['is'](_0x4d0f('0x69'))?(_0x140d36&&_0x1b69bc&&(_0x140d36+='\x20',_0x1b69bc=!0x1),_0x140d36+=_0x119c68[_0x4d0f('0x5')]):_0x1b69bc=!0x0;_0x1b69bc=!0x0;}return _0x140d36[_0x4d0f('0x25')](0x0,0x96);}[_0x4d0f('0x8')](_0x3a0657,_0x116ee9){const _0x2c9def=this[_0x4d0f('0x67')],_0x4146e0=_0x2c9def[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x54e255);let _0x5a3d8d=_0x4146e0[_0x4d0f('0x6a')](_0x116ee9);if(this[_0x4d0f('0x58')]['has'](_0x116ee9)){const _0x54a613=this['_attachedThreads'][_0x4d0f('0x50')](_0x116ee9);return _0x54a613[_0x4d0f('0x5d')](_0x3a0657)||_0x54a613[_0x4d0f('0x4e')](_0x3a0657),_0x5a3d8d;}this['_attachedThreads'][_0x4d0f('0x4d')](_0x116ee9,[_0x3a0657]);const _0x2782d9=_0x2c9def[_0x4d0f('0x2c')][_0x4d0f('0x50')](_0x4d0f('0x0')),_0x18710c=_0x2c9def[_0x4d0f('0x56')][_0x4d0f('0x50')](_0x1c74e4);if(_0x5a3d8d&&_0x5a3d8d[_0x4d0f('0x6c')])return _0x5a3d8d['reopen'](),_0x5a3d8d;return!this[_0x4d0f('0x16')](_0x116ee9)[0x0][_0x4d0f('0x3e')]?_0x2c9def[_0x4d0f('0x6d')][_0x4d0f('0x6e')][_0x4d0f('0x70')]('render',()=>{const _0x4ef953=_0x2c9def[_0x4d0f('0x56')]['get'](_0x39f743);_0x5a3d8d=_0x4146e0['openNewCommentThread']({'channelId':_0x2782d9,'threadId':_0x116ee9,'target':()=>this[_0x4d0f('0x41')](_0x116ee9),'context':{'type':_0x4d0f('0x68'),'value':this[_0x4d0f('0x24')](_0x116ee9)}});const _0x2e88a9=_0x4146e0['_threadToController'][_0x4d0f('0x50')](_0x5a3d8d)[_0x4d0f('0x6e')],_0x3362b4=_0x4ef953[_0x4d0f('0x1b')](_0x2e88a9);_0x3362b4&&_0x18710c[_0x4d0f('0x5c')](_0x3362b4);},{'priority':'low'}):_0x4146e0[_0x4d0f('0x21')]({'channelId':_0x2782d9,'threadId':_0x116ee9})[_0x4d0f('0x7')](_0x212204=>{if('destroyed'!==_0x2c9def['state']){if(_0x5a3d8d=_0x212204,_0x5a3d8d){const _0x1b550e=_0x5a3d8d[_0x4d0f('0x6f')](()=>this['_getTargetForId'](_0x116ee9));_0x18710c[_0x4d0f('0x5c')](_0x1b550e),_0x5a3d8d[_0x4d0f('0x6c')]&&this['_reconvertMarkers'](_0x116ee9);}else{const _0x2812e6=this[_0x4d0f('0x16')](_0x116ee9);_0x2c9def['model'][_0x4d0f('0x38')](_0x2dd636=>{for(const _0x181d69 of _0x2812e6)_0x2dd636[_0x4d0f('0x2')](_0x181d69);});}}}),_0x5a3d8d;}[_0x4d0f('0x2a')](_0xdc863c,_0x16de4b){const _0x1372ce=this[_0x4d0f('0x8')](_0xdc863c,_0x16de4b);_0x1372ce&&!_0x1372ce['context']&&_0x1372ce[_0x4d0f('0x5a')]({'type':_0x4d0f('0x68'),'value':this[_0x4d0f('0x24')](_0x16de4b)});}}function tt(_0x39d02d,_0x51c659){return _0x51c659?_0x39d02d+':'+_0x51c659:_0x39d02d;}function ot(_0xfc4e50){const _0x23eed2=_0xfc4e50[_0x4d0f('0x37')](':');return{'group':_0x23eed2[0x0],'id':_0x23eed2[0x1],'part':_0x23eed2[0x2]};}function et(_0x2226bb,_0x2ac3dc){const _0x48de27=_0x2ac3dc[_0x4d0f('0xc')],_0x5a1b22=_0x2ac3dc[_0x4d0f('0x1')](_0x2226bb[_0x4d0f('0x30')]);for(const _0x1c4731 of _0x2226bb[_0x4d0f('0x17')]()){const {type:_0x367ee1,item:_0xa5b165,nextPosition:_0x3408c0}=_0x1c4731;if(_0x4d0f('0x68')===_0x367ee1||_0x48de27['isObject'](_0xa5b165)){const _0x1bd2db=_0x2ac3dc[_0x4d0f('0x27')](_0xa5b165);_0x5a1b22[_0x4d0f('0x46')]&&(_0x5a1b22['start']=_0x1bd2db),_0x5a1b22[_0x4d0f('0x48')]=_0x3408c0;}}return _0x5a1b22[_0x4d0f('0x46')]?null:_0x5a1b22;}
|
|
23
|
+
const _0xcc0d=['_attachedThreads','markerToData','then','createElement','createRange','consumable','_threadToController','updateMarker','hasCommentThread','getCommentThreads','delete','addMarker:','getItems','refreshVisibility','model','size','registerAnnotation','collaboration.channelId','_getTextContext','ready','removeCommentThread','low','has','isResolved','addComment','setContext','set','markerName','_handleMarkerAddAndRemove','for','reopen','once','affectsData','markers','isThreadsLoadingPaused','_threads','addCommentThread','commands','reconvertMarker','high','destroy','isCollapsed','focus','plugins','root','init','filter','document','activeMarker','CommentsEditing','enqueueChange','fetchCommentThread','getWalker','_reconvertMarkers','length','includes','resolveCommentThread','render','rootName','switchReadOnly','attachTo','change','isEqual','openNewCommentThread','differ','newRange','$graveyard','$marker','_hasTargetInContent','editor','comment:','_getTargetForId','upcast','getCommentThread','config','dataDowncast','end','_attachMarkerToThread','start','hasContent','consume','scrollToThreadMarker','from','view','add','getByInnerView','comment','getAllMarkersForId','pluginName','push','dataToMarker','registerPostFixer','ck-comment-marker--active','change:activeMarker','listenTo','editing','data','getRange','conversion','text','createPositionBefore','change:isReadOnly','state','_initializeMarkerConverters','get','_handleThreadMarker','removeMarker'];(function(_0x1ab288,_0xcc0d3e){const _0x5e5acb=function(_0x16a442){while(--_0x16a442){_0x1ab288['push'](_0x1ab288['shift']());}};_0x5e5acb(++_0xcc0d3e);}(_0xcc0d,0xd4));const _0x5e5a=function(_0x1ab288,_0xcc0d3e){_0x1ab288=_0x1ab288-0x0;let _0x5e5acb=_0xcc0d[_0x1ab288];return _0x5e5acb;};import{Plugin as _0x3b94ff}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x470011}from'ckeditor5/src/utils';import _0x59e9e0 from'./commentsrepository';import _0x4cbc12 from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x22a235}from'ckeditor5-collaboration/src/collaboration-core';import _0x5da5b0 from'../annotations/editorannotations';import _0x418cbf from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x4ebf26 from'./integrations/importword';import _0x23846a from'../annotations/annotations';export default class r extends _0x3b94ff{static get['requires'](){return[_0x59e9e0,_0x5da5b0,_0x418cbf,_0x4ebf26];}static get[_0x5e5a('0x5a')](){return _0x5e5a('0x33');}constructor(_0x5404eb){super(_0x5404eb),this[_0x5e5a('0x1c')](_0x5e5a('0x24'),!0x0),_0x5404eb[_0x5e5a('0x62')]['once'](_0x5e5a('0x15'),()=>this[_0x5e5a('0x24')]=!0x1),this['set'](_0x5e5a('0x32'),null),this['on'](_0x5e5a('0x5f'),(_0x49ef1a,_0x9a9f39,_0x17dd74,_0x59c7ea)=>{const _0x424bfa=_0x17dd74?ot(_0x17dd74)['id']:null;if(_0x5404eb[_0x5e5a('0x10')][_0x5e5a('0x3f')](()=>{if(_0x424bfa){const _0x4e3cfc=this['getAllMarkersForId'](_0x424bfa);for(const _0x240fa8 of _0x4e3cfc)_0x5404eb[_0x5e5a('0x61')][_0x5e5a('0x28')](_0x240fa8);}if(_0x59c7ea){const {id:_0x1a0429}=ot(_0x59c7ea),_0x4e45ba=this[_0x5e5a('0x59')](_0x1a0429);for(const _0xa4ae79 of _0x4e45ba)_0x5404eb['editing'][_0x5e5a('0x28')](_0xa4ae79);}}),_0x424bfa){const _0x3099b7=_0x5404eb['plugins'][_0x5e5a('0x6a')](_0x59e9e0)['getCommentThread'](_0x424bfa);_0x3099b7&&_0x3099b7[_0x5e5a('0x19')]&&this['scrollToThreadMarker'](_0x424bfa);}}),this[_0x5e5a('0x2')]=new Map();}[_0x5e5a('0x2f')](){const _0x3dfdd1=this['editor'],_0x585130=_0x3dfdd1[_0x5e5a('0x2d')][_0x5e5a('0x6a')](_0x59e9e0),_0x1d8aa7=_0x3dfdd1[_0x5e5a('0x4c')][_0x5e5a('0x6a')](_0x5e5a('0x13'));_0x3dfdd1[_0x5e5a('0x27')][_0x5e5a('0x56')](_0x5e5a('0x26'),new _0x4cbc12(_0x3dfdd1)),this[_0x5e5a('0x60')](_0x3dfdd1,_0x5e5a('0x67'),(_0x2e3934,_0x4452c9,_0x2ee908)=>{_0x585130[_0x5e5a('0x3d')](_0x2ee908,_0x3dfdd1['config'][_0x5e5a('0x6a')](_0x5e5a('0x13')));}),this[_0x5e5a('0x60')](_0x585130,tt(_0x5e5a('0x26'),_0x1d8aa7),(_0x2c0a92,{threadId:_0x46c7ae})=>{const _0x5461de=_0x3dfdd1['plugins'][_0x5e5a('0x6a')](_0x5da5b0),_0x3657a9=this['editor'][_0x5e5a('0x2d')]['get'](_0x59e9e0)[_0x5e5a('0x4b')](_0x46c7ae);if(_0x3657a9&&_0x3657a9[_0x5e5a('0x19')]&&!this[_0x5e5a('0x2')][_0x5e5a('0x18')](_0x46c7ae)){const _0x5a6895=_0x3657a9[_0x5e5a('0x3e')](()=>this[_0x5e5a('0x49')](_0x3657a9['id']));_0x5461de[_0x5e5a('0x12')](_0x5a6895),this['_attachedThreads'][_0x5e5a('0x1c')](_0x46c7ae,[]),0x0===this[_0x5e5a('0x59')](_0x46c7ae)[_0x5e5a('0x38')]&&(_0x3657a9[_0x5e5a('0x46')]=!0x1);}}),this[_0x5e5a('0x60')](_0x585130,tt(_0x5e5a('0x16'),_0x1d8aa7),(_0x29f69b,{threadId:_0x3ba37c})=>{_0x3dfdd1[_0x5e5a('0x10')][_0x5e5a('0x34')]({'isUndoable':!0x1},_0x3ac745=>{const _0x558066=this[_0x5e5a('0x59')](_0x3ba37c);this[_0x5e5a('0x2')]['delete'](_0x3ba37c);for(const _0x29ff60 of _0x558066)_0x3ac745['removeMarker'](_0x29ff60);});},{'priority':_0x5e5a('0x29')}),this[_0x5e5a('0x60')](_0x585130,tt(_0x5e5a('0x3a'),_0x1d8aa7),(_0x2e00da,{threadId:_0x590bf3})=>{this['_reconvertMarkers'](_0x590bf3),this[_0x5e5a('0x47')][_0x5e5a('0x61')]['view']['hasDomSelection']&&this[_0x5e5a('0x47')][_0x5e5a('0x61')]['view'][_0x5e5a('0x2c')]();},{'priority':_0x5e5a('0x17')}),this[_0x5e5a('0x60')](_0x585130,tt('reopenCommentThread',_0x1d8aa7),(_0x20912f,{threadId:_0x2f360f})=>{this['_reconvertMarkers'](_0x2f360f);},{'priority':_0x5e5a('0x17')}),this[_0x5e5a('0x60')](_0x585130,tt(_0x5e5a('0x1a'),_0x1d8aa7),(_0x482d78,{threadId:_0xadbbf1,isFromAdapter:_0x2fdef4})=>{const _0x275139=this[_0x5e5a('0x59')](_0xadbbf1);if(_0x2fdef4||0x0==_0x275139[_0x5e5a('0x38')]||!_0x585130[_0x5e5a('0xa')](_0xadbbf1))return;0x1===_0x585130[_0x5e5a('0x4b')](_0xadbbf1)[_0x5e5a('0x38')]&&_0x3dfdd1[_0x5e5a('0x10')]['enqueueChange']({'isUndoable':!0x1},_0x569ed8=>{for(const _0x3e25f1 of _0x275139)_0x569ed8[_0x5e5a('0x9')](_0x3e25f1,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this[_0x5e5a('0x69')](),this['_handleMarkerAddAndRemove']();}[_0x5e5a('0x2a')](){const _0x304212=this[_0x5e5a('0x47')][_0x5e5a('0x2d')]['get'](_0x59e9e0),_0x487545=this[_0x5e5a('0x47')][_0x5e5a('0x4c')][_0x5e5a('0x6a')](_0x5e5a('0x13'));for(const _0x310523 of _0x304212[_0x5e5a('0xb')]({'channelId':_0x487545}))_0x304212['_detachCommentThread'](_0x310523['id']),_0x304212[_0x5e5a('0x25')]['delete'](_0x310523['id']);super['destroy']();}['hasMarkerForId'](_0x5ea9a2){return this['getAllMarkersForId'](_0x5ea9a2)[_0x5e5a('0x38')]>0x0;}[_0x5e5a('0x59')](_0xe7790e){return(this[_0x5e5a('0x2')][_0x5e5a('0x6a')](_0xe7790e)||[])['map'](_0xf66fc2=>this[_0x5e5a('0x47')][_0x5e5a('0x10')][_0x5e5a('0x23')]['get'](_0xf66fc2))[_0x5e5a('0x30')](_0x59c5e8=>_0x59c5e8);}[_0x5e5a('0x53')](_0x47980e){const _0x21f55a=this[_0x5e5a('0x49')](_0x47980e);_0x21f55a&&setTimeout(()=>{this[_0x5e5a('0x32')]&&ot(this[_0x5e5a('0x32')])['id']===_0x47980e&&_0x470011({'target':_0x21f55a[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}[_0x5e5a('0x37')](_0x1daacc){this[_0x5e5a('0x47')][_0x5e5a('0x10')]['change'](()=>{for(const _0x30a098 of this[_0x5e5a('0x59')](_0x1daacc))this[_0x5e5a('0x47')]['editing'][_0x5e5a('0x28')](_0x30a098);});}[_0x5e5a('0x69')](){const _0x2a3fbf=this['editor'];_0x2a3fbf['conversion'][_0x5e5a('0x1f')]('editingDowncast')['markerToHighlight']({'model':_0x5e5a('0x58'),'view':(_0x5bc9a8,_0x51fa1e)=>{const {id:_0x2d920d}=ot(_0x5bc9a8['markerName']),_0x2eb1ab=_0x2a3fbf[_0x5e5a('0x2d')][_0x5e5a('0x6a')](_0x59e9e0)[_0x5e5a('0x4b')](_0x2d920d),_0x4c1446=this[_0x5e5a('0x32')]&&ot(this[_0x5e5a('0x32')])['id']===_0x2d920d;if(_0x2eb1ab&&_0x2eb1ab[_0x5e5a('0x19')]&&!_0x4c1446&&_0x5bc9a8['item'])return _0x51fa1e[_0x5e5a('0x7')]['consume'](_0x5bc9a8['item'],_0x5e5a('0xd')+_0x5bc9a8['markerName']),_0x51fa1e[_0x5e5a('0x7')][_0x5e5a('0x52')](_0x5bc9a8['item'],'removeMarker:'+_0x5bc9a8[_0x5e5a('0x1d')]),{'classes':[]};const _0x22b859=['ck-comment-marker'];return _0x4c1446&&_0x22b859[_0x5e5a('0x5b')](_0x5e5a('0x5e')),{'classes':_0x22b859,'attributes':{'data-comment':_0x2d920d}};}}),_0x2a3fbf['conversion'][_0x5e5a('0x1f')](_0x5e5a('0x4d'))[_0x5e5a('0x3')]({'model':'comment','view':(_0x50096f,{options:_0x19ce2b})=>{const _0x57d672=_0x2a3fbf[_0x5e5a('0x2d')][_0x5e5a('0x6a')](_0x59e9e0),_0x5a0ba5=_0x2a3fbf[_0x5e5a('0x10')]['markers'][_0x5e5a('0x6a')](_0x50096f),{id:_0x494132,part:_0xcdca8c}=ot(_0x50096f);if(_0x5a0ba5&&!_0x5a0ba5[_0x5e5a('0x22')])return null;if(_0x19ce2b['ignoreResolvedComments']){const _0x4b68de=_0x57d672['getCommentThread'](_0x494132);if(_0x4b68de&&_0x4b68de[_0x5e5a('0x19')])return null;}return{'group':_0x5e5a('0x58'),'name':_0xcdca8c?_0x494132+':'+_0xcdca8c:_0x494132};}}),_0x2a3fbf[_0x5e5a('0x64')][_0x5e5a('0x1f')](_0x5e5a('0x4a'))['elementToElement']({'view':{'name':_0x5e5a('0x58'),'attributes':{'id':/^\w/}},'model':(_0x5328d8,{writer:_0x257cfe})=>_0x257cfe[_0x5e5a('0x5')](_0x5e5a('0x45'),{'data-name':_0x5e5a('0x48')+_0x5328d8['getAttribute']('id')})}),_0x2a3fbf[_0x5e5a('0x64')][_0x5e5a('0x1f')]('upcast')[_0x5e5a('0x5c')]({'view':_0x5e5a('0x58')});}[_0x5e5a('0x1e')](){const _0x236ca1=this[_0x5e5a('0x47')],_0xe47a86=_0x236ca1['plugins'][_0x5e5a('0x6a')](_0x59e9e0),_0x56e3f5=new Set();_0x236ca1[_0x5e5a('0x10')][_0x5e5a('0x31')][_0x5e5a('0x5d')](_0x1e8462=>{let _0x321d98=!0x1;for(const {name:_0x51f3b1,data:_0x5379dd}of _0x236ca1[_0x5e5a('0x10')][_0x5e5a('0x31')][_0x5e5a('0x42')]['getChangedMarkers']()){const {group:_0x27ce2e,id:_0x41e836}=ot(_0x51f3b1);let _0xe8b8b4=_0x5379dd[_0x5e5a('0x43')];if(_0x5e5a('0x58')!==_0x27ce2e||!_0xe8b8b4)continue;const _0x3635a0=_0x5e5a('0x44')===_0xe8b8b4[_0x5e5a('0x2e')][_0x5e5a('0x3c')];_0x3635a0||(_0xe8b8b4=et(_0xe8b8b4,_0x236ca1['model']),!_0xe8b8b4||!_0x5379dd[_0x5e5a('0x43')]||_0xe8b8b4[_0x5e5a('0x40')](_0x5379dd[_0x5e5a('0x43')]))?!_0xe8b8b4||!_0x236ca1[_0x5e5a('0x10')][_0x5e5a('0x51')](_0xe8b8b4)||this[_0x5e5a('0x2')][_0x5e5a('0x18')](_0x41e836)&&_0x3635a0?(_0x1e8462[_0x5e5a('0x1')](_0x51f3b1),_0x321d98=!0x0):_0x3635a0||(this['isThreadsLoadingPaused']?_0x56e3f5[_0x5e5a('0x56')](_0x51f3b1):this[_0x5e5a('0x0')](_0x51f3b1,_0x41e836)):(_0x1e8462[_0x5e5a('0x9')](_0x51f3b1,{'range':_0xe8b8b4}),_0x321d98=!0x0);}return _0x321d98;}),this['on']('change:isThreadsLoadingPaused',(_0x15cf30,_0x196efe,_0x553a3c)=>{if(!_0x553a3c&&_0x56e3f5[_0x5e5a('0x11')])for(const _0x1dfd7b of _0x56e3f5){const {id:_0x46a383}=ot(_0x1dfd7b);_0x56e3f5['delete'](_0x46a383),_0x236ca1[_0x5e5a('0x10')][_0x5e5a('0x23')][_0x5e5a('0x6a')](_0x1dfd7b)&&this[_0x5e5a('0x0')](_0x1dfd7b,_0x46a383);}}),this[_0x5e5a('0x60')](_0x236ca1[_0x5e5a('0x10')][_0x5e5a('0x31')],'change',(_0x231771,_0x26eb40)=>{for(const {name:_0x3af1ab,data:{newRange:_0x52a593}}of _0x236ca1['model'][_0x5e5a('0x31')][_0x5e5a('0x42')]['getChangedMarkers']()){const {group:_0x17d994,id:_0x59f1a6}=ot(_0x3af1ab);if(_0x5e5a('0x58')!==_0x17d994)continue;const _0x45d36e=_0xe47a86['getCommentThread'](_0x59f1a6),_0x9ae2df=this['hasMarkerForId'](_0x59f1a6);_0x45d36e&&(_0x45d36e[_0x5e5a('0x46')]||_0x236ca1[_0x5e5a('0x61')][_0x5e5a('0x55')][_0x5e5a('0x21')](_0x5e5a('0x3b'),()=>{const _0x1656a9=_0x236ca1['plugins']['get'](_0x23846a),_0x3b5f7a=_0xe47a86[_0x5e5a('0x8')][_0x5e5a('0x6a')](_0x45d36e)[_0x5e5a('0x55')];_0x1656a9[_0x5e5a('0x57')](_0x3b5f7a)[_0x5e5a('0xf')]();},{'priority':_0x5e5a('0x17')}),_0x45d36e['_hasTargetInContent']=_0x9ae2df||!!_0x52a593),!_0x52a593&&_0x26eb40['isLocal']&&(_0x56e3f5[_0x5e5a('0xc')](_0x59f1a6),_0x45d36e&&!_0x45d36e[_0x5e5a('0x19')]&&!_0x9ae2df&&this[_0x5e5a('0x2')][_0x5e5a('0x18')](_0x59f1a6)&&(this[_0x5e5a('0x2')][_0x5e5a('0xc')](_0x59f1a6),_0x45d36e['resolve']()));}});}[_0x5e5a('0x49')](_0x3b789){const _0x1186d7=this[_0x5e5a('0x47')],_0x2636e3=this['getAllMarkersForId'](_0x3b789);return _0x22a235(_0x1186d7[_0x5e5a('0x61')],_0x2636e3);}[_0x5e5a('0x14')](_0x3de65a){const _0x556b26=this[_0x5e5a('0x59')](_0x3de65a);let _0x2b0ab4='',_0x39b6d3=!0x1;for(const _0x59f084 of _0x556b26){const _0x1497a6=_0x59f084[_0x5e5a('0x63')]();for(const _0x395763 of Array[_0x5e5a('0x54')](_0x1497a6[_0x5e5a('0xe')]()))_0x395763['is']('$textProxy')?(_0x2b0ab4&&_0x39b6d3&&(_0x2b0ab4+='\x20',_0x39b6d3=!0x1),_0x2b0ab4+=_0x395763[_0x5e5a('0x62')]):_0x39b6d3=!0x0;_0x39b6d3=!0x0;}return _0x2b0ab4['substring'](0x0,0x96);}[_0x5e5a('0x4f')](_0x4ad073,_0x12db8f){const _0x563878=this[_0x5e5a('0x47')],_0x422842=_0x563878[_0x5e5a('0x2d')][_0x5e5a('0x6a')](_0x59e9e0);let _0x530568=_0x422842[_0x5e5a('0x4b')](_0x12db8f);if(this[_0x5e5a('0x2')]['has'](_0x12db8f)){const _0x89b1fe=this[_0x5e5a('0x2')][_0x5e5a('0x6a')](_0x12db8f);return _0x89b1fe[_0x5e5a('0x39')](_0x4ad073)||_0x89b1fe[_0x5e5a('0x5b')](_0x4ad073),_0x530568;}this[_0x5e5a('0x2')][_0x5e5a('0x1c')](_0x12db8f,[_0x4ad073]);const _0x442888=_0x563878[_0x5e5a('0x4c')]['get']('collaboration.channelId'),_0x4ab3c1=_0x563878[_0x5e5a('0x2d')][_0x5e5a('0x6a')](_0x5da5b0);if(_0x530568&&_0x530568[_0x5e5a('0x19')])return _0x530568[_0x5e5a('0x20')](),_0x530568;return!this[_0x5e5a('0x59')](_0x12db8f)[0x0]['managedUsingOperations']?_0x563878[_0x5e5a('0x61')]['view'][_0x5e5a('0x21')](_0x5e5a('0x3b'),()=>{const _0x517947=_0x563878[_0x5e5a('0x2d')]['get'](_0x23846a);_0x530568=_0x422842[_0x5e5a('0x41')]({'channelId':_0x442888,'threadId':_0x12db8f,'target':()=>this[_0x5e5a('0x49')](_0x12db8f),'context':{'type':_0x5e5a('0x65'),'value':this[_0x5e5a('0x14')](_0x12db8f)}});const _0x2dc7d4=_0x422842[_0x5e5a('0x8')][_0x5e5a('0x6a')](_0x530568)[_0x5e5a('0x55')],_0x25ee3e=_0x517947[_0x5e5a('0x57')](_0x2dc7d4);_0x25ee3e&&_0x4ab3c1[_0x5e5a('0x12')](_0x25ee3e);},{'priority':_0x5e5a('0x17')}):_0x422842[_0x5e5a('0x35')]({'channelId':_0x442888,'threadId':_0x12db8f})[_0x5e5a('0x4')](_0x1bfc6a=>{if('destroyed'!==_0x563878[_0x5e5a('0x68')]){if(_0x530568=_0x1bfc6a,_0x530568){const _0x171317=_0x530568[_0x5e5a('0x3e')](()=>this['_getTargetForId'](_0x12db8f));_0x4ab3c1[_0x5e5a('0x12')](_0x171317),_0x530568[_0x5e5a('0x19')]&&this[_0x5e5a('0x37')](_0x12db8f);}else{const _0x352674=this[_0x5e5a('0x59')](_0x12db8f);_0x563878[_0x5e5a('0x10')][_0x5e5a('0x3f')](_0x138887=>{for(const _0x46d345 of _0x352674)_0x138887[_0x5e5a('0x1')](_0x46d345);});}}}),_0x530568;}[_0x5e5a('0x0')](_0x135008,_0x1af5a6){const _0x579ba9=this[_0x5e5a('0x4f')](_0x135008,_0x1af5a6);_0x579ba9&&!_0x579ba9['context']&&_0x579ba9[_0x5e5a('0x1b')]({'type':_0x5e5a('0x65'),'value':this[_0x5e5a('0x14')](_0x1af5a6)});}}function tt(_0x4f90ae,_0x53b143){return _0x53b143?_0x4f90ae+':'+_0x53b143:_0x4f90ae;}function ot(_0x25eb32){const _0x516366=_0x25eb32['split'](':');return{'group':_0x516366[0x0],'id':_0x516366[0x1],'part':_0x516366[0x2]};}function et(_0x522c51,_0x14cc00){const _0x43e8a4=_0x14cc00['schema'],_0x5b0caf=_0x14cc00[_0x5e5a('0x6')](_0x522c51['start']);for(const _0x4eb742 of _0x522c51[_0x5e5a('0x36')]()){const {type:_0x1b45c1,item:_0x10af58,nextPosition:_0x123f8f}=_0x4eb742;if(_0x5e5a('0x65')===_0x1b45c1||_0x43e8a4['isObject'](_0x10af58)){const _0x30352e=_0x14cc00[_0x5e5a('0x66')](_0x10af58);_0x5b0caf[_0x5e5a('0x2b')]&&(_0x5b0caf[_0x5e5a('0x50')]=_0x30352e),_0x5b0caf[_0x5e5a('0x4e')]=_0x123f8f;}}return _0x5b0caf[_0x5e5a('0x2b')]?null:_0x5b0caf;}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* @module comments/comments/commentsrepository
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Context,
|
|
5
|
+
import { Context, PendingActions, ContextPlugin, type Editor } from 'ckeditor5/src/core';
|
|
6
6
|
import { Collection } from 'ckeditor5/src/utils';
|
|
7
|
-
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
7
|
+
import { Users, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
8
8
|
import CommentThreadController from './ui/commentthreadcontroller';
|
|
9
9
|
import '../../theme/comment.css';
|
|
10
10
|
import '../../theme/commentthread.css';
|
|
11
11
|
import '../../theme/commentinput.css';
|
|
12
12
|
import Annotation, { type AnnotationTarget } from '../annotations/annotation';
|
|
13
|
+
import Annotations from '../annotations/annotations';
|
|
13
14
|
import type BaseCommentThreadView from './ui/view/basecommentthreadview';
|
|
14
15
|
/**
|
|
15
16
|
* Stores the list of {@link module:comments/comments/commentsrepository~CommentThread}
|
|
@@ -57,11 +58,11 @@ export default class CommentsRepository extends ContextPlugin {
|
|
|
57
58
|
/**
|
|
58
59
|
* @inheritDoc
|
|
59
60
|
*/
|
|
60
|
-
static get requires():
|
|
61
|
+
static get requires(): readonly [typeof Annotations, typeof PendingActions, typeof Users];
|
|
61
62
|
/**
|
|
62
63
|
* @inheritDoc
|
|
63
64
|
*/
|
|
64
|
-
static get pluginName():
|
|
65
|
+
static get pluginName(): "CommentsRepository";
|
|
65
66
|
/**
|
|
66
67
|
* @inheritDoc
|
|
67
68
|
*/
|
|
@@ -251,6 +252,10 @@ interface CommentPermissionsConfig {
|
|
|
251
252
|
* Allows for editing and removing comments created by this user.
|
|
252
253
|
*/
|
|
253
254
|
write: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Allows for resolving and reopening comment threads.
|
|
257
|
+
*/
|
|
258
|
+
resolve: boolean;
|
|
254
259
|
}
|
|
255
260
|
declare const CommentThread_base: {
|
|
256
261
|
new (): import("ckeditor5/src/utils").Observable;
|
|
@@ -314,7 +319,6 @@ export declare class CommentThread extends CommentThread_base {
|
|
|
314
319
|
constructor(commentsRepository: CommentsRepository, data: {
|
|
315
320
|
channelId: string | symbol;
|
|
316
321
|
id: string;
|
|
317
|
-
author: User | null;
|
|
318
322
|
context: CommentThreadContext;
|
|
319
323
|
attributes: Record<string, unknown>;
|
|
320
324
|
resolvedAt: Date | null;
|