@ckeditor/ckeditor5-comments 38.0.0 → 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 _0x5531=['isObject','low','filter','add','hasCommentThread','setContext','addCommentThread','CommentsEditing','editing','destroy','$textProxy','_getTextContext','change','change:isReadOnly','size','createElement','listenTo','split','markerToHighlight','commands','_threadToController','differ','_initializeMarkerConverters','reconvertMarker','isResolved','_handleThreadMarker','scrollToThreadMarker','reopen','_reconvertMarkers','registerAnnotation','fetchCommentThread','set','isThreadsLoadingPaused','getCommentThread','_attachedThreads','_getTargetForId','hasMarkerForId','removeCommentThread','from','_handleMarkerAddAndRemove','has','hasContent','removeMarker','render','schema','addComment','addMarker:','getAllMarkersForId','get','hasDomSelection','isLocal','for','activeMarker','delete','$marker','managedUsingOperations','consumable','text','_detachCommentThread','change:isThreadsLoadingPaused','editingDowncast','init','view','editor','ignoreResolvedComments','_hasTargetInContent','config','comment:','reopenCommentThread','comment','ck-comment-marker--active','switchReadOnly','map','$graveyard','document','includes','plugins','upcast','getCommentThreads','state','item','high','data','resolveCommentThread','markers','conversion','length','updateMarker','openNewCommentThread','getAttribute','start','elementToElement','requires','enqueueChange','consume','root','_threads','push','ck-comment-marker','isCollapsed','once','end','affectsData','newRange','attachTo','isEqual','getByInnerView','then','getChangedMarkers','_attachMarkerToThread','model','markerName'];(function(_0x12f6c4,_0x553170){const _0x1a1cad=function(_0xd8983d){while(--_0xd8983d){_0x12f6c4['push'](_0x12f6c4['shift']());}};_0x1a1cad(++_0x553170);}(_0x5531,0xb3));const _0x1a1c=function(_0x12f6c4,_0x553170){_0x12f6c4=_0x12f6c4-0x0;let _0x1a1cad=_0x5531[_0x12f6c4];return _0x1a1cad;};import{Plugin as _0x37588d}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x2cbd95}from'ckeditor5/src/utils';import _0x1c47a4 from'./commentsrepository';import _0x29792c from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x4d2d0e}from'ckeditor5-collaboration/src/collaboration-core';import _0x1c82fc from'../annotations/editorannotations';import _0xee51b from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x220435 from'./integrations/importword';import _0x3144be from'../annotations/annotations';export default class r extends _0x37588d{static get[_0x1a1c('0x19')](){return[_0x1c47a4,_0x1c82fc,_0xee51b,_0x220435];}static get['pluginName'](){return _0x1a1c('0x34');}constructor(_0x544bd9){super(_0x544bd9),this['set'](_0x1a1c('0x4d'),!0x0),_0x544bd9['data'][_0x1a1c('0x21')]('ready',()=>this[_0x1a1c('0x4d')]=!0x1),this['set'](_0x1a1c('0x61'),null),this['on']('change:activeMarker',(_0x28555b,_0x8a9bfb,_0x37ac89,_0x2f48b7)=>{const _0x3a09c8=_0x37ac89?rt(_0x37ac89)['id']:null;if(_0x544bd9[_0x1a1c('0x2b')][_0x1a1c('0x39')](()=>{if(_0x3a09c8){const _0x22edf0=this[_0x1a1c('0x5c')](_0x3a09c8);for(const _0x17bc1e of _0x22edf0)_0x544bd9[_0x1a1c('0x35')][_0x1a1c('0x44')](_0x17bc1e);}if(_0x2f48b7){const {id:_0x308212}=rt(_0x2f48b7),_0x4ce0f6=this[_0x1a1c('0x5c')](_0x308212);for(const _0x24a194 of _0x4ce0f6)_0x544bd9[_0x1a1c('0x35')][_0x1a1c('0x44')](_0x24a194);}}),_0x3a09c8){const _0x2956bb=_0x544bd9[_0x1a1c('0x9')]['get'](_0x1c47a4)['getCommentThread'](_0x3a09c8);_0x2956bb&&_0x2956bb[_0x1a1c('0x45')]&&this[_0x1a1c('0x47')](_0x3a09c8);}}),this[_0x1a1c('0x4f')]=new Map();}[_0x1a1c('0x6a')](){const _0x2c847d=this['editor'],_0x57058b=_0x2c847d[_0x1a1c('0x9')][_0x1a1c('0x5d')](_0x1c47a4),_0x30796b=_0x2c847d['config'][_0x1a1c('0x5d')]('collaboration.channelId');_0x2c847d[_0x1a1c('0x40')][_0x1a1c('0x30')](_0x1a1c('0x33'),new _0x29792c(_0x2c847d)),this['listenTo'](_0x2c847d,_0x1a1c('0x3a'),(_0x2cf21c,_0x169683,_0x2c17d2)=>{_0x57058b[_0x1a1c('0x4')](_0x2c17d2,_0x2c847d[_0x1a1c('0x6f')][_0x1a1c('0x5d')]('collaboration.channelId'));}),this[_0x1a1c('0x3d')](_0x57058b,et(_0x1a1c('0x33'),_0x30796b),(_0x4b6b44,{threadId:_0x4a93d2})=>{const _0xdc8b1=_0x2c847d[_0x1a1c('0x9')][_0x1a1c('0x5d')](_0x1c82fc),_0x5dab23=this[_0x1a1c('0x6c')][_0x1a1c('0x9')][_0x1a1c('0x5d')](_0x1c47a4)[_0x1a1c('0x4e')](_0x4a93d2);if(_0x5dab23&&_0x5dab23[_0x1a1c('0x45')]&&!this[_0x1a1c('0x4f')][_0x1a1c('0x55')](_0x4a93d2)){const _0x47688f=_0x5dab23[_0x1a1c('0x25')](()=>this[_0x1a1c('0x50')](_0x5dab23['id']));_0xdc8b1[_0x1a1c('0x4a')](_0x47688f),this[_0x1a1c('0x4f')][_0x1a1c('0x4c')](_0x4a93d2,[]),0x0===this[_0x1a1c('0x5c')](_0x4a93d2)[_0x1a1c('0x13')]&&(_0x5dab23[_0x1a1c('0x6e')]=!0x1);}}),this[_0x1a1c('0x3d')](_0x57058b,et(_0x1a1c('0x52'),_0x30796b),(_0x164944,{threadId:_0x8d2819})=>{_0x2c847d[_0x1a1c('0x2b')][_0x1a1c('0x1a')]({'isUndoable':!0x1},_0x126958=>{const _0x1d9cd9=this[_0x1a1c('0x5c')](_0x8d2819);this[_0x1a1c('0x4f')][_0x1a1c('0x62')](_0x8d2819);for(const _0xf9a98c of _0x1d9cd9)_0x126958[_0x1a1c('0x57')](_0xf9a98c);});},{'priority':_0x1a1c('0xe')}),this[_0x1a1c('0x3d')](_0x57058b,et(_0x1a1c('0x10'),_0x30796b),(_0x15758c,{threadId:_0x41c318})=>{this['_reconvertMarkers'](_0x41c318),this[_0x1a1c('0x6c')]['editing']['view'][_0x1a1c('0x5e')]&&this['editor']['editing'][_0x1a1c('0x6b')]['focus']();},{'priority':_0x1a1c('0x2e')}),this[_0x1a1c('0x3d')](_0x57058b,et(_0x1a1c('0x1'),_0x30796b),(_0x30f352,{threadId:_0x553dd6})=>{this[_0x1a1c('0x49')](_0x553dd6);},{'priority':_0x1a1c('0x2e')}),this[_0x1a1c('0x3d')](_0x57058b,et(_0x1a1c('0x5a'),_0x30796b),(_0x3faa40,{threadId:_0x7a315a,isFromAdapter:_0x49493e})=>{const _0x49d71f=this[_0x1a1c('0x5c')](_0x7a315a);if(_0x49493e||0x0==_0x49d71f['length']||!_0x57058b[_0x1a1c('0x31')](_0x7a315a))return;0x1===_0x57058b[_0x1a1c('0x4e')](_0x7a315a)[_0x1a1c('0x13')]&&_0x2c847d['model'][_0x1a1c('0x1a')]({'isUndoable':!0x1},_0x19633f=>{for(const _0x230dcc of _0x49d71f)_0x19633f[_0x1a1c('0x14')](_0x230dcc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this[_0x1a1c('0x43')](),this['_handleMarkerAddAndRemove']();}['destroy'](){const _0x22e4a6=this[_0x1a1c('0x6c')]['plugins'][_0x1a1c('0x5d')](_0x1c47a4),_0x557b0c=this['editor'][_0x1a1c('0x6f')][_0x1a1c('0x5d')]('collaboration.channelId');for(const _0x34e401 of _0x22e4a6[_0x1a1c('0xb')]({'channelId':_0x557b0c}))_0x22e4a6[_0x1a1c('0x67')](_0x34e401['id']),_0x22e4a6[_0x1a1c('0x1d')][_0x1a1c('0x62')](_0x34e401['id']);super[_0x1a1c('0x36')]();}[_0x1a1c('0x51')](_0xe183a6){return this[_0x1a1c('0x5c')](_0xe183a6)[_0x1a1c('0x13')]>0x0;}[_0x1a1c('0x5c')](_0x1ed717){return(this['_attachedThreads'][_0x1a1c('0x5d')](_0x1ed717)||[])[_0x1a1c('0x5')](_0x1c17ae=>this[_0x1a1c('0x6c')][_0x1a1c('0x2b')][_0x1a1c('0x11')][_0x1a1c('0x5d')](_0x1c17ae))[_0x1a1c('0x2f')](_0x5a1f87=>_0x5a1f87);}[_0x1a1c('0x47')](_0x13f50a){const _0x4a531b=this[_0x1a1c('0x50')](_0x13f50a);_0x4a531b&&setTimeout(()=>{this[_0x1a1c('0x61')]&&rt(this['activeMarker'])['id']===_0x13f50a&&_0x2cbd95({'target':_0x4a531b[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}[_0x1a1c('0x49')](_0x52cccc){this[_0x1a1c('0x6c')][_0x1a1c('0x2b')][_0x1a1c('0x39')](()=>{for(const _0x196644 of this[_0x1a1c('0x5c')](_0x52cccc))this['editor'][_0x1a1c('0x35')]['reconvertMarker'](_0x196644);});}['_initializeMarkerConverters'](){const _0x2ae8ac=this['editor'];_0x2ae8ac[_0x1a1c('0x12')][_0x1a1c('0x60')](_0x1a1c('0x69'))[_0x1a1c('0x3f')]({'model':'comment','view':(_0x109af2,_0x330841)=>{const {id:_0x1d4246}=rt(_0x109af2[_0x1a1c('0x2c')]),_0x1ba129=_0x2ae8ac[_0x1a1c('0x9')][_0x1a1c('0x5d')](_0x1c47a4)[_0x1a1c('0x4e')](_0x1d4246),_0x4f132e=this[_0x1a1c('0x61')]&&rt(this[_0x1a1c('0x61')])['id']===_0x1d4246;if(_0x1ba129&&_0x1ba129[_0x1a1c('0x45')]&&!_0x4f132e&&_0x109af2[_0x1a1c('0xd')])return _0x330841[_0x1a1c('0x65')][_0x1a1c('0x1b')](_0x109af2[_0x1a1c('0xd')],_0x1a1c('0x5b')+_0x109af2[_0x1a1c('0x2c')]),_0x330841[_0x1a1c('0x65')][_0x1a1c('0x1b')](_0x109af2['item'],'removeMarker:'+_0x109af2[_0x1a1c('0x2c')]),{'classes':[]};const _0x1fbdeb=[_0x1a1c('0x1f')];return _0x4f132e&&_0x1fbdeb[_0x1a1c('0x1e')](_0x1a1c('0x3')),{'classes':_0x1fbdeb,'attributes':{'data-comment':_0x1d4246}};}}),_0x2ae8ac[_0x1a1c('0x12')]['for']('dataDowncast')['markerToData']({'model':_0x1a1c('0x2'),'view':(_0x1d7c5b,{options:_0x488f2c})=>{const _0x277c23=_0x2ae8ac['plugins'][_0x1a1c('0x5d')](_0x1c47a4),_0x3ffca6=_0x2ae8ac['model']['markers'][_0x1a1c('0x5d')](_0x1d7c5b),{id:_0x5a9a9b,part:_0x1c3198}=rt(_0x1d7c5b),_0x5d357e=_0x277c23[_0x1a1c('0x4e')](_0x5a9a9b);return _0x3ffca6&&!_0x3ffca6[_0x1a1c('0x23')]||_0x5d357e&&_0x5d357e[_0x1a1c('0x45')]&&_0x488f2c[_0x1a1c('0x6d')]?null:{'group':_0x1a1c('0x2'),'name':_0x1c3198?_0x5a9a9b+':'+_0x1c3198:_0x5a9a9b};}}),_0x2ae8ac[_0x1a1c('0x12')][_0x1a1c('0x60')](_0x1a1c('0xa'))[_0x1a1c('0x18')]({'view':{'name':_0x1a1c('0x2'),'attributes':{'id':/^\w/}},'model':(_0x295834,{writer:_0x4ae235})=>_0x4ae235[_0x1a1c('0x3c')](_0x1a1c('0x63'),{'data-name':_0x1a1c('0x0')+_0x295834[_0x1a1c('0x16')]('id')})}),_0x2ae8ac['conversion'][_0x1a1c('0x60')](_0x1a1c('0xa'))['dataToMarker']({'view':_0x1a1c('0x2')});}[_0x1a1c('0x54')](){const _0x35dcbb=this[_0x1a1c('0x6c')],_0x36188c=_0x35dcbb[_0x1a1c('0x9')]['get'](_0x1c47a4),_0x8eb907=new Set();_0x35dcbb[_0x1a1c('0x2b')][_0x1a1c('0x7')]['registerPostFixer'](_0x4baae7=>{let _0xae59e8=!0x1;for(const {name:_0x4aa2f2,data:_0x383dfa}of _0x35dcbb[_0x1a1c('0x2b')][_0x1a1c('0x7')][_0x1a1c('0x42')][_0x1a1c('0x29')]()){const {group:_0x10316c,id:_0x2ab3df}=rt(_0x4aa2f2);let _0x44d1b5=_0x383dfa[_0x1a1c('0x24')];if(_0x1a1c('0x2')!==_0x10316c||!_0x44d1b5)continue;const _0x21d083=_0x1a1c('0x6')===_0x44d1b5[_0x1a1c('0x1c')]['rootName'];_0x21d083||(_0x44d1b5=nt(_0x44d1b5,_0x35dcbb[_0x1a1c('0x2b')]),!_0x44d1b5||!_0x383dfa[_0x1a1c('0x24')]||_0x44d1b5[_0x1a1c('0x26')](_0x383dfa[_0x1a1c('0x24')]))?!_0x44d1b5||!_0x35dcbb[_0x1a1c('0x2b')][_0x1a1c('0x56')](_0x44d1b5)||this[_0x1a1c('0x4f')][_0x1a1c('0x55')](_0x2ab3df)&&_0x21d083?(_0x4baae7['removeMarker'](_0x4aa2f2),_0xae59e8=!0x0):_0x21d083||(this[_0x1a1c('0x4d')]?_0x8eb907[_0x1a1c('0x30')](_0x4aa2f2):this[_0x1a1c('0x46')](_0x4aa2f2,_0x2ab3df)):(_0x4baae7[_0x1a1c('0x14')](_0x4aa2f2,{'range':_0x44d1b5}),_0xae59e8=!0x0);}return _0xae59e8;}),this['on'](_0x1a1c('0x68'),(_0x515f27,_0x5cd9c0,_0x1d2d6f)=>{if(!_0x1d2d6f&&_0x8eb907[_0x1a1c('0x3b')])for(const _0x1bfb7a of _0x8eb907){const {id:_0xc7219b}=rt(_0x1bfb7a);_0x8eb907[_0x1a1c('0x62')](_0xc7219b),_0x35dcbb[_0x1a1c('0x2b')][_0x1a1c('0x11')]['get'](_0x1bfb7a)&&this[_0x1a1c('0x46')](_0x1bfb7a,_0xc7219b);}}),this[_0x1a1c('0x3d')](_0x35dcbb['model'][_0x1a1c('0x7')],_0x1a1c('0x39'),(_0x46d5db,_0x238da2)=>{for(const {name:_0x434f31,data:{newRange:_0x27cfd8}}of _0x35dcbb[_0x1a1c('0x2b')][_0x1a1c('0x7')][_0x1a1c('0x42')][_0x1a1c('0x29')]()){const {group:_0xed159d,id:_0x3def62}=rt(_0x434f31);if(_0x1a1c('0x2')!==_0xed159d)continue;const _0x5817d7=_0x36188c[_0x1a1c('0x4e')](_0x3def62),_0x29f34d=this['hasMarkerForId'](_0x3def62);_0x5817d7&&(_0x5817d7[_0x1a1c('0x6e')]||_0x35dcbb[_0x1a1c('0x35')][_0x1a1c('0x6b')][_0x1a1c('0x21')](_0x1a1c('0x58'),()=>{const _0x5ca464=_0x35dcbb['plugins']['get'](_0x3144be),_0x3cedd0=_0x36188c[_0x1a1c('0x41')][_0x1a1c('0x5d')](_0x5817d7)[_0x1a1c('0x6b')];_0x5ca464['getByInnerView'](_0x3cedd0)['refreshVisibility']();},{'priority':_0x1a1c('0x2e')}),_0x5817d7[_0x1a1c('0x6e')]=_0x29f34d||!!_0x27cfd8),!_0x27cfd8&&_0x238da2[_0x1a1c('0x5f')]&&(_0x8eb907['delete'](_0x3def62),_0x5817d7&&!_0x5817d7['isResolved']&&!_0x29f34d&&this[_0x1a1c('0x4f')][_0x1a1c('0x55')](_0x3def62)&&(this[_0x1a1c('0x4f')][_0x1a1c('0x62')](_0x3def62),_0x5817d7['resolve']()));}});}[_0x1a1c('0x50')](_0x35e995){const _0x4ec23b=this['editor'],_0x565ab9=this[_0x1a1c('0x5c')](_0x35e995);return _0x4d2d0e(_0x4ec23b[_0x1a1c('0x35')],_0x565ab9);}['_getTextContext'](_0xb5af54){const _0x2d904d=this[_0x1a1c('0x5c')](_0xb5af54);let _0x4b4021='',_0x51b996=!0x1;for(const _0x5a902f of _0x2d904d){const _0x59d0e5=_0x5a902f['getRange']();for(const _0x3864ab of Array[_0x1a1c('0x53')](_0x59d0e5['getItems']()))_0x3864ab['is'](_0x1a1c('0x37'))?(_0x4b4021&&_0x51b996&&(_0x4b4021+='\x20',_0x51b996=!0x1),_0x4b4021+=_0x3864ab[_0x1a1c('0xf')]):_0x51b996=!0x0;_0x51b996=!0x0;}return _0x4b4021['substring'](0x0,0x96);}[_0x1a1c('0x2a')](_0x1635ba,_0x256ddf){const _0x32d4e9=this[_0x1a1c('0x6c')],_0x4203fe=_0x32d4e9['plugins'][_0x1a1c('0x5d')](_0x1c47a4);let _0x1ac7a9=_0x4203fe[_0x1a1c('0x4e')](_0x256ddf);if(this[_0x1a1c('0x4f')][_0x1a1c('0x55')](_0x256ddf)){const _0x431898=this[_0x1a1c('0x4f')][_0x1a1c('0x5d')](_0x256ddf);return _0x431898[_0x1a1c('0x8')](_0x1635ba)||_0x431898['push'](_0x1635ba),_0x1ac7a9;}this[_0x1a1c('0x4f')]['set'](_0x256ddf,[_0x1635ba]);const _0x9e9e55=_0x32d4e9[_0x1a1c('0x6f')][_0x1a1c('0x5d')]('collaboration.channelId'),_0x315dc3=_0x32d4e9['plugins']['get'](_0x1c82fc);if(_0x1ac7a9&&_0x1ac7a9[_0x1a1c('0x45')])return _0x1ac7a9[_0x1a1c('0x48')](),_0x1ac7a9;return!this[_0x1a1c('0x5c')](_0x256ddf)[0x0][_0x1a1c('0x64')]?_0x32d4e9[_0x1a1c('0x35')][_0x1a1c('0x6b')][_0x1a1c('0x21')](_0x1a1c('0x58'),()=>{const _0x5434d2=_0x32d4e9[_0x1a1c('0x9')][_0x1a1c('0x5d')](_0x3144be);_0x1ac7a9=_0x4203fe[_0x1a1c('0x15')]({'channelId':_0x9e9e55,'threadId':_0x256ddf,'target':()=>this[_0x1a1c('0x50')](_0x256ddf),'context':{'type':'text','value':this[_0x1a1c('0x38')](_0x256ddf)}});const _0x2ebab8=_0x4203fe[_0x1a1c('0x41')][_0x1a1c('0x5d')](_0x1ac7a9)[_0x1a1c('0x6b')],_0x3e83d6=_0x5434d2[_0x1a1c('0x27')](_0x2ebab8);_0x3e83d6&&_0x315dc3[_0x1a1c('0x4a')](_0x3e83d6);},{'priority':'low'}):_0x4203fe[_0x1a1c('0x4b')]({'channelId':_0x9e9e55,'threadId':_0x256ddf})[_0x1a1c('0x28')](_0x53233c=>{if('destroyed'!==_0x32d4e9[_0x1a1c('0xc')]){if(_0x1ac7a9=_0x53233c,_0x1ac7a9){const _0x126c01=_0x1ac7a9[_0x1a1c('0x25')](()=>this[_0x1a1c('0x50')](_0x256ddf));_0x315dc3[_0x1a1c('0x4a')](_0x126c01),_0x1ac7a9[_0x1a1c('0x45')]&&this[_0x1a1c('0x49')](_0x256ddf);}else{const _0x5a7340=this[_0x1a1c('0x5c')](_0x256ddf);_0x32d4e9[_0x1a1c('0x2b')]['change'](_0x42dc7d=>{for(const _0x375288 of _0x5a7340)_0x42dc7d[_0x1a1c('0x57')](_0x375288);});}}}),_0x1ac7a9;}[_0x1a1c('0x46')](_0x40766e,_0x571adf){const _0x2c8e89=this[_0x1a1c('0x2a')](_0x40766e,_0x571adf);_0x2c8e89&&!_0x2c8e89['context']&&_0x2c8e89[_0x1a1c('0x32')]({'type':'text','value':this[_0x1a1c('0x38')](_0x571adf)});}}function et(_0x5368e1,_0x1960a1){return _0x1960a1?_0x5368e1+':'+_0x1960a1:_0x5368e1;}function rt(_0x2a44e5){const _0x3ce274=_0x2a44e5[_0x1a1c('0x3e')](':');return{'group':_0x3ce274[0x0],'id':_0x3ce274[0x1],'part':_0x3ce274[0x2]};}function nt(_0x714577,_0x230e37){const _0x4c9980=_0x230e37[_0x1a1c('0x59')],_0x3070ac=_0x230e37['createRange'](_0x714577[_0x1a1c('0x17')]);for(const _0x5bc6f4 of _0x714577['getWalker']()){const {type:_0x4630b3,item:_0x2e161b,nextPosition:_0x3ee39b}=_0x5bc6f4;if(_0x1a1c('0x66')===_0x4630b3||_0x4c9980[_0x1a1c('0x2d')](_0x2e161b)){const _0x4d9888=_0x230e37['createPositionBefore'](_0x2e161b);_0x3070ac[_0x1a1c('0x20')]&&(_0x3070ac[_0x1a1c('0x17')]=_0x4d9888),_0x3070ac[_0x1a1c('0x22')]=_0x3ee39b;}}return _0x3070ac[_0x1a1c('0x20')]?null:_0x3070ac;}
|
|
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;
|