@ckeditor/ckeditor5-comments 38.1.0 → 38.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/package.json +3 -3
- package/src/annotations/annotation.d.ts +86 -86
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +94 -94
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +150 -150
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +228 -228
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +63 -63
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +86 -86
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +81 -81
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +96 -96
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +86 -86
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +51 -51
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +28 -28
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +73 -73
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +48 -48
- package/src/comments/addcommentthreadcommand.d.ts +31 -31
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +27 -27
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +34 -34
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +75 -75
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1088 -1088
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +29 -29
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +17 -17
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- 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 +108 -108
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +108 -108
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +10 -10
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +82 -82
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.d.ts +96 -96
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +113 -113
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +239 -239
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +31 -31
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +29 -29
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +172 -172
- package/src/index.d.ts +21 -21
- package/src/utils/common-translations.d.ts +5 -5
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.d.ts +13 -13
- package/src/utils/createmutationobserver.js +1 -1
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentinputview
|
|
3
|
-
*/
|
|
4
|
-
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
5
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import { type EditorConfig, type DataApi } from 'ckeditor5/src/core';
|
|
7
|
-
import CommentEditor from '../commenteditor/commenteditor';
|
|
8
|
-
/**
|
|
9
|
-
* A view for the comment input section that includes a comment editor.
|
|
10
|
-
*/
|
|
11
|
-
export default class CommentInputView extends View {
|
|
12
|
-
/**
|
|
13
|
-
* Comment editor.
|
|
14
|
-
*/
|
|
15
|
-
editor: CommentEditor & DataApi | null;
|
|
16
|
-
/**
|
|
17
|
-
* The input value (comment editor content).
|
|
18
|
-
*
|
|
19
|
-
* @observable
|
|
20
|
-
*/
|
|
21
|
-
value: string;
|
|
22
|
-
/**
|
|
23
|
-
* When set to `true` it is not possible to submit the commit.
|
|
24
|
-
*
|
|
25
|
-
* @observable
|
|
26
|
-
*/
|
|
27
|
-
disabledSubmit: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies whether the buttons should be visible (`true`) or hidden (`false`).
|
|
30
|
-
*
|
|
31
|
-
* @observable
|
|
32
|
-
*/
|
|
33
|
-
showButtons: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* The comment editor placeholder.
|
|
36
|
-
*
|
|
37
|
-
* @observable
|
|
38
|
-
*/
|
|
39
|
-
placeholder: string;
|
|
40
|
-
/**
|
|
41
|
-
* The submit button label.
|
|
42
|
-
*
|
|
43
|
-
* @observable
|
|
44
|
-
*/
|
|
45
|
-
submitLabel: string;
|
|
46
|
-
element: HTMLElement;
|
|
47
|
-
/**
|
|
48
|
-
* Keystroke handler for the view.
|
|
49
|
-
*/
|
|
50
|
-
keystrokes: KeystrokeHandler;
|
|
51
|
-
/**
|
|
52
|
-
* Focus tracker for the view.
|
|
53
|
-
*/
|
|
54
|
-
focusTracker: FocusTracker;
|
|
55
|
-
/**
|
|
56
|
-
* Button view for the button which submits the comment.
|
|
57
|
-
*/
|
|
58
|
-
submitButtonView: ButtonView;
|
|
59
|
-
/**
|
|
60
|
-
* Button view for the button which cancels comment input.
|
|
61
|
-
*/
|
|
62
|
-
cancelButtonView: ButtonView;
|
|
63
|
-
constructor(locale: Locale, editorConfig?: EditorConfig);
|
|
64
|
-
/**
|
|
65
|
-
* @inheritDoc
|
|
66
|
-
*/
|
|
67
|
-
render(): void;
|
|
68
|
-
/**
|
|
69
|
-
* Creates the comment editor instance.
|
|
70
|
-
*
|
|
71
|
-
* @returns Promise resolved after the editor instance is initialized.
|
|
72
|
-
*/
|
|
73
|
-
createEditor(): Promise<CommentEditor | undefined>;
|
|
74
|
-
/**
|
|
75
|
-
* Focuses the view.
|
|
76
|
-
*/
|
|
77
|
-
focus(): void;
|
|
78
|
-
/**
|
|
79
|
-
* @inheritDoc
|
|
80
|
-
*/
|
|
81
|
-
destroy(): Promise<void>;
|
|
82
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentinputview
|
|
3
|
+
*/
|
|
4
|
+
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
5
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import { type EditorConfig, type DataApi } from 'ckeditor5/src/core';
|
|
7
|
+
import CommentEditor from '../commenteditor/commenteditor';
|
|
8
|
+
/**
|
|
9
|
+
* A view for the comment input section that includes a comment editor.
|
|
10
|
+
*/
|
|
11
|
+
export default class CommentInputView extends View {
|
|
12
|
+
/**
|
|
13
|
+
* Comment editor.
|
|
14
|
+
*/
|
|
15
|
+
editor: CommentEditor & DataApi | null;
|
|
16
|
+
/**
|
|
17
|
+
* The input value (comment editor content).
|
|
18
|
+
*
|
|
19
|
+
* @observable
|
|
20
|
+
*/
|
|
21
|
+
value: string;
|
|
22
|
+
/**
|
|
23
|
+
* When set to `true` it is not possible to submit the commit.
|
|
24
|
+
*
|
|
25
|
+
* @observable
|
|
26
|
+
*/
|
|
27
|
+
disabledSubmit: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies whether the buttons should be visible (`true`) or hidden (`false`).
|
|
30
|
+
*
|
|
31
|
+
* @observable
|
|
32
|
+
*/
|
|
33
|
+
showButtons: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The comment editor placeholder.
|
|
36
|
+
*
|
|
37
|
+
* @observable
|
|
38
|
+
*/
|
|
39
|
+
placeholder: string;
|
|
40
|
+
/**
|
|
41
|
+
* The submit button label.
|
|
42
|
+
*
|
|
43
|
+
* @observable
|
|
44
|
+
*/
|
|
45
|
+
submitLabel: string;
|
|
46
|
+
element: HTMLElement;
|
|
47
|
+
/**
|
|
48
|
+
* Keystroke handler for the view.
|
|
49
|
+
*/
|
|
50
|
+
keystrokes: KeystrokeHandler;
|
|
51
|
+
/**
|
|
52
|
+
* Focus tracker for the view.
|
|
53
|
+
*/
|
|
54
|
+
focusTracker: FocusTracker;
|
|
55
|
+
/**
|
|
56
|
+
* Button view for the button which submits the comment.
|
|
57
|
+
*/
|
|
58
|
+
submitButtonView: ButtonView;
|
|
59
|
+
/**
|
|
60
|
+
* Button view for the button which cancels comment input.
|
|
61
|
+
*/
|
|
62
|
+
cancelButtonView: ButtonView;
|
|
63
|
+
constructor(locale: Locale, editorConfig?: EditorConfig);
|
|
64
|
+
/**
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
render(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Creates the comment editor instance.
|
|
70
|
+
*
|
|
71
|
+
* @returns Promise resolved after the editor instance is initialized.
|
|
72
|
+
*/
|
|
73
|
+
createEditor(): Promise<CommentEditor | undefined>;
|
|
74
|
+
/**
|
|
75
|
+
* Focuses the view.
|
|
76
|
+
*/
|
|
77
|
+
focus(): void;
|
|
78
|
+
/**
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
destroy(): Promise<void>;
|
|
82
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2c63=['getData','createEditor','document','submitLabel','create','length','placeholder','value','setTemplate','ck-comment__input-wrapper','_editorCreationPromise','initialData','set','cancel','showButtons','trim','change','tab','TOO_LONG_COMMENT_ALERT','disabledSubmit','keystrokes','then','label','stop','ck-comment__input-actions','listenTo','bind','_isDestroyed','ck-comment__input-actions--active','Cancel','shift\x20+\x20tab','view','add','editor','Reply...','focusNext','_createCancelButton','destroy','_editorConfig','submitButtonView','submit','extendTemplate','fire','_initializeFocusCycling','focusPrevious','setData','high','model','low','withText','Reply','div','cancelButtonView','ck-comment__input-actions--submit','render','element','execute'];(function(_0xf8e3c0,_0x2c6345){const _0x10e68a=function(_0x49ccf9){while(--_0x49ccf9){_0xf8e3c0['push'](_0xf8e3c0['shift']());}};_0x10e68a(++_0x2c6345);}(_0x2c63,0xa5));const _0x10e6=function(_0xf8e3c0,_0x2c6345){_0xf8e3c0=_0xf8e3c0-0x0;let _0x10e68a=_0x2c63[_0xf8e3c0];return _0x10e68a;};import{View as _0x4bba8d,ViewCollection as _0x102ab9,FocusCycler as _0x229949,ButtonView as _0x32061b}from'ckeditor5/src/ui';import{FocusTracker as _0x3a22f1,KeystrokeHandler as _0x5c8457}from'ckeditor5/src/utils';import _0x9692a6 from'../commenteditor/commenteditor';import{getTranslation as _0x5f193b}from'../../../utils/common-translations';export default class Yt extends _0x4bba8d{constructor(_0x1eb5ba,_0x284b32={}){super(_0x1eb5ba),this[_0x10e6('0x27')]=null,this['_editorConfig']=_0x284b32,this['keystrokes']=new _0x5c8457(),this['focusTracker']=new _0x3a22f1(),this[_0x10e6('0x12')](_0x10e6('0xd'),_0x284b32[_0x10e6('0x11')]||''),this[_0x10e6('0x12')](_0x10e6('0x19'),!0x1),this['set'](_0x10e6('0x14'),!0x0),this[_0x10e6('0x12')]('placeholder',_0x5f193b(_0x1eb5ba,_0x10e6('0x28'))),this[_0x10e6('0x12')]('submitLabel',_0x5f193b(_0x1eb5ba,_0x10e6('0x38'))),this[_0x10e6('0x2d')]=this['_createSubmitButton'](),this['cancelButtonView']=this[_0x10e6('0x2a')](),this[_0x10e6('0xe')]({'tag':_0x10e6('0x0'),'attributes':{'class':[_0x10e6('0xf')]},'children':[{'tag':_0x10e6('0x0'),'attributes':{'class':[_0x10e6('0x1e'),this['bindTemplate']['if'](_0x10e6('0x14'),_0x10e6('0x22'))]},'children':[this[_0x10e6('0x2d')],this[_0x10e6('0x1')]]}]}),this['keystrokes'][_0x10e6('0x12')]('Esc',(_0x128b33,_0x212d98)=>{this[_0x10e6('0x1')]['fire'](_0x10e6('0x5')),_0x212d98();}),this['on'](_0x10e6('0x2e'),(_0x2ca5ec,_0x18a4d5)=>{_0x18a4d5[_0x10e6('0xb')]>0xfde8?(alert(_0x5f193b(_0x1eb5ba,_0x10e6('0x18'),[_0x18a4d5[_0x10e6('0xb')],0xfde8])),_0x2ca5ec[_0x10e6('0x1d')]()):this[_0x10e6('0x27')][_0x10e6('0x33')]('');},{'priority':_0x10e6('0x34')});}[_0x10e6('0x3')](){super[_0x10e6('0x3')](),this[_0x10e6('0x1a')][_0x10e6('0x1f')](this['element']),this['focusTracker'][_0x10e6('0x26')](this['element']);}[_0x10e6('0x7')](){return this['editor']||(this[_0x10e6('0x27')]=new _0x9692a6(this[_0x10e6('0x2c')]),this['_editorCreationPromise']=this['editor'][_0x10e6('0xa')]()[_0x10e6('0x1b')](()=>{if(this['_isDestroyed'])return;const _0x2785ec=this['editor'];this[_0x10e6('0x4')]['insertBefore'](_0x2785ec['ui'][_0x10e6('0x4')],this['element']['firstChild']),_0x2785ec[_0x10e6('0x35')][_0x10e6('0x8')]['on'](_0x10e6('0x16'),()=>this[_0x10e6('0xd')]=_0x2785ec[_0x10e6('0x6')]()),_0x2785ec[_0x10e6('0x20')](_0x10e6('0xc'))['to'](this),this[_0x10e6('0x31')](this[_0x10e6('0x27')]),this[_0x10e6('0x30')]('editorReady');})),this[_0x10e6('0x10')];}['focus'](){this[_0x10e6('0x27')]&&this[_0x10e6('0x27')]['focus']();}async[_0x10e6('0x2b')](){this['_isDestroyed']||(this[_0x10e6('0x21')]=!0x0,this[_0x10e6('0x27')]&&(await this[_0x10e6('0x10')],await this[_0x10e6('0x27')]['destroy']()),await super[_0x10e6('0x2b')]());}['_createSubmitButton'](){const {locale:_0x1b4ec5}=this,_0x53233c=new _0x32061b(_0x1b4ec5);return _0x53233c[_0x10e6('0x2f')]({'attributes':{'class':[_0x10e6('0x2')]}}),_0x53233c['withText']=!0x0,_0x53233c[_0x10e6('0x20')](_0x10e6('0x1c'))['to'](this,_0x10e6('0x9')),_0x53233c['on'](_0x10e6('0x5'),()=>{this[_0x10e6('0x30')]('submit',this[_0x10e6('0xd')]);}),_0x53233c[_0x10e6('0x20')]('isEnabled')['to'](this,_0x10e6('0xd'),this,'disabledSubmit',(_0x2febe1,_0xf2303b)=>!_0xf2303b&&!!_0x2febe1[_0x10e6('0x15')]()),_0x53233c;}[_0x10e6('0x2a')](){const {locale:_0xddc26f}=this,_0x207a78=new _0x32061b(_0xddc26f);return _0x207a78['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x207a78[_0x10e6('0x1c')]=_0x5f193b(_0xddc26f,_0x10e6('0x23')),_0x207a78[_0x10e6('0x37')]=!0x0,_0x207a78['on'](_0x10e6('0x5'),()=>{this[_0x10e6('0x27')][_0x10e6('0x33')](''),this[_0x10e6('0x30')](_0x10e6('0x13'));}),_0x207a78;}['_initializeFocusCycling'](_0x577305){const _0x37e21e=this['focusTracker'],_0x9589a7=new _0x102ab9();[_0x577305['ui'][_0x10e6('0x25')],this[_0x10e6('0x2d')],this['cancelButtonView']]['forEach'](_0x307b8e=>{_0x9589a7[_0x10e6('0x26')](_0x307b8e),_0x37e21e['add'](_0x307b8e['element']);});const _0x301721=new _0x229949({'focusables':_0x9589a7,'focusTracker':_0x37e21e});this[_0x10e6('0x1a')][_0x10e6('0x12')](_0x10e6('0x17'),(_0x36f15e,_0x4e4b95)=>{_0x301721[_0x10e6('0x29')](),_0x4e4b95();},{'priority':_0x10e6('0x36')}),this[_0x10e6('0x1a')][_0x10e6('0x12')](_0x10e6('0x24'),(_0xb847c3,_0x5cc4fd)=>{_0x301721[_0x10e6('0x32')](),_0x5cc4fd();},{'priority':_0x10e6('0x36')});}}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentslistview
|
|
3
|
-
*/
|
|
4
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import type AnnotationView from '../../../annotations/view/annotationview';
|
|
7
|
-
/**
|
|
8
|
-
* A view representing the content of comments archive.
|
|
9
|
-
*/
|
|
10
|
-
export default class CommentsArchiveView extends View {
|
|
11
|
-
/**
|
|
12
|
-
* The flag indicating whether there are items to display in the comments archive.
|
|
13
|
-
*
|
|
14
|
-
* @observable
|
|
15
|
-
*/
|
|
16
|
-
isEmpty: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* @param locale The localization service instance.
|
|
19
|
-
* @param annotationViews Resolved comment thread annotation views to render inside the comments archive.
|
|
20
|
-
*/
|
|
21
|
-
constructor(locale: Locale, annotationViews: ViewCollection<AnnotationView>);
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
render(): void;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
destroy(): void;
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
focus(): void;
|
|
34
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentslistview
|
|
3
|
+
*/
|
|
4
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import type AnnotationView from '../../../annotations/view/annotationview';
|
|
7
|
+
/**
|
|
8
|
+
* A view representing the content of comments archive.
|
|
9
|
+
*/
|
|
10
|
+
export default class CommentsArchiveView extends View {
|
|
11
|
+
/**
|
|
12
|
+
* The flag indicating whether there are items to display in the comments archive.
|
|
13
|
+
*
|
|
14
|
+
* @observable
|
|
15
|
+
*/
|
|
16
|
+
isEmpty: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @param locale The localization service instance.
|
|
19
|
+
* @param annotationViews Resolved comment thread annotation views to render inside the comments archive.
|
|
20
|
+
*/
|
|
21
|
+
constructor(locale: Locale, annotationViews: ViewCollection<AnnotationView>);
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
render(): void;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
destroy(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
focus(): void;
|
|
34
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4200=['set','isActive','arrowleft','arrowright','stopPropagation','ck-hidden','destroy','focus','arrowup','listenTo','tab','shift\x20+\x20tab','auto','element','ck-comments-archive__content','ck-comments-archive__info','arrowdown','_focusables','_focusTracker','_keystrokes','ck-comments-archive__header\x20','add','setTemplate','div','EMPTY_COMMENTS_ARCHIVE','ck-comments-archive','COMMENTS_ARCHIVE','length'];(function(_0x369cd2,_0x420049){const _0x3c3056=function(_0x49e6a9){while(--_0x49e6a9){_0x369cd2['push'](_0x369cd2['shift']());}};_0x3c3056(++_0x420049);}(_0x4200,0x149));const _0x3c30=function(_0x369cd2,_0x420049){_0x369cd2=_0x369cd2-0x0;let _0x3c3056=_0x4200[_0x369cd2];return _0x3c3056;};import{View as _0x2e566d,FocusCycler as _0x34d39b}from'ckeditor5/src/ui';import{FocusTracker as _0x3eb7cd,KeystrokeHandler as _0x285883}from'ckeditor5/src/utils';import{getTranslation as _0x2fb418}from'../../../utils/common-translations';export default class Q extends _0x2e566d{constructor(_0x2b876b,_0x86859){super(_0x2b876b),this[_0x3c30('0x7')]('isEmpty',!_0x86859[_0x3c30('0x6')]),this[_0x3c30('0x19')]=new _0x3eb7cd(),this[_0x3c30('0x1a')]=new _0x285883(),this[_0x3c30('0x18')]=_0x86859,this['_focusCycler']=new _0x34d39b({'focusables':this[_0x3c30('0x18')],'focusTracker':this[_0x3c30('0x19')],'keystrokeHandler':this['_keystrokes'],'actions':{'focusPrevious':_0x3c30('0x12'),'focusNext':_0x3c30('0x11')}}),this['listenTo'](_0x86859,_0x3c30('0x0'),()=>{this['isEmpty']=!0x1;}),this[_0x3c30('0x10')](_0x86859,'remove',(_0x4732b3,_0xf1ed84)=>{_0xf1ed84[_0x3c30('0x8')]&&this[_0x3c30('0xe')](),_0x86859[_0x3c30('0x6')]||(this['isEmpty']=!0x0);});const _0x580f72=this['bindTemplate'];this[_0x3c30('0x1')]({'tag':_0x3c30('0x2'),'attributes':{'dir':_0x3c30('0x13'),'class':['ck',_0x3c30('0x4')],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x3c30('0x1b')]},'children':[{'text':_0x2fb418(_0x2b876b,_0x3c30('0x5'))}]},{'tag':_0x3c30('0x2'),'attributes':{'class':[_0x3c30('0x15')]},'children':[{'tag':'div','children':_0x86859},{'tag':'p','attributes':{'class':[_0x3c30('0x16'),_0x580f72['if']('isEmpty',_0x3c30('0xc'),_0x1264d1=>!_0x1264d1)]},'children':[{'text':_0x2fb418(_0x2b876b,_0x3c30('0x3'))}]}]}]});}['render'](){super['render'](),this[_0x3c30('0x1a')]['listenTo'](this[_0x3c30('0x14')]);const _0x577837=_0x38b07=>_0x38b07[_0x3c30('0xb')]();this[_0x3c30('0x1a')][_0x3c30('0x7')](_0x3c30('0xa'),_0x577837),this['_keystrokes']['set'](_0x3c30('0x9'),_0x577837),this[_0x3c30('0x1a')]['set'](_0x3c30('0xf'),_0x577837),this[_0x3c30('0x1a')][_0x3c30('0x7')](_0x3c30('0x17'),_0x577837),this[_0x3c30('0x10')](this[_0x3c30('0x14')],'selectstart',(_0x4266c8,_0x5f890)=>{_0x5f890[_0x3c30('0xb')]();},{'priority':'high'});}[_0x3c30('0xd')](){super[_0x3c30('0xd')](),this[_0x3c30('0x19')][_0x3c30('0xd')](),this[_0x3c30('0x1a')][_0x3c30('0xd')]();}[_0x3c30('0xe')](){this[_0x3c30('0x14')]['focus']();}}
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentslistview
|
|
3
|
-
*/
|
|
4
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import type { CommentThread } from '../../commentsrepository';
|
|
7
|
-
import type CommentView from './commentview';
|
|
8
|
-
import type { CommentThreadConfig } from '../../../config';
|
|
9
|
-
/**
|
|
10
|
-
* A view representing the list of comments. It should be used as a part of the comment thread view.
|
|
11
|
-
*/
|
|
12
|
-
export default class CommentsListView extends View {
|
|
13
|
-
locale: Locale;
|
|
14
|
-
/**
|
|
15
|
-
* Informs whether the list contains any comment view that is in the editing mode.
|
|
16
|
-
*
|
|
17
|
-
* @observable
|
|
18
|
-
*/
|
|
19
|
-
hasDirtyComment: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Number of comments in the list.
|
|
22
|
-
*
|
|
23
|
-
* @observable
|
|
24
|
-
*/
|
|
25
|
-
length: number;
|
|
26
|
-
/**
|
|
27
|
-
* Informs whether the comments list view is in the active state ("highlighted").
|
|
28
|
-
* Comment list view is in that state when it is focused or it was activated by the user in any different way.
|
|
29
|
-
*
|
|
30
|
-
* @observable
|
|
31
|
-
*/
|
|
32
|
-
isActive: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* View collection which holds all comment views to be displayed.
|
|
35
|
-
* It may also contain collapsed count view if the comments list view is collapsed and some comment views are hidden.
|
|
36
|
-
*
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
readonly visibleViews: ViewCollection;
|
|
40
|
-
/**
|
|
41
|
-
* View collection which holds all comment views created for given comment thread.
|
|
42
|
-
*
|
|
43
|
-
* @readonly
|
|
44
|
-
*/
|
|
45
|
-
readonly commentViews: ViewCollection;
|
|
46
|
-
/**
|
|
47
|
-
* Comment view used to display information that comment has been resolved.
|
|
48
|
-
*
|
|
49
|
-
* @readonly
|
|
50
|
-
*/
|
|
51
|
-
resolvedCommentView: CommentView | null;
|
|
52
|
-
/**
|
|
53
|
-
* @param locale The localization service instance.
|
|
54
|
-
* @param model The model on which the view will base.
|
|
55
|
-
* @param config Additional view configuration.
|
|
56
|
-
*/
|
|
57
|
-
constructor(locale: Locale, model: CommentThread, config: CommentThreadConfig);
|
|
58
|
-
/**
|
|
59
|
-
* @inheritDoc
|
|
60
|
-
*/
|
|
61
|
-
render(): void;
|
|
62
|
-
/**
|
|
63
|
-
* Focuses the view.
|
|
64
|
-
*/
|
|
65
|
-
focus(): void;
|
|
66
|
-
/**
|
|
67
|
-
* @inheritDoc
|
|
68
|
-
*/
|
|
69
|
-
destroy(): void;
|
|
70
|
-
/**
|
|
71
|
-
* Refreshes the list of the visible views.
|
|
72
|
-
*
|
|
73
|
-
* When doing so, it performs a minimal amount of changes, so that views are not re-added, which might cause undesirable effects
|
|
74
|
-
* like focus loss or glitches due to CSS animations.
|
|
75
|
-
*
|
|
76
|
-
* The comments list may be collapsed or expanded:
|
|
77
|
-
*
|
|
78
|
-
* * it is expanded, if it {@link ~#isActive is active},
|
|
79
|
-
* * it is expanded, if {@link module:comments/comments/commentsrepository~CommentThread#weight comment thread weight}
|
|
80
|
-
* is lower than allowed (`config.comments.maxThreadTotalWeight`),
|
|
81
|
-
* * it is expanded, if it {@link ~#hasDirtyComment has any comments in edit mode},
|
|
82
|
-
* * it is collapsed, if neither of above is true.
|
|
83
|
-
*
|
|
84
|
-
* When comments list is in collapsed state, it displays at most `config.comments.maxCommentsWhenCollapsed` comment views:
|
|
85
|
-
*
|
|
86
|
-
* * first comment view,
|
|
87
|
-
* * {@link ~#_collapsedCommentsView collapsed comments counter} (if there are any hidden views),
|
|
88
|
-
* * appropriate number of the comments from the bottom of the thread.
|
|
89
|
-
*
|
|
90
|
-
* All the comments are also {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#collapse set to collapsed state}.
|
|
91
|
-
*
|
|
92
|
-
* When comments list in in expanded state, it displays all comment views for all comments. All the comments are also
|
|
93
|
-
* {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#expand set to expanded state}.
|
|
94
|
-
*/
|
|
95
|
-
refreshVisibleViews(): void;
|
|
96
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentslistview
|
|
3
|
+
*/
|
|
4
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
7
|
+
import type CommentView from './commentview';
|
|
8
|
+
import type { CommentThreadConfig } from '../../../config';
|
|
9
|
+
/**
|
|
10
|
+
* A view representing the list of comments. It should be used as a part of the comment thread view.
|
|
11
|
+
*/
|
|
12
|
+
export default class CommentsListView extends View {
|
|
13
|
+
locale: Locale;
|
|
14
|
+
/**
|
|
15
|
+
* Informs whether the list contains any comment view that is in the editing mode.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
hasDirtyComment: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Number of comments in the list.
|
|
22
|
+
*
|
|
23
|
+
* @observable
|
|
24
|
+
*/
|
|
25
|
+
length: number;
|
|
26
|
+
/**
|
|
27
|
+
* Informs whether the comments list view is in the active state ("highlighted").
|
|
28
|
+
* Comment list view is in that state when it is focused or it was activated by the user in any different way.
|
|
29
|
+
*
|
|
30
|
+
* @observable
|
|
31
|
+
*/
|
|
32
|
+
isActive: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* View collection which holds all comment views to be displayed.
|
|
35
|
+
* It may also contain collapsed count view if the comments list view is collapsed and some comment views are hidden.
|
|
36
|
+
*
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
readonly visibleViews: ViewCollection;
|
|
40
|
+
/**
|
|
41
|
+
* View collection which holds all comment views created for given comment thread.
|
|
42
|
+
*
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
readonly commentViews: ViewCollection;
|
|
46
|
+
/**
|
|
47
|
+
* Comment view used to display information that comment has been resolved.
|
|
48
|
+
*
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
resolvedCommentView: CommentView | null;
|
|
52
|
+
/**
|
|
53
|
+
* @param locale The localization service instance.
|
|
54
|
+
* @param model The model on which the view will base.
|
|
55
|
+
* @param config Additional view configuration.
|
|
56
|
+
*/
|
|
57
|
+
constructor(locale: Locale, model: CommentThread, config: CommentThreadConfig);
|
|
58
|
+
/**
|
|
59
|
+
* @inheritDoc
|
|
60
|
+
*/
|
|
61
|
+
render(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Focuses the view.
|
|
64
|
+
*/
|
|
65
|
+
focus(): void;
|
|
66
|
+
/**
|
|
67
|
+
* @inheritDoc
|
|
68
|
+
*/
|
|
69
|
+
destroy(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Refreshes the list of the visible views.
|
|
72
|
+
*
|
|
73
|
+
* When doing so, it performs a minimal amount of changes, so that views are not re-added, which might cause undesirable effects
|
|
74
|
+
* like focus loss or glitches due to CSS animations.
|
|
75
|
+
*
|
|
76
|
+
* The comments list may be collapsed or expanded:
|
|
77
|
+
*
|
|
78
|
+
* * it is expanded, if it {@link ~#isActive is active},
|
|
79
|
+
* * it is expanded, if {@link module:comments/comments/commentsrepository~CommentThread#weight comment thread weight}
|
|
80
|
+
* is lower than allowed (`config.comments.maxThreadTotalWeight`),
|
|
81
|
+
* * it is expanded, if it {@link ~#hasDirtyComment has any comments in edit mode},
|
|
82
|
+
* * it is collapsed, if neither of above is true.
|
|
83
|
+
*
|
|
84
|
+
* When comments list is in collapsed state, it displays at most `config.comments.maxCommentsWhenCollapsed` comment views:
|
|
85
|
+
*
|
|
86
|
+
* * first comment view,
|
|
87
|
+
* * {@link ~#_collapsedCommentsView collapsed comments counter} (if there are any hidden views),
|
|
88
|
+
* * appropriate number of the comments from the bottom of the thread.
|
|
89
|
+
*
|
|
90
|
+
* All the comments are also {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#collapse set to collapsed state}.
|
|
91
|
+
*
|
|
92
|
+
* When comments list in in expanded state, it displays all comment views for all comments. All the comments are also
|
|
93
|
+
* {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#expand set to expanded state}.
|
|
94
|
+
*/
|
|
95
|
+
refreshVisibleViews(): void;
|
|
96
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x143a=['_model','from','focus','_handleInfoComment','_collapsedCommentsView','resolvedBy','formatDateTime','editorConfig','remove','_rearrangeExpand','add','_updateHasDirtyComment','change:isResolved','isActive','delete','maxCommentsWhenCollapsed','render','resolved','length','weight','commentViews','_handleRemoveCommentModel','CommentView','visibleViews','_handleNewCommentModel','_shouldCollapse','_rearrangeCollapse','maxCommentCharsWhenCollapsed','viewUid','resolvedCommentView','resolveCommentThread','isEditMode','updateComment','refreshVisibleViews','createCollection','listenTo','destroy','_calculatePosition','change:hasDirtyComment','element','hasDirtyComment','get','_findOptimalIndex','change:isEditMode','stopListening','change:isActive','set','maxThreadTotalWeight','equal','delegate','locale','insert','authoredAt','resolvedAt','count','_config','Marked\x20as\x20resolved','comments'];(function(_0x4defab,_0x143a2d){const _0x34ede6=function(_0x5ef90f){while(--_0x5ef90f){_0x4defab['push'](_0x4defab['shift']());}};_0x34ede6(++_0x143a2d);}(_0x143a,0x1ab));const _0x34ed=function(_0x4defab,_0x143a2d){_0x4defab=_0x4defab-0x0;let _0x34ede6=_0x143a[_0x4defab];return _0x34ede6;};import{View as _0x272656}from'ckeditor5/src/ui';import{diff as _0x4ea9be,Collection as _0x557994}from'ckeditor5/src/utils';import{getTranslation as _0x5936ca}from'../../../utils/common-translations';import _0x4b15fe from'./collapsedcommentsview';export default class wt extends _0x272656{constructor(_0x3daf01,_0x20aee4,_0x991de){super(_0x3daf01),this[_0x34ed('0x19')](_0x34ed('0x13'),!0x1),this['set'](_0x34ed('0x37'),_0x20aee4[_0x34ed('0x24')][_0x34ed('0x37')]),this[_0x34ed('0x19')](_0x34ed('0x32'),!0x1),this[_0x34ed('0x25')]=_0x20aee4,this[_0x34ed('0x22')]=_0x991de,this['commentViews']=this[_0x34ed('0xd')](),this['visibleViews']=this[_0x34ed('0xd')](),this[_0x34ed('0x8')]=null,this[_0x34ed('0x29')]=new _0x4b15fe(_0x3daf01),this[_0x34ed('0x29')]['bind'](_0x34ed('0x21'))['to'](this,_0x34ed('0x37'),_0x190e36=>_0x190e36-this['_config'][_0x34ed('0x34')]);for(const _0x5c1625 of _0x20aee4['comments'])this[_0x34ed('0x3')](_0x5c1625);this[_0x34ed('0x28')](),this[_0x34ed('0xe')](_0x20aee4[_0x34ed('0x24')],_0x34ed('0x2f'),(_0x4eab1a,_0x50b257)=>{const _0x7d5909=this[_0x34ed('0x10')](_0x50b257);this[_0x34ed('0x37')]++,this[_0x34ed('0x3')](_0x50b257,_0x7d5909),this[_0x34ed('0xc')]();}),this[_0x34ed('0xe')](_0x20aee4[_0x34ed('0x24')],_0x34ed('0x2d'),(_0x53e166,_0x2650cd)=>{this[_0x34ed('0x37')]--,this['_handleRemoveCommentModel'](_0x2650cd),this[_0x34ed('0xc')]();}),this[_0x34ed('0xe')](_0x20aee4,'commentUpdated',()=>this['refreshVisibleViews']()),this[_0x34ed('0xe')](_0x20aee4,_0x34ed('0x31'),()=>this['_handleInfoComment']()),this['on'](_0x34ed('0x18'),()=>this['refreshVisibleViews']()),this['on'](_0x34ed('0x11'),()=>this[_0x34ed('0xc')]()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments']},'children':this[_0x34ed('0x2')]});}get[_0x34ed('0x4')](){return this[_0x34ed('0x25')][_0x34ed('0x38')]>this[_0x34ed('0x22')][_0x34ed('0x1a')]&&!this[_0x34ed('0x32')]&&!this[_0x34ed('0x13')];}[_0x34ed('0x35')](){super[_0x34ed('0x35')](),this['refreshVisibleViews']();}[_0x34ed('0x27')](){this[_0x34ed('0x12')][_0x34ed('0x27')]();}[_0x34ed('0xf')](){this['_collapsedCommentsView']['destroy']();for(const _0x280918 of this[_0x34ed('0x39')])_0x280918[_0x34ed('0xf')]();super['destroy']();}[_0x34ed('0xc')](){this[_0x34ed('0x4')]?this[_0x34ed('0x5')]():this[_0x34ed('0x2e')]();}[_0x34ed('0x3')](_0x491339,_0x2749d2){const _0x57c937=new this[(_0x34ed('0x22'))][(_0x34ed('0x1'))](this[_0x34ed('0x1d')],_0x491339,{'maxCommentCharsWhenCollapsed':this[_0x34ed('0x22')][_0x34ed('0x6')],'formatDateTime':this[_0x34ed('0x22')][_0x34ed('0x2b')],'editorConfig':this[_0x34ed('0x22')][_0x34ed('0x2c')]});_0x57c937[_0x34ed('0x7')]=_0x491339['id'],_0x57c937['delegate']('removeComment')['to'](this),_0x57c937[_0x34ed('0x1c')](_0x34ed('0xb'))['to'](this),_0x57c937[_0x34ed('0x1c')](_0x34ed('0x9'))['to'](this),this['listenTo'](_0x57c937,_0x34ed('0x16'),()=>this[_0x34ed('0x30')]()),this[_0x34ed('0x39')][_0x34ed('0x2f')](_0x57c937,_0x2749d2);}[_0x34ed('0x10')](_0x454342){const _0x10891f=this[_0x34ed('0x25')][_0x34ed('0x15')](_0x454342);return this[_0x34ed('0x8')]?this[_0x34ed('0x8')][_0x34ed('0x1f')]>_0x454342[_0x34ed('0x1f')]?_0x10891f-0x1:_0x10891f:_0x10891f-0x1;}[_0x34ed('0x28')](){if(this['_model'][_0x34ed('0x2a')]&&this[_0x34ed('0x25')][_0x34ed('0x20')]){const _0x5bf05d={'id':_0x34ed('0x36'),'author':this['_model'][_0x34ed('0x2a')],'authoredAt':this[_0x34ed('0x25')][_0x34ed('0x20')],'content':_0x5936ca(this['locale'],_0x34ed('0x23')),'attributes':{}};this['resolvedCommentView']=new this[(_0x34ed('0x22'))][(_0x34ed('0x1'))](this[_0x34ed('0x1d')],_0x5bf05d,{'maxCommentCharsWhenCollapsed':this['_config'][_0x34ed('0x6')],'formatDateTime':this['_config'][_0x34ed('0x2b')],'editorConfig':this[_0x34ed('0x22')]['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this[_0x34ed('0x8')],this[_0x34ed('0x25')][_0x34ed('0x15')](_0x5bf05d));}else this[_0x34ed('0x8')]&&(this['commentViews'][_0x34ed('0x2d')](this[_0x34ed('0x8')]),this[_0x34ed('0x8')]['destroy'](),this[_0x34ed('0x8')]=null);this[_0x34ed('0xc')]();}[_0x34ed('0x0')](_0xf9b7a1){const _0x2e5a3e=this['commentViews'][_0x34ed('0x2d')](_0xf9b7a1['id']);this[_0x34ed('0x17')](_0x2e5a3e),_0x2e5a3e['isEditMode']&&this['_updateHasDirtyComment'](),_0x2e5a3e[_0x34ed('0xf')]();}[_0x34ed('0x30')](){this[_0x34ed('0x13')]=Array[_0x34ed('0x26')](this[_0x34ed('0x39')])['some'](_0x453e2c=>_0x453e2c[_0x34ed('0xa')]);}[_0x34ed('0x5')](){const _0x442b0c=function(_0x18c400){const _0x2874bb=new _0x557994();for(const _0x65d557 of _0x18c400)_0x2874bb[_0x34ed('0x2f')](_0x65d557);return _0x2874bb;}(this[_0x34ed('0x39')]),_0x1c5da3=this['_collapsedCommentsView'][_0x34ed('0x21')];for(let _0x188e47=0x1;_0x188e47<=_0x1c5da3;_0x188e47++)_0x442b0c[_0x34ed('0x2d')](0x1);for(const _0x51dac6 of _0x442b0c)_0x51dac6['collapse']();_0x1c5da3>0x0&&_0x442b0c[_0x34ed('0x2f')](this[_0x34ed('0x29')],0x1),ss(_0x4ea9be(Array[_0x34ed('0x26')](this[_0x34ed('0x2')]),Array[_0x34ed('0x26')](_0x442b0c)),this[_0x34ed('0x2')],_0x442b0c);}['_rearrangeExpand'](){ss(_0x4ea9be(Array[_0x34ed('0x26')](this[_0x34ed('0x2')]),Array[_0x34ed('0x26')](this[_0x34ed('0x39')])),this['visibleViews'],this[_0x34ed('0x39')]);for(const _0x3ad84f of this['visibleViews'])_0x3ad84f['expand']();}}function ss(_0x417617,_0x486338,_0x528186){let _0x43dfac=0x0;for(const _0x337d54 of _0x417617)switch(_0x337d54){case _0x34ed('0x1e'):_0x486338[_0x34ed('0x2f')](_0x528186[_0x34ed('0x14')](_0x43dfac),_0x43dfac),_0x43dfac++;break;case _0x34ed('0x33'):_0x486338['remove'](_0x43dfac);break;case _0x34ed('0x1b'):_0x43dfac++;}}
|