@ckeditor/ckeditor5-comments 38.1.1 → 38.2.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/build/comments.js +1 -1
- package/package.json +4 -3
- package/src/annotations/annotation.d.ts +86 -86
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +94 -94
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +150 -150
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +228 -228
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +63 -63
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +86 -86
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +81 -81
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +96 -96
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +86 -86
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +51 -51
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +28 -28
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +73 -73
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +48 -48
- package/src/comments/addcommentthreadcommand.d.ts +31 -31
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +27 -27
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +34 -34
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +75 -75
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1088 -1088
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +29 -29
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +17 -17
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.d.ts +108 -108
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +108 -108
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +10 -10
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +82 -82
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.d.ts +96 -96
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +113 -113
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +239 -239
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +31 -31
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +29 -29
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +172 -172
- package/src/index.d.ts +21 -21
- package/src/index.js +1 -1
- package/src/utils/common-translations.d.ts +5 -5
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.d.ts +13 -13
- package/src/utils/createmutationobserver.js +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/annotations/view/sidebaritemview
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
7
|
-
/**
|
|
8
|
-
* A wrapper view that wraps given {@link module:ui/view~View} to display it as a {@link module:comments/annotations/sidebar~Sidebar} item.
|
|
9
|
-
*/
|
|
10
|
-
export default class SidebarItemView extends View {
|
|
11
|
-
element: HTMLElement;
|
|
12
|
-
/**
|
|
13
|
-
* The item top offset.
|
|
14
|
-
* Setting `0` as the initial value makes new items falling from heaven.
|
|
15
|
-
*
|
|
16
|
-
* @observable
|
|
17
|
-
*/
|
|
18
|
-
top: number;
|
|
19
|
-
/**
|
|
20
|
-
* @observable
|
|
21
|
-
*/
|
|
22
|
-
bottom: number;
|
|
23
|
-
/**
|
|
24
|
-
* @observable
|
|
25
|
-
*/
|
|
26
|
-
height: number;
|
|
27
|
-
/**
|
|
28
|
-
* @observable
|
|
29
|
-
*/
|
|
30
|
-
isAnimationDisabled: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* A collection of content views.
|
|
33
|
-
*/
|
|
34
|
-
content: ViewCollection;
|
|
35
|
-
/**
|
|
36
|
-
* @inheritDoc
|
|
37
|
-
*/
|
|
38
|
-
constructor(locale: Locale);
|
|
39
|
-
/**
|
|
40
|
-
* @inheritDoc
|
|
41
|
-
*/
|
|
42
|
-
render(): void;
|
|
43
|
-
/**
|
|
44
|
-
* Updates {@link #height the height property} according to the element's DOM height.
|
|
45
|
-
*/
|
|
46
|
-
updateHeight(): void;
|
|
47
|
-
/**
|
|
48
|
-
* @inheritDoc
|
|
49
|
-
*/
|
|
50
|
-
destroy(): void;
|
|
51
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/annotations/view/sidebaritemview
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* A wrapper view that wraps given {@link module:ui/view~View} to display it as a {@link module:comments/annotations/sidebar~Sidebar} item.
|
|
9
|
+
*/
|
|
10
|
+
export default class SidebarItemView extends View {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
/**
|
|
13
|
+
* The item top offset.
|
|
14
|
+
* Setting `0` as the initial value makes new items falling from heaven.
|
|
15
|
+
*
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
top: number;
|
|
19
|
+
/**
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
bottom: number;
|
|
23
|
+
/**
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
height: number;
|
|
27
|
+
/**
|
|
28
|
+
* @observable
|
|
29
|
+
*/
|
|
30
|
+
isAnimationDisabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A collection of content views.
|
|
33
|
+
*/
|
|
34
|
+
content: ViewCollection;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
constructor(locale: Locale);
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
render(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Updates {@link #height the height property} according to the element's DOM height.
|
|
45
|
+
*/
|
|
46
|
+
updateHeight(): void;
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
destroy(): void;
|
|
51
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3808=['setTemplate','bottom','updateHeight','ck-sidebar-item','content','isAnimationDisabled','_targetTop','set','bind','createCollection','top','bindTemplate','div','destroy','detach','_mutationObserver','height','clear','render','element'];(function(_0x17828b,_0x3808e8){const _0x3cce8b=function(_0x4db904){while(--_0x4db904){_0x17828b['push'](_0x17828b['shift']());}};_0x3cce8b(++_0x3808e8);}(_0x3808,0xc6));const _0x3cce=function(_0x17828b,_0x3808e8){_0x17828b=_0x17828b-0x0;let _0x3cce8b=_0x3808[_0x17828b];return _0x3cce8b;};import{View as _0x13292e}from'ckeditor5/src/ui.js';import{toUnit as _0x2a4ab5}from'ckeditor5/src/utils.js';import _0x5eb6e4 from'../../utils/createmutationobserver.js';const At=_0x2a4ab5('px');export default class C extends _0x13292e{constructor(_0x596be){super(_0x596be),this[_0x3cce('0x9')](_0x3cce('0xc'),0x0),this[_0x3cce('0x9')]('height',0x0),this[_0x3cce('0xa')](_0x3cce('0x3'))['to'](this,'top',this,'height',(_0x1f6d28,_0x20d88d)=>_0x1f6d28+_0x20d88d),this[_0x3cce('0x9')]('isAnimationDisabled',!0x1),this[_0x3cce('0x11')]=_0x5eb6e4(()=>this['updateHeight']()),this[_0x3cce('0x8')]=null,this[_0x3cce('0x6')]=this[_0x3cce('0xb')]();const _0x1e75fe=this[_0x3cce('0xd')];this[_0x3cce('0x2')]({'tag':_0x3cce('0xe'),'attributes':{'class':[_0x3cce('0x5'),_0x1e75fe['to'](_0x3cce('0x7'),_0x29507f=>_0x29507f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1e75fe['to'](_0x3cce('0xc'),_0x8ae6ea=>At(_0x8ae6ea))}},'children':this[_0x3cce('0x6')]});}[_0x3cce('0x0')](){super['render'](),this[_0x3cce('0x11')]['attach'](this[_0x3cce('0x1')]);}[_0x3cce('0x4')](){const _0x160057=this[_0x3cce('0x1')]['clientHeight'];_0x160057&&(this[_0x3cce('0x12')]=_0x160057);}[_0x3cce('0xf')](){this[_0x3cce('0x6')][_0x3cce('0x13')](),this[_0x3cce('0x11')][_0x3cce('0x10')](),super[_0x3cce('0xf')]();}}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/annotations/view/sidebarview
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
7
|
-
import '../../../theme/sidebar.css';
|
|
8
|
-
/**
|
|
9
|
-
* The sidebar view class that displays the collection of sidebar item views.
|
|
10
|
-
*/
|
|
11
|
-
export default class SidebarView extends View {
|
|
12
|
-
/**
|
|
13
|
-
* @observable
|
|
14
|
-
*/
|
|
15
|
-
minHeight: number | null;
|
|
16
|
-
/**
|
|
17
|
-
* @observable
|
|
18
|
-
*/
|
|
19
|
-
class: string;
|
|
20
|
-
/**
|
|
21
|
-
* A collection of sidebar item views.
|
|
22
|
-
*/
|
|
23
|
-
list: ViewCollection;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
constructor(locale: Locale);
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/annotations/view/sidebarview
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
+
import '../../../theme/sidebar.css';
|
|
8
|
+
/**
|
|
9
|
+
* The sidebar view class that displays the collection of sidebar item views.
|
|
10
|
+
*/
|
|
11
|
+
export default class SidebarView extends View {
|
|
12
|
+
/**
|
|
13
|
+
* @observable
|
|
14
|
+
*/
|
|
15
|
+
minHeight: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
class: string;
|
|
20
|
+
/**
|
|
21
|
+
* A collection of sidebar item views.
|
|
22
|
+
*/
|
|
23
|
+
list: ViewCollection;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(locale: Locale);
|
|
28
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2dce=['createCollection','list','setTemplate','ck-reset','bindTemplate','div','number','class','ck-sidebar','set','minHeight'];(function(_0x4e4e4c,_0x2dce1e){const _0x96a86a=function(_0xc7d638){while(--_0xc7d638){_0x4e4e4c['push'](_0x4e4e4c['shift']());}};_0x96a86a(++_0x2dce1e);}(_0x2dce,0x1ad));const _0x96a8=function(_0x4e4e4c,_0x2dce1e){_0x4e4e4c=_0x4e4e4c-0x0;let _0x96a86a=_0x2dce[_0x4e4e4c];return _0x96a86a;};import{View as _0x4fc690}from'ckeditor5/src/ui.js';import{toUnit as _0x80d4a}from'ckeditor5/src/utils.js';import'../../../theme/sidebar.css';const At=_0x80d4a('px');export default class T extends _0x4fc690{constructor(_0xd5f2cc){super(_0xd5f2cc);const _0x4a8385=this[_0x96a8('0x4')];this[_0x96a8('0x9')]('minHeight',0x0),this['set'](_0x96a8('0x7'),''),this['list']=this[_0x96a8('0x0')](),this[_0x96a8('0x2')]({'tag':_0x96a8('0x5'),'attributes':{'class':['ck',_0x96a8('0x8'),_0x96a8('0x3'),_0x4a8385['to'](_0x96a8('0x7'))],'style':{'minHeight':_0x4a8385['to'](_0x96a8('0xa'),_0x96fa73=>_0x96a8('0x6')==typeof _0x96fa73?At(_0x96fa73+0xa):null)}},'children':this[_0x96a8('0x1')]});}}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/annotations/widesidebar
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
|
|
7
|
-
import Sidebar from './sidebar';
|
|
8
|
-
import type Annotation from './annotation';
|
|
9
|
-
import type { default as AnnotationCollection } from './annotationcollection';
|
|
10
|
-
/**
|
|
11
|
-
* The wide sidebar UI for displaying annotations.
|
|
12
|
-
*
|
|
13
|
-
* In this implementation {@link module:comments/annotations/sidebar~Sidebar the sidebar} displays full
|
|
14
|
-
* {@link module:comments/annotations/view/annotationview~AnnotationView annotation views}.
|
|
15
|
-
*
|
|
16
|
-
* To activate this UI use one of the following:
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'wideSidebar' );
|
|
20
|
-
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'wideSidebar', filter );
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
24
|
-
*/
|
|
25
|
-
export default class WideSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
|
|
26
|
-
/**
|
|
27
|
-
* An active annotation tracked by this UI.
|
|
28
|
-
*
|
|
29
|
-
* @observable
|
|
30
|
-
*/
|
|
31
|
-
activeAnnotation: Annotation | null;
|
|
32
|
-
isAttached: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* A collection of annotations controlled by this UI.
|
|
35
|
-
*
|
|
36
|
-
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
37
|
-
*
|
|
38
|
-
* It is set to `null` if `WideSidebar` is not {@link module:comments/annotations/widesidebar~WideSidebar#attach attached}.
|
|
39
|
-
*/
|
|
40
|
-
annotations: AnnotationCollection | null;
|
|
41
|
-
/**
|
|
42
|
-
* @inheritDoc
|
|
43
|
-
*/
|
|
44
|
-
static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
|
|
45
|
-
/**
|
|
46
|
-
* @inheritDoc
|
|
47
|
-
*/
|
|
48
|
-
static get pluginName(): "WideSidebar";
|
|
49
|
-
/**
|
|
50
|
-
* @inheritDoc
|
|
51
|
-
*/
|
|
52
|
-
constructor(context: Context | Editor);
|
|
53
|
-
/**
|
|
54
|
-
* @inheritDoc
|
|
55
|
-
*/
|
|
56
|
-
init(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the active annotation for this UI.
|
|
59
|
-
*/
|
|
60
|
-
setActiveAnnotation(annotation: Annotation | null): void;
|
|
61
|
-
/**
|
|
62
|
-
* @inheritDoc
|
|
63
|
-
*/
|
|
64
|
-
attach(annotations: AnnotationCollection): void;
|
|
65
|
-
/**
|
|
66
|
-
* @inheritDoc
|
|
67
|
-
*/
|
|
68
|
-
detach(): void;
|
|
69
|
-
/**
|
|
70
|
-
* @inheritDoc
|
|
71
|
-
*/
|
|
72
|
-
destroy(): void;
|
|
73
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/annotations/widesidebar
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
7
|
+
import Sidebar from './sidebar.js';
|
|
8
|
+
import type Annotation from './annotation.js';
|
|
9
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
10
|
+
/**
|
|
11
|
+
* The wide sidebar UI for displaying annotations.
|
|
12
|
+
*
|
|
13
|
+
* In this implementation {@link module:comments/annotations/sidebar~Sidebar the sidebar} displays full
|
|
14
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView annotation views}.
|
|
15
|
+
*
|
|
16
|
+
* To activate this UI use one of the following:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'wideSidebar' );
|
|
20
|
+
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'wideSidebar', filter );
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
24
|
+
*/
|
|
25
|
+
export default class WideSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
|
|
26
|
+
/**
|
|
27
|
+
* An active annotation tracked by this UI.
|
|
28
|
+
*
|
|
29
|
+
* @observable
|
|
30
|
+
*/
|
|
31
|
+
activeAnnotation: Annotation | null;
|
|
32
|
+
isAttached: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* A collection of annotations controlled by this UI.
|
|
35
|
+
*
|
|
36
|
+
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
37
|
+
*
|
|
38
|
+
* It is set to `null` if `WideSidebar` is not {@link module:comments/annotations/widesidebar~WideSidebar#attach attached}.
|
|
39
|
+
*/
|
|
40
|
+
annotations: AnnotationCollection | null;
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
static get pluginName(): "WideSidebar";
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
constructor(context: Context | Editor);
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
init(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the active annotation for this UI.
|
|
59
|
+
*/
|
|
60
|
+
setActiveAnnotation(annotation: Annotation | null): void;
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
attach(annotations: AnnotationCollection): void;
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
detach(): void;
|
|
69
|
+
/**
|
|
70
|
+
* @inheritDoc
|
|
71
|
+
*/
|
|
72
|
+
destroy(): void;
|
|
73
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x29cd=['_editorAnnotations','off','WideSidebar','ck-sidebar--wide','change:container','remove','refreshPositioning','blur','ready','setActiveAnnotation','activeAnnotation','switchTo','register','_integrateWithEditorAnnotations','stopListening','set:container','detach','addEventListener','destroy','context','widesidebar-attach-already-attached','cancel','editors','uiUpdate','from','updateTargetRect','_destroyEditorAnnotationsIntegration','widesidebar-detach-not-attached','high','focus','_annotations','refresh','listenTo','add','EditorAnnotations','isAttached','getOrderedSelectedAnnotations','get','pluginName','container','has','plugins','_refreshPositioningDebounced','annotations','attach'];(function(_0xd10482,_0x29cd27){const _0x1e6c4f=function(_0x3542ab){while(--_0x3542ab){_0xd10482['push'](_0xd10482['shift']());}};_0x1e6c4f(++_0x29cd27);}(_0x29cd,0x9a));const _0x1e6c=function(_0xd10482,_0x29cd27){_0xd10482=_0xd10482-0x0;let _0x1e6c4f=_0x29cd[_0xd10482];return _0x1e6c4f;};import{ContextPlugin as _0x4fcc85,Context as _0x5c9a4d}from'ckeditor5/src/core.js';import _0x7c084 from'./annotationsuis.js';import _0x3b50f8 from'./sidebar.js';import{CKEditorError as _0x208568,Collection as _0x26e260}from'ckeditor5/src/utils.js';import{debounce as _0x365e6a}from'lodash-es';import _0x543e5d from'./editorannotations.js';export default class n extends _0x4fcc85{static get['requires'](){return[_0x3b50f8,_0x7c084];}static get[_0x1e6c('0x13')](){return _0x1e6c('0x1c');}constructor(_0x994934){super(_0x994934),this['isAttached']=!0x1,this['set'](_0x1e6c('0x24'),null),this[_0x1e6c('0x18')]=null,this[_0x1e6c('0x1a')]=new _0x26e260(),this[_0x1e6c('0x17')]=_0x365e6a(()=>{this['annotations'][_0x1e6c('0x20')]();},0xfa,{'leading':!0x1});}['init'](){const _0x1f21f2=this[_0x1e6c('0x0')]['plugins'][_0x1e6c('0x12')](_0x7c084),_0x5d0a7e=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);_0x1f21f2[_0x1e6c('0x26')]('wideSidebar',this),_0x5d0a7e[_0x1e6c('0x14')]&&_0x1f21f2[_0x1e6c('0x25')]('wideSidebar');}[_0x1e6c('0x23')](_0x569aff){if(_0x569aff===this['activeAnnotation'])return;const _0x241825=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);_0x241825['_activeAnnotation']=_0x569aff;const _0x24bed7=this[_0x1e6c('0x24')];this[_0x1e6c('0x24')]=_0x569aff,_0x241825[_0x1e6c('0xc')]({'blurredAnnotation':_0x24bed7,'activatedAnnotation':this['activeAnnotation']});}[_0x1e6c('0x19')](_0x2ef3cd){this[_0x1e6c('0x18')]=_0x2ef3cd;const _0x3bcc4e=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);if(_0x3bcc4e[_0x1e6c('0xb')]=_0x2ef3cd,this[_0x1e6c('0x10')])throw new _0x208568(_0x1e6c('0x1'),this);this['isAttached']=!0x0,this['listenTo'](_0x3bcc4e,_0x1e6c('0x29'),()=>{this[_0x1e6c('0x2a')](),this[_0x1e6c('0xd')](_0x3bcc4e,_0x1e6c('0x1e'),_0x2e7e94=>{_0x2e7e94[_0x1e6c('0x1b')](),this[_0x1e6c('0x19')](_0x2ef3cd);});}),_0x3bcc4e['_attachToContainer']({'viewClass':_0x1e6c('0x1d')});const _0x2cf81c=_0x19c973=>{_0x19c973[_0x1e6c('0x6')](),_0x3bcc4e['addAnnotation'](_0x19c973);};for(const _0x3f59f1 of _0x2ef3cd)_0x2cf81c(_0x3f59f1);this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0xe'),(_0x5f571e,_0x349241)=>{_0x2cf81c(_0x349241);}),this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0x1f'),(_0x89c9ce,_0x8c987f,_0x55698f)=>{_0x3bcc4e['rearrange']({'removedAnnotation':_0x8c987f,'previousAnnotation':_0x2ef3cd[_0x1e6c('0x12')](_0x55698f-0x1),'nextAnnotation':_0x2ef3cd[_0x1e6c('0x12')](_0x55698f+0x1)}),_0x8c987f===this[_0x1e6c('0x24')]&&this[_0x1e6c('0x23')](null);},{'priority':_0x1e6c('0x9')}),this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0xa'),(_0x3b1752,_0x590285)=>{this[_0x1e6c('0x23')](_0x590285);}),this['listenTo'](_0x2ef3cd,_0x1e6c('0x21'),()=>{this[_0x1e6c('0x23')](null);});const _0x2f2e0c=this[_0x1e6c('0x0')]instanceof _0x5c9a4d?this['context'][_0x1e6c('0x3')]:new _0x26e260([this[_0x1e6c('0x0')]]);for(const _0x59bc04 of _0x2f2e0c)this['_integrateWithEditorAnnotations'](_0x59bc04);this[_0x1e6c('0xd')](_0x2f2e0c,'add',(_0x424a36,_0x10bb52)=>{this[_0x1e6c('0xd')](_0x10bb52,_0x1e6c('0x22'),()=>{this[_0x1e6c('0x27')](_0x10bb52);});}),this['listenTo'](_0x2f2e0c,_0x1e6c('0x1f'),(_0x431edd,_0x56f6b5)=>{_0x56f6b5[_0x1e6c('0x16')][_0x1e6c('0x15')](_0x1e6c('0xf'))&&this['_destroyEditorAnnotationsIntegration'](_0x56f6b5['plugins'][_0x1e6c('0x12')](_0x1e6c('0xf')));}),window[_0x1e6c('0x2b')]('resize',this[_0x1e6c('0x17')]),this['annotations']['refreshPositioning']();}['detach'](){if(!this[_0x1e6c('0x10')])throw new _0x208568(_0x1e6c('0x8'),this);this[_0x1e6c('0x23')](null);const _0x71b003=this[_0x1e6c('0x0')][_0x1e6c('0x16')]['get'](_0x3b50f8);_0x71b003['_detachFromContainer'](this[_0x1e6c('0x18')]),this['stopListening'](_0x71b003),this[_0x1e6c('0x28')](this['annotations']),this[_0x1e6c('0x0')]instanceof _0x5c9a4d&&this[_0x1e6c('0x28')](this[_0x1e6c('0x0')][_0x1e6c('0x3')]);for(const _0x40eba9 of Array[_0x1e6c('0x5')](this[_0x1e6c('0x1a')]))this[_0x1e6c('0x7')](_0x40eba9);window['removeEventListener']('resize',this[_0x1e6c('0x17')]),this['_refreshPositioningDebounced'][_0x1e6c('0x2')](),this['activeAnnotation']=null,this[_0x1e6c('0x10')]=!0x1,this[_0x1e6c('0x18')]=null;}[_0x1e6c('0x2c')](){this[_0x1e6c('0x10')]&&this[_0x1e6c('0x2a')]();}[_0x1e6c('0x27')](_0xe09982){const _0x504b47=_0xe09982['plugins']['get'](_0x543e5d);if(!_0x504b47)return;const _0x5bf97f=()=>{const _0x382720=_0x504b47[_0x1e6c('0x11')]({'annotations':this[_0x1e6c('0x18')],'activeAnnotation':this[_0x1e6c('0x24')]});this[_0x1e6c('0x23')](_0x382720[0x0]||null);};this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0xc'),_0x5bf97f),this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0x21'),(_0x5ae6fe,{isAnnotationTracked:_0x13055a})=>{this['activeAnnotation']&&_0x13055a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0x4'),()=>{this[_0x1e6c('0x17')]();}),this[_0x1e6c('0xd')](this[_0x1e6c('0x18')],_0x1e6c('0x21'),_0x569bd8=>{_0x504b47['hasDomSelection']()&&(_0x5bf97f(),_0x569bd8['stop']());},{'priority':'high'}),this[_0x1e6c('0x1a')][_0x1e6c('0xe')](_0x504b47);}[_0x1e6c('0x7')](_0x595f76){this['stopListening'](_0x595f76),this[_0x1e6c('0x1a')][_0x1e6c('0x1f')](_0x595f76);}}
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
|
|
2
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
3
|
-
interface EditorConfig {
|
|
4
|
-
/**
|
|
5
|
-
* The configuration of the comments feature.
|
|
6
|
-
* Introduced by the {@link module:comments/comments~Comments} feature.
|
|
7
|
-
*
|
|
8
|
-
* Read more in {@link module:comments/config~CommentsConfig}.
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* ClassicEditor
|
|
12
|
-
* .create( {
|
|
13
|
-
* comments: ... // Locale editor configuration.
|
|
14
|
-
* } )
|
|
15
|
-
* .then( ... )
|
|
16
|
-
* .catch( ... );
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
20
|
-
*/
|
|
21
|
-
comments?: CommentsConfig;
|
|
22
|
-
/**
|
|
23
|
-
* The configuration of the sidebar feature.
|
|
24
|
-
* Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
|
|
25
|
-
*/
|
|
26
|
-
sidebar?: SidebarConfig;
|
|
27
|
-
/**
|
|
28
|
-
* Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
|
|
29
|
-
*
|
|
30
|
-
* ```ts
|
|
31
|
-
* ClassicEditor
|
|
32
|
-
* .create( {
|
|
33
|
-
* commentsOnly: true
|
|
34
|
-
* } )
|
|
35
|
-
* .then( ... )
|
|
36
|
-
* .catch( ... );
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
commentsOnly?: boolean;
|
|
40
|
-
}
|
|
41
|
-
interface PluginsMap {
|
|
42
|
-
[Annotations.pluginName]: Annotations;
|
|
43
|
-
[AnnotationsUIs.pluginName]: AnnotationsUIs;
|
|
44
|
-
[EditorAnnotations.pluginName]: EditorAnnotations;
|
|
45
|
-
[CommentsRepository.pluginName]: CommentsRepository;
|
|
46
|
-
[CommentsUI.pluginName]: CommentsUI;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index.js';
|
|
2
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
3
|
+
interface EditorConfig {
|
|
4
|
+
/**
|
|
5
|
+
* The configuration of the comments feature.
|
|
6
|
+
* Introduced by the {@link module:comments/comments~Comments} feature.
|
|
7
|
+
*
|
|
8
|
+
* Read more in {@link module:comments/config~CommentsConfig}.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* ClassicEditor
|
|
12
|
+
* .create( {
|
|
13
|
+
* comments: ... // Locale editor configuration.
|
|
14
|
+
* } )
|
|
15
|
+
* .then( ... )
|
|
16
|
+
* .catch( ... );
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
20
|
+
*/
|
|
21
|
+
comments?: CommentsConfig;
|
|
22
|
+
/**
|
|
23
|
+
* The configuration of the sidebar feature.
|
|
24
|
+
* Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
|
|
25
|
+
*/
|
|
26
|
+
sidebar?: SidebarConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* ClassicEditor
|
|
32
|
+
* .create( {
|
|
33
|
+
* commentsOnly: true
|
|
34
|
+
* } )
|
|
35
|
+
* .then( ... )
|
|
36
|
+
* .catch( ... );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
commentsOnly?: boolean;
|
|
40
|
+
}
|
|
41
|
+
interface PluginsMap {
|
|
42
|
+
[Annotations.pluginName]: Annotations;
|
|
43
|
+
[AnnotationsUIs.pluginName]: AnnotationsUIs;
|
|
44
|
+
[EditorAnnotations.pluginName]: EditorAnnotations;
|
|
45
|
+
[CommentsRepository.pluginName]: CommentsRepository;
|
|
46
|
+
[CommentsUI.pluginName]: CommentsUI;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module comments/comments/addcommentthreadcommand
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
import { Command } from 'ckeditor5/src/core';
|
|
6
|
-
/**
|
|
7
|
-
* Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
|
|
8
|
-
* Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
|
|
12
|
-
* editor.execute( 'addCommentThread' );
|
|
13
|
-
*
|
|
14
|
-
* // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
|
|
15
|
-
* editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export default class AddCommentThreadCommand extends Command {
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
refresh(): void;
|
|
23
|
-
/**
|
|
24
|
-
* @fires execute
|
|
25
|
-
* @param options Options for executed command.
|
|
26
|
-
* @param options.threadId Id of comment marker that will be added.
|
|
27
|
-
*/
|
|
28
|
-
execute({ threadId }?: {
|
|
29
|
-
threadId?: string | undefined;
|
|
30
|
-
}): void;
|
|
31
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/addcommentthreadcommand
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
6
|
+
/**
|
|
7
|
+
* Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
|
|
8
|
+
* Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
|
|
12
|
+
* editor.execute( 'addCommentThread' );
|
|
13
|
+
*
|
|
14
|
+
* // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
|
|
15
|
+
* editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export default class AddCommentThreadCommand extends Command {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
refresh(): void;
|
|
23
|
+
/**
|
|
24
|
+
* @fires execute
|
|
25
|
+
* @param options Options for executed command.
|
|
26
|
+
* @param options.threadId Id of comment marker that will be added.
|
|
27
|
+
*/
|
|
28
|
+
execute({ threadId }?: {
|
|
29
|
+
threadId?: string | undefined;
|
|
30
|
+
}): void;
|
|
31
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1935=['_trimToContent','editor','createRange','refresh','change','addMarker','$textProxy','getLastMatchingPosition','backward','_hasContent','start','getItems','end','isObject','execute','document','_itemIsContent','element','model','push','selection','isEnabled','substr','getRanges','schema'];(function(_0x268abd,_0x1935f6){const _0x467eee=function(_0x45b5bb){while(--_0x45b5bb){_0x268abd['push'](_0x268abd['shift']());}};_0x467eee(++_0x1935f6);}(_0x1935,0x106));const _0x467e=function(_0x268abd,_0x1935f6){_0x268abd=_0x268abd-0x0;let _0x467eee=_0x1935[_0x268abd];return _0x467eee;};import{Command as _0x38ca43}from'ckeditor5/src/core.js';import{uid as _0x23bad3}from'ckeditor5/src/utils.js';export default class G extends _0x38ca43{[_0x467e('0x10')](){const _0x464986=this['editor'][_0x467e('0x6')][_0x467e('0x3')]['selection'];for(const _0x10798c of _0x464986[_0x467e('0xb')]())if(this[_0x467e('0x16')](_0x10798c))return void(this[_0x467e('0x9')]=!0x0);this[_0x467e('0x9')]=!0x1;}[_0x467e('0x2')]({threadId:_0x38e8f2=_0x23bad3()}={}){const _0x47c3cb=this['editor'][_0x467e('0x6')],_0x3260e9=[];for(const _0x4ac0d7 of _0x47c3cb[_0x467e('0x3')][_0x467e('0x8')]['getRanges']())this[_0x467e('0x16')](_0x4ac0d7)&&_0x3260e9[_0x467e('0x7')](this[_0x467e('0xd')](_0x4ac0d7));_0x47c3cb[_0x467e('0x11')](_0x47bf1c=>{for(const _0x488f4d of _0x3260e9){const _0x4f7e4d=_0x23bad3()[_0x467e('0xa')](0x1,0x5),_0x30dadc='comment:'+_0x38e8f2+':'+_0x4f7e4d;_0x47bf1c[_0x467e('0x12')](_0x30dadc,{'range':_0x488f4d,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x467e('0x16')](_0x52e0c6){for(const _0x34e374 of _0x52e0c6[_0x467e('0x18')]())if(this['_itemIsContent'](_0x34e374))return!0x0;return!0x1;}[_0x467e('0x4')](_0x303968){return _0x303968['is'](_0x467e('0x13'))||this['editor'][_0x467e('0x6')][_0x467e('0xc')][_0x467e('0x1')](_0x303968)&&!_0x303968['is'](_0x467e('0x5'),'tableCell');}[_0x467e('0xd')](_0x49ea6a){const _0x519c6c=_0x1692e6=>!this[_0x467e('0x4')](_0x1692e6['item']),_0x11feb1=_0x49ea6a[_0x467e('0x17')][_0x467e('0x14')](_0x519c6c),_0x240b09=_0x49ea6a[_0x467e('0x0')][_0x467e('0x14')](_0x519c6c,{'direction':_0x467e('0x15')});return this[_0x467e('0xe')]['model'][_0x467e('0xf')](_0x11feb1,_0x240b09);}}
|