@ckeditor/ckeditor5-comments 40.0.0 → 40.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -3
- 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 +8 -0
- 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 +8 -0
- 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 +1129 -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 _0x664d=['icon','_trimContextValue','...','remove','substring','scrollWidth','mouseenter','ck-context--quotes','render','contextValue','add','hasContext','reopenCommentThread','lastIndexOf','ck-context__value','div','bind','fire','length','.ck-context__value','span','label','Comment\x20was\x20made\x20on\x20an\x20element','isReadOnly','Reopen','ck-thread__header','context','locale','_createReopenButton','bindTemplate','isVisible','isResolvable','reopenButtonView','querySelector','listenTo','ck-context','_attachContextActions','_model','setTemplate','value','overlay','isResolved'];(function(_0x5c27c3,_0x664dd9){const _0x1104b2=function(_0x56b5f9){while(--_0x56b5f9){_0x5c27c3['push'](_0x5c27c3['shift']());}};_0x1104b2(++_0x664dd9);}(_0x664d,0x1e7));const _0x1104=function(_0x5c27c3,_0x664dd9){_0x5c27c3=_0x5c27c3-0x0;let _0x1104b2=_0x664d[_0x5c27c3];return _0x1104b2;};import{View as _0x120636,ButtonView as _0x5ec2c0}from'ckeditor5/src/ui';import{getTranslation as _0x90bacd}from'../../../utils/common-translations';import _0x4a8ed5 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x120636{constructor(_0x34fa81,_0x5e9ab1){super(_0x34fa81);const _0x5c33c6=this[_0x1104('0x4')];this[_0x1104('0xc')]=_0x5e9ab1,this[_0x1104('0x7')]=this[_0x1104('0x3')](),this['bind']('hasContext')['to'](this[_0x1104('0xc')],_0x1104('0x1'),_0x560fc7=>!!_0x560fc7),this[_0x1104('0x21')](_0x1104('0x1a'))['to'](this[_0x1104('0xc')],_0x1104('0x1'),_0x1b0c78=>_0x1b0c78&&_0x1b0c78[_0x1104('0xe')]?this[_0x1104('0x12')](_0x1b0c78['value']):_0x90bacd(this[_0x1104('0x2')],_0x1104('0x27'))),this[_0x1104('0xd')]({'tag':_0x1104('0x20'),'attributes':{'class':[_0x1104('0x0')]},'children':[{'tag':_0x1104('0x20'),'attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':[_0x1104('0xa'),_0x5c33c6['if'](_0x1104('0x1c'),_0x1104('0x18'))]},'children':[{'tag':_0x1104('0x25'),'attributes':{'class':[_0x1104('0x1f')]},'children':[{'text':_0x5c33c6['to'](_0x1104('0x1a'))}]}]}]},{'tag':_0x1104('0x20'),'attributes':{'class':['ck-annotation__actions']},'children':[this[_0x1104('0x7')]]}]});}[_0x1104('0x19')](){super[_0x1104('0x19')](),this[_0x1104('0xb')]();}[_0x1104('0x3')](){const _0x38a7d2=new _0x5ec2c0(this['locale']);return _0x38a7d2[_0x1104('0x26')]=_0x90bacd(this['locale'],_0x1104('0x29')),_0x38a7d2['tooltip']=_0x90bacd(this[_0x1104('0x2')],_0x1104('0x29')),_0x38a7d2[_0x1104('0x11')]=_0x4a8ed5,_0x38a7d2[_0x1104('0x21')]('isEnabled')['to'](this['_model'],_0x1104('0x28'),_0x35eeb9=>!_0x35eeb9),_0x38a7d2[_0x1104('0x21')](_0x1104('0x5'))['to'](this[_0x1104('0xc')],_0x1104('0x6'),this['_model'],_0x1104('0x10'),(_0x3f79a4,_0x5337b1)=>_0x3f79a4&&_0x5337b1),_0x38a7d2['on']('execute',()=>{this[_0x1104('0x22')](_0x1104('0x1d'),this['_model']['id']);}),_0x38a7d2;}[_0x1104('0x12')](_0x4a33e3){if(_0x4a33e3[_0x1104('0x23')]<0x96)return _0x4a33e3;const _0x1b38e4=_0x4a33e3[_0x1104('0x1e')]('\x20',0x93);return _0x4a33e3[_0x1104('0x15')](0x0,_0x1b38e4>-0x1?_0x1b38e4:0x93)+_0x1104('0x13');}[_0x1104('0xb')](){const _0x581d7c=this['element'][_0x1104('0x8')]('.ck-context'),_0x4ba273=_0x581d7c['querySelector'](_0x1104('0x24'));this['listenTo'](_0x581d7c,_0x1104('0x17'),()=>{_0x4ba273['offsetWidth']<_0x4ba273[_0x1104('0x16')]&&_0x581d7c['classList'][_0x1104('0x1b')](_0x1104('0xf'));}),this[_0x1104('0x9')](_0x581d7c,'mouseleave',()=>{_0x581d7c['classList'][_0x1104('0x14')]('overlay');});}}
|
|
@@ -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 _0x4618=['destroy','showInput','commentInputView','editorDestroyed','delegate','extendTemplate','bindTemplate','ck-comment__input-container--active','userView','isFocused','setTemplate','ck-thread__user','bind','div','showButtons','set'];(function(_0x1ab1c5,_0x461842){var _0x55c210=function(_0x1edf44){while(--_0x1edf44){_0x1ab1c5['push'](_0x1ab1c5['shift']());}};_0x55c210(++_0x461842);}(_0x4618,0xd4));var _0x55c2=function(_0x1ab1c5,_0x461842){_0x1ab1c5=_0x1ab1c5-0x0;var _0x55c210=_0x4618[_0x1ab1c5];return _0x55c210;};import{View as _0x172b8f}from'ckeditor5/src/ui';import _0xf02172 from'./commentinputview';import{UserView as _0x1a4191}from'ckeditor5-collaboration/src/collaboration-core';export default class At extends _0x172b8f{constructor(_0x4b7a29,_0x383195,_0x7fbaa1){super(_0x4b7a29),this[_0x55c2('0xe')]=new _0xf02172(_0x4b7a29,_0x7fbaa1),this['commentInputView'][_0x55c2('0x8')](_0x55c2('0xa'))['to'](this['commentInputView']['focusTracker'],_0x55c2('0x5'),this[_0x55c2('0xe')],'value',(_0x30c48e,_0x16abff)=>_0x30c48e||!!_0x16abff),this[_0x55c2('0xb')]('showInput',!0x1),this['on']('change:showInput',()=>{this[_0x55c2('0xd')]&&!this[_0x55c2('0xe')]['editor']&&this[_0x55c2('0xe')]['createEditor']();}),this[_0x55c2('0xe')]['delegate']('editorReady')['to'](this),this[_0x55c2('0xe')][_0x55c2('0x0')](_0x55c2('0xf'))['to'](this),this['userView']=new _0x1a4191(_0x4b7a29,_0x383195),this[_0x55c2('0x4')][_0x55c2('0x1')]({'attributes':{'class':_0x55c2('0x7')}}),this[_0x55c2('0xe')]['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this[_0x55c2('0x6')]({'tag':_0x55c2('0x9'),'attributes':{'class':['ck-comment__input-container',this[_0x55c2('0x2')]['if'](_0x55c2('0xd'),_0x55c2('0x3'))]},'children':[this[_0x55c2('0x4')],this['commentInputView']]});}[_0x55c2('0xc')](){return this[_0x55c2('0xe')]['destroy']()['then'](()=>super[_0x55c2('0xc')]());}}
|
|
@@ -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 _0x4690=['get','listenTo','high','removeCommentThread','cancelConfirm','element','_createResolveButton','remove','label','locale','commentThreadHeaderView','.ck-thread__container','ck-comment--resolve','showConfirm','execute','isConfirm','Resolve','bind','isActive','ck-thread--','isSystemComment','_cancelAllConfirms','addMany','commentThreadChildren','render','containerElement','ck-thread--active','fire','unbind','change:archivedAt','commentsListView','isEnabled','ck-thread--unlinked','getTemplate','ck-reset_all-excluded','tooltip','div','isVisible','isResolved','isReadOnly','setTemplate','placeholder','length','removeButton','check','change:isActive','actionBar','commentThreadInputView','isResolvable','actionIndicator','ck-thread--remove-confirmation','commentViews','bindTemplate','_boundFirstCommentView','add','isUnlinked','set','has','_bindFirstCommentView','resolveButton','_model'];(function(_0x4d61fb,_0x469028){const _0x5907d1=function(_0x103eda){while(--_0x103eda){_0x4d61fb['push'](_0x4d61fb['shift']());}};_0x5907d1(++_0x469028);}(_0x4690,0x1a9));const _0x5907=function(_0x4d61fb,_0x469028){_0x4d61fb=_0x4d61fb-0x0;let _0x5907d1=_0x4690[_0x4d61fb];return _0x5907d1;};import{ConfirmMixin as _0x41d1af}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x4be99e}from'ckeditor5/src/ui';import{icons as _0x2eba6a}from'ckeditor5/src/core';import _0x435299 from'./basecommentthreadview';import{getTranslation as _0x1aa497}from'../../../utils/common-translations';export default class ft extends _0x41d1af(_0x435299){constructor(_0x2a41c6,_0xe40f06,_0x363c65,_0x294f86){super(_0x2a41c6,_0xe40f06,_0x363c65,_0x294f86),this[_0x5907('0x19')]=this['createCollection'](),this[_0x5907('0x19')][_0x5907('0x18')]([this[_0x5907('0x20')],this[_0x5907('0x31')]]),this[_0x5907('0x1')]['archivedAt']&&this['commentThreadChildren'][_0x5907('0x38')](this[_0x5907('0xc')],0x0),this[_0x5907('0x1')]['on'](_0x5907('0x1f'),(_0x2bba28,_0x467fb2,_0x15d760)=>{_0x15d760?this[_0x5907('0x19')][_0x5907('0x3b')](this['commentThreadHeaderView'])||this[_0x5907('0x19')][_0x5907('0x38')](this[_0x5907('0xc')],0x0):this['commentThreadChildren'][_0x5907('0x9')](this[_0x5907('0xc')]);}),this[_0x5907('0x3a')]('actionIndicator',null),this[_0x5907('0x1b')]=null,this[_0x5907('0x37')]=null,this[_0x5907('0xb')]=_0x2a41c6,this[_0x5907('0x0')]=this[_0x5907('0x8')](),this[_0x5907('0x2a')](this[_0x5907('0x23')]()),this['on'](_0x5907('0x2f'),(_0x496c52,_0x2bfa10,_0x543a6c)=>{_0x543a6c||this[_0x5907('0x17')]();}),this[_0x5907('0x3')](this[_0x5907('0x1')],'change:isReadOnly',(_0xd69240,_0x4aa709,_0x3a6710)=>{_0x3a6710&&this[_0x5907('0x17')]();}),this[_0x5907('0x2c')]>0x0&&this[_0x5907('0x3c')](),this['listenTo'](this[_0x5907('0x20')][_0x5907('0x35')],_0x5907('0x38'),()=>{this[_0x5907('0x3c')]();});}['getTemplate'](){const _0x28f45f=this[_0x5907('0x36')];return{'tag':_0x5907('0x26'),'attributes':{'class':['ck-thread',_0x5907('0x24'),_0x28f45f['if'](_0x5907('0x14'),_0x5907('0x1c')),_0x28f45f['if'](_0x5907('0x39'),_0x5907('0x22')),_0x28f45f['if'](_0x5907('0x11'),_0x5907('0x34')),_0x28f45f['to'](_0x5907('0x33'),_0x389022=>_0x389022?_0x5907('0x15')+_0x389022:'')],'data-thread-id':this['_model']['id'],'tabindex':-0x1},'children':[{'tag':_0x5907('0x26'),'attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}[_0x5907('0x1a')](){super[_0x5907('0x1a')](),this['containerElement']=this[_0x5907('0x7')]['querySelector'](_0x5907('0xd'));}[_0x5907('0x17')](){this[_0x5907('0x6')]();for(const _0x3d6546 of this['commentsListView'][_0x5907('0x35')])_0x3d6546[_0x5907('0x6')]();}[_0x5907('0x3c')](){const {locale:_0x245029}=this,_0x28ef65=this[_0x5907('0x20')]['commentViews'][_0x5907('0x2')](0x0);_0x28ef65===this['_boundFirstCommentView']||_0x28ef65[_0x5907('0x16')]||(this['_boundFirstCommentView']=_0x28ef65,this[_0x5907('0x1e')](_0x5907('0x33')),this[_0x5907('0x13')](_0x5907('0x33'))['to'](_0x28ef65,'actionIndicator',_0x44a722=>_0x5907('0x9')===_0x44a722?_0x5907('0x9'):null),_0x28ef65[_0x5907('0x2b')]=_0x1aa497(_0x245029,'Write\x20a\x20comment...'),_0x28ef65[_0x5907('0x2d')]['on'](_0x5907('0x10'),_0x15d583=>{_0x15d583['stop'](),this[_0x5907('0xf')](_0x1aa497(_0x245029,'Delete\x20comment\x20thread?'),this[_0x5907('0x1b')])['then'](()=>{this[_0x5907('0x1d')](_0x5907('0x5'));});},{'priority':_0x5907('0x4')}),_0x28ef65[_0x5907('0x30')]['add'](this[_0x5907('0x0')],0x0));}[_0x5907('0x8')](){const _0xe0cc59=new _0x4be99e(this[_0x5907('0xb')]);return _0xe0cc59[_0x5907('0xa')]=_0x1aa497(this['locale'],'Resolve'),_0xe0cc59[_0x5907('0x25')]=_0x1aa497(this['locale'],_0x5907('0x12')),_0xe0cc59['icon']=_0x2eba6a[_0x5907('0x2e')],_0xe0cc59['extendTemplate']({'attributes':{'class':_0x5907('0xe')}}),_0xe0cc59[_0x5907('0x13')](_0x5907('0x21'))['to'](this[_0x5907('0x1')],_0x5907('0x29'),_0x529aa8=>!_0x529aa8),_0xe0cc59['bind'](_0x5907('0x27'))['to'](this[_0x5907('0x1')],_0x5907('0x32'),this[_0x5907('0x1')],_0x5907('0x28'),(_0x12496f,_0x1aea73)=>_0x12496f&&!_0x1aea73),_0xe0cc59['on']('execute',()=>{this[_0x5907('0x1d')]('resolveCommentThread',this[_0x5907('0x1')]['id']);}),_0xe0cc59;}}
|