@ckeditor/ckeditor5-comments 40.0.0 → 40.2.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 +19 -19
- package/LICENSE.md +3 -3
- package/README.md +1 -1
- package/build/comments.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +2 -0
- package/lang/translations/af.po +8 -0
- package/lang/translations/ar.po +8 -0
- package/lang/translations/bg.po +8 -0
- package/lang/translations/bn.po +8 -0
- package/lang/translations/bs.po +8 -0
- package/lang/translations/ca.po +8 -0
- package/lang/translations/cs.po +8 -0
- package/lang/translations/da.po +8 -0
- package/lang/translations/de-ch.po +8 -0
- package/lang/translations/de.po +8 -0
- package/lang/translations/el.po +8 -0
- package/lang/translations/en-au.po +8 -0
- package/lang/translations/en.po +8 -0
- package/lang/translations/es-co.po +8 -0
- package/lang/translations/es.po +8 -0
- package/lang/translations/et.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +8 -0
- package/lang/translations/fr.po +8 -0
- package/lang/translations/gl.po +8 -0
- package/lang/translations/he.po +8 -0
- package/lang/translations/hi.po +8 -0
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/id.po +8 -0
- package/lang/translations/it.po +8 -0
- package/lang/translations/ja.po +8 -0
- package/lang/translations/jv.po +8 -0
- package/lang/translations/ko.po +8 -0
- package/lang/translations/lt.po +8 -0
- package/lang/translations/lv.po +8 -0
- package/lang/translations/ms.po +8 -0
- package/lang/translations/nl.po +8 -0
- package/lang/translations/no.po +8 -0
- package/lang/translations/pl.po +8 -0
- package/lang/translations/pt-br.po +8 -0
- package/lang/translations/pt.po +8 -0
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/sk.po +8 -0
- package/lang/translations/sq.po +8 -0
- package/lang/translations/sr-latn.po +9 -1
- package/lang/translations/sr.po +8 -0
- package/lang/translations/sv.po +8 -0
- package/lang/translations/th.po +8 -0
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +8 -0
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +16 -8
- package/lang/translations/uk.po +8 -0
- package/lang/translations/ur.po +8 -0
- package/lang/translations/vi.po +8 -0
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +3 -3
- 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 +1130 -1129
- 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 -119
- 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 -118
- 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/comment.css +1 -1
|
@@ -1,50 +1,50 @@
|
|
|
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/view/commentthreadheaderview
|
|
7
|
-
*/
|
|
8
|
-
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import type { CommentThread } from '../../commentsrepository';
|
|
11
|
-
export declare const MAX_CONTENT_LENGTH = 150;
|
|
12
|
-
/**
|
|
13
|
-
* A view for the comment thread header.
|
|
14
|
-
*/
|
|
15
|
-
export default class CommentThreadHeaderView extends View {
|
|
16
|
-
locale: Locale;
|
|
17
|
-
/**
|
|
18
|
-
* Defines whether the context value exists.
|
|
19
|
-
*
|
|
20
|
-
* @observable
|
|
21
|
-
*/
|
|
22
|
-
hasContext: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Context value to display in the header.
|
|
25
|
-
*
|
|
26
|
-
* @observable
|
|
27
|
-
*/
|
|
28
|
-
contextValue: string;
|
|
29
|
-
/**
|
|
30
|
-
* Button view for the button which reopen the comment thread.
|
|
31
|
-
*/
|
|
32
|
-
reopenButtonView: ButtonView;
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
constructor(locale: Locale, model: CommentThread);
|
|
37
|
-
/**
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
render(): void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Fired when a user performed an action that should lead to reopen the resolved comment thread.
|
|
44
|
-
*
|
|
45
|
-
* @eventName ~CommentThreadHeaderView#reopenCommentThread
|
|
46
|
-
*/
|
|
47
|
-
export type UIReopenCommentThreadEvent = {
|
|
48
|
-
name: 'reopenCommentThread';
|
|
49
|
-
args: [id: string];
|
|
50
|
-
};
|
|
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/view/commentthreadheaderview
|
|
7
|
+
*/
|
|
8
|
+
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
11
|
+
export declare const MAX_CONTENT_LENGTH = 150;
|
|
12
|
+
/**
|
|
13
|
+
* A view for the comment thread header.
|
|
14
|
+
*/
|
|
15
|
+
export default class CommentThreadHeaderView extends View {
|
|
16
|
+
locale: Locale;
|
|
17
|
+
/**
|
|
18
|
+
* Defines whether the context value exists.
|
|
19
|
+
*
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
hasContext: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Context value to display in the header.
|
|
25
|
+
*
|
|
26
|
+
* @observable
|
|
27
|
+
*/
|
|
28
|
+
contextValue: string;
|
|
29
|
+
/**
|
|
30
|
+
* Button view for the button which reopen the comment thread.
|
|
31
|
+
*/
|
|
32
|
+
reopenButtonView: ButtonView;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
constructor(locale: Locale, model: CommentThread);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
render(): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Fired when a user performed an action that should lead to reopen the resolved comment thread.
|
|
44
|
+
*
|
|
45
|
+
* @eventName ~CommentThreadHeaderView#reopenCommentThread
|
|
46
|
+
*/
|
|
47
|
+
export type UIReopenCommentThreadEvent = {
|
|
48
|
+
name: 'reopenCommentThread';
|
|
49
|
+
args: [id: string];
|
|
50
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x38af=['Comment\x20was\x20made\x20on\x20an\x20element','isResolvable','tooltip','Reopen','locale','.ck-context','listenTo','add','.ck-context__value','render','ck-context-wrapper','_createReopenButton','hasContext','offsetWidth','_attachContextActions','classList','mouseenter','_trimContextValue','bind','reopenCommentThread','icon','querySelector','isResolved','_model','execute','ck-context__value','setTemplate','reopenButtonView','label','...','scrollWidth','fire','div','lastIndexOf','isReadOnly','isEnabled','value','ck-context','ck-thread__header','context','mouseleave','remove','span','overlay','contextValue'];(function(_0x1581f3,_0x38af64){const _0x3fb034=function(_0xc2507){while(--_0xc2507){_0x1581f3['push'](_0x1581f3['shift']());}};_0x3fb034(++_0x38af64);}(_0x38af,0x69));const _0x3fb0=function(_0x1581f3,_0x38af64){_0x1581f3=_0x1581f3-0x0;let _0x3fb034=_0x38af[_0x1581f3];return _0x3fb034;};import{View as _0x571c2b,ButtonView as _0x1618dd}from'ckeditor5/src/ui';import{getTranslation as _0x224545}from'../../../utils/common-translations';import _0x5dfe4c from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x571c2b{constructor(_0x5c7867,_0x48873b){super(_0x5c7867);const _0x24a940=this['bindTemplate'];this['_model']=_0x48873b,this[_0x3fb0('0xc')]=this['_createReopenButton'](),this[_0x3fb0('0x3')](_0x3fb0('0x2a'))['to'](this[_0x3fb0('0x8')],_0x3fb0('0x18'),_0x3f57cb=>!!_0x3f57cb),this[_0x3fb0('0x3')]('contextValue')['to'](this[_0x3fb0('0x8')],'context',_0x5c944e=>_0x5c944e&&_0x5c944e['value']?this['_trimContextValue'](_0x5c944e[_0x3fb0('0x15')]):_0x224545(this['locale'],_0x3fb0('0x1e'))),this[_0x3fb0('0xb')]({'tag':_0x3fb0('0x11'),'attributes':{'class':[_0x3fb0('0x17')]},'children':[{'tag':_0x3fb0('0x11'),'attributes':{'class':[_0x3fb0('0x28')]},'children':[{'tag':_0x3fb0('0x11'),'attributes':{'class':[_0x3fb0('0x16'),_0x24a940['if'](_0x3fb0('0x2a'),'ck-context--quotes')]},'children':[{'tag':_0x3fb0('0x1b'),'attributes':{'class':[_0x3fb0('0xa')]},'children':[{'text':_0x24a940['to'](_0x3fb0('0x1d'))}]}]}]},{'tag':_0x3fb0('0x11'),'attributes':{'class':['ck-annotation__actions']},'children':[this[_0x3fb0('0xc')]]}]});}['render'](){super[_0x3fb0('0x27')](),this[_0x3fb0('0x2c')]();}[_0x3fb0('0x29')](){const _0x2defbb=new _0x1618dd(this[_0x3fb0('0x22')]);return _0x2defbb[_0x3fb0('0xd')]=_0x224545(this[_0x3fb0('0x22')],_0x3fb0('0x21')),_0x2defbb[_0x3fb0('0x20')]=_0x224545(this[_0x3fb0('0x22')],'Reopen'),_0x2defbb[_0x3fb0('0x5')]=_0x5dfe4c,_0x2defbb[_0x3fb0('0x3')](_0x3fb0('0x14'))['to'](this[_0x3fb0('0x8')],_0x3fb0('0x13'),_0x61c6de=>!_0x61c6de),_0x2defbb[_0x3fb0('0x3')]('isVisible')['to'](this[_0x3fb0('0x8')],_0x3fb0('0x1f'),this[_0x3fb0('0x8')],_0x3fb0('0x7'),(_0xc512a8,_0x139e0d)=>_0xc512a8&&_0x139e0d),_0x2defbb['on'](_0x3fb0('0x9'),()=>{this[_0x3fb0('0x10')](_0x3fb0('0x4'),this['_model']['id']);}),_0x2defbb;}[_0x3fb0('0x2')](_0x251ef4){if(_0x251ef4['length']<0x96)return _0x251ef4;const _0x11a818=_0x251ef4[_0x3fb0('0x12')]('\x20',0x93);return _0x251ef4['substring'](0x0,_0x11a818>-0x1?_0x11a818:0x93)+_0x3fb0('0xe');}[_0x3fb0('0x2c')](){const _0x13ac24=this['element'][_0x3fb0('0x6')](_0x3fb0('0x23')),_0x19dcde=_0x13ac24[_0x3fb0('0x6')](_0x3fb0('0x26'));this['listenTo'](_0x13ac24,_0x3fb0('0x1'),()=>{_0x19dcde[_0x3fb0('0x2b')]<_0x19dcde[_0x3fb0('0xf')]&&_0x13ac24['classList'][_0x3fb0('0x25')]('overlay');}),this[_0x3fb0('0x24')](_0x13ac24,_0x3fb0('0x19'),()=>{_0x13ac24[_0x3fb0('0x0')][_0x3fb0('0x1a')](_0x3fb0('0x1c'));});}}
|
|
@@ -1,41 +1,41 @@
|
|
|
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/view/commentthreadinputview
|
|
7
|
-
*/
|
|
8
|
-
import { View } from 'ckeditor5/src/ui';
|
|
9
|
-
import CommentInputView from './commentinputview';
|
|
10
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
11
|
-
import type { EditorConfig } from 'ckeditor5/src/core';
|
|
12
|
-
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
13
|
-
/**
|
|
14
|
-
* View that represents comment input area for a comment thread. Includes editor, user view and buttons.
|
|
15
|
-
*/
|
|
16
|
-
export default class CommentThreadInputView extends View {
|
|
17
|
-
/**
|
|
18
|
-
* Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
|
|
19
|
-
*
|
|
20
|
-
* @observable
|
|
21
|
-
*/
|
|
22
|
-
showInput: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Comment input view.
|
|
25
|
-
*/
|
|
26
|
-
commentInputView: CommentInputView;
|
|
27
|
-
/**
|
|
28
|
-
* User view for the input area. Presents the local user.
|
|
29
|
-
*/
|
|
30
|
-
userView: UserView;
|
|
31
|
-
/**
|
|
32
|
-
* @param locale The localization service instance.
|
|
33
|
-
* @param localUser Current local user.
|
|
34
|
-
* @param editorConfig
|
|
35
|
-
*/
|
|
36
|
-
constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
|
|
37
|
-
/**
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
destroy(): Promise<void>;
|
|
41
|
-
}
|
|
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/view/commentthreadinputview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from 'ckeditor5/src/ui';
|
|
9
|
+
import CommentInputView from './commentinputview';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
11
|
+
import type { EditorConfig } from 'ckeditor5/src/core';
|
|
12
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
13
|
+
/**
|
|
14
|
+
* View that represents comment input area for a comment thread. Includes editor, user view and buttons.
|
|
15
|
+
*/
|
|
16
|
+
export default class CommentThreadInputView extends View {
|
|
17
|
+
/**
|
|
18
|
+
* Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
|
|
19
|
+
*
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
showInput: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Comment input view.
|
|
25
|
+
*/
|
|
26
|
+
commentInputView: CommentInputView;
|
|
27
|
+
/**
|
|
28
|
+
* User view for the input area. Presents the local user.
|
|
29
|
+
*/
|
|
30
|
+
userView: UserView;
|
|
31
|
+
/**
|
|
32
|
+
* @param locale The localization service instance.
|
|
33
|
+
* @param localUser Current local user.
|
|
34
|
+
* @param editorConfig
|
|
35
|
+
*/
|
|
36
|
+
constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
destroy(): Promise<void>;
|
|
41
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0xbbc4=['value','editor','setTemplate','ck-comment__input-container--active','focusTracker','commentInputView','createEditor','userView','showInput','set','destroy','then','div','bind','editorReady','change:showInput','ck-thread__input','bindTemplate','extendTemplate','ck-comment__input-container','ck-thread__user'];(function(_0x376be5,_0xbbc4fd){var _0x3b7bb5=function(_0x53765e){while(--_0x53765e){_0x376be5['push'](_0x376be5['shift']());}};_0x3b7bb5(++_0xbbc4fd);}(_0xbbc4,0x14d));var _0x3b7b=function(_0x376be5,_0xbbc4fd){_0x376be5=_0x376be5-0x0;var _0x3b7bb5=_0xbbc4[_0x376be5];return _0x3b7bb5;};import{View as _0x5a4903}from'ckeditor5/src/ui';import _0x40f73d from'./commentinputview';import{UserView as _0x143110}from'ckeditor5-collaboration/src/collaboration-core';export default class At extends _0x5a4903{constructor(_0x7ead34,_0x1b4f6a,_0x31f6cd){super(_0x7ead34),this[_0x3b7b('0x8')]=new _0x40f73d(_0x7ead34,_0x31f6cd),this[_0x3b7b('0x8')][_0x3b7b('0x10')]('showButtons')['to'](this['commentInputView'][_0x3b7b('0x7')],'isFocused',this['commentInputView'],_0x3b7b('0x3'),(_0x9b7690,_0x2665f1)=>_0x9b7690||!!_0x2665f1),this[_0x3b7b('0xc')](_0x3b7b('0xb'),!0x1),this['on'](_0x3b7b('0x12'),()=>{this[_0x3b7b('0xb')]&&!this[_0x3b7b('0x8')][_0x3b7b('0x4')]&&this[_0x3b7b('0x8')][_0x3b7b('0x9')]();}),this[_0x3b7b('0x8')]['delegate'](_0x3b7b('0x11'))['to'](this),this[_0x3b7b('0x8')]['delegate']('editorDestroyed')['to'](this),this[_0x3b7b('0xa')]=new _0x143110(_0x7ead34,_0x1b4f6a),this['userView']['extendTemplate']({'attributes':{'class':_0x3b7b('0x2')}}),this['commentInputView'][_0x3b7b('0x0')]({'attributes':{'class':_0x3b7b('0x13')}}),this[_0x3b7b('0x5')]({'tag':_0x3b7b('0xf'),'attributes':{'class':[_0x3b7b('0x1'),this[_0x3b7b('0x14')]['if'](_0x3b7b('0xb'),_0x3b7b('0x6'))]},'children':[this[_0x3b7b('0xa')],this[_0x3b7b('0x8')]]});}[_0x3b7b('0xd')](){return this[_0x3b7b('0x8')]['destroy']()[_0x3b7b('0xe')](()=>super[_0x3b7b('0xd')]());}}
|
|
@@ -1,118 +1,118 @@
|
|
|
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/view/commentthreadview
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
11
|
-
import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
|
|
12
|
-
import BaseCommentThreadView from './basecommentthreadview';
|
|
13
|
-
import type { CommentThread } from '../../commentsrepository';
|
|
14
|
-
import type { CommentThreadConfig } from '../../../config';
|
|
15
|
-
declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
16
|
-
/**
|
|
17
|
-
* The default view for comment thread.
|
|
18
|
-
*/
|
|
19
|
-
export default class CommentThreadView extends CommentThreadView_base {
|
|
20
|
-
isConfirm: boolean;
|
|
21
|
-
cancelConfirm: () => void;
|
|
22
|
-
showConfirm: (key: string, element: unknown) => Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* The locale instance.
|
|
25
|
-
*/
|
|
26
|
-
readonly locale: Locale;
|
|
27
|
-
/**
|
|
28
|
-
* A property used by the template.
|
|
29
|
-
*
|
|
30
|
-
* It works as a visual indicator for the user that an action is about to be performed.
|
|
31
|
-
* The value of this property is used in setting the CSS class.
|
|
32
|
-
* The property is used when the user interacts with the view.
|
|
33
|
-
*
|
|
34
|
-
* @observable
|
|
35
|
-
*/
|
|
36
|
-
actionIndicator: string | null;
|
|
37
|
-
/**
|
|
38
|
-
* View collection which holds all comment thread children elements.
|
|
39
|
-
*
|
|
40
|
-
* These views are:
|
|
41
|
-
*
|
|
42
|
-
* * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
|
|
43
|
-
* resolved),
|
|
44
|
-
* * {@link ~CommentThreadView#commentsListView `commentsListView`},
|
|
45
|
-
* * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
|
|
46
|
-
*
|
|
47
|
-
* @readonly
|
|
48
|
-
*/
|
|
49
|
-
readonly commentThreadChildren: ViewCollection;
|
|
50
|
-
/**
|
|
51
|
-
* `ConfirmView` uses this element as a container for confirmation dialog.
|
|
52
|
-
*
|
|
53
|
-
* The element is set after `view#render()` is called.
|
|
54
|
-
*
|
|
55
|
-
* @member {HTMLElement|null} #containerElement
|
|
56
|
-
*/
|
|
57
|
-
containerElement: HTMLElement | null;
|
|
58
|
-
/**
|
|
59
|
-
* Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
|
|
60
|
-
*
|
|
61
|
-
* @readonly
|
|
62
|
-
*/
|
|
63
|
-
readonly resolveButton: ButtonView;
|
|
64
|
-
/**
|
|
65
|
-
* @inheritDoc
|
|
66
|
-
*/
|
|
67
|
-
constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
|
|
68
|
-
/**
|
|
69
|
-
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
70
|
-
*
|
|
71
|
-
* Overwrite this method if you want to set a custom template for the comment thread view.
|
|
72
|
-
*
|
|
73
|
-
* The default template looks as follows:
|
|
74
|
-
*
|
|
75
|
-
* ```ts
|
|
76
|
-
* const bind = this.bindTemplate;
|
|
77
|
-
*
|
|
78
|
-
* {
|
|
79
|
-
* tag: 'div',
|
|
80
|
-
*
|
|
81
|
-
* attributes: {
|
|
82
|
-
* class: [
|
|
83
|
-
* 'ck-thread',
|
|
84
|
-
* 'ck-reset_all-excluded',
|
|
85
|
-
* bind.if( 'isActive', 'ck-thread--active' ),
|
|
86
|
-
* bind.if( 'isUnlinked', 'ck-thread--unlinked' ),
|
|
87
|
-
* bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
|
|
88
|
-
* bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
|
|
89
|
-
* ],
|
|
90
|
-
* 'data-thread-id': this._model.id,
|
|
91
|
-
* // Needed for managing focus after adding new comment.
|
|
92
|
-
* tabindex: -1
|
|
93
|
-
* },
|
|
94
|
-
*
|
|
95
|
-
* children: [
|
|
96
|
-
* {
|
|
97
|
-
* tag: 'div',
|
|
98
|
-
* attributes: {
|
|
99
|
-
* class: 'ck-thread__container'
|
|
100
|
-
* },
|
|
101
|
-
* children: this.commentThreadChildren
|
|
102
|
-
* }
|
|
103
|
-
* ]
|
|
104
|
-
* };
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
|
|
108
|
-
* the possible annotation customizations.
|
|
109
|
-
*
|
|
110
|
-
* @returns The definition of a comment thread view's template.
|
|
111
|
-
*/
|
|
112
|
-
getTemplate(): TemplateDefinition;
|
|
113
|
-
/**
|
|
114
|
-
* @inheritDoc
|
|
115
|
-
*/
|
|
116
|
-
render(): void;
|
|
117
|
-
}
|
|
118
|
-
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/view/commentthreadview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
11
|
+
import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
|
|
12
|
+
import BaseCommentThreadView from './basecommentthreadview';
|
|
13
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
14
|
+
import type { CommentThreadConfig } from '../../../config';
|
|
15
|
+
declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
16
|
+
/**
|
|
17
|
+
* The default view for comment thread.
|
|
18
|
+
*/
|
|
19
|
+
export default class CommentThreadView extends CommentThreadView_base {
|
|
20
|
+
isConfirm: boolean;
|
|
21
|
+
cancelConfirm: () => void;
|
|
22
|
+
showConfirm: (key: string, element: unknown) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* The locale instance.
|
|
25
|
+
*/
|
|
26
|
+
readonly locale: Locale;
|
|
27
|
+
/**
|
|
28
|
+
* A property used by the template.
|
|
29
|
+
*
|
|
30
|
+
* It works as a visual indicator for the user that an action is about to be performed.
|
|
31
|
+
* The value of this property is used in setting the CSS class.
|
|
32
|
+
* The property is used when the user interacts with the view.
|
|
33
|
+
*
|
|
34
|
+
* @observable
|
|
35
|
+
*/
|
|
36
|
+
actionIndicator: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* View collection which holds all comment thread children elements.
|
|
39
|
+
*
|
|
40
|
+
* These views are:
|
|
41
|
+
*
|
|
42
|
+
* * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
|
|
43
|
+
* resolved),
|
|
44
|
+
* * {@link ~CommentThreadView#commentsListView `commentsListView`},
|
|
45
|
+
* * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
|
|
46
|
+
*
|
|
47
|
+
* @readonly
|
|
48
|
+
*/
|
|
49
|
+
readonly commentThreadChildren: ViewCollection;
|
|
50
|
+
/**
|
|
51
|
+
* `ConfirmView` uses this element as a container for confirmation dialog.
|
|
52
|
+
*
|
|
53
|
+
* The element is set after `view#render()` is called.
|
|
54
|
+
*
|
|
55
|
+
* @member {HTMLElement|null} #containerElement
|
|
56
|
+
*/
|
|
57
|
+
containerElement: HTMLElement | null;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
readonly resolveButton: ButtonView;
|
|
64
|
+
/**
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
|
|
68
|
+
/**
|
|
69
|
+
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
70
|
+
*
|
|
71
|
+
* Overwrite this method if you want to set a custom template for the comment thread view.
|
|
72
|
+
*
|
|
73
|
+
* The default template looks as follows:
|
|
74
|
+
*
|
|
75
|
+
* ```ts
|
|
76
|
+
* const bind = this.bindTemplate;
|
|
77
|
+
*
|
|
78
|
+
* {
|
|
79
|
+
* tag: 'div',
|
|
80
|
+
*
|
|
81
|
+
* attributes: {
|
|
82
|
+
* class: [
|
|
83
|
+
* 'ck-thread',
|
|
84
|
+
* 'ck-reset_all-excluded',
|
|
85
|
+
* bind.if( 'isActive', 'ck-thread--active' ),
|
|
86
|
+
* bind.if( 'isUnlinked', 'ck-thread--unlinked' ),
|
|
87
|
+
* bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
|
|
88
|
+
* bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
|
|
89
|
+
* ],
|
|
90
|
+
* 'data-thread-id': this._model.id,
|
|
91
|
+
* // Needed for managing focus after adding new comment.
|
|
92
|
+
* tabindex: -1
|
|
93
|
+
* },
|
|
94
|
+
*
|
|
95
|
+
* children: [
|
|
96
|
+
* {
|
|
97
|
+
* tag: 'div',
|
|
98
|
+
* attributes: {
|
|
99
|
+
* class: 'ck-thread__container'
|
|
100
|
+
* },
|
|
101
|
+
* children: this.commentThreadChildren
|
|
102
|
+
* }
|
|
103
|
+
* ]
|
|
104
|
+
* };
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
|
|
108
|
+
* the possible annotation customizations.
|
|
109
|
+
*
|
|
110
|
+
* @returns The definition of a comment thread view's template.
|
|
111
|
+
*/
|
|
112
|
+
getTemplate(): TemplateDefinition;
|
|
113
|
+
/**
|
|
114
|
+
* @inheritDoc
|
|
115
|
+
*/
|
|
116
|
+
render(): void;
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4281=['_boundFirstCommentView','commentsListView','isResolvable','bind','isVisible','actionIndicator','ck-thread--','ck-reset_all-excluded','change:isActive','stop','div','Write\x20a\x20comment...','ck-thread--active','isReadOnly','fire','locale','extendTemplate','set','commentViews','Delete\x20comment\x20thread?','removeCommentThread','add','resolveCommentThread','querySelector','label','ck-thread--unlinked','cancelConfirm','getTemplate','containerElement','archivedAt','render','_bindFirstCommentView','ck-thread--remove-confirmation','isEnabled','commentThreadHeaderView','tooltip','_cancelAllConfirms','actionBar','commentThreadChildren','resolveButton','placeholder','_model','length','remove','icon','element','bindTemplate','_createResolveButton','unbind','isActive','ck-thread__container','change:isReadOnly','createCollection','addMany','then','isSystemComment','ck-thread','ck-comment--resolve','isConfirm','removeButton','Resolve','execute'];(function(_0x5d05bb,_0x4281bc){const _0x560edf=function(_0x2f95d7){while(--_0x2f95d7){_0x5d05bb['push'](_0x5d05bb['shift']());}};_0x560edf(++_0x4281bc);}(_0x4281,0x1eb));const _0x560e=function(_0x5d05bb,_0x4281bc){_0x5d05bb=_0x5d05bb-0x0;let _0x560edf=_0x4281[_0x5d05bb];return _0x560edf;};import{ConfirmMixin as _0xc50d54}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x2319ca}from'ckeditor5/src/ui';import{icons as _0x30e61d}from'ckeditor5/src/core';import _0xdf9eb6 from'./basecommentthreadview';import{getTranslation as _0x3d4af4}from'../../../utils/common-translations';export default class ft extends _0xc50d54(_0xdf9eb6){constructor(_0x2774c1,_0x51d93f,_0x2bf94f,_0x9dcf2c){super(_0x2774c1,_0x51d93f,_0x2bf94f,_0x9dcf2c),this[_0x560e('0x2b')]=this[_0x560e('0x39')](),this['commentThreadChildren'][_0x560e('0x3a')]([this[_0x560e('0x6')],this['commentThreadInputView']]),this[_0x560e('0x2e')][_0x560e('0x22')]&&this[_0x560e('0x2b')]['add'](this[_0x560e('0x27')],0x0),this['_model']['on']('change:archivedAt',(_0x1b8045,_0x466a10,_0x5797ad)=>{_0x5797ad?this['commentThreadChildren']['has'](this[_0x560e('0x27')])||this[_0x560e('0x2b')]['add'](this[_0x560e('0x27')],0x0):this['commentThreadChildren'][_0x560e('0x30')](this[_0x560e('0x27')]);}),this[_0x560e('0x16')](_0x560e('0xa'),null),this[_0x560e('0x21')]=null,this[_0x560e('0x5')]=null,this[_0x560e('0x14')]=_0x2774c1,this[_0x560e('0x2c')]=this['_createResolveButton'](),this['setTemplate'](this[_0x560e('0x20')]()),this['on'](_0x560e('0xd'),(_0x31a484,_0x40553d,_0x176b5f)=>{_0x176b5f||this['_cancelAllConfirms']();}),this['listenTo'](this[_0x560e('0x2e')],_0x560e('0x38'),(_0xcb73db,_0x388f2f,_0x2fc039)=>{_0x2fc039&&this[_0x560e('0x29')]();}),this[_0x560e('0x2f')]>0x0&&this[_0x560e('0x24')](),this['listenTo'](this['commentsListView']['commentViews'],_0x560e('0x1a'),()=>{this[_0x560e('0x24')]();});}['getTemplate'](){const _0x195a5b=this[_0x560e('0x33')];return{'tag':_0x560e('0xf'),'attributes':{'class':[_0x560e('0x3d'),_0x560e('0xc'),_0x195a5b['if'](_0x560e('0x36'),_0x560e('0x11')),_0x195a5b['if']('isUnlinked',_0x560e('0x1e')),_0x195a5b['if'](_0x560e('0x1'),_0x560e('0x25')),_0x195a5b['to'](_0x560e('0xa'),_0x379dbc=>_0x379dbc?_0x560e('0xb')+_0x379dbc:'')],'data-thread-id':this['_model']['id'],'tabindex':-0x1},'children':[{'tag':_0x560e('0xf'),'attributes':{'class':_0x560e('0x37')},'children':this[_0x560e('0x2b')]}]};}[_0x560e('0x23')](){super[_0x560e('0x23')](),this[_0x560e('0x21')]=this[_0x560e('0x32')][_0x560e('0x1c')]('.ck-thread__container');}['_cancelAllConfirms'](){this[_0x560e('0x1f')]();for(const _0x33c2fc of this[_0x560e('0x6')]['commentViews'])_0x33c2fc['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4c2ab3}=this,_0x28061f=this[_0x560e('0x6')][_0x560e('0x17')]['get'](0x0);_0x28061f===this[_0x560e('0x5')]||_0x28061f[_0x560e('0x3c')]||(this[_0x560e('0x5')]=_0x28061f,this[_0x560e('0x35')](_0x560e('0xa')),this[_0x560e('0x8')]('actionIndicator')['to'](_0x28061f,'actionIndicator',_0x11bdb4=>_0x560e('0x30')===_0x11bdb4?_0x560e('0x30'):null),_0x28061f[_0x560e('0x2d')]=_0x3d4af4(_0x4c2ab3,_0x560e('0x10')),_0x28061f[_0x560e('0x2')]['on']('execute',_0x5621c5=>{_0x5621c5[_0x560e('0xe')](),this['showConfirm'](_0x3d4af4(_0x4c2ab3,_0x560e('0x18')),this[_0x560e('0x21')])[_0x560e('0x3b')](()=>{this['fire'](_0x560e('0x19'));});},{'priority':'high'}),_0x28061f[_0x560e('0x2a')][_0x560e('0x1a')](this[_0x560e('0x2c')],0x0));}[_0x560e('0x34')](){const _0x22b790=new _0x2319ca(this[_0x560e('0x14')]);return _0x22b790[_0x560e('0x1d')]=_0x3d4af4(this[_0x560e('0x14')],_0x560e('0x3')),_0x22b790[_0x560e('0x28')]=_0x3d4af4(this['locale'],_0x560e('0x3')),_0x22b790[_0x560e('0x31')]=_0x30e61d['check'],_0x22b790[_0x560e('0x15')]({'attributes':{'class':_0x560e('0x0')}}),_0x22b790['bind'](_0x560e('0x26'))['to'](this[_0x560e('0x2e')],_0x560e('0x12'),_0x4caa4e=>!_0x4caa4e),_0x22b790[_0x560e('0x8')](_0x560e('0x9'))['to'](this[_0x560e('0x2e')],_0x560e('0x7'),this[_0x560e('0x2e')],'isResolved',(_0x4baa23,_0x24f2ea)=>_0x4baa23&&!_0x24f2ea),_0x22b790['on'](_0x560e('0x4'),()=>{this[_0x560e('0x13')](_0x560e('0x1b'),this[_0x560e('0x2e')]['id']);}),_0x22b790;}}
|