@ckeditor/ckeditor5-track-changes 41.2.0 → 41.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/track-changes.js +1 -1
- package/dist/content-index.css +332 -0
- package/dist/editor-index.css +312 -0
- package/dist/index.css +951 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/types/augmentation.d.ts +44 -0
- package/dist/types/commands/acceptsuggestioncommand.d.ts +28 -0
- package/dist/types/commands/discardsuggestioncommand.d.ts +28 -0
- package/dist/types/commands/executeonallsuggestionscommand.d.ts +28 -0
- package/dist/types/commands/executeonselectedsuggestionscommand.d.ts +28 -0
- package/dist/types/commands/trackchangescommand.d.ts +30 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/integrations/aiassistant.d.ts +21 -0
- package/dist/types/integrations/alignment.d.ts +21 -0
- package/dist/types/integrations/basicstyles.d.ts +21 -0
- package/dist/types/integrations/blockquote.d.ts +21 -0
- package/dist/types/integrations/casechange.d.ts +21 -0
- package/dist/types/integrations/ckbox.d.ts +21 -0
- package/dist/types/integrations/codeblock.d.ts +21 -0
- package/dist/types/integrations/comments.d.ts +18 -0
- package/dist/types/integrations/deletecommand.d.ts +21 -0
- package/dist/types/integrations/entercommand.d.ts +20 -0
- package/dist/types/integrations/findandreplace.d.ts +25 -0
- package/dist/types/integrations/font.d.ts +21 -0
- package/dist/types/integrations/formatpainter.d.ts +21 -0
- package/dist/types/integrations/heading.d.ts +21 -0
- package/dist/types/integrations/highlight.d.ts +21 -0
- package/dist/types/integrations/horizontalline.d.ts +21 -0
- package/dist/types/integrations/htmlembed.d.ts +21 -0
- package/dist/types/integrations/image.d.ts +21 -0
- package/dist/types/integrations/imagereplace.d.ts +21 -0
- package/dist/types/integrations/imagestyle.d.ts +21 -0
- package/dist/types/integrations/importword.d.ts +22 -0
- package/dist/types/integrations/indent.d.ts +21 -0
- package/dist/types/integrations/inputcommand.d.ts +20 -0
- package/dist/types/integrations/legacylist.d.ts +21 -0
- package/dist/types/integrations/legacylistproperties.d.ts +33 -0
- package/dist/types/integrations/link.d.ts +21 -0
- package/dist/types/integrations/list.d.ts +21 -0
- package/dist/types/integrations/listproperties.d.ts +24 -0
- package/dist/types/integrations/mediaembed.d.ts +21 -0
- package/dist/types/integrations/mention.d.ts +21 -0
- package/dist/types/integrations/pagebreak.d.ts +21 -0
- package/dist/types/integrations/paragraph.d.ts +21 -0
- package/dist/types/integrations/removeformat.d.ts +21 -0
- package/dist/types/integrations/restrictededitingmode.d.ts +21 -0
- package/dist/types/integrations/shiftentercommand.d.ts +20 -0
- package/dist/types/integrations/standardeditingmode.d.ts +21 -0
- package/dist/types/integrations/style.d.ts +21 -0
- package/dist/types/integrations/table.d.ts +46 -0
- package/dist/types/integrations/tablecaption.d.ts +26 -0
- package/dist/types/integrations/tableclipboard.d.ts +23 -0
- package/dist/types/integrations/tablecolumnresize.d.ts +30 -0
- package/dist/types/integrations/tableheadings.d.ts +26 -0
- package/dist/types/integrations/tablemergesplit.d.ts +26 -0
- package/dist/types/integrations/tableofcontents.d.ts +21 -0
- package/dist/types/integrations/tableproperties.d.ts +31 -0
- package/dist/types/integrations/template.d.ts +21 -0
- package/dist/types/integrations/title.d.ts +21 -0
- package/dist/types/integrations/undo.d.ts +21 -0
- package/dist/types/integrations/utils.d.ts +25 -0
- package/dist/types/suggestion.d.ts +295 -0
- package/dist/types/suggestiondescriptionfactory.d.ts +187 -0
- package/dist/types/trackchanges.d.ts +184 -0
- package/dist/types/trackchangesconfig.d.ts +82 -0
- package/dist/types/trackchangesdata.d.ts +45 -0
- package/dist/types/trackchangesediting.d.ts +529 -0
- package/dist/types/trackchangesui.d.ts +42 -0
- package/dist/types/ui/suggestioncontroller.d.ts +41 -0
- package/dist/types/ui/view/basesuggestionthreadview.d.ts +174 -0
- package/dist/types/ui/view/suggestionthreadview.d.ts +186 -0
- package/dist/types/utils/common-translations.d.ts +13 -0
- package/dist/types/utils/utils.d.ts +34 -0
- package/package.json +4 -3
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/executeonallsuggestionscommand.js +1 -1
- package/src/commands/executeonselectedsuggestionscommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/index.js +1 -1
- package/src/integrations/aiassistant.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/casechange.js +1 -1
- package/src/integrations/ckbox.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/findandreplace.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/formatpainter.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/htmlembed.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/imagereplace.js +1 -1
- package/src/integrations/imagestyle.js +1 -1
- package/src/integrations/importword.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/legacylist.js +1 -1
- package/src/integrations/legacylistproperties.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/listproperties.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/style.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tablecaption.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tablecolumnresize.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/tableofcontents.js +1 -1
- package/src/integrations/tableproperties.js +1 -1
- package/src/integrations/template.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/utils.js +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module track-changes/trackchangesui
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import { Users } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
14
|
+
import TrackChangesEditing from './trackchangesediting.js';
|
|
15
|
+
/**
|
|
16
|
+
* Provides UI for track changes plugin.
|
|
17
|
+
*
|
|
18
|
+
* This plugin displays {@link module:track-changes/suggestion~Suggestion suggestions} as a
|
|
19
|
+
* {@link module:comments/annotations/annotations~Annotations}.
|
|
20
|
+
*/
|
|
21
|
+
export default class TrackChangesUI extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get requires(): readonly [typeof TrackChangesEditing, typeof Users, "CommentsRepository", "Annotations", "EditorAnnotations"];
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "TrackChangesUI";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
constructor(editor: Editor);
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type Suggestion from '../suggestion.js';
|
|
11
|
+
import type BaseSuggestionThreadView from './view/basesuggestionthreadview.js';
|
|
12
|
+
import type { CommentThreadController } from '@ckeditor/ckeditor5-comments';
|
|
13
|
+
declare const SuggestionController_base: {
|
|
14
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
15
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A controller for a suggestion.
|
|
19
|
+
*
|
|
20
|
+
* It takes a suggestion thread view, listens to events fired by that view and based on them performs actions
|
|
21
|
+
* on the provided suggestion model.
|
|
22
|
+
*/
|
|
23
|
+
export default class SuggestionController extends SuggestionController_base {
|
|
24
|
+
model: Suggestion;
|
|
25
|
+
view: BaseSuggestionThreadView;
|
|
26
|
+
commentThreadController: CommentThreadController;
|
|
27
|
+
constructor(editor: Editor, model: Suggestion, view: BaseSuggestionThreadView, commentThreadController: CommentThreadController);
|
|
28
|
+
/**
|
|
29
|
+
* Accepts the suggestion that belongs to this controller.
|
|
30
|
+
*/
|
|
31
|
+
acceptSuggestion(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Discards the suggestion that belongs to this controller.
|
|
34
|
+
*/
|
|
35
|
+
discardSuggestion(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Destroys `SuggestionController` instance.
|
|
38
|
+
*/
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module track-changes/ui/view/basesuggestionthreadview
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
14
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
15
|
+
import type { EditorConfig } from 'ckeditor5/src/core.js';
|
|
16
|
+
import type Suggestion from '../../suggestion.js';
|
|
17
|
+
import type { CommentsListView, CommentThreadInputView, CommentView } from '@ckeditor/ckeditor5-comments';
|
|
18
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
19
|
+
import type { Description } from '../../suggestiondescriptionfactory.js';
|
|
20
|
+
/**
|
|
21
|
+
* An abstract suggestion thread view class that should be used as a base for suggestion thread view implementations.
|
|
22
|
+
* It provides some behaviors, flags and building blocks to use when creating a custom suggestion thread view class.
|
|
23
|
+
*
|
|
24
|
+
* All events fired by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}
|
|
25
|
+
* are delegated to {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView}.
|
|
26
|
+
* This means that {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView} can also fire these
|
|
27
|
+
* events to communicate with CKEditor 5 collaboration features.
|
|
28
|
+
*
|
|
29
|
+
* For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view
|
|
30
|
+
* Annotations custom view} guide.
|
|
31
|
+
*/
|
|
32
|
+
export default abstract class BaseSuggestionThreadView extends View {
|
|
33
|
+
/**
|
|
34
|
+
* The list of comment views. It should be used as a part of the view template when present.
|
|
35
|
+
*/
|
|
36
|
+
commentsListView: CommentsListView | null;
|
|
37
|
+
/**
|
|
38
|
+
* The comment input area view. It should be used as a part of the view template when present.
|
|
39
|
+
*/
|
|
40
|
+
commentThreadInputView: CommentThreadInputView | null;
|
|
41
|
+
/**
|
|
42
|
+
* A boolean value that informs if the comment thread view is in the active state ("highlighted").
|
|
43
|
+
* A comment thread view is in this state when it is focused or was activated by the user in any different way.
|
|
44
|
+
*
|
|
45
|
+
* @observable
|
|
46
|
+
*/
|
|
47
|
+
isActive: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Suggestion creation date.
|
|
50
|
+
*
|
|
51
|
+
* @observable
|
|
52
|
+
*/
|
|
53
|
+
authoredAt: Date | null;
|
|
54
|
+
/**
|
|
55
|
+
* Flag that indicates whether suggestion acceptation is possible.
|
|
56
|
+
*
|
|
57
|
+
* @observable
|
|
58
|
+
*/
|
|
59
|
+
canAccept: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Flag that indicates whether suggestion discarding is possible.
|
|
62
|
+
*
|
|
63
|
+
* @observable
|
|
64
|
+
*/
|
|
65
|
+
canDiscard: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Stores description entries generated for this suggestion that describe what is the suggested change.
|
|
68
|
+
* They are used to create the final description presented in the suggestion view to the user.
|
|
69
|
+
*
|
|
70
|
+
* Note that one suggestion may include multiple changes.
|
|
71
|
+
*
|
|
72
|
+
* Most cases are simple and include just one description item:
|
|
73
|
+
*
|
|
74
|
+
* ```ts
|
|
75
|
+
* [
|
|
76
|
+
* { type: 'insertion', content: '*Insert:* "Foo"' }
|
|
77
|
+
* ]
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* This description item represents a suggestion for inserting the "Foo" text. The `type` property describes the performed action
|
|
81
|
+
* while the `content` property contains additional information about the action and is optional.
|
|
82
|
+
*
|
|
83
|
+
* A more complex example is presented below:
|
|
84
|
+
*
|
|
85
|
+
* ```ts
|
|
86
|
+
* [
|
|
87
|
+
* { type: 'insertion', content: '*Insert:* 2 paragraphs' },
|
|
88
|
+
* { type: 'insertion', content: '*Insert:* image' },
|
|
89
|
+
* { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
|
|
90
|
+
* ]
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* In this example, there are three description instances (or lines). Two new (empty) paragraphs were added,
|
|
94
|
+
* an image was added and then "Foo" text was replaced by "Bar". The above structure could be rendered as:
|
|
95
|
+
*
|
|
96
|
+
* ```html
|
|
97
|
+
* <p><strong>Insert:</strong> 2 paragraphs</p>
|
|
98
|
+
* <p><strong>Insert:</strong> image</p>
|
|
99
|
+
* <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @observable
|
|
103
|
+
*/
|
|
104
|
+
descriptionParts: Array<Description>;
|
|
105
|
+
/**
|
|
106
|
+
* Informs whether the suggestion thread has any changes that have not been saved.
|
|
107
|
+
*
|
|
108
|
+
* @observable
|
|
109
|
+
*/
|
|
110
|
+
isDirty: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Informs whether the suggestion can be accepted or discarded.
|
|
113
|
+
*
|
|
114
|
+
* @observable
|
|
115
|
+
*/
|
|
116
|
+
isEnabled: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* The number of items in the view, where the suggestion itself counts as one.
|
|
119
|
+
*
|
|
120
|
+
* In other words, it is equal to the number of comments in the suggestion thread view plus one.
|
|
121
|
+
*
|
|
122
|
+
* @observable
|
|
123
|
+
*/
|
|
124
|
+
readonly length: number;
|
|
125
|
+
constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
|
|
126
|
+
/**
|
|
127
|
+
* Focuses the view.
|
|
128
|
+
*/
|
|
129
|
+
focus(): void;
|
|
130
|
+
/**
|
|
131
|
+
* @inheritDoc
|
|
132
|
+
*/
|
|
133
|
+
destroy(): void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Fired when a user performed an action that should lead to accepting the suggestion.
|
|
137
|
+
*
|
|
138
|
+
* This event is not fired by default by any component created by `BaseSuggestionThreadView`.
|
|
139
|
+
* If you create a view class extending `BaseSuggestionCommentView`, you should provide
|
|
140
|
+
* a UI element that will fire this event.
|
|
141
|
+
*
|
|
142
|
+
* @eventName ~BaseSuggestionThreadView#acceptSuggestion
|
|
143
|
+
*/
|
|
144
|
+
export type AcceptSuggestionEvent = {
|
|
145
|
+
name: 'acceptSuggestion';
|
|
146
|
+
args: [];
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Fired when a user performed an action that should lead to discarding the suggestion.
|
|
150
|
+
*
|
|
151
|
+
* This event is not fired by default by any component created by `BaseSuggestionThreadView`.
|
|
152
|
+
* If you create a view class extending `BaseSuggestionCommentView`, you should provide
|
|
153
|
+
* a UI element that will fire this event.
|
|
154
|
+
*
|
|
155
|
+
* @eventName ~BaseSuggestionThreadView#discardSuggestion
|
|
156
|
+
*/
|
|
157
|
+
export type DiscardSuggestionEvent = {
|
|
158
|
+
name: 'discardSuggestion';
|
|
159
|
+
args: [];
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Config used for suggestion thread views.
|
|
163
|
+
*/
|
|
164
|
+
export interface SuggestionThreadConfig {
|
|
165
|
+
disableComments: boolean;
|
|
166
|
+
editorConfig: EditorConfig;
|
|
167
|
+
maxCommentsWhenCollapsed: number;
|
|
168
|
+
maxThreadTotalWeight: number;
|
|
169
|
+
maxCommentCharsWhenCollapsed: number;
|
|
170
|
+
formatDateTime: (date: Date | string) => string;
|
|
171
|
+
CommentView: typeof CommentView;
|
|
172
|
+
CommentsListView: typeof CommentsListView;
|
|
173
|
+
CommentThreadInputView: typeof CommentThreadInputView;
|
|
174
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import { default as BaseSuggestionThreadView, type SuggestionThreadConfig } from './basesuggestionthreadview.js';
|
|
10
|
+
import { ButtonView, type TemplateDefinition } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
12
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
+
import type Suggestion from '../../suggestion.js';
|
|
14
|
+
/**
|
|
15
|
+
* The default view for a suggestion thread.
|
|
16
|
+
*
|
|
17
|
+
* This view can be replaced by other view by overwriting the
|
|
18
|
+
* {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionThreadView} configuration.
|
|
19
|
+
*/
|
|
20
|
+
export default class SuggestionThreadView extends BaseSuggestionThreadView {
|
|
21
|
+
/**
|
|
22
|
+
* The suggestion thread view type.
|
|
23
|
+
*
|
|
24
|
+
* This value is not equal to the suggestion (model) type. It is evaluated based on the type of the first suggestion for
|
|
25
|
+
* the suggestion thread view template purposes.
|
|
26
|
+
*
|
|
27
|
+
* @observable
|
|
28
|
+
*/
|
|
29
|
+
type: 'format' | 'replace' | 'deletion' | 'insertion' | '';
|
|
30
|
+
/**
|
|
31
|
+
* A suggestion description explaining what has been changed. To be presented to the user.
|
|
32
|
+
*
|
|
33
|
+
* @observable
|
|
34
|
+
*/
|
|
35
|
+
description: string;
|
|
36
|
+
/**
|
|
37
|
+
* A user view for the suggestion author.
|
|
38
|
+
*/
|
|
39
|
+
userView: UserView;
|
|
40
|
+
/**
|
|
41
|
+
* A button view for the button that accepts the suggestion.
|
|
42
|
+
*/
|
|
43
|
+
acceptButton: ButtonView | null;
|
|
44
|
+
/**
|
|
45
|
+
* A button view for the button that discards the suggestion.
|
|
46
|
+
*/
|
|
47
|
+
discardButton: ButtonView | null;
|
|
48
|
+
constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
|
|
49
|
+
/**
|
|
50
|
+
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
51
|
+
*
|
|
52
|
+
* Overwrite this method if you want to set a custom template for the suggestion thread view.
|
|
53
|
+
*
|
|
54
|
+
* The template looks as follows:
|
|
55
|
+
*
|
|
56
|
+
* ```ts
|
|
57
|
+
* {
|
|
58
|
+
* tag: 'div',
|
|
59
|
+
* attributes: {
|
|
60
|
+
* class: [
|
|
61
|
+
* 'ck-suggestion-wrapper',
|
|
62
|
+
* bind.if( 'isActive', 'ck-suggestion-wrapper--active' ),
|
|
63
|
+
* bind.to( 'type', value => `ck-suggestion-${ value }` ),
|
|
64
|
+
* this._config.disableComments && 'ck-suggestion--disabled-comments'
|
|
65
|
+
* ],
|
|
66
|
+
* 'data-suggestion-id': this._model.id,
|
|
67
|
+
* 'data-thread-id': this._model.commentThread.id,
|
|
68
|
+
* 'data-author-id': this._model.author.id,
|
|
69
|
+
* // Needed for managing focus after adding a new comment.
|
|
70
|
+
* tabindex: -1
|
|
71
|
+
* },
|
|
72
|
+
* children: [
|
|
73
|
+
* {
|
|
74
|
+
* tag: 'div',
|
|
75
|
+
*
|
|
76
|
+
* attributes: {
|
|
77
|
+
* class: [
|
|
78
|
+
* 'ck-suggestion',
|
|
79
|
+
* 'ck-annotation'
|
|
80
|
+
* ]
|
|
81
|
+
* },
|
|
82
|
+
*
|
|
83
|
+
* children: [
|
|
84
|
+
* this.userView,
|
|
85
|
+
* {
|
|
86
|
+
* tag: 'div',
|
|
87
|
+
*
|
|
88
|
+
* attributes: {
|
|
89
|
+
* class: [ 'ck-suggestion__main', 'ck-annotation__main' ]
|
|
90
|
+
* },
|
|
91
|
+
*
|
|
92
|
+
* children: [
|
|
93
|
+
* {
|
|
94
|
+
* tag: 'div',
|
|
95
|
+
*
|
|
96
|
+
* attributes: {
|
|
97
|
+
* class: [ 'ck-suggestion__info', 'ck-annotation__info' ]
|
|
98
|
+
* },
|
|
99
|
+
*
|
|
100
|
+
* children: [
|
|
101
|
+
* {
|
|
102
|
+
* tag: 'span',
|
|
103
|
+
*
|
|
104
|
+
* children: [
|
|
105
|
+
* {
|
|
106
|
+
* text: this.userView.name
|
|
107
|
+
* }
|
|
108
|
+
* ],
|
|
109
|
+
*
|
|
110
|
+
* attributes: {
|
|
111
|
+
* class: [ 'ck-suggestion__info-name', 'ck-annotation__info-name' ]
|
|
112
|
+
* }
|
|
113
|
+
* },
|
|
114
|
+
* {
|
|
115
|
+
* tag: 'time',
|
|
116
|
+
*
|
|
117
|
+
* attributes: {
|
|
118
|
+
* datetime: bind.to( 'authoredAt' ),
|
|
119
|
+
* class: [ 'ck-comment__info-time', 'ck-annotation__info-time' ]
|
|
120
|
+
* },
|
|
121
|
+
*
|
|
122
|
+
* children: [
|
|
123
|
+
* {
|
|
124
|
+
* text: bind.to( 'authoredAt', value => this._config.formatDateTime( value ) )
|
|
125
|
+
* }
|
|
126
|
+
* ]
|
|
127
|
+
* }
|
|
128
|
+
* ]
|
|
129
|
+
* },
|
|
130
|
+
* {
|
|
131
|
+
* tag: 'div',
|
|
132
|
+
*
|
|
133
|
+
* attributes: {
|
|
134
|
+
* class: [
|
|
135
|
+
* 'ck-suggestion__actions',
|
|
136
|
+
* 'ck-annotation__actions'
|
|
137
|
+
* ]
|
|
138
|
+
* },
|
|
139
|
+
*
|
|
140
|
+
* children: [
|
|
141
|
+
* this.acceptButton,
|
|
142
|
+
* this.discardButton
|
|
143
|
+
* ]
|
|
144
|
+
* },
|
|
145
|
+
* {
|
|
146
|
+
* tag: 'div',
|
|
147
|
+
*
|
|
148
|
+
* attributes: {
|
|
149
|
+
* class: [ 'ck-annotation__content-wrapper' ]
|
|
150
|
+
* }
|
|
151
|
+
* },
|
|
152
|
+
* {
|
|
153
|
+
* tag: 'div',
|
|
154
|
+
*
|
|
155
|
+
* attributes: {
|
|
156
|
+
* class: [ 'ck-comment__external' ]
|
|
157
|
+
* },
|
|
158
|
+
*
|
|
159
|
+
* children: [ {
|
|
160
|
+
* text: getTranslation( this.locale, 'EXTERNAL_SUGGESTION' )
|
|
161
|
+
* } ]
|
|
162
|
+
* }
|
|
163
|
+
* ]
|
|
164
|
+
* }
|
|
165
|
+
* ]
|
|
166
|
+
* },
|
|
167
|
+
* this.commentsListView,
|
|
168
|
+
* this.commentThreadInputView
|
|
169
|
+
* ]
|
|
170
|
+
* }
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
getTemplate(): TemplateDefinition;
|
|
174
|
+
/**
|
|
175
|
+
* @inheritDoc
|
|
176
|
+
*/
|
|
177
|
+
render(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the translated note which indicates that the suggestion comes from an external source.
|
|
180
|
+
*/
|
|
181
|
+
getExternalSuggestionNote(): string;
|
|
182
|
+
/**
|
|
183
|
+
* Gets the translated notification text which indicates that the author name comes from an external source.
|
|
184
|
+
*/
|
|
185
|
+
getUserViewNotificationText(): string | null;
|
|
186
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module track-changes/utils/common-translations
|
|
11
|
+
*/
|
|
12
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
+
export declare function getTranslation(locale: Locale, id: string, values?: number | string | ReadonlyArray<number | string>): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module track-changes/utils/utils
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { DocumentSelection, Model } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import type Suggestion from '../suggestion.js';
|
|
15
|
+
import type { Description } from '../suggestiondescriptionfactory.js';
|
|
16
|
+
/**
|
|
17
|
+
* Used in tests for easy suggestion comparison.
|
|
18
|
+
*/
|
|
19
|
+
export declare function normalizeDescription(description: Array<Description> | Description): string;
|
|
20
|
+
export declare function sortSuggestions(suggestions: Array<Suggestion>): Array<Suggestion>;
|
|
21
|
+
/**
|
|
22
|
+
* From the list of passed `suggestions` returns those that are selected by given `selection`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSelectedSuggestions(selection: DocumentSelection, suggestions: Array<Suggestion>): Set<Suggestion>;
|
|
25
|
+
/**
|
|
26
|
+
* How many suggestion actions should be put into one batch when multiple suggestions are accepted or discarded.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MAX_SUGGESTION_ACTIONS_IN_BATCH = 100;
|
|
29
|
+
/**
|
|
30
|
+
* Executes given `command` for given `suggestions`. If there is a lot of suggestions, the command executions is split into batches.
|
|
31
|
+
* There is at most `MAX_SUGGESTION_ACTIONS_IN_BATCH` exeuctions in one batch. As a result, this limits number of actions to be done
|
|
32
|
+
* in one undo step but may create multiple undo steps.
|
|
33
|
+
*/
|
|
34
|
+
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": "41.
|
|
3
|
+
"version": "41.3.0-alpha.2",
|
|
4
4
|
"description": "CKEditor 5 track changes plugin.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"main": "src/index.js",
|
|
33
33
|
"files": [
|
|
34
34
|
"build",
|
|
35
|
+
"dist",
|
|
35
36
|
"lang",
|
|
36
37
|
"src/**/*.js",
|
|
37
38
|
"src/**/*.d.ts",
|
|
@@ -40,8 +41,8 @@
|
|
|
40
41
|
"CHANGELOG.md"
|
|
41
42
|
],
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"ckeditor5": "41.
|
|
44
|
-
"ckeditor5-collaboration": "41.
|
|
44
|
+
"ckeditor5": "41.3.0-alpha.2",
|
|
45
|
+
"ckeditor5-collaboration": "41.3.0-alpha.2",
|
|
45
46
|
"lodash-es": "4.17.21"
|
|
46
47
|
},
|
|
47
48
|
"types": "src/index.d.ts",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x241acc=_0x341c;(function(_0x1b202c,_0x18679e){const _0x18c91c=_0x341c,_0x26435a=_0x1b202c();while(!![]){try{const _0x4fdc00=-parseInt(_0x18c91c(0x1b8))/0x1*(parseInt(_0x18c91c(0x1c6))/0x2)+parseInt(_0x18c91c(0x1c5))/0x3*(-parseInt(_0x18c91c(0x1bf))/0x4)+parseInt(_0x18c91c(0x1c0))/0x5+parseInt(_0x18c91c(0x1b9))/0x6+parseInt(_0x18c91c(0x1c4))/0x7+-parseInt(_0x18c91c(0x1c2))/0x8*(-parseInt(_0x18c91c(0x1c1))/0x9)+-parseInt(_0x18c91c(0x1b7))/0xa;if(_0x4fdc00===_0x18679e)break;else _0x26435a['push'](_0x26435a['shift']());}catch(_0xe1eca9){_0x26435a['push'](_0x26435a['shift']());}}}(_0x3d55,0x4b8c2));function _0x3d55(){const _0x4663eb=['track-changes-accept-suggestion-not-found','6947780iXJeUK','96283rClCUF','2900238NfZVXp','_isEnabledBasedOnSelection','plugins','model','acceptSuggestion','getRanges','64qTTRQF','1549240cZjDLX','1786194nIkDQk','8hdkAdH','isEnabled','2909543mhlMeD','3372VeegwP','8kdFzkp','editor','TrackChangesEditing','refresh','execute','get','canEditAt','_suggestions'];_0x3d55=function(){return _0x4663eb;};return _0x3d55();}function _0x341c(_0x5a0da5,_0x8ecd86){const _0x3d553e=_0x3d55();return _0x341c=function(_0x341c11,_0x19c305){_0x341c11=_0x341c11-0x1b3;let _0x21c649=_0x3d553e[_0x341c11];return _0x21c649;},_0x341c(_0x5a0da5,_0x8ecd86);}import{Command as _0x3daf0b}from'ckeditor5/src/core.js';import{CKEditorError as _0x8db76a}from'ckeditor5/src/utils.js';export default class $ extends _0x3daf0b{constructor(_0x5e1f2f,_0x201e33){const _0x37292f=_0x341c;super(_0x5e1f2f),this[_0x37292f(0x1b5)]=_0x201e33,this[_0x37292f(0x1c9)](),this[_0x37292f(0x1ba)]=!0x1;}[_0x241acc(0x1c9)](){const _0x19f63b=_0x241acc;this[_0x19f63b(0x1c3)]=!0x0;}[_0x241acc(0x1ca)](_0x59bf7f){const _0x44255c=_0x241acc,_0x3ec648=this[_0x44255c(0x1b5)][_0x44255c(0x1b3)](_0x59bf7f);if(!_0x3ec648)throw new _0x8db76a(_0x44255c(0x1b6),this);const _0x392646=_0x3ec648[_0x44255c(0x1be)]();this[_0x44255c(0x1c7)][_0x44255c(0x1bc)][_0x44255c(0x1b4)](_0x392646)&&this[_0x44255c(0x1c7)][_0x44255c(0x1bb)][_0x44255c(0x1b3)](_0x44255c(0x1c8))[_0x44255c(0x1bd)](_0x3ec648);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x1566f3=_0x5831;(function(_0x318993,_0x2e330b){const _0x4127c3=_0x5831,_0x421ee8=_0x318993();while(!![]){try{const _0x3c37f4=-parseInt(_0x4127c3(0xc9))/0x1*(parseInt(_0x4127c3(0xd9))/0x2)+-parseInt(_0x4127c3(0xc4))/0x3+-parseInt(_0x4127c3(0xd8))/0x4+parseInt(_0x4127c3(0xc3))/0x5*(parseInt(_0x4127c3(0xc7))/0x6)+parseInt(_0x4127c3(0xd4))/0x7*(-parseInt(_0x4127c3(0xca))/0x8)+parseInt(_0x4127c3(0xd5))/0x9*(parseInt(_0x4127c3(0xcf))/0xa)+parseInt(_0x4127c3(0xd6))/0xb*(parseInt(_0x4127c3(0xcb))/0xc);if(_0x3c37f4===_0x2e330b)break;else _0x421ee8['push'](_0x421ee8['shift']());}catch(_0x59e8f8){_0x421ee8['push'](_0x421ee8['shift']());}}}(_0x10e1,0x7027c));import{Command as _0x1afe0d}from'ckeditor5/src/core.js';function _0x5831(_0x1328a0,_0xd5ffe3){const _0x10e123=_0x10e1();return _0x5831=function(_0x5831ee,_0x4137c0){_0x5831ee=_0x5831ee-0xc2;let _0x49b75e=_0x10e123[_0x5831ee];return _0x49b75e;},_0x5831(_0x1328a0,_0xd5ffe3);}import{CKEditorError as _0x1d9207}from'ckeditor5/src/utils.js';export default class B extends _0x1afe0d{constructor(_0x2625c5,_0x5874b4){const _0x4c7237=_0x5831;super(_0x2625c5),this[_0x4c7237(0xd2)]=_0x5874b4,this[_0x4c7237(0xcd)](),this[_0x4c7237(0xc8)]=!0x1;}[_0x1566f3(0xcd)](){const _0x17cd89=_0x1566f3;this[_0x17cd89(0xd0)]=!0x0;}[_0x1566f3(0xdb)](_0x7aea05){const _0x4f4b07=_0x1566f3,_0x4b59e3=this[_0x4f4b07(0xd2)][_0x4f4b07(0xd1)](_0x7aea05);if(!_0x4b59e3)throw new _0x1d9207(_0x4f4b07(0xd7),this);const _0x1b9b68=_0x4b59e3[_0x4f4b07(0xce)]();this[_0x4f4b07(0xc6)][_0x4f4b07(0xc2)][_0x4f4b07(0xda)](_0x1b9b68)&&this[_0x4f4b07(0xc6)][_0x4f4b07(0xc5)][_0x4f4b07(0xd1)](_0x4f4b07(0xcc))[_0x4f4b07(0xd3)](_0x4b59e3);}}function _0x10e1(){const _0x57c4d9=['_suggestions','discardSuggestion','4400221JqwPga','9DmQNuM','11OHEqGY','track-changes-discard-suggestion-not-found','1849332SzYUHS','61458RAeyEw','canEditAt','execute','model','35dnusgu','807009Ovttjf','plugins','editor','541260JNURHj','_isEnabledBasedOnSelection','17sIYHIx','8UfulEQ','15852348TDHSQp','TrackChangesEditing','refresh','getRanges','3892210XrTomr','isEnabled','get'];_0x10e1=function(){return _0x57c4d9;};return _0x10e1();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x309c53=_0x13fc;function _0x22dd(){const _0x3b63fa=['values','108216DgLDqc','3296181HERVRX','some','from','4aWWdjB','2507523oHanue','6748230owBmLt','canEditAt','_suggestions','editor','9DSWffS','refresh','1736712gJJZVY','433406sxzrCN','execute','model','_isEnabledBasedOnSelection','getRanges','isEnabled','1MCfitz','_command','240RZtkKx','isInContent','22598268HUWmFX'];_0x22dd=function(){return _0x3b63fa;};return _0x22dd();}(function(_0x57c905,_0x294162){const _0x441cec=_0x13fc,_0x5d1ccb=_0x57c905();while(!![]){try{const _0x30cdd0=parseInt(_0x441cec(0x118))/0x1*(-parseInt(_0x441cec(0x112))/0x2)+-parseInt(_0x441cec(0x123))/0x3*(-parseInt(_0x441cec(0x122))/0x4)+parseInt(_0x441cec(0x11a))/0x5*(-parseInt(_0x441cec(0x11e))/0x6)+-parseInt(_0x441cec(0x11f))/0x7+-parseInt(_0x441cec(0x111))/0x8*(parseInt(_0x441cec(0x10f))/0x9)+-parseInt(_0x441cec(0x10b))/0xa+parseInt(_0x441cec(0x11c))/0xb;if(_0x30cdd0===_0x294162)break;else _0x5d1ccb['push'](_0x5d1ccb['shift']());}catch(_0x52cbe4){_0x5d1ccb['push'](_0x5d1ccb['shift']());}}}(_0x22dd,0x6ca4b));function _0x13fc(_0x4b745d,_0x328cc3){const _0x22ddce=_0x22dd();return _0x13fc=function(_0x13fc40,_0x2e9420){_0x13fc40=_0x13fc40-0x10b;let _0xbb5cc9=_0x22ddce[_0x13fc40];return _0xbb5cc9;},_0x13fc(_0x4b745d,_0x328cc3);}import{Command as _0x1c5f94}from'ckeditor5/src/core.js';import{sortSuggestions as _0x584848,executeCommandForSuggestions as _0x1c24a6}from'../utils/utils.js';export default class x extends _0x1c5f94{constructor(_0x44f001,_0x5ed497,_0x2ce3d6){const _0x1fa639=_0x13fc;super(_0x44f001),this[_0x1fa639(0x119)]=_0x5ed497,this[_0x1fa639(0x10d)]=_0x2ce3d6,this[_0x1fa639(0x110)](),this[_0x1fa639(0x115)]=!0x1;}[_0x309c53(0x110)](){const _0x572b73=_0x309c53,_0x344f27=Array[_0x572b73(0x121)](this[_0x572b73(0x10d)][_0x572b73(0x11d)]())[_0x572b73(0x120)](_0x59f510=>_0x59f510[_0x572b73(0x11b)]);this[_0x572b73(0x117)]=this[_0x572b73(0x119)][_0x572b73(0x117)]&&_0x344f27;}[_0x309c53(0x113)](){const _0xe0a95a=_0x309c53,_0x592703=_0x584848(Array[_0xe0a95a(0x121)](this[_0xe0a95a(0x10d)][_0xe0a95a(0x11d)]()));for(const _0x3117f5 of _0x592703){const _0x26c8a5=_0x3117f5[_0xe0a95a(0x116)]();if(!this[_0xe0a95a(0x10e)][_0xe0a95a(0x114)][_0xe0a95a(0x10c)](_0x26c8a5))return;}_0x1c24a6(this[_0xe0a95a(0x10e)][_0xe0a95a(0x114)],this[_0xe0a95a(0x119)],_0x592703);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x52e3ac=_0x1535;(function(_0x443be5,_0x7572b){const _0x43cce1=_0x1535,_0x191881=_0x443be5();while(!![]){try{const _0x36423f=-parseInt(_0x43cce1(0x1ab))/0x1*(parseInt(_0x43cce1(0x1b4))/0x2)+parseInt(_0x43cce1(0x19f))/0x3+-parseInt(_0x43cce1(0x1a1))/0x4*(parseInt(_0x43cce1(0x19d))/0x5)+-parseInt(_0x43cce1(0x1a2))/0x6*(parseInt(_0x43cce1(0x1af))/0x7)+-parseInt(_0x43cce1(0x1a7))/0x8*(parseInt(_0x43cce1(0x1a9))/0x9)+-parseInt(_0x43cce1(0x1ac))/0xa*(parseInt(_0x43cce1(0x19b))/0xb)+parseInt(_0x43cce1(0x19e))/0xc;if(_0x36423f===_0x7572b)break;else _0x191881['push'](_0x191881['shift']());}catch(_0xb28a3f){_0x191881['push'](_0x191881['shift']());}}}(_0x211c,0xbc87f));function _0x1535(_0x59d5b9,_0x1c2958){const _0x211c56=_0x211c();return _0x1535=function(_0x153596,_0x4b126e){_0x153596=_0x153596-0x19b;let _0x4b135d=_0x211c56[_0x153596];return _0x4b135d;},_0x1535(_0x59d5b9,_0x1c2958);}function _0x211c(){const _0x4c0b44=['2194587VPzeUi','getRanges','4YZLINV','11958nJYgCk','document','isEnabled','_command','values','1208KXMMKE','refresh','58554kRJIKA','execute','117lwooBD','1766290PxbgcJ','_selectedSuggestions','size','273NGaOlJ','model','_suggestions','_isEnabledBasedOnSelection','selection','17096oEsIta','canEditAt','editor','22wbMZtj','from','987655ZVVDTi','31820784DAmULO'];_0x211c=function(){return _0x4c0b44;};return _0x211c();}import{Command as _0x57c99b}from'ckeditor5/src/core.js';import{sortSuggestions as _0x3664ee,getSelectedSuggestions as _0x20729f,executeCommandForSuggestions as _0x1f2d03}from'../utils/utils.js';export default class R extends _0x57c99b{constructor(_0x20dbd2,_0x5c0b24,_0x11e1f9){const _0xcb7851=_0x1535;super(_0x20dbd2),this[_0xcb7851(0x1a5)]=_0x5c0b24,this[_0xcb7851(0x1b1)]=_0x11e1f9,this[_0xcb7851(0x1ad)]=new Set(),this[_0xcb7851(0x1a8)](),this[_0xcb7851(0x1b2)]=!0x1;}[_0x52e3ac(0x1a8)](){const _0x522a99=_0x52e3ac,_0x214a41=this[_0x522a99(0x1b6)][_0x522a99(0x1b0)][_0x522a99(0x1a3)][_0x522a99(0x1b3)],_0x425809=Array[_0x522a99(0x19c)](this[_0x522a99(0x1b1)][_0x522a99(0x1a6)]());this[_0x522a99(0x1ad)]=_0x20729f(_0x214a41,_0x425809),this[_0x522a99(0x1a4)]=this[_0x522a99(0x1a5)][_0x522a99(0x1a4)]&&!!this[_0x522a99(0x1ad)][_0x522a99(0x1ae)];}[_0x52e3ac(0x1aa)](){const _0x517cf6=_0x52e3ac,_0x32d16e=_0x3664ee(Array[_0x517cf6(0x19c)](this[_0x517cf6(0x1ad)]));for(const _0x3e1be9 of _0x32d16e){const _0x986e13=_0x3e1be9[_0x517cf6(0x1a0)]();if(!this[_0x517cf6(0x1b6)][_0x517cf6(0x1b0)][_0x517cf6(0x1b5)](_0x986e13))return;}_0x1f2d03(this[_0x517cf6(0x1b6)][_0x517cf6(0x1b0)],this[_0x517cf6(0x1a5)],_0x32d16e);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4093d4=_0x4ee7;function _0x4ee7(_0x322200,_0x385764){const _0x5b9e8f=_0x5b9e();return _0x4ee7=function(_0x4ee7b9,_0x33c6fb){_0x4ee7b9=_0x4ee7b9-0x1f2;let _0x1365c9=_0x5b9e8f[_0x4ee7b9];return _0x1365c9;},_0x4ee7(_0x322200,_0x385764);}(function(_0x236eec,_0x3d7c81){const _0x1a43e7=_0x4ee7,_0x2c1a64=_0x236eec();while(!![]){try{const _0xb5d6ae=-parseInt(_0x1a43e7(0x1f4))/0x1+-parseInt(_0x1a43e7(0x208))/0x2+parseInt(_0x1a43e7(0x1fd))/0x3+parseInt(_0x1a43e7(0x204))/0x4+parseInt(_0x1a43e7(0x1f6))/0x5*(parseInt(_0x1a43e7(0x1fb))/0x6)+-parseInt(_0x1a43e7(0x1f8))/0x7*(parseInt(_0x1a43e7(0x207))/0x8)+parseInt(_0x1a43e7(0x1fe))/0x9;if(_0xb5d6ae===_0x3d7c81)break;else _0x2c1a64['push'](_0x2c1a64['shift']());}catch(_0x31ccc7){_0x2c1a64['push'](_0x2c1a64['shift']());}}}(_0x5b9e,0x39b76));import{Command as _0x2982de}from'ckeditor5/src/core.js';export default class M extends _0x2982de{constructor(_0x4e7cb3,_0x1f25a2){const _0x2168ad=_0x4ee7;super(_0x4e7cb3),this[_0x2168ad(0x206)]=_0x1f25a2,this[_0x2168ad(0x203)]=!0x1,this[_0x2168ad(0x202)](),this[_0x2168ad(0x1fc)]=!0x1;}[_0x4093d4(0x202)](){const _0x57fba8=_0x4093d4;this[_0x57fba8(0x209)]=!0x0;}[_0x4093d4(0x200)](){const _0x1e9fc7=_0x4093d4;this[_0x1e9fc7(0x203)]=!this[_0x1e9fc7(0x203)],this[_0x1e9fc7(0x203)]?this[_0x1e9fc7(0x1f2)]():this[_0x1e9fc7(0x1f3)]();}[_0x4093d4(0x1f2)](){const _0x5081fe=_0x4093d4;for(const _0x36a46f of this[_0x5081fe(0x1f9)][_0x5081fe(0x201)][_0x5081fe(0x201)]())_0x36a46f[_0x5081fe(0x1f7)]&&!this[_0x5081fe(0x206)][_0x5081fe(0x1ff)](_0x36a46f)&&_0x36a46f[_0x5081fe(0x1fa)](_0x5081fe(0x1f5));}[_0x4093d4(0x1f3)](){const _0x145b4b=_0x4093d4;for(const _0x388866 of this[_0x145b4b(0x1f9)][_0x145b4b(0x201)][_0x145b4b(0x201)]())_0x388866[_0x145b4b(0x1f7)]&&!this[_0x145b4b(0x206)][_0x145b4b(0x1ff)](_0x388866)&&_0x388866[_0x145b4b(0x205)](_0x145b4b(0x1f5));}}function _0x5b9e(){const _0x51bbbe=['forceDisabled','6cHSjBe','_isEnabledBasedOnSelection','1247301VxqeVo','241191OoXHoC','has','execute','commands','refresh','value','401016aBrWxL','clearForceDisabled','_enabledCommands','57952MbVKUV','5252KOVPql','isEnabled','_disableUnsupportedCommands','_enableCommands','263902nQKasK','TrackChangesCommand','561190QhPmGC','affectsData','147fzVIkG','editor'];_0x5b9e=function(){return _0x51bbbe;};return _0x5b9e();}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x3aaaba,_0x3225bb){var _0x35b4eb=_0x7fa6,_0x425715=_0x3aaaba();while(!![]){try{var _0x131a68=-parseInt(_0x35b4eb(0x198))/0x1+-parseInt(_0x35b4eb(0x19d))/0x2*(-parseInt(_0x35b4eb(0x19a))/0x3)+parseInt(_0x35b4eb(0x197))/0x4+parseInt(_0x35b4eb(0x19e))/0x5+parseInt(_0x35b4eb(0x199))/0x6+-parseInt(_0x35b4eb(0x19b))/0x7*(parseInt(_0x35b4eb(0x196))/0x8)+parseInt(_0x35b4eb(0x19f))/0x9*(-parseInt(_0x35b4eb(0x19c))/0xa);if(_0x131a68===_0x3225bb)break;else _0x425715['push'](_0x425715['shift']());}catch(_0x2842ec){_0x425715['push'](_0x425715['shift']());}}}(_0x5018,0xa1491));export{default as TrackChanges}from'./trackchanges.js';function _0x7fa6(_0x4a0098,_0x308557){var _0x50186d=_0x5018();return _0x7fa6=function(_0x7fa61e,_0xfea794){_0x7fa61e=_0x7fa61e-0x196;var _0x572ad3=_0x50186d[_0x7fa61e];return _0x572ad3;},_0x7fa6(_0x4a0098,_0x308557);}function _0x5018(){var _0x33797f=['12891WDjmoE','5180EwknLK','3229370STIbUA','244ZDipvg','2173725OtvYxM','18sglTtK','13320mPRTMq','1839812IMkQUA','28137nIxUga','6886824AUlZWT'];_0x5018=function(){return _0x33797f;};return _0x5018();}export{default as TrackChangesData}from'./trackchangesdata.js';export{default as TrackChangesEditing}from'./trackchangesediting.js';export{default as BaseSuggestionThreadView}from'./ui/view/basesuggestionthreadview.js';import'./augmentation.js';
|