@ckeditor/ckeditor5-track-changes 48.2.0 → 48.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/augmentation.d.ts +42 -42
- package/dist/commands/acceptsuggestioncommand.d.ts +19 -19
- package/dist/commands/discardsuggestioncommand.d.ts +19 -19
- package/dist/commands/executeonallsuggestionscommand.d.ts +19 -19
- package/dist/commands/executeonselectedsuggestionscommand.d.ts +19 -19
- package/dist/commands/previewfinalcontentcommand.d.ts +21 -21
- package/dist/commands/trackchangescommand.d.ts +21 -21
- package/dist/index.d.ts +23 -23
- package/dist/index.js +4 -4
- package/dist/integrations/ai.d.ts +12 -12
- package/dist/integrations/aiassistant.d.ts +12 -12
- package/dist/integrations/aiquickactions.d.ts +12 -12
- package/dist/integrations/alignment.d.ts +12 -12
- package/dist/integrations/basicstyles.d.ts +12 -12
- package/dist/integrations/blockquote.d.ts +12 -12
- package/dist/integrations/bookmark.d.ts +12 -12
- package/dist/integrations/casechange.d.ts +12 -12
- package/dist/integrations/ckbox.d.ts +12 -12
- package/dist/integrations/codeblock.d.ts +12 -12
- package/dist/integrations/comments.d.ts +9 -9
- package/dist/integrations/deletecommand.d.ts +12 -12
- package/dist/integrations/emoji.d.ts +12 -12
- package/dist/integrations/entercommand.d.ts +11 -11
- package/dist/integrations/findandreplace.d.ts +16 -16
- package/dist/integrations/font.d.ts +12 -12
- package/dist/integrations/footnotes.d.ts +12 -12
- package/dist/integrations/formatpainter.d.ts +12 -12
- package/dist/integrations/generalhtmlsupport.d.ts +24 -24
- package/dist/integrations/heading.d.ts +12 -12
- package/dist/integrations/highlight.d.ts +12 -12
- package/dist/integrations/horizontalline.d.ts +12 -12
- package/dist/integrations/htmlembed.d.ts +12 -12
- package/dist/integrations/image.d.ts +12 -12
- package/dist/integrations/imagereplace.d.ts +12 -12
- package/dist/integrations/imagestyle.d.ts +12 -12
- package/dist/integrations/importword.d.ts +13 -13
- package/dist/integrations/indent.d.ts +12 -12
- package/dist/integrations/inputcommand.d.ts +11 -11
- package/dist/integrations/legacylist.d.ts +12 -12
- package/dist/integrations/legacylistproperties.d.ts +24 -24
- package/dist/integrations/lineheight.d.ts +12 -12
- package/dist/integrations/link.d.ts +12 -12
- package/dist/integrations/list.d.ts +12 -12
- package/dist/integrations/listproperties.d.ts +15 -15
- package/dist/integrations/mediaembed.d.ts +12 -12
- package/dist/integrations/mediaembedstyle.d.ts +13 -13
- package/dist/integrations/mention.d.ts +12 -12
- package/dist/integrations/mergefields.d.ts +12 -12
- package/dist/integrations/multilevellist.d.ts +19 -19
- package/dist/integrations/pagebreak.d.ts +12 -12
- package/dist/integrations/paragraph.d.ts +12 -12
- package/dist/integrations/removeformat.d.ts +12 -12
- package/dist/integrations/replacesourcecommand.d.ts +13 -13
- package/dist/integrations/restrictededitingmode.d.ts +12 -12
- package/dist/integrations/shiftentercommand.d.ts +9 -9
- package/dist/integrations/standardeditingmode.d.ts +12 -12
- package/dist/integrations/style.d.ts +29 -29
- package/dist/integrations/table.d.ts +34 -34
- package/dist/integrations/tablecaption.d.ts +17 -17
- package/dist/integrations/tableclipboard.d.ts +15 -15
- package/dist/integrations/tablecolumnresize.d.ts +21 -21
- package/dist/integrations/tablefooters.d.ts +17 -17
- package/dist/integrations/tableheadings.d.ts +17 -17
- package/dist/integrations/tablelayout.d.ts +12 -12
- package/dist/integrations/tablemergesplit.d.ts +17 -17
- package/dist/integrations/tableofcontents.d.ts +12 -12
- package/dist/integrations/tableproperties.d.ts +30 -30
- package/dist/integrations/template.d.ts +12 -12
- package/dist/integrations/title.d.ts +12 -12
- package/dist/integrations/undo.d.ts +12 -12
- package/dist/integrations/uploadcare.d.ts +12 -12
- package/dist/integrations/utils.d.ts +8 -8
- package/dist/suggestion.d.ts +285 -283
- package/dist/suggestiondescriptionfactory.d.ts +165 -165
- package/dist/trackchanges.d.ts +178 -178
- package/dist/trackchangesconfig.d.ts +136 -103
- package/dist/trackchangesdata.d.ts +59 -59
- package/dist/trackchangesediting.d.ts +565 -565
- package/dist/trackchangespreview.d.ts +26 -26
- package/dist/trackchangesui.d.ts +52 -52
- 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/ui/suggestioncontroller.d.ts +34 -33
- package/dist/ui/view/basesuggestionthreadview.d.ts +192 -191
- package/dist/ui/view/suggestionthreadview.d.ts +89 -89
- package/dist/ui/view/suggestionview.d.ts +219 -183
- package/dist/ui/view/trackchangespreviewview.d.ts +0 -4
- package/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/utils.d.ts +23 -23
- package/package.json +25 -25
|
@@ -1,190 +1,226 @@
|
|
|
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 { FocusTracker, KeystrokeHandler, type Locale } from
|
|
10
|
-
import { View, type TemplateDefinition, type FocusableView, ViewCollection, FocusCycler } from
|
|
11
|
-
import { LateFocusButtonView, UserView } from
|
|
12
|
-
import { type Suggestion } from
|
|
6
|
+
* @module track-changes/ui/view/suggestionview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import { View, type TemplateDefinition, type FocusableView, ViewCollection, FocusCycler } from "@ckeditor/ckeditor5-ui";
|
|
11
|
+
import { LateFocusButtonView, UserView } from "@ckeditor/ckeditor5-collaboration-core";
|
|
12
|
+
import { type Suggestion } from "../../suggestion.js";
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
* A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
|
|
15
|
+
*
|
|
16
|
+
* This view can be replaced by other view by overwriting the
|
|
17
|
+
* {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionView} configuration.
|
|
18
|
+
*/
|
|
19
19
|
export declare class SuggestionView 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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
20
|
+
/**
|
|
21
|
+
* A suggestion description explaining what has been changed. To be presented to the user.
|
|
22
|
+
*
|
|
23
|
+
* @observable
|
|
24
|
+
*/
|
|
25
|
+
description: string;
|
|
26
|
+
/**
|
|
27
|
+
* A user view for the suggestion author.
|
|
28
|
+
*/
|
|
29
|
+
userView: UserView;
|
|
30
|
+
/**
|
|
31
|
+
* A button view for the button that accepts the suggestion.
|
|
32
|
+
*/
|
|
33
|
+
acceptButton: LateFocusButtonView;
|
|
34
|
+
/**
|
|
35
|
+
* A button view for the button that discards the suggestion.
|
|
36
|
+
*/
|
|
37
|
+
discardButton: LateFocusButtonView;
|
|
38
|
+
/**
|
|
39
|
+
* A collection of focusable child views.
|
|
40
|
+
*/
|
|
41
|
+
readonly focusables: ViewCollection<FocusableView>;
|
|
42
|
+
/**
|
|
43
|
+
* Tracks information about DOM focus in the suggestion.
|
|
44
|
+
*/
|
|
45
|
+
readonly focusTracker: FocusTracker;
|
|
46
|
+
/**
|
|
47
|
+
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
48
|
+
*/
|
|
49
|
+
readonly keystrokes: KeystrokeHandler;
|
|
50
|
+
/**
|
|
51
|
+
* Helps cycling over focusable views in the suggestion.
|
|
52
|
+
*/
|
|
53
|
+
readonly focusCycler: FocusCycler;
|
|
54
|
+
/**
|
|
55
|
+
* Suggestion creation date.
|
|
56
|
+
*
|
|
57
|
+
* @observable
|
|
58
|
+
*/
|
|
59
|
+
authoredAt: Date | null;
|
|
60
|
+
constructor(locale: Locale, model: Suggestion, config: SuggestionConfig);
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
override render(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
67
|
+
*
|
|
68
|
+
* Overwrite this method if you want to set a custom template for the suggestion view.
|
|
69
|
+
*
|
|
70
|
+
* The template looks as follows:
|
|
71
|
+
*
|
|
72
|
+
* ```ts
|
|
73
|
+
* const bind = this.bindTemplate;
|
|
74
|
+
* const suggestionContentElements = [
|
|
75
|
+
* {
|
|
76
|
+
* tag: 'div',
|
|
77
|
+
*
|
|
78
|
+
* attributes: {
|
|
79
|
+
* class: [ 'ck-suggestion__info', 'ck-annotation__info' ]
|
|
80
|
+
* },
|
|
81
|
+
*
|
|
82
|
+
* children: [
|
|
83
|
+
* {
|
|
84
|
+
* tag: 'span',
|
|
85
|
+
*
|
|
86
|
+
* children: [
|
|
87
|
+
* {
|
|
88
|
+
* text: this.userView.name
|
|
89
|
+
* }
|
|
90
|
+
* ],
|
|
91
|
+
*
|
|
92
|
+
* attributes: {
|
|
93
|
+
* class: [ 'ck-suggestion__info-name', 'ck-annotation__info-name' ]
|
|
94
|
+
* }
|
|
95
|
+
* },
|
|
96
|
+
* {
|
|
97
|
+
* tag: 'time',
|
|
98
|
+
*
|
|
99
|
+
* attributes: {
|
|
100
|
+
* datetime: bind.to( 'authoredAt' ),
|
|
101
|
+
* class: [ 'ck-comment__info-time', 'ck-annotation__info-time' ]
|
|
102
|
+
* },
|
|
103
|
+
*
|
|
104
|
+
* children: [
|
|
105
|
+
* {
|
|
106
|
+
* text: bind.to( 'authoredAt', value => this._config.formatDateTime( value ) )
|
|
107
|
+
* }
|
|
108
|
+
* ]
|
|
109
|
+
* }
|
|
110
|
+
* ]
|
|
111
|
+
* },
|
|
112
|
+
* {
|
|
113
|
+
* tag: 'div',
|
|
114
|
+
*
|
|
115
|
+
* attributes: {
|
|
116
|
+
* class: [ 'ck-suggestion__actions', 'ck-annotation__actions' ]
|
|
117
|
+
* },
|
|
118
|
+
*
|
|
119
|
+
* children: [
|
|
120
|
+
* this.acceptButton,
|
|
121
|
+
* this.discardButton
|
|
122
|
+
* ]
|
|
123
|
+
* },
|
|
124
|
+
* {
|
|
125
|
+
* tag: 'div',
|
|
126
|
+
*
|
|
127
|
+
* attributes: {
|
|
128
|
+
* class: [ 'ck-annotation__content-wrapper' ]
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
* ];
|
|
132
|
+
*
|
|
133
|
+
* if ( this._model.isExternal ) {
|
|
134
|
+
* suggestionContentElements.push( {
|
|
135
|
+
* tag: 'div',
|
|
136
|
+
*
|
|
137
|
+
* attributes: {
|
|
138
|
+
* class: [ 'ck-comment__external' ]
|
|
139
|
+
* },
|
|
140
|
+
*
|
|
141
|
+
* children: [ {
|
|
142
|
+
* text: this.getExternalSuggestionNote()
|
|
143
|
+
* } ]
|
|
144
|
+
* } );
|
|
145
|
+
* }
|
|
146
|
+
*
|
|
147
|
+
* if ( this._model.aiSource && this._config.showAISource ) {
|
|
148
|
+
* const pillView = new PillView( this.locale );
|
|
149
|
+
*
|
|
150
|
+
* pillView.set( {
|
|
151
|
+
* icon: IconSparkle,
|
|
152
|
+
* label: getTranslation( this.locale, 'AI_SOURCE_PILL_LABEL' ),
|
|
153
|
+
* tooltip: getTranslation( this.locale, 'AI_SOURCE_PILL_TOOLTIP' ),
|
|
154
|
+
* class: 'ck-pill_ai'
|
|
155
|
+
* } );
|
|
156
|
+
*
|
|
157
|
+
* suggestionContentElements.push( {
|
|
158
|
+
* tag: 'div',
|
|
159
|
+
*
|
|
160
|
+
* attributes: {
|
|
161
|
+
* class: [ 'ck-suggestion__ai-source-pill' ]
|
|
162
|
+
* },
|
|
163
|
+
*
|
|
164
|
+
* children: [ pillView ]
|
|
165
|
+
* } );
|
|
166
|
+
* }
|
|
167
|
+
*
|
|
168
|
+
* return {
|
|
169
|
+
* tag: 'div',
|
|
170
|
+
*
|
|
171
|
+
* attributes: {
|
|
172
|
+
* class: [
|
|
173
|
+
* 'ck-suggestion',
|
|
174
|
+
* 'ck-annotation'
|
|
175
|
+
* ],
|
|
176
|
+
* tabindex: -1
|
|
177
|
+
* },
|
|
178
|
+
*
|
|
179
|
+
* children: [
|
|
180
|
+
* this.userView,
|
|
181
|
+
* {
|
|
182
|
+
* tag: 'div',
|
|
183
|
+
*
|
|
184
|
+
* attributes: {
|
|
185
|
+
* class: [ 'ck-suggestion__main', 'ck-annotation__main' ],
|
|
186
|
+
* role: 'presentation'
|
|
187
|
+
* },
|
|
188
|
+
*
|
|
189
|
+
* children: suggestionContentElements
|
|
190
|
+
* }
|
|
191
|
+
* ]
|
|
192
|
+
* };
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
getTemplate(): TemplateDefinition;
|
|
196
|
+
/**
|
|
197
|
+
* @inheritDoc
|
|
198
|
+
*/
|
|
199
|
+
focus(): void;
|
|
200
|
+
/**
|
|
201
|
+
* Gets the translated notification text which indicates that the author name comes from an external source.
|
|
202
|
+
*/
|
|
203
|
+
getUserViewNotificationText(): string | null;
|
|
204
|
+
/**
|
|
205
|
+
* Gets the translated note which indicates that the suggestion comes from an external source.
|
|
206
|
+
*/
|
|
207
|
+
getExternalSuggestionNote(): string;
|
|
187
208
|
}
|
|
188
209
|
export interface SuggestionConfig {
|
|
189
|
-
|
|
210
|
+
formatDateTime: (date: Date | string) => string;
|
|
211
|
+
/**
|
|
212
|
+
* How the AI source of an AI-authored suggestion should be surfaced in the view.
|
|
213
|
+
*
|
|
214
|
+
* See {@link module:track-changes/trackchangesconfig~TrackChangesConfig#showAISource}.
|
|
215
|
+
*/
|
|
216
|
+
showAISource: "pill" | "author" | null;
|
|
217
|
+
/**
|
|
218
|
+
* The view-only identity used to render AI-sourced suggestions when {@link #showAISource} is `'author'`.
|
|
219
|
+
*
|
|
220
|
+
* See {@link module:track-changes/trackchangesconfig~TrackChangesConfig#aiAuthor}.
|
|
221
|
+
*/
|
|
222
|
+
aiAuthor: {
|
|
223
|
+
name: string;
|
|
224
|
+
avatar?: string;
|
|
225
|
+
};
|
|
190
226
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { type Locale } from
|
|
6
|
+
* @module track-changes/utils/common-translations
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from "@ckeditor/ckeditor5-utils";
|
|
9
9
|
export declare function getTranslation(locale: Locale, id: string, values?: number | string | ReadonlyArray<number | string>): string;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
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 type { Command } from
|
|
9
|
-
import type { ModelDocumentSelection, Model } from
|
|
10
|
-
import { type Suggestion } from
|
|
11
|
-
import type { SuggestionDescription } from
|
|
6
|
+
* @module track-changes/utils/utils
|
|
7
|
+
*/
|
|
8
|
+
import type { Command } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import type { ModelDocumentSelection, Model } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import { type Suggestion } from "../suggestion.js";
|
|
11
|
+
import type { SuggestionDescription } from "../suggestiondescriptionfactory.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* Used in tests for easy suggestion comparison.
|
|
14
|
+
*/
|
|
15
15
|
export declare function normalizeDescription(description: Array<SuggestionDescription> | SuggestionDescription): string;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Renders a rich HTML description out of primitive description string.
|
|
18
|
+
*/
|
|
19
19
|
export declare function renderDescription(description: string, color?: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
value: string;
|
|
21
|
+
title: string;
|
|
22
22
|
}): string;
|
|
23
23
|
export declare function sortSuggestions(suggestions: Array<Suggestion>): Array<Suggestion>;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* From the list of passed `suggestions` returns those that are selected by given `selection`.
|
|
26
|
+
*/
|
|
27
27
|
export declare function getSelectedSuggestions(selection: ModelDocumentSelection, suggestions: Array<Suggestion>): Set<Suggestion>;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* How many suggestion actions should be put into one batch when multiple suggestions are accepted or discarded.
|
|
30
|
+
*/
|
|
31
31
|
export declare const MAX_SUGGESTION_ACTIONS_IN_BATCH = 100;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
* Executes given `command` for given `suggestions`. If there is a lot of suggestions, the command executions is split into batches.
|
|
34
|
+
* There is at most `MAX_SUGGESTION_ACTIONS_IN_BATCH` exeuctions in one batch. As a result, this limits number of actions to be done
|
|
35
|
+
* in one undo step but may create multiple undo steps.
|
|
36
|
+
*/
|
|
37
37
|
export declare function executeCommandForSuggestions(model: Model, command: Command, suggestions: Array<Suggestion>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-track-changes",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.3.0-alpha.1",
|
|
4
4
|
"description": "CKEditor 5 track changes plugin.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -36,30 +36,30 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ckeditor/ckeditor5-clipboard": "48.
|
|
40
|
-
"@ckeditor/ckeditor5-code-block": "48.
|
|
41
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.
|
|
42
|
-
"@ckeditor/ckeditor5-comments": "48.
|
|
43
|
-
"@ckeditor/ckeditor5-core": "48.
|
|
44
|
-
"@ckeditor/ckeditor5-editor-multi-root": "48.
|
|
45
|
-
"@ckeditor/ckeditor5-engine": "48.
|
|
46
|
-
"@ckeditor/ckeditor5-enter": "48.
|
|
47
|
-
"@ckeditor/ckeditor5-find-and-replace": "48.
|
|
48
|
-
"@ckeditor/ckeditor5-font": "48.
|
|
49
|
-
"@ckeditor/ckeditor5-heading": "48.
|
|
50
|
-
"@ckeditor/ckeditor5-highlight": "48.
|
|
51
|
-
"@ckeditor/ckeditor5-html-support": "48.
|
|
52
|
-
"@ckeditor/ckeditor5-icons": "48.
|
|
53
|
-
"@ckeditor/ckeditor5-image": "48.
|
|
54
|
-
"@ckeditor/ckeditor5-link": "48.
|
|
55
|
-
"@ckeditor/ckeditor5-list": "48.
|
|
56
|
-
"@ckeditor/ckeditor5-media-embed": "48.
|
|
57
|
-
"@ckeditor/ckeditor5-merge-fields": "48.
|
|
58
|
-
"@ckeditor/ckeditor5-restricted-editing": "48.
|
|
59
|
-
"@ckeditor/ckeditor5-table": "48.
|
|
60
|
-
"@ckeditor/ckeditor5-typing": "48.
|
|
61
|
-
"@ckeditor/ckeditor5-ui": "48.
|
|
62
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
39
|
+
"@ckeditor/ckeditor5-clipboard": "48.3.0-alpha.1",
|
|
40
|
+
"@ckeditor/ckeditor5-code-block": "48.3.0-alpha.1",
|
|
41
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.3.0-alpha.1",
|
|
42
|
+
"@ckeditor/ckeditor5-comments": "48.3.0-alpha.1",
|
|
43
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
|
|
44
|
+
"@ckeditor/ckeditor5-editor-multi-root": "48.3.0-alpha.1",
|
|
45
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
|
|
46
|
+
"@ckeditor/ckeditor5-enter": "48.3.0-alpha.1",
|
|
47
|
+
"@ckeditor/ckeditor5-find-and-replace": "48.3.0-alpha.1",
|
|
48
|
+
"@ckeditor/ckeditor5-font": "48.3.0-alpha.1",
|
|
49
|
+
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.1",
|
|
50
|
+
"@ckeditor/ckeditor5-highlight": "48.3.0-alpha.1",
|
|
51
|
+
"@ckeditor/ckeditor5-html-support": "48.3.0-alpha.1",
|
|
52
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
|
|
53
|
+
"@ckeditor/ckeditor5-image": "48.3.0-alpha.1",
|
|
54
|
+
"@ckeditor/ckeditor5-link": "48.3.0-alpha.1",
|
|
55
|
+
"@ckeditor/ckeditor5-list": "48.3.0-alpha.1",
|
|
56
|
+
"@ckeditor/ckeditor5-media-embed": "48.3.0-alpha.1",
|
|
57
|
+
"@ckeditor/ckeditor5-merge-fields": "48.3.0-alpha.1",
|
|
58
|
+
"@ckeditor/ckeditor5-restricted-editing": "48.3.0-alpha.1",
|
|
59
|
+
"@ckeditor/ckeditor5-table": "48.3.0-alpha.1",
|
|
60
|
+
"@ckeditor/ckeditor5-typing": "48.3.0-alpha.1",
|
|
61
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
|
|
62
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.1",
|
|
63
63
|
"es-toolkit": "1.45.1"
|
|
64
64
|
},
|
|
65
65
|
"files": [
|