@ckeditor/ckeditor5-comments 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/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,98 +1,98 @@
|
|
|
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 { Plugin, type Editor } from
|
|
10
|
-
import { AnnotationsUIs, type AnnotationsUI } from
|
|
11
|
-
import { EditorAnnotations } from
|
|
12
|
-
import { ContextualBalloon } from
|
|
13
|
-
import
|
|
14
|
-
import { type Annotation } from
|
|
15
|
-
import { type AnnotationCollection } from
|
|
6
|
+
* @module comments/annotations/inlineannotations
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { AnnotationsUIs, type AnnotationsUI } from "./annotationsuis.js";
|
|
11
|
+
import { EditorAnnotations } from "./editorannotations.js";
|
|
12
|
+
import { ContextualBalloon } from "@ckeditor/ckeditor5-ui";
|
|
13
|
+
import "./../../theme/annotation-inline.css";
|
|
14
|
+
import { type Annotation } from "./annotation.js";
|
|
15
|
+
import { type AnnotationCollection } from "./annotationcollection.js";
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
* The popup-style UI for displaying annotations next to editor target elements.
|
|
18
|
+
*
|
|
19
|
+
* It displays {@link module:comments/annotations/annotation~Annotation annotations} in the
|
|
20
|
+
* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon balloon} where the current
|
|
21
|
+
* {@link module:comments/annotations/inlineannotations~InlineAnnotations#activeAnnotation} is the displayed one.
|
|
22
|
+
*
|
|
23
|
+
* Note: this UI type works only with {@link module:core/editor/editor~Editor the Editor} and cannot be used in integrations where
|
|
24
|
+
* there is only {@link module:core/context~Context context} without any editor.
|
|
25
|
+
*
|
|
26
|
+
* This UI is intended for narrow screens.
|
|
27
|
+
*
|
|
28
|
+
* To activate this UI use one of the following:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'inline' );
|
|
32
|
+
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'inline', filter );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
36
|
+
*/
|
|
37
37
|
export declare class InlineAnnotations extends Plugin implements AnnotationsUI<Plugin> {
|
|
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
|
-
|
|
38
|
+
/**
|
|
39
|
+
* An active annotation tracked by this UI.
|
|
40
|
+
*
|
|
41
|
+
* @observable
|
|
42
|
+
*/
|
|
43
|
+
activeAnnotation: Annotation | null;
|
|
44
|
+
isAttached: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A collection of annotations controlled by this UI.
|
|
47
|
+
*
|
|
48
|
+
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
49
|
+
*
|
|
50
|
+
* It is set to `null` if `InlineAnnotations` is not
|
|
51
|
+
* {@link module:comments/annotations/inlineannotations~InlineAnnotations#attach attached}.
|
|
52
|
+
*/
|
|
53
|
+
annotations: AnnotationCollection | null;
|
|
54
|
+
/**
|
|
55
|
+
* @inheritDoc
|
|
56
|
+
*/
|
|
57
|
+
static get requires(): PluginDependenciesOf<[EditorAnnotations, ContextualBalloon, AnnotationsUIs]>;
|
|
58
|
+
/**
|
|
59
|
+
* @inheritDoc
|
|
60
|
+
*/
|
|
61
|
+
static get pluginName(): "InlineAnnotations";
|
|
62
|
+
/**
|
|
63
|
+
* @inheritDoc
|
|
64
|
+
*/
|
|
65
|
+
static override get isOfficialPlugin(): true;
|
|
66
|
+
/**
|
|
67
|
+
* @inheritDoc
|
|
68
|
+
*/
|
|
69
|
+
static override get isPremiumPlugin(): true;
|
|
70
|
+
/**
|
|
71
|
+
* @inheritDoc
|
|
72
|
+
*/
|
|
73
|
+
constructor(editor: Editor);
|
|
74
|
+
/**
|
|
75
|
+
* @inheritDoc
|
|
76
|
+
*/
|
|
77
|
+
init(): void;
|
|
78
|
+
/**
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
afterInit(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the active annotation for this UI.
|
|
84
|
+
*/
|
|
85
|
+
setActiveAnnotation(annotation: Annotation | null): void;
|
|
86
|
+
/**
|
|
87
|
+
* @inheritDoc
|
|
88
|
+
*/
|
|
89
|
+
attach(annotations: AnnotationCollection): void;
|
|
90
|
+
/**
|
|
91
|
+
* @inheritDoc
|
|
92
|
+
*/
|
|
93
|
+
detach(): void;
|
|
94
|
+
/**
|
|
95
|
+
* @inheritDoc
|
|
96
|
+
*/
|
|
97
|
+
override destroy(): void;
|
|
98
98
|
}
|
|
@@ -1,93 +1,93 @@
|
|
|
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 { ContextPlugin, Context, type Editor } from
|
|
10
|
-
import { AnnotationsUIs, type AnnotationsUI } from
|
|
11
|
-
import { Sidebar } from
|
|
12
|
-
import { BalloonPanelView, BodyCollection } from
|
|
13
|
-
import
|
|
14
|
-
import { type Annotation } from
|
|
15
|
-
import type { AnnotationCollection } from
|
|
6
|
+
* @module comments/annotations/narrowsidebar
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ContextPlugin, Context, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { AnnotationsUIs, type AnnotationsUI } from "./annotationsuis.js";
|
|
11
|
+
import { Sidebar } from "./sidebar.js";
|
|
12
|
+
import { BalloonPanelView, BodyCollection } from "@ckeditor/ckeditor5-ui";
|
|
13
|
+
import "../../theme/sidebar-narrow.css";
|
|
14
|
+
import { type Annotation } from "./annotation.js";
|
|
15
|
+
import type { AnnotationCollection } from "./annotationcollection.js";
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
* The narrow sidebar UI for displaying annotations.
|
|
18
|
+
*
|
|
19
|
+
* Binds {@link module:comments/annotations/annotations~Annotations} plugin with
|
|
20
|
+
* {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
|
|
21
|
+
* {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
|
|
22
|
+
*
|
|
23
|
+
* After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
|
|
24
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
|
|
25
|
+
*
|
|
26
|
+
* This UI is intended for medium-sized viewports.
|
|
27
|
+
*
|
|
28
|
+
* To activate this UI use one of the following:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
|
|
32
|
+
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
36
|
+
*/
|
|
37
37
|
export declare class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
|
|
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
|
-
|
|
38
|
+
/**
|
|
39
|
+
* An active annotation tracked by this UI.
|
|
40
|
+
*/
|
|
41
|
+
activeAnnotation: Annotation | null;
|
|
42
|
+
bodyCollection: BodyCollection;
|
|
43
|
+
balloonPanelView: BalloonPanelView;
|
|
44
|
+
isAttached: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A collection of annotations controlled by this UI.
|
|
47
|
+
*
|
|
48
|
+
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
49
|
+
*
|
|
50
|
+
* It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
|
|
51
|
+
*/
|
|
52
|
+
annotations: AnnotationCollection | null;
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
static get requires(): PluginDependenciesOf<[Sidebar, AnnotationsUIs]>;
|
|
57
|
+
/**
|
|
58
|
+
* @inheritDoc
|
|
59
|
+
*/
|
|
60
|
+
static get pluginName(): "NarrowSidebar";
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
static override get isOfficialPlugin(): true;
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
static override get isPremiumPlugin(): true;
|
|
69
|
+
/**
|
|
70
|
+
* @inheritDoc
|
|
71
|
+
*/
|
|
72
|
+
constructor(context: Context | Editor);
|
|
73
|
+
/**
|
|
74
|
+
* @inheritDoc
|
|
75
|
+
*/
|
|
76
|
+
init(): void;
|
|
77
|
+
/**
|
|
78
|
+
* @inheritDoc
|
|
79
|
+
*/
|
|
80
|
+
attach(annotations: AnnotationCollection): void;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the active annotation for this UI.
|
|
83
|
+
*/
|
|
84
|
+
setActiveAnnotation(annotation: Annotation | null): void;
|
|
85
|
+
/**
|
|
86
|
+
* @inheritDoc
|
|
87
|
+
*/
|
|
88
|
+
detach(): void;
|
|
89
|
+
/**
|
|
90
|
+
* @inheritDoc
|
|
91
|
+
*/
|
|
92
|
+
override destroy(): void;
|
|
93
93
|
}
|
|
@@ -1,110 +1,110 @@
|
|
|
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 { ContextPlugin, type Context, type Editor } from
|
|
10
|
-
import type { FocusableView } from
|
|
11
|
-
import { AnnotationsSidebarView } from
|
|
12
|
-
import { AnnotationsSidebarItemView } from
|
|
13
|
-
import { type Annotation } from
|
|
6
|
+
* @module comments/annotations/sidebar
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import type { FocusableView } from "@ckeditor/ckeditor5-ui";
|
|
11
|
+
import { AnnotationsSidebarView } from "./view/sidebarview.js";
|
|
12
|
+
import { AnnotationsSidebarItemView } from "./view/sidebaritemview.js";
|
|
13
|
+
import { type Annotation } from "./annotation.js";
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
|
+
*
|
|
17
|
+
* `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~AnnotationsSidebarView} which can be injected at any place on
|
|
18
|
+
* a website.
|
|
19
|
+
*
|
|
20
|
+
* It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
|
|
21
|
+
* or `Rect`s.
|
|
22
|
+
*
|
|
23
|
+
* The following plugins use `Sidebar` to provide annotations UI:
|
|
24
|
+
*
|
|
25
|
+
* * {@link module:comments/annotations/widesidebar~WideSidebar}
|
|
26
|
+
* * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
|
|
27
|
+
*
|
|
28
|
+
* The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~AnnotationsSidebarItemView} which is a wrapper view
|
|
29
|
+
* for {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
|
|
30
|
+
* the sidebar.
|
|
31
|
+
*
|
|
32
|
+
* Structure of items:
|
|
33
|
+
*
|
|
34
|
+
* |-> AnnotationsSidebarItemView -> AnnotationView -> added View
|
|
35
|
+
* Sidebar#view#list -|-> AnnotationsSidebarItemView -> AnnotationView -> added View
|
|
36
|
+
* |-> ...
|
|
37
|
+
*/
|
|
38
38
|
export declare class Sidebar extends ContextPlugin {
|
|
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
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Container element into which sidebar is injected (in the DOM).
|
|
41
|
+
*
|
|
42
|
+
* @observable
|
|
43
|
+
*/
|
|
44
|
+
container: HTMLElement | null;
|
|
45
|
+
/**
|
|
46
|
+
* Sidebar view.
|
|
47
|
+
*/
|
|
48
|
+
view: AnnotationsSidebarView;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
static get pluginName(): "Sidebar";
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
static override get isOfficialPlugin(): true;
|
|
57
|
+
/**
|
|
58
|
+
* @inheritDoc
|
|
59
|
+
*/
|
|
60
|
+
static override get isPremiumPlugin(): true;
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
constructor(context: Context | Editor);
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
init(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets a new sidebar container.
|
|
71
|
+
*/
|
|
72
|
+
setContainer(container: HTMLElement): void;
|
|
73
|
+
/**
|
|
74
|
+
* Rearranges annotations when the annotation is removed.
|
|
75
|
+
*/
|
|
76
|
+
rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
|
|
77
|
+
removedAnnotation: Annotation;
|
|
78
|
+
previousAnnotation: Annotation | null;
|
|
79
|
+
nextAnnotation: Annotation | null;
|
|
80
|
+
}): void;
|
|
81
|
+
/**
|
|
82
|
+
* Refreshes sidebar items when one of the annotations is activated.
|
|
83
|
+
*
|
|
84
|
+
* @param options Configuration options.
|
|
85
|
+
* @param options.activatedAnnotation The activated annotation.
|
|
86
|
+
* @param options.blurredAnnotation The previously active annotation.
|
|
87
|
+
* @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
|
|
88
|
+
*/
|
|
89
|
+
refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
|
|
90
|
+
blurredAnnotation: Annotation | null;
|
|
91
|
+
activatedAnnotation: Annotation | null;
|
|
92
|
+
disableAnimationOnActivatedAnnotation?: boolean;
|
|
93
|
+
}): void;
|
|
94
|
+
/**
|
|
95
|
+
* Creates new {@link module:comments/annotations/view/sidebaritemview~AnnotationsSidebarItemView} and binds its
|
|
96
|
+
* position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
|
|
97
|
+
*
|
|
98
|
+
* By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
|
|
99
|
+
* to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
|
|
100
|
+
*/
|
|
101
|
+
addAnnotation(annotation: Annotation, viewToDisplay?: FocusableView): AnnotationsSidebarItemView;
|
|
102
|
+
/**
|
|
103
|
+
* Returns sidebar item view that wraps given annotation view.
|
|
104
|
+
*/
|
|
105
|
+
getSidebarItemView(annotation: Annotation): AnnotationsSidebarItemView | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* @inheritDoc
|
|
108
|
+
*/
|
|
109
|
+
override destroy(): void;
|
|
110
110
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
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 { ButtonView, View } from
|
|
10
|
-
import type { Locale } from
|
|
6
|
+
* @module comments/annotations/view/annotationcounterbuttonview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ButtonView, View } from "@ckeditor/ckeditor5-ui";
|
|
10
|
+
import type { Locale } from "@ckeditor/ckeditor5-utils";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
13
|
+
*/
|
|
14
14
|
export declare class AnnotationCounterButtonView extends ButtonView {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
isDirty: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
number: number;
|
|
23
|
+
/**
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
annotationType: string;
|
|
27
|
+
counterView: View;
|
|
28
|
+
constructor(locale: Locale);
|
|
29
29
|
}
|