@ckeditor/ckeditor5-comments 38.0.1 → 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/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.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 -227
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +63 -62
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +86 -84
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +81 -80
- 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 -72
- 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 -25
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +34 -32
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +75 -71
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1088 -1084
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +29 -25
- 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 -22
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +29 -28
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +172 -172
- package/src/index.d.ts +21 -19
- package/src/index.js +1 -1
- 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,46 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentthreadheaderview
|
|
3
|
-
*/
|
|
4
|
-
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
5
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import type { CommentThread } from '../../commentsrepository';
|
|
7
|
-
export declare const MAX_CONTENT_LENGTH = 150;
|
|
8
|
-
/**
|
|
9
|
-
* A view for the comment thread header.
|
|
10
|
-
*/
|
|
11
|
-
export default class CommentThreadHeaderView extends View {
|
|
12
|
-
locale: Locale;
|
|
13
|
-
/**
|
|
14
|
-
* Defines whether the context value exists.
|
|
15
|
-
*
|
|
16
|
-
* @observable
|
|
17
|
-
*/
|
|
18
|
-
hasContext: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Context value to display in the header.
|
|
21
|
-
*
|
|
22
|
-
* @observable
|
|
23
|
-
*/
|
|
24
|
-
contextValue: string;
|
|
25
|
-
/**
|
|
26
|
-
* Button view for the button which reopen the comment thread.
|
|
27
|
-
*/
|
|
28
|
-
reopenButtonView: ButtonView;
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
constructor(locale: Locale, model: CommentThread);
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
render(): void;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Fired when a user performed an action that should lead to reopen the resolved comment thread.
|
|
40
|
-
*
|
|
41
|
-
* @eventName ~CommentThreadHeaderView#reopenCommentThread
|
|
42
|
-
*/
|
|
43
|
-
export type UIReopenCommentThreadEvent = {
|
|
44
|
-
name: 'reopenCommentThread';
|
|
45
|
-
args: [id: string];
|
|
46
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentthreadheaderview
|
|
3
|
+
*/
|
|
4
|
+
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
7
|
+
export declare const MAX_CONTENT_LENGTH = 150;
|
|
8
|
+
/**
|
|
9
|
+
* A view for the comment thread header.
|
|
10
|
+
*/
|
|
11
|
+
export default class CommentThreadHeaderView extends View {
|
|
12
|
+
locale: Locale;
|
|
13
|
+
/**
|
|
14
|
+
* Defines whether the context value exists.
|
|
15
|
+
*
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
hasContext: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Context value to display in the header.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
*/
|
|
24
|
+
contextValue: string;
|
|
25
|
+
/**
|
|
26
|
+
* Button view for the button which reopen the comment thread.
|
|
27
|
+
*/
|
|
28
|
+
reopenButtonView: ButtonView;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
constructor(locale: Locale, model: CommentThread);
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
render(): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Fired when a user performed an action that should lead to reopen the resolved comment thread.
|
|
40
|
+
*
|
|
41
|
+
* @eventName ~CommentThreadHeaderView#reopenCommentThread
|
|
42
|
+
*/
|
|
43
|
+
export type UIReopenCommentThreadEvent = {
|
|
44
|
+
name: 'reopenCommentThread';
|
|
45
|
+
args: [id: string];
|
|
46
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5874=['isEnabled','ck-context-wrapper','execute','querySelector','context','bind','listenTo','offsetWidth','bindTemplate','ck-context--quotes','lastIndexOf','length','reopenButtonView','Comment\x20was\x20made\x20on\x20an\x20element','substring','isVisible','label','ck-context__value','classList','div','mouseleave','scrollWidth','overlay','_attachContextActions','contextValue','isResolvable','fire','_createReopenButton','render','value','tooltip','_trimContextValue','...','.ck-context','locale','hasContext','mouseenter','reopenCommentThread','setTemplate','ck-thread__header','isReadOnly','span','_model','add'];(function(_0x161eef,_0x5874db){const _0x5b5b7b=function(_0xa5a862){while(--_0xa5a862){_0x161eef['push'](_0x161eef['shift']());}};_0x5b5b7b(++_0x5874db);}(_0x5874,0xc0));const _0x5b5b=function(_0x161eef,_0x5874db){_0x161eef=_0x161eef-0x0;let _0x5b5b7b=_0x5874[_0x161eef];return _0x5b5b7b;};import{View as _0x4970dc,ButtonView as _0x586cf4}from'ckeditor5/src/ui';import{getTranslation as _0x493f88}from'../../../utils/common-translations';import _0x36d0a1 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x4970dc{constructor(_0x1d976a,_0x1c93d5){super(_0x1d976a);const _0x125f16=this[_0x5b5b('0x24')];this[_0x5b5b('0x1a')]=_0x1c93d5,this[_0x5b5b('0x28')]=this['_createReopenButton'](),this['bind'](_0x5b5b('0x13'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x20'),_0x4919d9=>!!_0x4919d9),this[_0x5b5b('0x21')](_0x5b5b('0x8'))['to'](this['_model'],_0x5b5b('0x20'),_0x892379=>_0x892379&&_0x892379[_0x5b5b('0xd')]?this['_trimContextValue'](_0x892379[_0x5b5b('0xd')]):_0x493f88(this[_0x5b5b('0x12')],_0x5b5b('0x29'))),this[_0x5b5b('0x16')]({'tag':_0x5b5b('0x3'),'attributes':{'class':[_0x5b5b('0x17')]},'children':[{'tag':_0x5b5b('0x3'),'attributes':{'class':[_0x5b5b('0x1d')]},'children':[{'tag':_0x5b5b('0x3'),'attributes':{'class':['ck-context',_0x125f16['if'](_0x5b5b('0x13'),_0x5b5b('0x25'))]},'children':[{'tag':_0x5b5b('0x19'),'attributes':{'class':[_0x5b5b('0x1')]},'children':[{'text':_0x125f16['to']('contextValue')}]}]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this[_0x5b5b('0x28')]]}]});}[_0x5b5b('0xc')](){super['render'](),this[_0x5b5b('0x7')]();}[_0x5b5b('0xb')](){const _0x4d6e39=new _0x586cf4(this[_0x5b5b('0x12')]);return _0x4d6e39[_0x5b5b('0x0')]=_0x493f88(this[_0x5b5b('0x12')],'Reopen'),_0x4d6e39[_0x5b5b('0xe')]=_0x493f88(this['locale'],'Reopen'),_0x4d6e39['icon']=_0x36d0a1,_0x4d6e39[_0x5b5b('0x21')](_0x5b5b('0x1c'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x18'),_0x3e9798=>!_0x3e9798),_0x4d6e39[_0x5b5b('0x21')](_0x5b5b('0x2b'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x9')),_0x4d6e39['on'](_0x5b5b('0x1e'),()=>{this[_0x5b5b('0xa')](_0x5b5b('0x15'),this['_model']['id']);}),_0x4d6e39;}[_0x5b5b('0xf')](_0x14effc){if(_0x14effc[_0x5b5b('0x27')]<0x96)return _0x14effc;const _0x3578bc=_0x14effc[_0x5b5b('0x26')]('\x20',0x93);return _0x14effc[_0x5b5b('0x2a')](0x0,_0x3578bc>-0x1?_0x3578bc:0x93)+_0x5b5b('0x10');}[_0x5b5b('0x7')](){const _0x2294dc=this['element']['querySelector'](_0x5b5b('0x11')),_0x5a90ed=_0x2294dc[_0x5b5b('0x1f')]('.ck-context__value');this['listenTo'](_0x2294dc,_0x5b5b('0x14'),()=>{_0x5a90ed[_0x5b5b('0x23')]<_0x5a90ed[_0x5b5b('0x5')]&&_0x2294dc[_0x5b5b('0x2')][_0x5b5b('0x1b')](_0x5b5b('0x6'));}),this[_0x5b5b('0x22')](_0x2294dc,_0x5b5b('0x4'),()=>{_0x2294dc[_0x5b5b('0x2')]['remove']('overlay');});}}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentthreadinputview
|
|
3
|
-
*/
|
|
4
|
-
import { View } from 'ckeditor5/src/ui';
|
|
5
|
-
import CommentInputView from './commentinputview';
|
|
6
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
7
|
-
import type { EditorConfig } from 'ckeditor5/src/core';
|
|
8
|
-
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
9
|
-
/**
|
|
10
|
-
* View that represents comment input area for a comment thread. Includes editor, user view and buttons.
|
|
11
|
-
*/
|
|
12
|
-
export default class CommentThreadInputView extends View {
|
|
13
|
-
/**
|
|
14
|
-
* Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
|
|
15
|
-
*
|
|
16
|
-
* @observable
|
|
17
|
-
*/
|
|
18
|
-
showInput: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Comment input view.
|
|
21
|
-
*/
|
|
22
|
-
commentInputView: CommentInputView;
|
|
23
|
-
/**
|
|
24
|
-
* User view for the input area. Presents the local user.
|
|
25
|
-
*/
|
|
26
|
-
userView: UserView;
|
|
27
|
-
/**
|
|
28
|
-
* @param locale The localization service instance.
|
|
29
|
-
* @param localUser Current local user.
|
|
30
|
-
* @param editorConfig
|
|
31
|
-
*/
|
|
32
|
-
constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
destroy(): Promise<void>;
|
|
37
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentthreadinputview
|
|
3
|
+
*/
|
|
4
|
+
import { View } from 'ckeditor5/src/ui';
|
|
5
|
+
import CommentInputView from './commentinputview';
|
|
6
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
7
|
+
import type { EditorConfig } from 'ckeditor5/src/core';
|
|
8
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
9
|
+
/**
|
|
10
|
+
* View that represents comment input area for a comment thread. Includes editor, user view and buttons.
|
|
11
|
+
*/
|
|
12
|
+
export default class CommentThreadInputView extends View {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
|
|
15
|
+
*
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
showInput: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Comment input view.
|
|
21
|
+
*/
|
|
22
|
+
commentInputView: CommentInputView;
|
|
23
|
+
/**
|
|
24
|
+
* User view for the input area. Presents the local user.
|
|
25
|
+
*/
|
|
26
|
+
userView: UserView;
|
|
27
|
+
/**
|
|
28
|
+
* @param locale The localization service instance.
|
|
29
|
+
* @param localUser Current local user.
|
|
30
|
+
* @param editorConfig
|
|
31
|
+
*/
|
|
32
|
+
constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
destroy(): Promise<void>;
|
|
37
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x7a12=['set','change:showInput','createEditor','editor','focusTracker','userView','showInput','destroy','ck-comment__input-container--active','extendTemplate','ck-thread__input','ck-comment__input-container','commentInputView','then','value','bind','bindTemplate','showButtons','isFocused'];(function(_0x2eab6c,_0x7a12f1){var _0x11af23=function(_0x5386c1){while(--_0x5386c1){_0x2eab6c['push'](_0x2eab6c['shift']());}};_0x11af23(++_0x7a12f1);}(_0x7a12,0x128));var _0x11af=function(_0x2eab6c,_0x7a12f1){_0x2eab6c=_0x2eab6c-0x0;var _0x11af23=_0x7a12[_0x2eab6c];return _0x11af23;};import{View as _0x31bddb}from'ckeditor5/src/ui';import _0x4d8b04 from'./commentinputview';import{UserView as _0x46672c}from'ckeditor5-collaboration/src/collaboration-core';export default class Ct extends _0x31bddb{constructor(_0x94df9a,_0x144b84,_0x1b0467){super(_0x94df9a),this[_0x11af('0x1')]=new _0x4d8b04(_0x94df9a,_0x1b0467),this[_0x11af('0x1')][_0x11af('0x4')](_0x11af('0x6'))['to'](this[_0x11af('0x1')][_0x11af('0xc')],_0x11af('0x7'),this[_0x11af('0x1')],_0x11af('0x3'),(_0x4f8bd0,_0xe37c08)=>_0x4f8bd0||!!_0xe37c08),this[_0x11af('0x8')](_0x11af('0xe'),!0x1),this['on'](_0x11af('0x9'),()=>{this[_0x11af('0xe')]&&!this[_0x11af('0x1')][_0x11af('0xb')]&&this[_0x11af('0x1')][_0x11af('0xa')]();}),this[_0x11af('0xd')]=new _0x46672c(_0x94df9a,_0x144b84),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user'}}),this['commentInputView'][_0x11af('0x11')]({'attributes':{'class':_0x11af('0x12')}}),this['setTemplate']({'tag':'div','attributes':{'class':[_0x11af('0x0'),this[_0x11af('0x5')]['if'](_0x11af('0xe'),_0x11af('0x10'))]},'children':[this['userView'],this[_0x11af('0x1')]]});}[_0x11af('0xf')](){return this['commentInputView'][_0x11af('0xf')]()[_0x11af('0x2')](()=>super[_0x11af('0xf')]());}}
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/ui/view/commentthreadview
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
7
|
-
import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
|
|
8
|
-
import BaseCommentThreadView from './basecommentthreadview';
|
|
9
|
-
import type { CommentThread } from '../../commentsrepository';
|
|
10
|
-
import type { CommentThreadConfig } from '../../../config';
|
|
11
|
-
declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
12
|
-
/**
|
|
13
|
-
* The default view for comment thread.
|
|
14
|
-
*/
|
|
15
|
-
export default class CommentThreadView extends CommentThreadView_base {
|
|
16
|
-
isConfirm: boolean;
|
|
17
|
-
cancelConfirm: () => void;
|
|
18
|
-
showConfirm: (key: string, element: unknown) => Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* The locale instance.
|
|
21
|
-
*/
|
|
22
|
-
readonly locale: Locale;
|
|
23
|
-
/**
|
|
24
|
-
* A property used by the template.
|
|
25
|
-
*
|
|
26
|
-
* It works as a visual indicator for the user that an action is about to be performed.
|
|
27
|
-
* The value of this property is used in setting the CSS class.
|
|
28
|
-
* The property is used when the user interacts with the view.
|
|
29
|
-
*
|
|
30
|
-
* @observable
|
|
31
|
-
*/
|
|
32
|
-
actionIndicator: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* View collection which holds all comment thread children elements.
|
|
35
|
-
*
|
|
36
|
-
* These views are:
|
|
37
|
-
*
|
|
38
|
-
* * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
|
|
39
|
-
* resolved),
|
|
40
|
-
* * {@link ~CommentThreadView#commentsListView `commentsListView`},
|
|
41
|
-
* * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
|
|
42
|
-
*
|
|
43
|
-
* @readonly
|
|
44
|
-
*/
|
|
45
|
-
readonly commentThreadChildren: ViewCollection;
|
|
46
|
-
/**
|
|
47
|
-
* `ConfirmView` uses this element as a container for confirmation dialog.
|
|
48
|
-
*
|
|
49
|
-
* The element is set after `view#render()` is called.
|
|
50
|
-
*
|
|
51
|
-
* @member {HTMLElement|null} #containerElement
|
|
52
|
-
*/
|
|
53
|
-
containerElement: HTMLElement | null;
|
|
54
|
-
/**
|
|
55
|
-
* Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
|
|
56
|
-
*
|
|
57
|
-
* @readonly
|
|
58
|
-
*/
|
|
59
|
-
readonly resolveButton: ButtonView;
|
|
60
|
-
/**
|
|
61
|
-
* @inheritDoc
|
|
62
|
-
*/
|
|
63
|
-
constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
|
|
64
|
-
/**
|
|
65
|
-
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
66
|
-
*
|
|
67
|
-
* Overwrite this method if you want to set a custom template for the comment thread view.
|
|
68
|
-
*
|
|
69
|
-
* The default template looks as follows:
|
|
70
|
-
*
|
|
71
|
-
* ```ts
|
|
72
|
-
* const bind = this.bindTemplate;
|
|
73
|
-
*
|
|
74
|
-
* {
|
|
75
|
-
* tag: 'div',
|
|
76
|
-
*
|
|
77
|
-
* attributes: {
|
|
78
|
-
* class: [
|
|
79
|
-
* 'ck-thread',
|
|
80
|
-
* 'ck-reset_all-excluded',
|
|
81
|
-
* bind.if( 'isActive', 'ck-thread--active' ),
|
|
82
|
-
* bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
|
|
83
|
-
* bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
|
|
84
|
-
* ],
|
|
85
|
-
* 'data-thread-id': this._model.id,
|
|
86
|
-
* // Needed for managing focus after adding new comment.
|
|
87
|
-
* tabindex: -1
|
|
88
|
-
* },
|
|
89
|
-
*
|
|
90
|
-
* children: [
|
|
91
|
-
* {
|
|
92
|
-
* tag: 'div',
|
|
93
|
-
* attributes: {
|
|
94
|
-
* class: 'ck-thread__container'
|
|
95
|
-
* },
|
|
96
|
-
* children: this.commentThreadChildren
|
|
97
|
-
* }
|
|
98
|
-
* ]
|
|
99
|
-
* };
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
|
|
103
|
-
* the possible annotation customizations.
|
|
104
|
-
*
|
|
105
|
-
* @returns The definition of a comment thread view's template.
|
|
106
|
-
*/
|
|
107
|
-
getTemplate(): TemplateDefinition;
|
|
108
|
-
/**
|
|
109
|
-
* @inheritDoc
|
|
110
|
-
*/
|
|
111
|
-
render(): void;
|
|
112
|
-
}
|
|
113
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/ui/view/commentthreadview
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
7
|
+
import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
|
|
8
|
+
import BaseCommentThreadView from './basecommentthreadview';
|
|
9
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
10
|
+
import type { CommentThreadConfig } from '../../../config';
|
|
11
|
+
declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
12
|
+
/**
|
|
13
|
+
* The default view for comment thread.
|
|
14
|
+
*/
|
|
15
|
+
export default class CommentThreadView extends CommentThreadView_base {
|
|
16
|
+
isConfirm: boolean;
|
|
17
|
+
cancelConfirm: () => void;
|
|
18
|
+
showConfirm: (key: string, element: unknown) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* The locale instance.
|
|
21
|
+
*/
|
|
22
|
+
readonly locale: Locale;
|
|
23
|
+
/**
|
|
24
|
+
* A property used by the template.
|
|
25
|
+
*
|
|
26
|
+
* It works as a visual indicator for the user that an action is about to be performed.
|
|
27
|
+
* The value of this property is used in setting the CSS class.
|
|
28
|
+
* The property is used when the user interacts with the view.
|
|
29
|
+
*
|
|
30
|
+
* @observable
|
|
31
|
+
*/
|
|
32
|
+
actionIndicator: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* View collection which holds all comment thread children elements.
|
|
35
|
+
*
|
|
36
|
+
* These views are:
|
|
37
|
+
*
|
|
38
|
+
* * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
|
|
39
|
+
* resolved),
|
|
40
|
+
* * {@link ~CommentThreadView#commentsListView `commentsListView`},
|
|
41
|
+
* * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
|
|
42
|
+
*
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
readonly commentThreadChildren: ViewCollection;
|
|
46
|
+
/**
|
|
47
|
+
* `ConfirmView` uses this element as a container for confirmation dialog.
|
|
48
|
+
*
|
|
49
|
+
* The element is set after `view#render()` is called.
|
|
50
|
+
*
|
|
51
|
+
* @member {HTMLElement|null} #containerElement
|
|
52
|
+
*/
|
|
53
|
+
containerElement: HTMLElement | null;
|
|
54
|
+
/**
|
|
55
|
+
* Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
|
|
56
|
+
*
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
readonly resolveButton: ButtonView;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
|
|
64
|
+
/**
|
|
65
|
+
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
66
|
+
*
|
|
67
|
+
* Overwrite this method if you want to set a custom template for the comment thread view.
|
|
68
|
+
*
|
|
69
|
+
* The default template looks as follows:
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* const bind = this.bindTemplate;
|
|
73
|
+
*
|
|
74
|
+
* {
|
|
75
|
+
* tag: 'div',
|
|
76
|
+
*
|
|
77
|
+
* attributes: {
|
|
78
|
+
* class: [
|
|
79
|
+
* 'ck-thread',
|
|
80
|
+
* 'ck-reset_all-excluded',
|
|
81
|
+
* bind.if( 'isActive', 'ck-thread--active' ),
|
|
82
|
+
* bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
|
|
83
|
+
* bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
|
|
84
|
+
* ],
|
|
85
|
+
* 'data-thread-id': this._model.id,
|
|
86
|
+
* // Needed for managing focus after adding new comment.
|
|
87
|
+
* tabindex: -1
|
|
88
|
+
* },
|
|
89
|
+
*
|
|
90
|
+
* children: [
|
|
91
|
+
* {
|
|
92
|
+
* tag: 'div',
|
|
93
|
+
* attributes: {
|
|
94
|
+
* class: 'ck-thread__container'
|
|
95
|
+
* },
|
|
96
|
+
* children: this.commentThreadChildren
|
|
97
|
+
* }
|
|
98
|
+
* ]
|
|
99
|
+
* };
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
|
|
103
|
+
* the possible annotation customizations.
|
|
104
|
+
*
|
|
105
|
+
* @returns The definition of a comment thread view's template.
|
|
106
|
+
*/
|
|
107
|
+
getTemplate(): TemplateDefinition;
|
|
108
|
+
/**
|
|
109
|
+
* @inheritDoc
|
|
110
|
+
*/
|
|
111
|
+
render(): void;
|
|
112
|
+
}
|
|
113
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1bbe=['_bindFirstCommentView','element','cancelConfirm','_model','querySelector','tooltip','resolveButton','ck-thread--remove-confirmation','isSystemComment','get','commentThreadChildren','removeButton','ck-reset_all-excluded','actionIndicator','ck-thread','fire','div','change:isReadOnly','check','render','.ck-thread__container','bind','Resolve','_createResolveButton','addMany','icon','commentViews','isResolved','unbind','_cancelAllConfirms','commentThreadInputView','length','add','showConfirm','set','ck-thread__container','_boundFirstCommentView','remove','commentsListView','Write\x20a\x20comment...','change:isResolved','listenTo','locale','label','isEnabled','isResolvable','ck-thread--active','resolveCommentThread','containerElement','high','ck-comment--resolve','isReadOnly','bindTemplate','stop','isActive'];(function(_0x264f63,_0x1bbe20){const _0x114206=function(_0x1769c2){while(--_0x1769c2){_0x264f63['push'](_0x264f63['shift']());}};_0x114206(++_0x1bbe20);}(_0x1bbe,0x105));const _0x1142=function(_0x264f63,_0x1bbe20){_0x264f63=_0x264f63-0x0;let _0x114206=_0x1bbe[_0x264f63];return _0x114206;};import{ConfirmMixin as _0x4bc22b}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x3e62bf}from'ckeditor5/src/ui';import{icons as _0x32e751}from'ckeditor5/src/core';import _0x660b62 from'./basecommentthreadview';import{getTranslation as _0x5de917}from'../../../utils/common-translations';export default class lt extends _0x4bc22b(_0x660b62){constructor(_0x2df31b,_0x569de2,_0xde8a42,_0x527970){super(_0x2df31b,_0x569de2,_0xde8a42,_0x527970),this[_0x1142('0x18')]=this['createCollection'](),this[_0x1142('0x18')][_0x1142('0x26')]([this[_0x1142('0x34')],this[_0x1142('0x2c')]]),this['_model'][_0x1142('0x29')]&&this[_0x1142('0x18')][_0x1142('0x2e')](this['commentThreadHeaderView'],0x0),this[_0x1142('0x11')]['on'](_0x1142('0x36'),(_0x5eeb48,_0x5a1848,_0x52812e)=>{_0x52812e?this[_0x1142('0x18')][_0x1142('0x2e')](this['commentThreadHeaderView'],0x0):this['commentThreadChildren'][_0x1142('0x33')](this['commentThreadHeaderView']);}),this[_0x1142('0x30')](_0x1142('0x1b'),null),this[_0x1142('0x7')]=null,this[_0x1142('0x32')]=null,this[_0x1142('0x1')]=_0x2df31b,this[_0x1142('0x14')]=this[_0x1142('0x25')](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x42f7c1,_0x13a1e6,_0x588e12)=>{_0x588e12||this[_0x1142('0x2b')]();}),this['listenTo'](this[_0x1142('0x11')],_0x1142('0x1f'),(_0x4178c7,_0x3aa274,_0x5e3e22)=>{_0x5e3e22&&this['_cancelAllConfirms']();}),this[_0x1142('0x2d')]>0x0&&this[_0x1142('0xe')](),this[_0x1142('0x0')](this[_0x1142('0x34')]['commentViews'],_0x1142('0x2e'),()=>{this[_0x1142('0xe')]();});}['getTemplate'](){const _0x4d0437=this[_0x1142('0xb')];return{'tag':_0x1142('0x1e'),'attributes':{'class':[_0x1142('0x1c'),_0x1142('0x1a'),_0x4d0437['if'](_0x1142('0xd'),_0x1142('0x5')),_0x4d0437['if']('isConfirm',_0x1142('0x15')),_0x4d0437['to']('actionIndicator',_0x30574d=>_0x30574d?'ck-thread--'+_0x30574d:'')],'data-thread-id':this[_0x1142('0x11')]['id'],'tabindex':-0x1},'children':[{'tag':_0x1142('0x1e'),'attributes':{'class':_0x1142('0x31')},'children':this['commentThreadChildren']}]};}[_0x1142('0x21')](){super[_0x1142('0x21')](),this[_0x1142('0x7')]=this[_0x1142('0xf')][_0x1142('0x12')](_0x1142('0x22'));}[_0x1142('0x2b')](){this[_0x1142('0x10')]();for(const _0x6a013c of this['commentsListView'][_0x1142('0x28')])_0x6a013c[_0x1142('0x10')]();}[_0x1142('0xe')](){const {locale:_0x185e05}=this,_0x19c8ba=this[_0x1142('0x34')][_0x1142('0x28')][_0x1142('0x17')](0x0);_0x19c8ba===this[_0x1142('0x32')]||_0x19c8ba[_0x1142('0x16')]||(this[_0x1142('0x32')]=_0x19c8ba,this[_0x1142('0x2a')]('actionIndicator'),this[_0x1142('0x23')](_0x1142('0x1b'))['to'](_0x19c8ba,_0x1142('0x1b'),_0x9f5ba3=>_0x1142('0x33')===_0x9f5ba3?_0x1142('0x33'):null),_0x19c8ba['placeholder']=_0x5de917(_0x185e05,_0x1142('0x35')),_0x19c8ba[_0x1142('0x19')]['on']('execute',_0x7b7c8=>{_0x7b7c8[_0x1142('0xc')](),this[_0x1142('0x2f')](_0x5de917(_0x185e05,'Delete\x20comment\x20thread?'),this[_0x1142('0x7')])['then'](()=>{this[_0x1142('0x1d')]('removeCommentThread');});},{'priority':_0x1142('0x8')}),_0x19c8ba['actionBar'][_0x1142('0x2e')](this[_0x1142('0x14')],0x0));}[_0x1142('0x25')](){const _0x207de0=new _0x3e62bf(this[_0x1142('0x1')]);return _0x207de0[_0x1142('0x2')]=_0x5de917(this[_0x1142('0x1')],_0x1142('0x24')),_0x207de0[_0x1142('0x13')]=_0x5de917(this[_0x1142('0x1')],_0x1142('0x24')),_0x207de0[_0x1142('0x27')]=_0x32e751[_0x1142('0x20')],_0x207de0['extendTemplate']({'attributes':{'class':_0x1142('0x9')}}),_0x207de0['bind'](_0x1142('0x3'))['to'](this[_0x1142('0x11')],_0x1142('0xa'),_0x82dfc=>!_0x82dfc),_0x207de0[_0x1142('0x23')]('isVisible')['to'](this[_0x1142('0x11')],_0x1142('0x4'),this[_0x1142('0x11')],'isResolved',(_0x1ab464,_0x29afd4)=>_0x1ab464&&!_0x29afd4),_0x207de0['on']('execute',()=>{this[_0x1142('0x1d')](_0x1142('0x6'),this[_0x1142('0x11')]['id']);}),_0x207de0;}}
|