@ckeditor/ckeditor5-comments 48.2.0-alpha.7 → 48.3.0-alpha.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/dist/annotations/annotation.d.ts +84 -87
- package/dist/annotations/annotationcollection.d.ts +83 -83
- package/dist/annotations/annotations.d.ts +148 -148
- package/dist/annotations/annotationsuis.d.ts +235 -235
- package/dist/annotations/editorannotations.d.ts +71 -71
- package/dist/annotations/inlineannotations.d.ts +93 -93
- package/dist/annotations/narrowsidebar.d.ts +88 -88
- package/dist/annotations/sidebar.d.ts +105 -105
- package/dist/annotations/view/annotationcounterbuttonview.d.ts +24 -24
- package/dist/annotations/view/annotationview.d.ts +83 -83
- package/dist/annotations/view/sidebaritemview.d.ts +54 -54
- package/dist/annotations/view/sidebarview.d.ts +48 -48
- package/dist/annotations/widesidebar.d.ts +80 -80
- package/dist/augmentation.d.ts +57 -57
- package/dist/comments/addcommentthreadcommand.d.ts +69 -69
- package/dist/comments/commentsarchive.d.ts +34 -34
- package/dist/comments/commentsarchiveui.d.ts +48 -48
- package/dist/comments/commentsediting.d.ts +90 -90
- package/dist/comments/commentsrepository.d.ts +1042 -1054
- package/dist/comments/commentsui.d.ts +40 -40
- package/dist/comments/integrations/clipboard.d.ts +21 -21
- package/dist/comments/integrations/commentsrestrictededitingmode.d.ts +12 -12
- package/dist/comments/integrations/importword.d.ts +16 -16
- package/dist/comments/integrations/showcommenthighlights.d.ts +14 -14
- package/dist/comments/ui/commenteditor/commenteditor.d.ts +33 -32
- package/dist/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/dist/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- package/dist/comments/ui/commentthreadcontroller.d.ts +62 -60
- package/dist/comments/ui/view/basecommentthreadview.d.ts +134 -134
- package/dist/comments/ui/view/basecommentview.d.ts +136 -136
- package/dist/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/dist/comments/ui/view/commentcontentview.d.ts +10 -10
- package/dist/comments/ui/view/commentinputview.d.ts +93 -93
- package/dist/comments/ui/view/commentsarchiveview.d.ts +41 -41
- package/dist/comments/ui/view/commentslistview.d.ts +107 -107
- package/dist/comments/ui/view/commentthreadheadercontextview.d.ts +19 -19
- package/dist/comments/ui/view/commentthreadheaderview.d.ts +67 -67
- package/dist/comments/ui/view/commentthreadinputview.d.ts +51 -51
- package/dist/comments/ui/view/commentthreadview.d.ts +116 -116
- package/dist/comments/ui/view/commentview.d.ts +225 -230
- package/dist/comments.d.ts +38 -38
- package/dist/commentsonly.d.ts +36 -36
- package/dist/config.d.ts +186 -186
- package/dist/index.d.ts +35 -35
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/createmutationobserver.d.ts +9 -9
- package/dist/utils/splitmarkername.d.ts +10 -10
- package/package.json +16 -16
|
@@ -1,148 +1,148 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { FocusCycler, View, type FocusableView, type ViewCollection } from
|
|
10
|
-
import { type Locale, FocusTracker, KeystrokeHandler } from
|
|
11
|
-
import { CommentThreadInputView } from
|
|
12
|
-
import { CommentsListView } from
|
|
13
|
-
import { CommentThreadHeaderView } from
|
|
14
|
-
import { AriaDescriptionView, type User } from
|
|
15
|
-
import type { CommentThread } from
|
|
16
|
-
import type { CommentThreadConfig } from
|
|
6
|
+
* @module comments/comments/ui/view/basecommentthreadview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { FocusCycler, View, type FocusableView, type ViewCollection } from "@ckeditor/ckeditor5-ui";
|
|
10
|
+
import { type Locale, FocusTracker, KeystrokeHandler } from "@ckeditor/ckeditor5-utils";
|
|
11
|
+
import { CommentThreadInputView } from "./commentthreadinputview.js";
|
|
12
|
+
import { CommentsListView } from "./commentslistview.js";
|
|
13
|
+
import { CommentThreadHeaderView } from "./commentthreadheaderview.js";
|
|
14
|
+
import { AriaDescriptionView, type User } from "@ckeditor/ckeditor5-collaboration-core";
|
|
15
|
+
import type { CommentThread } from "../../commentsrepository.js";
|
|
16
|
+
import type { CommentThreadConfig } from "../../../config.js";
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
* An abstract comment thread view class that should be used as a base for comment thread view implementations.
|
|
19
|
+
* It provides some behaviors, flags and building blocks to use when creating a custom comment thread view class.
|
|
20
|
+
*
|
|
21
|
+
* For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view Custom annotation view} guide.
|
|
22
|
+
*/
|
|
23
23
|
export declare class BaseCommentThreadView extends View {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
24
|
+
locale: Locale;
|
|
25
|
+
/**
|
|
26
|
+
* Informs whether the comment thread view is in active state ("highlighted").
|
|
27
|
+
* A comment thread view is in this state when it is focused or was activated by the user in any other way.
|
|
28
|
+
*
|
|
29
|
+
* @observable
|
|
30
|
+
*/
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Informs whether the comment thread view is in unlinked state.
|
|
34
|
+
* A comment thread view is in this state when its corresponding target has been removed from the content.
|
|
35
|
+
*
|
|
36
|
+
* @observable
|
|
37
|
+
*/
|
|
38
|
+
isUnlinked: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Informs whether the comment thread has any changes that have not been saved.
|
|
41
|
+
*
|
|
42
|
+
* @observable
|
|
43
|
+
*/
|
|
44
|
+
isDirty: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The number of comments.
|
|
47
|
+
*
|
|
48
|
+
* @observable
|
|
49
|
+
*/
|
|
50
|
+
readonly length: number;
|
|
51
|
+
/**
|
|
52
|
+
* The list of comment views. It should be used as a part of the view template.
|
|
53
|
+
*
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
readonly commentsListView: CommentsListView;
|
|
57
|
+
/**
|
|
58
|
+
* The comment thread header. It should be used as a part of the view template.
|
|
59
|
+
* This header is used only for resolved comment threads.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
readonly commentThreadHeaderView: CommentThreadHeaderView;
|
|
64
|
+
/**
|
|
65
|
+
* The comment input area view. It should be used as a part of the view template.
|
|
66
|
+
*
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
69
|
+
readonly commentThreadInputView: CommentThreadInputView;
|
|
70
|
+
/**
|
|
71
|
+
* A helper view that provides an ARIA description for the comment thread used by
|
|
72
|
+
* assistive technologies.
|
|
73
|
+
*/
|
|
74
|
+
readonly ariaDescriptionView: AriaDescriptionView;
|
|
75
|
+
/**
|
|
76
|
+
* An accessible thread label text exposed to assistive technologies.
|
|
77
|
+
*/
|
|
78
|
+
ariaLabel: string;
|
|
79
|
+
/**
|
|
80
|
+
* The collection of focusable views in the comment thread.
|
|
81
|
+
*/
|
|
82
|
+
readonly focusables: ViewCollection<FocusableView>;
|
|
83
|
+
/**
|
|
84
|
+
* Tracks information about DOM focus in the thread.
|
|
85
|
+
*/
|
|
86
|
+
readonly focusTracker: FocusTracker;
|
|
87
|
+
/**
|
|
88
|
+
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
89
|
+
*/
|
|
90
|
+
readonly keystrokes: KeystrokeHandler;
|
|
91
|
+
/**
|
|
92
|
+
* Helps cycling over focusable views in the thread.
|
|
93
|
+
*/
|
|
94
|
+
readonly focusCycler: FocusCycler;
|
|
95
|
+
/**
|
|
96
|
+
* @param locale The localization service instance.
|
|
97
|
+
* @param model The model on which the view will base.
|
|
98
|
+
* @param localUser The current local user.
|
|
99
|
+
* @param config Additional view configuration.
|
|
100
|
+
*/
|
|
101
|
+
constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
|
|
102
|
+
/**
|
|
103
|
+
* Focuses the view.
|
|
104
|
+
*/
|
|
105
|
+
focus(): void;
|
|
106
|
+
/**
|
|
107
|
+
* @inheritDoc
|
|
108
|
+
*/
|
|
109
|
+
override render(): void;
|
|
110
|
+
/**
|
|
111
|
+
* @inheritDoc
|
|
112
|
+
*/
|
|
113
|
+
override destroy(): Promise<void>;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
* Fired when a user created a first comment in the comment thread. Then the comment thread is submitted and saved.
|
|
117
|
+
*
|
|
118
|
+
* @eventName ~BaseCommentThreadView#submitCommentThread
|
|
119
|
+
*/
|
|
120
120
|
export type UISubmitCommentThreadEvent = {
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
name: "submitCommentThread";
|
|
122
|
+
args: [];
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
125
|
+
* Fired when a user performed an action that should lead to removing the comment thread.
|
|
126
|
+
*
|
|
127
|
+
* This event is not fired by default by any component created by `BaseCommentThreadView`.
|
|
128
|
+
* If you create a view class extending `BaseCommentThreadView`, you should provide
|
|
129
|
+
* a UI element that will fire this event.
|
|
130
|
+
*
|
|
131
|
+
* This event is fired by default when an empty comment thread view (with no comments)
|
|
132
|
+
* loses focus.
|
|
133
|
+
*
|
|
134
|
+
* @eventName ~BaseCommentThreadView#removeCommentThread
|
|
135
|
+
*/
|
|
136
136
|
export type UIRemoveCommentThreadEvent = {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
name: "removeCommentThread";
|
|
138
|
+
args: [];
|
|
139
139
|
};
|
|
140
140
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
* Fired when a user performed an action that should lead to resolve the comment thread.
|
|
142
|
+
*
|
|
143
|
+
* @eventName ~BaseCommentThreadView#resolveCommentThread
|
|
144
|
+
*/
|
|
145
145
|
export type UIResolveCommentThreadEvent = {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
name: "resolveCommentThread";
|
|
147
|
+
args: [id: string];
|
|
148
148
|
};
|
|
@@ -1,150 +1,150 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { View, ViewCollection, type FocusableView, FocusCycler } from
|
|
10
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from
|
|
11
|
-
import { AriaDescriptionView } from
|
|
12
|
-
import type { Comment } from
|
|
13
|
-
import type { CommentViewConfig } from
|
|
6
|
+
* @module comments/comments/ui/view/basecommentview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { View, ViewCollection, type FocusableView, FocusCycler } from "@ckeditor/ckeditor5-ui";
|
|
10
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
|
|
11
|
+
import { AriaDescriptionView } from "@ckeditor/ckeditor5-collaboration-core";
|
|
12
|
+
import type { Comment } from "../../commentsrepository.js";
|
|
13
|
+
import type { CommentViewConfig } from "../../../config.js";
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
* An abstract comment view class that should be used as a base for comment view implementations.
|
|
16
|
+
*
|
|
17
|
+
* It provides some behaviors, flags and building blocks to use when creating a custom comment view class.
|
|
18
|
+
*/
|
|
19
19
|
export declare class BaseCommentView extends View implements FocusableView {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
20
|
+
locale: Locale;
|
|
21
|
+
/**
|
|
22
|
+
* Informs whether the comment view is in the editing mode.
|
|
23
|
+
*
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
isEditMode: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Flag indicating whether the comment view displays an actual comment (`false`) or is a system message (`true`).
|
|
29
|
+
* System message comment should not include any UI elements which allow for editing the comment as it is not an actual comment.
|
|
30
|
+
*
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
isSystemComment: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Stores the currently displayed sub-view.
|
|
36
|
+
*
|
|
37
|
+
* This is a collection that always includes one view: comment content view or comment input view.
|
|
38
|
+
* Depending whether the comment is in editing mode or not, one of the views is in the collection.
|
|
39
|
+
* When the comment mode changes, the content of this collection also changes.
|
|
40
|
+
*
|
|
41
|
+
* By default, the comment is in the "content mode" and this view collection stores the comment content view.
|
|
42
|
+
*/
|
|
43
|
+
readonly visibleView: ViewCollection;
|
|
44
|
+
/**
|
|
45
|
+
* A helper view that provides an ARIA description for the comment used by
|
|
46
|
+
* assistive technologies.
|
|
47
|
+
*/
|
|
48
|
+
readonly ariaDescriptionView: AriaDescriptionView;
|
|
49
|
+
/**
|
|
50
|
+
* An accessible label text used by assistive technologies describing the comment.
|
|
51
|
+
*/
|
|
52
|
+
ariaLabel: string;
|
|
53
|
+
/**
|
|
54
|
+
* A collection of child views that can receive focus and contribute to the (shift) tab key navigation.
|
|
55
|
+
*/
|
|
56
|
+
readonly focusables: ViewCollection<FocusableView>;
|
|
57
|
+
/**
|
|
58
|
+
* Tracks information about DOM focus in the comment view.
|
|
59
|
+
*/
|
|
60
|
+
readonly focusTracker: FocusTracker;
|
|
61
|
+
/**
|
|
62
|
+
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
63
|
+
*/
|
|
64
|
+
readonly keystrokes: KeystrokeHandler;
|
|
65
|
+
/**
|
|
66
|
+
* Helps cycling over focusable {@link #focusables} in the comment.
|
|
67
|
+
*/
|
|
68
|
+
readonly focusCycler: FocusCycler;
|
|
69
|
+
/**
|
|
70
|
+
* @param locale The localization service instance.
|
|
71
|
+
* @param model The model on which the view will base.
|
|
72
|
+
* @param config Additional view configuration.
|
|
73
|
+
*/
|
|
74
|
+
constructor(locale: Locale, model: Comment, config: CommentViewConfig);
|
|
75
|
+
/**
|
|
76
|
+
* Expands the view.
|
|
77
|
+
*/
|
|
78
|
+
expand(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Collapses the view.
|
|
81
|
+
*/
|
|
82
|
+
collapse(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Focuses the view.
|
|
85
|
+
*/
|
|
86
|
+
focus(): void;
|
|
87
|
+
/**
|
|
88
|
+
* @inheritDoc
|
|
89
|
+
*/
|
|
90
|
+
override render(): void;
|
|
91
|
+
/**
|
|
92
|
+
* @inheritDoc
|
|
93
|
+
*/
|
|
94
|
+
override destroy(): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Switches the comment to the editing mode.
|
|
97
|
+
*/
|
|
98
|
+
switchToEditMode(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Switches the comment back from the editing mode to the content display mode.
|
|
101
|
+
*/
|
|
102
|
+
switchToDisplayMode(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Gets the translated note which indicates that the comment comes from an external source.
|
|
105
|
+
*/
|
|
106
|
+
getExternalCommentNote(): string;
|
|
107
|
+
/**
|
|
108
|
+
* Gets the translated notification text which indicates that author name comes from an external source.
|
|
109
|
+
*/
|
|
110
|
+
getUserViewNotificationText(): string | null;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
* Fired when a user performed an action that should lead to creating a new comment in the comment thread.
|
|
114
|
+
*
|
|
115
|
+
* This event is fired by default when the comment input field of the comment thread is submitted.
|
|
116
|
+
*
|
|
117
|
+
* @eventName ~BaseCommentView#addComment
|
|
118
|
+
* @param content The content of the new comment.
|
|
119
|
+
*/
|
|
120
120
|
export type UIAddCommentEvent = {
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
name: "addComment";
|
|
122
|
+
args: [content: string];
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
* Fired when a user performed an action that should lead to updating the comment content.
|
|
126
|
+
*
|
|
127
|
+
* This event is fired by default when the comment input field of a comment is submitted.
|
|
128
|
+
*
|
|
129
|
+
* @param commentId The ID of the updated comment.
|
|
130
|
+
* @param commentContent The updated comment content.
|
|
131
|
+
* @eventName ~BaseCommentView#updateComment
|
|
132
|
+
*/
|
|
133
133
|
export type UIUpdateCommentEvent = {
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
name: "updateComment";
|
|
135
|
+
args: [commentId: string, commentContent: string];
|
|
136
136
|
};
|
|
137
137
|
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
* Fired when a user performed an action that should lead to removing a comment.
|
|
139
|
+
*
|
|
140
|
+
* This event is not fired by default by any component created by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}.
|
|
141
|
+
* If you create a view class extending {@link module:comments/comments/ui/view/basecommentview~BaseCommentView} you should provide
|
|
142
|
+
* a UI element that will fire this event.
|
|
143
|
+
*
|
|
144
|
+
* @param commentId The ID of the removed comment.
|
|
145
|
+
* @eventName ~BaseCommentView#removeComment
|
|
146
|
+
*/
|
|
147
147
|
export type UIRemoveCommentEvent = {
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
name: "removeComment";
|
|
149
|
+
args: [commentId: string];
|
|
150
150
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { View } from
|
|
9
|
-
import type { Locale } from
|
|
6
|
+
* @module comments/comments/ui/view/collapsedcommentsview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from "@ckeditor/ckeditor5-ui";
|
|
9
|
+
import type { Locale } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
export declare class CollapsedCommentsView extends View {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
count: number | undefined;
|
|
12
|
+
constructor(locale: Locale);
|
|
13
13
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { View } from
|
|
9
|
-
import type { Locale } from
|
|
6
|
+
* @module comments/comments/ui/view/commentcontentview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from "@ckeditor/ckeditor5-ui";
|
|
9
|
+
import type { Locale } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
export declare class CommentContentView extends View {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
content: string;
|
|
12
|
+
constructor(locale: Locale);
|
|
13
|
+
override render(): void;
|
|
14
14
|
}
|