@ckeditor/ckeditor5-comments 39.0.1 → 40.0.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/CHANGELOG.md +2 -2
- package/LICENSE.md +6 -6
- package/README.md +14 -14
- package/build/comments.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/lang/translations/af.po +1 -0
- package/lang/translations/ar.po +1 -0
- package/lang/translations/bg.po +1 -0
- package/lang/translations/bn.po +1 -0
- package/lang/translations/bs.po +1 -0
- package/lang/translations/ca.po +1 -0
- package/lang/translations/cs.po +1 -0
- package/lang/translations/da.po +1 -0
- package/lang/translations/de-ch.po +1 -0
- package/lang/translations/de.po +1 -0
- package/lang/translations/el.po +1 -0
- package/lang/translations/en-au.po +1 -0
- package/lang/translations/en.po +1 -0
- package/lang/translations/es-co.po +1 -0
- package/lang/translations/es.po +1 -0
- package/lang/translations/et.po +1 -0
- package/lang/translations/fa.po +10 -9
- package/lang/translations/fi.po +1 -0
- package/lang/translations/fr.po +1 -0
- package/lang/translations/gl.po +1 -0
- package/lang/translations/he.po +1 -0
- package/lang/translations/hi.po +1 -0
- package/lang/translations/hr.po +1 -0
- package/lang/translations/hu.po +1 -0
- package/lang/translations/id.po +1 -0
- package/lang/translations/it.po +1 -0
- package/lang/translations/ja.po +1 -0
- package/lang/translations/jv.po +1 -0
- package/lang/translations/ko.po +1 -0
- package/lang/translations/lt.po +1 -0
- package/lang/translations/lv.po +1 -0
- package/lang/translations/ms.po +1 -0
- package/lang/translations/nl.po +1 -0
- package/lang/translations/no.po +1 -0
- package/lang/translations/pl.po +1 -0
- package/lang/translations/pt-br.po +4 -3
- package/lang/translations/pt.po +1 -0
- package/lang/translations/ro.po +1 -0
- package/lang/translations/ru.po +1 -0
- package/lang/translations/sk.po +1 -0
- package/lang/translations/sq.po +1 -0
- package/lang/translations/sr-latn.po +1 -0
- package/lang/translations/sr.po +1 -0
- package/lang/translations/sv.po +1 -0
- package/lang/translations/th.po +1 -0
- package/lang/translations/tk.po +1 -0
- package/lang/translations/tr.po +1 -0
- package/lang/translations/tt.po +1 -0
- package/lang/translations/ug.po +1 -0
- package/lang/translations/uk.po +1 -0
- package/lang/translations/ur.po +1 -0
- package/lang/translations/vi.po +1 -0
- package/lang/translations/zh-cn.po +1 -0
- package/lang/translations/zh.po +1 -0
- package/package.json +3 -7
- package/src/annotations/annotation.d.ts +90 -90
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +98 -98
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +154 -154
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +232 -232
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +67 -67
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +90 -90
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +85 -85
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +100 -100
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +90 -90
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +55 -55
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +32 -32
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +77 -77
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +52 -52
- package/src/comments/addcommentthreadcommand.d.ts +35 -35
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +31 -31
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +38 -38
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +79 -79
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1129 -1105
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +33 -33
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +21 -21
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.d.ts +119 -112
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +112 -112
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +14 -14
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +86 -86
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.d.ts +100 -100
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +118 -117
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +243 -243
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +35 -35
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +33 -33
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +176 -176
- package/src/index.d.ts +24 -24
- package/src/utils/common-translations.d.ts +9 -9
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.d.ts +14 -14
- package/src/utils/createmutationobserver.js +1 -1
- package/theme/annotation-inline.css +2 -1
- package/theme/annotation.css +2 -3
- package/theme/comment.css +39 -38
- package/theme/commentinput.css +2 -1
- package/theme/commentmarker.css +7 -6
- package/theme/commentsarchive.css +2 -1
- package/theme/commentthread.css +68 -57
- package/theme/icons/add-comment.svg +1 -1
- package/theme/icons/comments-archive.svg +1 -1
- package/theme/icons/edit-comment.svg +1 -1
- package/theme/icons/remove-comment.svg +1 -1
- package/theme/sidebar-narrow.css +4 -3
- package/theme/sidebar.css +13 -12
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1a62=['stop','addSourceCollector','length','tooltip','CommentsUI','_threadToController','view','change:activeAnnotations','icon','find','focus','get','bind','_viewToController','plugins','activeMarker','has','locale','removeCommentThread','editor','highest','model','commands','hasCommentThread','isFocused','isEnabled','getAllMarkersForId','init','push','listenTo','execute','Comment','map','hasMarkerForId','comment:','componentFactory','editing','low','CommentsListView','comment','innerView'];(function(_0x53ad62,_0x1a626f){const _0x3e2bcf=function(_0x39788b){while(--_0x39788b){_0x53ad62['push'](_0x53ad62['shift']());}};_0x3e2bcf(++_0x1a626f);}(_0x1a62,0x1c3));const _0x3e2b=function(_0x53ad62,_0x1a626f){_0x53ad62=_0x53ad62-0x0;let _0x3e2bcf=_0x1a62[_0x53ad62];return _0x3e2bcf;};import{Plugin as _0xc39eba}from'ckeditor5/src/core';import _0x31d511 from'./commentsrepository';import _0x3eda84 from'./commentsediting';import _0x2991ca from'../annotations/editorannotations';import{ButtonView as _0x308e25}from'ckeditor5/src/ui';import _0xed4edb from'../../theme/icons/add-comment.svg';import _0x5990f4 from'../annotations/annotations';import _0x31134b from'./ui/view/commentslistview';import _0x356123 from'./ui/view/commentthreadinputview';import{getTranslation as _0x4213d4}from'../utils/common-translations';export default class e extends _0xc39eba{static get['pluginName'](){return _0x3e2b('0x4');}static get['requires'](){return[_0x31d511,_0x3eda84,_0x2991ca,_0x5990f4];}get[_0x3e2b('0x26')](){return _0x31134b;}get['CommentThreadInputView'](){return _0x356123;}[_0x3e2b('0x1b')](){const _0x2efbec=this['editor'],_0x3ca53c=_0x2efbec[_0x3e2b('0xe')]['get'](_0x31d511),_0x10e779=_0x2efbec[_0x3e2b('0xe')]['get'](_0x3eda84),_0x524e08=_0x2efbec[_0x3e2b('0xe')][_0x3e2b('0xb')](_0x5990f4),_0x29606f=_0x2efbec['plugins']['get'](_0x2991ca);_0x2efbec['ui'][_0x3e2b('0x23')]['add'](_0x3e2b('0x27'),()=>this['_createUIButton']()),_0x29606f[_0x3e2b('0x1')](()=>{const _0x5706b8=[];for(const [_0x30c495,_0x589395]of _0x3ca53c[_0x3e2b('0x5')]){const _0x527039=_0x10e779[_0x3e2b('0x1a')](_0x30c495['id']),_0x53a5c1=_0x527039[_0x3e2b('0x20')](_0x25121f=>_0x25121f['getRange']());_0x527039[_0x3e2b('0x2')]>0x0&&_0x5706b8[_0x3e2b('0x1c')]([_0x589395[_0x3e2b('0x6')],_0x53a5c1]);}return _0x5706b8;}),this[_0x3e2b('0x1d')](_0x524e08,_0x3e2b('0x7'),(_0x440a90,_0x282ff2,_0x3f69e9)=>{const _0x3268d8=Array['from'](_0x3f69e9)[_0x3e2b('0x20')](_0x3f0dca=>_0x3f0dca[_0x3e2b('0x28')])[_0x3e2b('0x9')](_0x2592bf=>_0x3ca53c[_0x3e2b('0xd')][_0x3e2b('0x10')](_0x2592bf));if(!_0x3268d8)return void(_0x10e779['activeMarker']=null);const _0x529ca6=_0x3ca53c[_0x3e2b('0xd')][_0x3e2b('0xb')](_0x3268d8)[_0x3e2b('0x15')]['id'],_0xafb956=_0x3e2b('0x22')+_0x529ca6;_0x529ca6&&_0x10e779[_0x3e2b('0x21')](_0x529ca6)?_0x10e779['activeMarker']=_0xafb956:_0x10e779['activeMarker']&&(_0x10e779[_0x3e2b('0xf')]=null);}),this[_0x3e2b('0x1d')](_0x3ca53c,_0x3e2b('0x12'),(_0x35321a,{threadId:_0x42b8ac,isFromAdapter:_0x330420})=>{!_0x330420&&_0x2efbec['ui']['focusTracker'][_0x3e2b('0x18')]&&_0x10e779['hasMarkerForId'](_0x42b8ac)&&_0x2efbec[_0x3e2b('0x24')]['view']['focus']();},{'priority':_0x3e2b('0x14')}),this[_0x3e2b('0x1d')](_0x3ca53c,'addComment',(_0x142fb9,{threadId:_0x24a391,isFromAdapter:_0x43b990})=>{if(_0x43b990||!_0x10e779['hasMarkerForId'](_0x24a391)||!_0x3ca53c[_0x3e2b('0x17')](_0x24a391))return;0x1===_0x3ca53c['getCommentThread'](_0x24a391)[_0x3e2b('0x2')]&&(_0x2efbec[_0x3e2b('0x24')][_0x3e2b('0x6')][_0x3e2b('0xa')](),_0x142fb9[_0x3e2b('0x0')]());},{'priority':_0x3e2b('0x25')});}['_createUIButton'](){const _0x8f98fe=this[_0x3e2b('0x13')],_0x198238=new _0x308e25(_0x8f98fe[_0x3e2b('0x11')]),_0x3ab654=_0x8f98fe[_0x3e2b('0x16')]['get']('addCommentThread');return _0x198238['label']=_0x4213d4(_0x8f98fe[_0x3e2b('0x11')],_0x3e2b('0x1f')),_0x198238[_0x3e2b('0x3')]=_0x4213d4(_0x8f98fe[_0x3e2b('0x11')],_0x3e2b('0x1f')),_0x198238[_0x3e2b('0x8')]=_0xed4edb,_0x198238[_0x3e2b('0xc')](_0x3e2b('0x19'))['to'](_0x3ab654),this['listenTo'](_0x198238,_0x3e2b('0x1e'),()=>_0x3ab654[_0x3e2b('0x1e')]()),_0x198238;}}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/comments/integrations/commentsrestrictededitingmode
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
/**
|
|
10
|
-
* Provides comments plugin integration for restricted editing mode feature from restricted editing package.
|
|
11
|
-
*/
|
|
12
|
-
export default class CommentsRestrictedEditingMode extends Plugin {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
afterInit(): void;
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/comments/integrations/commentsrestrictededitingmode
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
/**
|
|
10
|
+
* Provides comments plugin integration for restricted editing mode feature from restricted editing package.
|
|
11
|
+
*/
|
|
12
|
+
export default class CommentsRestrictedEditingMode extends Plugin {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
afterInit(): void;
|
|
17
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5a54=['get','afterInit','editor','enableCommand','has','RestrictedEditingModeEditing','plugins'];(function(_0x11817f,_0x5a5462){const _0x270938=function(_0x4a174d){while(--_0x4a174d){_0x11817f['push'](_0x11817f['shift']());}};_0x270938(++_0x5a5462);}(_0x5a54,0xad));const _0x2709=function(_0x11817f,_0x5a5462){_0x11817f=_0x11817f-0x0;let _0x270938=_0x5a54[_0x11817f];return _0x270938;};import{Plugin as _0x59226b}from'ckeditor5/src/core';export default class X extends _0x59226b{[_0x2709('0x3')](){const _0xd3a75c=this[_0x2709('0x4')];if(!_0xd3a75c[_0x2709('0x1')][_0x2709('0x6')](_0x2709('0x0')))return;_0xd3a75c[_0x2709('0x1')][_0x2709('0x2')](_0x2709('0x0'))[_0x2709('0x5')]('addCommentThread');}}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/integrations/importword
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
/**
|
|
10
|
-
* Provides comments plugin integration for the import from Word feature.
|
|
11
|
-
*/
|
|
12
|
-
export default class CommentsImportWord extends Plugin {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
constructor(editor: Editor);
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
afterInit(): void;
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/integrations/importword
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
+
/**
|
|
10
|
+
* Provides comments plugin integration for the import from Word feature.
|
|
11
|
+
*/
|
|
12
|
+
export default class CommentsImportWord extends Plugin {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
constructor(editor: Editor);
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
afterInit(): void;
|
|
21
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x32dd=['config','collaboration.channelId','editor','collaboration_features','importWord.commentsStyles','_handleImportedData','map','get','listenTo','execute','addCommentThread','high','dataInsert','define','afterInit','forEach','plugins','commands','importWord','basic'];(function(_0x2f0f83,_0x32dd07){const _0x68ebe8=function(_0x4d5cea){while(--_0x4d5cea){_0x2f0f83['push'](_0x2f0f83['shift']());}};_0x68ebe8(++_0x32dd07);}(_0x32dd,0x129));const _0x68eb=function(_0x2f0f83,_0x32dd07){_0x2f0f83=_0x2f0f83-0x0;let _0x68ebe8=_0x32dd[_0x2f0f83];return _0x68ebe8;};import{Plugin as _0x54950b}from'ckeditor5/src/core';import{priorities as _0x3629c5}from'ckeditor5/src/utils';import{Users as _0x48849c}from'ckeditor5-collaboration/src/collaboration-core';import _0x4a9589 from'../commentsrepository';export default class Y extends _0x54950b{constructor(_0x12f307){super(_0x12f307),this[_0x68eb('0x5')][_0x68eb('0x3')][_0x68eb('0x10')](_0x68eb('0x7'),_0x68eb('0x2'));}[_0x68eb('0x11')](){const _0x5055dd=this['editor'],_0x44101b=_0x5055dd[_0x68eb('0x0')][_0x68eb('0xa')](_0x68eb('0x1')),_0x37b541=_0x5055dd[_0x68eb('0x13')][_0x68eb('0xa')](_0x48849c);_0x44101b&&(_0x44101b['on'](_0x68eb('0xc'),(_0x39a06f,[,_0x2199d9])=>{_0x2199d9[_0x68eb('0x6')]={'comments':!0x0,'user_id':_0x37b541['me']['id'],'comments_styles':this['editor']['config']['get'](_0x68eb('0x7'))};},{'priority':_0x3629c5[_0x68eb('0xe')]+0xa}),this[_0x68eb('0xb')](_0x44101b,_0x68eb('0xf'),this['_handleImportedData']));}[_0x68eb('0x8')](_0xb136a2,_0x150641){const {comment_threads:_0x2791c3}=_0x150641;_0x2791c3&&_0x2791c3[_0x68eb('0x12')](({thread_id:_0x3fcfa2,comments:_0x399c39,is_resolved:_0x3261bc})=>{const _0x5912ac=new Date(),_0xd6e0ff=_0x399c39[_0x68eb('0x9')](({author:_0xaacca9,content:_0x596ac1,created_at:_0x4f5c44})=>({'content':_0x596ac1,'authorId':this[_0x68eb('0x5')][_0x68eb('0x13')][_0x68eb('0xa')](_0x48849c)['me']['id'],'createdAt':_0x5912ac,'attributes':{'@external':{'authorName':_0xaacca9,'createdAt':_0x4f5c44?new Date(_0x4f5c44):new Date(),'source':'importWord'}}})),_0x59fc1f=this[_0x68eb('0x5')]['config'][_0x68eb('0xa')](_0x68eb('0x4'));this['editor'][_0x68eb('0x13')][_0x68eb('0xa')](_0x4a9589)[_0x68eb('0xd')]({'channelId':_0x59fc1f,'threadId':_0x3fcfa2,'comments':_0xd6e0ff,'resolvedAt':_0x3261bc?_0x5912ac:null});});}}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/comments/ui/commenteditor/commenteditor
|
|
7
|
-
*/
|
|
8
|
-
import { Editor, type EditorConfig } from 'ckeditor5/src/core';
|
|
9
|
-
import CommentEditorUI from './commenteditorui';
|
|
10
|
-
import { type PlaceholderableElement } from 'ckeditor5/src/engine';
|
|
11
|
-
declare const CommentEditor_base: import("ckeditor5/src/utils").Mixed<import("ckeditor5/src/utils").Mixed<typeof Editor, import("ckeditor5/src/core").DataApi>, import("ckeditor5/src/utils").Observable>;
|
|
12
|
-
export default class CommentEditor extends CommentEditor_base {
|
|
13
|
-
static defaultPlugins: EditorConfig['plugins'];
|
|
14
|
-
/**
|
|
15
|
-
* The input placeholder.
|
|
16
|
-
*
|
|
17
|
-
* @observable
|
|
18
|
-
*/
|
|
19
|
-
placeholder: string;
|
|
20
|
-
placeholderElement: PlaceholderableElement | undefined;
|
|
21
|
-
ui: CommentEditorUI;
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
constructor(config?: EditorConfig);
|
|
26
|
-
create(): Promise<unknown>;
|
|
27
|
-
/**
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
destroy(): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Place the selection at the end of the editor data and focus the editable.
|
|
33
|
-
*/
|
|
34
|
-
focus(): void;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/comments/ui/commenteditor/commenteditor
|
|
7
|
+
*/
|
|
8
|
+
import { Editor, type EditorConfig } from 'ckeditor5/src/core';
|
|
9
|
+
import CommentEditorUI from './commenteditorui';
|
|
10
|
+
import { type PlaceholderableElement } from 'ckeditor5/src/engine';
|
|
11
|
+
declare const CommentEditor_base: import("ckeditor5/src/utils").Mixed<import("ckeditor5/src/utils").Mixed<typeof Editor, import("ckeditor5/src/core").DataApi>, import("ckeditor5/src/utils").Observable>;
|
|
12
|
+
export default class CommentEditor extends CommentEditor_base {
|
|
13
|
+
static defaultPlugins: EditorConfig['plugins'];
|
|
14
|
+
/**
|
|
15
|
+
* The input placeholder.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
placeholder: string;
|
|
20
|
+
placeholderElement: PlaceholderableElement | undefined;
|
|
21
|
+
ui: CommentEditorUI;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(config?: EditorConfig);
|
|
26
|
+
create(): Promise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
destroy(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Place the selection at the end of the editor data and focus the editable.
|
|
33
|
+
*/
|
|
34
|
+
focus(): void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4fc9=['change:placeholder','editing','initPlugins','then','model','_updatePlaceholder','change','end','getChild','getRoot','initialData','set','fire','ready','destroy','get','name','focus','document','placeholderElement','init','view','placeholder','plugins','assign','childCount','defaultPlugins'];(function(_0x25520e,_0x4fc913){const _0x5b2b98=function(_0x54b929){while(--_0x54b929){_0x25520e['push'](_0x25520e['shift']());}};_0x5b2b98(++_0x4fc913);}(_0x4fc9,0x100));const _0x5b2b=function(_0x25520e,_0x4fc913){_0x25520e=_0x25520e-0x0;let _0x5b2b98=_0x4fc9[_0x25520e];return _0x5b2b98;};import{Editor as _0x35cffc,DataApiMixin as _0x459ad4}from'ckeditor5/src/core';import _0x41e7c5 from'./commenteditorui';import{ObservableMixin as _0x4e8163}from'ckeditor5/src/utils';import{enablePlaceholder as _0x33ecf5,disablePlaceholder as _0x2c8b5d}from'ckeditor5/src/engine';import{Clipboard as _0x1d8f6b}from'ckeditor5/src/clipboard';import{Enter as _0x3254c1,ShiftEnter as _0x1561b1}from'ckeditor5/src/enter';import{SelectAll as _0x2ebd84}from'ckeditor5/src/select-all';import{Typing as _0x206769}from'ckeditor5/src/typing';import{Undo as _0x4ddaeb}from'ckeditor5/src/undo';import{Paragraph as _0x56f4dd}from'ckeditor5/src/paragraph';const Kt=[_0x1d8f6b,_0x3254c1,_0x1561b1,_0x2ebd84,_0x206769,_0x4ddaeb,_0x56f4dd];export default class Lt extends _0x4e8163(_0x459ad4(_0x35cffc)){constructor(_0x5cd1b7={}){(_0x5cd1b7=Object[_0x5b2b('0xb')]({},_0x5cd1b7))[_0x5b2b('0xa')]||(_0x5cd1b7[_0x5b2b('0xa')]=Lt['defaultPlugins']),super(_0x5cd1b7),this['ui']=new _0x41e7c5(this),this[_0x5b2b('0x19')](_0x5b2b('0x9'),''),this['model']['document']['on'](_0x5b2b('0x14'),()=>this[_0x5b2b('0x13')](),{'priority':'low'}),this['on'](_0x5b2b('0xe'),()=>this[_0x5b2b('0x13')]()),this[_0x5b2b('0x12')][_0x5b2b('0x5')]['createRoot']();}['create'](){const _0x469042=this['config'][_0x5b2b('0x2')](_0x5b2b('0x18'))||'';return this[_0x5b2b('0x10')]()[_0x5b2b('0x11')](()=>this['ui'][_0x5b2b('0x7')]())[_0x5b2b('0x11')](()=>this['data'][_0x5b2b('0x7')](_0x469042))['then'](()=>this[_0x5b2b('0x1a')](_0x5b2b('0x0')));}[_0x5b2b('0x1')](){return super[_0x5b2b('0x1')]()[_0x5b2b('0x11')](()=>this['ui'][_0x5b2b('0x1')]());}['focus'](){this[_0x5b2b('0x12')][_0x5b2b('0x14')](_0x9858a1=>{const _0x180474=this[_0x5b2b('0x12')][_0x5b2b('0x5')][_0x5b2b('0x17')](),_0x538925=_0x180474&&_0x180474[_0x5b2b('0x16')](_0x180474[_0x5b2b('0xc')]-0x1);_0x9858a1['setSelection'](_0x538925,_0x5b2b('0x15')),this[_0x5b2b('0xf')]['view'][_0x5b2b('0x4')]();});}[_0x5b2b('0x13')](){const _0x1a7e24=this[_0x5b2b('0xf')][_0x5b2b('0x8')],_0x342b5d=_0x1a7e24[_0x5b2b('0x5')][_0x5b2b('0x17')](),_0x2510d1=_0x342b5d[_0x5b2b('0x16')](0x0);_0x342b5d[_0x5b2b('0xc')]>0x1||!_0x2510d1||'p'!=_0x2510d1[_0x5b2b('0x3')]?this[_0x5b2b('0x6')]&&this[_0x5b2b('0x6')][_0x5b2b('0x9')]&&(_0x2c8b5d(_0x1a7e24,this[_0x5b2b('0x6')]),this[_0x5b2b('0x6')]=void 0x0):(this[_0x5b2b('0x9')]&&(_0x2510d1['placeholder']=this[_0x5b2b('0x9')]),_0x33ecf5({'view':_0x1a7e24,'element':_0x2510d1,'keepOnFocus':!0x0}),this[_0x5b2b('0x6')]=_0x2510d1);}}Lt[_0x5b2b('0xd')]=Kt;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/comments/ui/commenteditor/commenteditorui
|
|
7
|
-
*/
|
|
8
|
-
import { EditorUI } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import CommentEditorUIView from './commenteditoruiview';
|
|
11
|
-
export default class CommentEditorUI extends EditorUI {
|
|
12
|
-
/**
|
|
13
|
-
* The main (top–most) view of the editor UI.
|
|
14
|
-
*/
|
|
15
|
-
readonly view: CommentEditorUIView;
|
|
16
|
-
/**
|
|
17
|
-
* Creates an instance of the classic editor UI class.
|
|
18
|
-
*
|
|
19
|
-
* @param editor The editor instance.
|
|
20
|
-
*/
|
|
21
|
-
constructor(editor: Editor);
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
get element(): HTMLElement | null;
|
|
26
|
-
init(): void;
|
|
27
|
-
/**
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
destroy(): void;
|
|
31
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/comments/ui/commenteditor/commenteditorui
|
|
7
|
+
*/
|
|
8
|
+
import { EditorUI } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Editor } from 'ckeditor5/src/core';
|
|
10
|
+
import CommentEditorUIView from './commenteditoruiview';
|
|
11
|
+
export default class CommentEditorUI extends EditorUI {
|
|
12
|
+
/**
|
|
13
|
+
* The main (top–most) view of the editor UI.
|
|
14
|
+
*/
|
|
15
|
+
readonly view: CommentEditorUIView;
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of the classic editor UI class.
|
|
18
|
+
*
|
|
19
|
+
* @param editor The editor instance.
|
|
20
|
+
*/
|
|
21
|
+
constructor(editor: Editor);
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
get element(): HTMLElement | null;
|
|
26
|
+
init(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
destroy(): void;
|
|
31
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1a02=['bind','editor','element','editing','view','name','getRoot','document','editable','focusTracker','rootName','destroy','locale','render','setEditableElement','attachDomRoot','isFocused'];(function(_0x2aec76,_0x1a0285){const _0x45e82f=function(_0x5ccb4c){while(--_0x5ccb4c){_0x2aec76['push'](_0x2aec76['shift']());}};_0x45e82f(++_0x1a0285);}(_0x1a02,0x118));const _0x45e8=function(_0x2aec76,_0x1a0285){_0x2aec76=_0x2aec76-0x0;let _0x45e82f=_0x1a02[_0x2aec76];return _0x45e82f;};import{EditorUI as _0xb4027f}from'ckeditor5/src/ui';import _0x5d1038 from'./commenteditoruiview';export default class jt extends _0xb4027f{constructor(_0x2ffe7b){super(_0x2ffe7b),this[_0x45e8('0xd')]=new _0x5d1038(_0x2ffe7b[_0x45e8('0x4')],_0x2ffe7b[_0x45e8('0xc')]['view']);}get['element'](){return this[_0x45e8('0xd')][_0x45e8('0xb')];}['init'](){const _0x140bce=this[_0x45e8('0xa')][_0x45e8('0xc')][_0x45e8('0xd')],_0x2b322a=this[_0x45e8('0xd')]['editable'],_0x31e908=_0x140bce[_0x45e8('0x10')][_0x45e8('0xf')]();_0x2b322a[_0x45e8('0xe')]=_0x31e908[_0x45e8('0x2')],this['view'][_0x45e8('0x5')]();const _0xe5768c=_0x2b322a['element'];this[_0x45e8('0x6')](_0x2b322a[_0x45e8('0xe')],_0xe5768c),this[_0x45e8('0xd')][_0x45e8('0x0')][_0x45e8('0x9')](_0x45e8('0x8'))['to'](this[_0x45e8('0x1')]),_0x140bce[_0x45e8('0x7')](_0xe5768c),this['fire']('ready');}['destroy'](){super['destroy'](),this[_0x45e8('0xd')][_0x45e8('0x3')]();}}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/comments/ui/commenteditor/commenteditoruiview
|
|
7
|
-
*/
|
|
8
|
-
import { InlineEditableUIView, EditorUIView, type ViewCollection } from 'ckeditor5/src/ui';
|
|
9
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import type { View } from 'ckeditor5/src/engine';
|
|
11
|
-
export default class CommentEditorUIView extends EditorUIView {
|
|
12
|
-
/**
|
|
13
|
-
* Collection of the child views located in the main (`.ck-editor__main`)
|
|
14
|
-
* area of the UI.
|
|
15
|
-
*/
|
|
16
|
-
readonly main: ViewCollection;
|
|
17
|
-
/**
|
|
18
|
-
* Editable UI view.
|
|
19
|
-
*/
|
|
20
|
-
editable: InlineEditableUIView;
|
|
21
|
-
/**
|
|
22
|
-
* Creates an instance of the comments editor UI view.
|
|
23
|
-
*
|
|
24
|
-
* @param locale The locale instance.
|
|
25
|
-
* @param editingView The editing view instance this view is related to.
|
|
26
|
-
*/
|
|
27
|
-
constructor(locale: Locale, editingView: View);
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
render(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Focusable interface required by a FocusCycler.
|
|
34
|
-
*/
|
|
35
|
-
focus(): void;
|
|
36
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/comments/ui/commenteditor/commenteditoruiview
|
|
7
|
+
*/
|
|
8
|
+
import { InlineEditableUIView, EditorUIView, type ViewCollection } from 'ckeditor5/src/ui';
|
|
9
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import type { View } from 'ckeditor5/src/engine';
|
|
11
|
+
export default class CommentEditorUIView extends EditorUIView {
|
|
12
|
+
/**
|
|
13
|
+
* Collection of the child views located in the main (`.ck-editor__main`)
|
|
14
|
+
* area of the UI.
|
|
15
|
+
*/
|
|
16
|
+
readonly main: ViewCollection;
|
|
17
|
+
/**
|
|
18
|
+
* Editable UI view.
|
|
19
|
+
*/
|
|
20
|
+
editable: InlineEditableUIView;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of the comments editor UI view.
|
|
23
|
+
*
|
|
24
|
+
* @param locale The locale instance.
|
|
25
|
+
* @param editingView The editing view instance this view is related to.
|
|
26
|
+
*/
|
|
27
|
+
constructor(locale: Locale, editingView: View);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
render(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Focusable interface required by a FocusCycler.
|
|
34
|
+
*/
|
|
35
|
+
focus(): void;
|
|
36
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1f84=['main','_voiceLabelView','div','ck-reset','comment','_createVoiceLabel','cke-editor__aria-label_','setTemplate','ck-editor__main','add','extendTemplate','Comment\x20editor','ck-comment__input','element','editable','render','createCollection','presentation','focus','uiLanguage','ck-editor','ck-rounded-corners'];(function(_0x5f33a8,_0x1f84ac){const _0xc15c98=function(_0x284257){while(--_0x284257){_0x5f33a8['push'](_0x5f33a8['shift']());}};_0xc15c98(++_0x1f84ac);}(_0x1f84,0x1f4));const _0xc15c=function(_0x5f33a8,_0x1f84ac){_0x5f33a8=_0x5f33a8-0x0;let _0xc15c98=_0x1f84[_0x5f33a8];return _0xc15c98;};import{InlineEditableUIView as _0x4209a9,EditorUIView as _0x5922f2,LabelView as _0x197e06}from'ckeditor5/src/ui';import{uid as _0x625826}from'ckeditor5/src/utils';import{getTranslation as _0x23f44d}from'../../../utils/common-translations';export default class Nt extends _0x5922f2{constructor(_0x3c6f52,_0x5dcbc9){super(_0x3c6f52);const _0x4c04b7=_0x625826();this[_0xc15c('0x6')]=this[_0xc15c('0x0')](),this[_0xc15c('0x14')]=new _0x4209a9(_0x3c6f52,_0x5dcbc9),this[_0xc15c('0x7')]=this[_0xc15c('0xb')](_0x4c04b7,_0x3c6f52),this[_0xc15c('0xd')]({'tag':'div','attributes':{'class':[_0xc15c('0x9'),_0xc15c('0x4'),_0xc15c('0x5'),_0xc15c('0x12')],'role':_0xc15c('0xa'),'dir':_0x3c6f52['uiLanguageDirection'],'lang':_0x3c6f52[_0xc15c('0x3')],'aria-labelledby':_0xc15c('0xc')+_0x4c04b7},'children':[this[_0xc15c('0x7')],{'tag':_0xc15c('0x8'),'attributes':{'class':_0xc15c('0xe'),'role':_0xc15c('0x1')},'children':this[_0xc15c('0x6')]}]});}[_0xc15c('0x15')](){super[_0xc15c('0x15')](),this[_0xc15c('0x6')][_0xc15c('0xf')](this[_0xc15c('0x14')]);}[_0xc15c('0x2')](){this['editable'][_0xc15c('0x13')][_0xc15c('0x2')]();}['_createVoiceLabel'](_0x59df0d,_0x1c9ec4){const _0x2b21e5=new _0x197e06();return _0x2b21e5['text']=_0x23f44d(_0x1c9ec4,_0xc15c('0x11')),_0x2b21e5[_0xc15c('0x10')]({'attributes':{'id':'ck-editor__aria-label_'+_0x59df0d,'class':'ck-voice-label'}}),_0x2b21e5;}}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
import type { CommentThread } from '../commentsrepository';
|
|
6
|
-
import type { default as BaseCommentThreadView } from './view/basecommentthreadview';
|
|
7
|
-
declare const CommentThreadController_base: {
|
|
8
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
9
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Controller for a comment thread.
|
|
13
|
-
*
|
|
14
|
-
* It takes a comment thread view, listens to events fired by that view and based on them performs actions on a comment thread model.
|
|
15
|
-
*/
|
|
16
|
-
export default class CommentThreadController extends CommentThreadController_base {
|
|
17
|
-
model: CommentThread;
|
|
18
|
-
view: BaseCommentThreadView;
|
|
19
|
-
/**
|
|
20
|
-
* @param model Comment thread model.
|
|
21
|
-
* @param view Comment thread view.
|
|
22
|
-
*/
|
|
23
|
-
constructor(model: CommentThread, view: BaseCommentThreadView);
|
|
24
|
-
/**
|
|
25
|
-
* Submits the comment thread.
|
|
26
|
-
*/
|
|
27
|
-
submit(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Removes the comment thread.
|
|
30
|
-
*/
|
|
31
|
-
remove(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Resolves the comment thread.
|
|
34
|
-
*/
|
|
35
|
-
resolve(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Reopens the comment thread.
|
|
38
|
-
*/
|
|
39
|
-
reopen(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Adds a comment to the comment thread.
|
|
42
|
-
*
|
|
43
|
-
* @param commentContent Comment content.
|
|
44
|
-
*/
|
|
45
|
-
addComment(commentContent: string): void;
|
|
46
|
-
/**
|
|
47
|
-
* Updates a comment that belongs to the comment thread.
|
|
48
|
-
*
|
|
49
|
-
* @param commentId Id of the comment to update.
|
|
50
|
-
* @param commentContent Updated comment content.
|
|
51
|
-
*/
|
|
52
|
-
updateComment(commentId: string, commentContent: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Removes a comment from the comment thread.
|
|
55
|
-
*
|
|
56
|
-
* @param commentId Id of the comment to remove.
|
|
57
|
-
*/
|
|
58
|
-
removeComment(commentId: string): void;
|
|
59
|
-
/**
|
|
60
|
-
* Destroys `CommentThreadController` instance.
|
|
61
|
-
*/
|
|
62
|
-
destroy(): void;
|
|
63
|
-
}
|
|
64
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { CommentThread } from '../commentsrepository';
|
|
6
|
+
import type { default as BaseCommentThreadView } from './view/basecommentthreadview';
|
|
7
|
+
declare const CommentThreadController_base: {
|
|
8
|
+
new (): import("ckeditor5/src/utils").Observable;
|
|
9
|
+
prototype: import("ckeditor5/src/utils").Observable;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Controller for a comment thread.
|
|
13
|
+
*
|
|
14
|
+
* It takes a comment thread view, listens to events fired by that view and based on them performs actions on a comment thread model.
|
|
15
|
+
*/
|
|
16
|
+
export default class CommentThreadController extends CommentThreadController_base {
|
|
17
|
+
model: CommentThread;
|
|
18
|
+
view: BaseCommentThreadView;
|
|
19
|
+
/**
|
|
20
|
+
* @param model Comment thread model.
|
|
21
|
+
* @param view Comment thread view.
|
|
22
|
+
*/
|
|
23
|
+
constructor(model: CommentThread, view: BaseCommentThreadView);
|
|
24
|
+
/**
|
|
25
|
+
* Submits the comment thread.
|
|
26
|
+
*/
|
|
27
|
+
submit(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Removes the comment thread.
|
|
30
|
+
*/
|
|
31
|
+
remove(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the comment thread.
|
|
34
|
+
*/
|
|
35
|
+
resolve(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Reopens the comment thread.
|
|
38
|
+
*/
|
|
39
|
+
reopen(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Adds a comment to the comment thread.
|
|
42
|
+
*
|
|
43
|
+
* @param commentContent Comment content.
|
|
44
|
+
*/
|
|
45
|
+
addComment(commentContent: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Updates a comment that belongs to the comment thread.
|
|
48
|
+
*
|
|
49
|
+
* @param commentId Id of the comment to update.
|
|
50
|
+
* @param commentContent Updated comment content.
|
|
51
|
+
*/
|
|
52
|
+
updateComment(commentId: string, commentContent: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Removes a comment from the comment thread.
|
|
55
|
+
*
|
|
56
|
+
* @param commentId Id of the comment to remove.
|
|
57
|
+
*/
|
|
58
|
+
removeComment(commentId: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Destroys `CommentThreadController` instance.
|
|
61
|
+
*/
|
|
62
|
+
destroy(): void;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5a72=['removeComment','_isAttached','reopenCommentThread','stopListening','view','resolve','model','submit','updateComment','reopen','isResolved','update','remove','_localUser','listenTo','getComment','addComment','removeCommentThread'];(function(_0x287c69,_0x5a72ea){var _0x5a6964=function(_0x4e347e){while(--_0x4e347e){_0x287c69['push'](_0x287c69['shift']());}};_0x5a6964(++_0x5a72ea);}(_0x5a72,0x10e));var _0x5a69=function(_0x287c69,_0x5a72ea){_0x287c69=_0x287c69-0x0;var _0x5a6964=_0x5a72[_0x287c69];return _0x5a6964;};import{ObservableMixin as _0x1cf769}from'ckeditor5/src/utils';export default class ct extends _0x1cf769(){constructor(_0x17973f,_0x178fdb){super(),this['model']=_0x17973f,this[_0x5a69('0x6')][_0x5a69('0x1')]=!0x0,this[_0x5a69('0x4')]=_0x178fdb,this['listenTo'](_0x178fdb,'submitCommentThread',()=>this[_0x5a69('0x7')]()),this[_0x5a69('0xe')](_0x178fdb,_0x5a69('0x11'),()=>this[_0x5a69('0xc')]()),this[_0x5a69('0xe')](_0x178fdb,'resolveCommentThread',()=>this[_0x5a69('0x5')]()),this[_0x5a69('0xe')](_0x178fdb,_0x5a69('0x2'),()=>this[_0x5a69('0x9')]()),this[_0x5a69('0xe')](_0x178fdb,_0x5a69('0x10'),(_0x5ee53d,_0x71213)=>this[_0x5a69('0x10')](_0x71213)),this[_0x5a69('0xe')](_0x178fdb,_0x5a69('0x8'),(_0x23bbbf,_0xbd7da,_0xbe131c)=>this[_0x5a69('0x8')](_0xbd7da,_0xbe131c)),this[_0x5a69('0xe')](_0x178fdb,_0x5a69('0x0'),(_0x44c81b,_0x245773)=>this[_0x5a69('0x0')](_0x245773));}[_0x5a69('0x7')](){this['model'][_0x5a69('0x7')]();}['remove'](){this[_0x5a69('0x6')][_0x5a69('0xc')]();}[_0x5a69('0x5')](){this['model'][_0x5a69('0xa')]||this[_0x5a69('0x6')][_0x5a69('0x5')]();}[_0x5a69('0x9')](){this['model']['isResolved']&&this[_0x5a69('0x6')][_0x5a69('0x9')]();}['addComment'](_0xec2f1c){this[_0x5a69('0x6')][_0x5a69('0x10')]({'content':_0xec2f1c,'authorId':this[_0x5a69('0x4')][_0x5a69('0xd')]['id']});}[_0x5a69('0x8')](_0x7e29ed,_0x534369){this[_0x5a69('0x6')][_0x5a69('0xf')](_0x7e29ed)[_0x5a69('0xb')]({'content':_0x534369});}['removeComment'](_0x2a1090){this[_0x5a69('0x6')][_0x5a69('0xf')](_0x2a1090)[_0x5a69('0xc')]();}['destroy'](){this[_0x5a69('0x3')](),this[_0x5a69('0x6')][_0x5a69('0x1')]=!0x1;}}
|