@ckeditor/ckeditor5-comments 38.1.0 → 38.1.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 +3 -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/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';
|
|
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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2b06=['set','content','clear','_targetTop','height','ck-sidebar-item--no-animation','detach','isAnimationDisabled','attach','_mutationObserver','div','bottom','element','setTemplate','ck-sidebar-item','render','destroy','clientHeight','top'];(function(_0x18cb3f,_0x2b06d0){const _0x2423e1=function(_0x4f806c){while(--_0x4f806c){_0x18cb3f['push'](_0x18cb3f['shift']());}};_0x2423e1(++_0x2b06d0);}(_0x2b06,0xcc));const _0x2423=function(_0x18cb3f,_0x2b06d0){_0x18cb3f=_0x18cb3f-0x0;let _0x2423e1=_0x2b06[_0x18cb3f];return _0x2423e1;};import{View as _0x5b9002}from'ckeditor5/src/ui';import{toUnit as _0x266056}from'ckeditor5/src/utils';import _0x538eca from'../../utils/createmutationobserver';const At=_0x266056('px');export default class C extends _0x5b9002{constructor(_0x79e5b2){super(_0x79e5b2),this['set'](_0x2423('0x4'),0x0),this[_0x2423('0x5')](_0x2423('0x9'),0x0),this['bind'](_0x2423('0x10'))['to'](this,_0x2423('0x4'),this,'height',(_0x399b69,_0x3376e0)=>_0x399b69+_0x3376e0),this[_0x2423('0x5')](_0x2423('0xc'),!0x1),this[_0x2423('0xe')]=_0x538eca(()=>this['updateHeight']()),this[_0x2423('0x8')]=null,this[_0x2423('0x6')]=this['createCollection']();const _0x18f236=this['bindTemplate'];this[_0x2423('0x12')]({'tag':_0x2423('0xf'),'attributes':{'class':[_0x2423('0x0'),_0x18f236['to'](_0x2423('0xc'),_0x403d5b=>_0x403d5b?_0x2423('0xa'):'')],'style':{'top':_0x18f236['to']('top',_0xbf28b7=>At(_0xbf28b7))}},'children':this[_0x2423('0x6')]});}[_0x2423('0x1')](){super[_0x2423('0x1')](),this[_0x2423('0xe')][_0x2423('0xd')](this[_0x2423('0x11')]);}['updateHeight'](){const _0x3d5cf5=this['element'][_0x2423('0x3')];_0x3d5cf5&&(this[_0x2423('0x9')]=_0x3d5cf5);}[_0x2423('0x2')](){this[_0x2423('0x6')][_0x2423('0x7')](),this['_mutationObserver'][_0x2423('0xb')](),super['destroy']();}}
|
|
@@ -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';
|
|
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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4e02=['setTemplate','ck-reset','set','bindTemplate','number','div','minHeight','list','class'];(function(_0x3dd761,_0x4e0285){const _0x3a5b0b=function(_0x5887af){while(--_0x5887af){_0x3dd761['push'](_0x3dd761['shift']());}};_0x3a5b0b(++_0x4e0285);}(_0x4e02,0x168));const _0x3a5b=function(_0x3dd761,_0x4e0285){_0x3dd761=_0x3dd761-0x0;let _0x3a5b0b=_0x4e02[_0x3dd761];return _0x3a5b0b;};import{View as _0x3fd748}from'ckeditor5/src/ui';import{toUnit as _0x5c858a}from'ckeditor5/src/utils';import'../../../theme/sidebar.css';const At=_0x5c858a('px');export default class T extends _0x3fd748{constructor(_0x6da1e6){super(_0x6da1e6);const _0x468c2a=this[_0x3a5b('0x3')];this[_0x3a5b('0x2')](_0x3a5b('0x6'),0x0),this[_0x3a5b('0x2')](_0x3a5b('0x8'),''),this[_0x3a5b('0x7')]=this['createCollection'](),this[_0x3a5b('0x0')]({'tag':_0x3a5b('0x5'),'attributes':{'class':['ck','ck-sidebar',_0x3a5b('0x1'),_0x468c2a['to'](_0x3a5b('0x8'))],'style':{'minHeight':_0x468c2a['to'](_0x3a5b('0x6'),_0x3a3d17=>_0x3a5b('0x4')==typeof _0x3a3d17?At(_0x3a3d17+0xa):null)}},'children':this['list']});}}
|
|
@@ -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';
|
|
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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x287b=['destroy','isAttached','setActiveAnnotation','hasDomSelection','refreshPositioning','_activeAnnotation','listenTo','activeAnnotation','set:container','ready','add','context','change:container','get','editors','addEventListener','pluginName','_destroyEditorAnnotationsIntegration','_integrateWithEditorAnnotations','getOrderedSelectedAnnotations','_editorAnnotations','remove','set','WideSidebar','has','off','resize','init','focus','detach','refresh','attach','container','requires','annotations','high','updateTargetRect','plugins','widesidebar-detach-not-attached','stopListening','register','from','stop','wideSidebar','cancel','rearrange','blur','_refreshPositioningDebounced','EditorAnnotations'];(function(_0x5c9088,_0x287b7d){const _0x2876e8=function(_0x16c842){while(--_0x16c842){_0x5c9088['push'](_0x5c9088['shift']());}};_0x2876e8(++_0x287b7d);}(_0x287b,0x1e9));const _0x2876=function(_0x5c9088,_0x287b7d){_0x5c9088=_0x5c9088-0x0;let _0x2876e8=_0x287b[_0x5c9088];return _0x2876e8;};import{ContextPlugin as _0x29c1b3,Context as _0x4ca8c8}from'ckeditor5/src/core';import _0xc49507 from'./annotationsuis';import _0xc75922 from'./sidebar';import{CKEditorError as _0x7f0e04,Collection as _0x591643}from'ckeditor5/src/utils';import{debounce as _0xc2632e}from'lodash-es';import _0x4498a2 from'./editorannotations';export default class i extends _0x29c1b3{static get[_0x2876('0x22')](){return[_0xc75922,_0xc49507];}static get[_0x2876('0x11')](){return _0x2876('0x18');}constructor(_0x5a95b2){super(_0x5a95b2),this['isAttached']=!0x1,this[_0x2876('0x17')](_0x2876('0x8'),null),this[_0x2876('0x23')]=null,this[_0x2876('0x15')]=new _0x591643(),this[_0x2876('0x30')]=_0xc2632e(()=>{this['annotations'][_0x2876('0x5')]();},0xfa,{'leading':!0x1});}[_0x2876('0x1c')](){const _0x456a0a=this['context'][_0x2876('0x26')][_0x2876('0xe')](_0xc49507),_0x3962a3=this[_0x2876('0xc')][_0x2876('0x26')][_0x2876('0xe')](_0xc75922);_0x456a0a[_0x2876('0x29')](_0x2876('0x2c'),this),_0x3962a3[_0x2876('0x21')]&&_0x456a0a['switchTo']('wideSidebar');}[_0x2876('0x3')](_0x5208d4){if(_0x5208d4===this[_0x2876('0x8')])return;const _0x71aeee=this[_0x2876('0xc')][_0x2876('0x26')][_0x2876('0xe')](_0xc75922);_0x71aeee[_0x2876('0x6')]=_0x5208d4;const _0x1aa7cc=this[_0x2876('0x8')];this[_0x2876('0x8')]=_0x5208d4,_0x71aeee[_0x2876('0x1f')]({'blurredAnnotation':_0x1aa7cc,'activatedAnnotation':this['activeAnnotation']});}[_0x2876('0x20')](_0x5042bc){this['annotations']=_0x5042bc;const _0x66009e=this[_0x2876('0xc')][_0x2876('0x26')][_0x2876('0xe')](_0xc75922);if(_0x66009e['_annotations']=_0x5042bc,this[_0x2876('0x2')])throw new _0x7f0e04('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this[_0x2876('0x7')](_0x66009e,_0x2876('0x9'),()=>{this[_0x2876('0x1e')](),this[_0x2876('0x7')](_0x66009e,_0x2876('0xd'),_0x18df59=>{_0x18df59[_0x2876('0x1a')](),this[_0x2876('0x20')](_0x5042bc);});}),_0x66009e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x174e75=_0x303eb8=>{_0x303eb8[_0x2876('0x25')](),_0x66009e['addAnnotation'](_0x303eb8);};for(const _0x4c36c3 of _0x5042bc)_0x174e75(_0x4c36c3);this[_0x2876('0x7')](_0x5042bc,_0x2876('0xb'),(_0x21bfc1,_0x5c5828)=>{_0x174e75(_0x5c5828);}),this[_0x2876('0x7')](_0x5042bc,_0x2876('0x16'),(_0x1927f3,_0x5c604e,_0x158272)=>{_0x66009e[_0x2876('0x2e')]({'removedAnnotation':_0x5c604e,'previousAnnotation':_0x5042bc[_0x2876('0xe')](_0x158272-0x1),'nextAnnotation':_0x5042bc[_0x2876('0xe')](_0x158272+0x1)}),_0x5c604e===this[_0x2876('0x8')]&&this[_0x2876('0x3')](null);},{'priority':_0x2876('0x24')}),this[_0x2876('0x7')](_0x5042bc,_0x2876('0x1d'),(_0x1870b0,_0x5bea68)=>{this[_0x2876('0x3')](_0x5bea68);}),this['listenTo'](_0x5042bc,'blur',()=>{this[_0x2876('0x3')](null);});const _0x242523=this[_0x2876('0xc')]instanceof _0x4ca8c8?this[_0x2876('0xc')][_0x2876('0xf')]:new _0x591643([this[_0x2876('0xc')]]);for(const _0x12c183 of _0x242523)this['_integrateWithEditorAnnotations'](_0x12c183);this[_0x2876('0x7')](_0x242523,_0x2876('0xb'),(_0x18716b,_0x16db37)=>{this[_0x2876('0x7')](_0x16db37,_0x2876('0xa'),()=>{this[_0x2876('0x13')](_0x16db37);});}),this[_0x2876('0x7')](_0x242523,'remove',(_0x44b3c8,_0x43cd68)=>{_0x43cd68[_0x2876('0x26')][_0x2876('0x19')](_0x2876('0x0'))&&this[_0x2876('0x12')](_0x43cd68['plugins'][_0x2876('0xe')]('EditorAnnotations'));}),window[_0x2876('0x10')](_0x2876('0x1b'),this['_refreshPositioningDebounced']),this[_0x2876('0x23')][_0x2876('0x5')]();}['detach'](){if(!this['isAttached'])throw new _0x7f0e04(_0x2876('0x27'),this);this[_0x2876('0x3')](null);const _0x893d72=this[_0x2876('0xc')][_0x2876('0x26')][_0x2876('0xe')](_0xc75922);_0x893d72['_detachFromContainer'](this[_0x2876('0x23')]),this['stopListening'](_0x893d72),this['stopListening'](this[_0x2876('0x23')]),this[_0x2876('0xc')]instanceof _0x4ca8c8&&this['stopListening'](this[_0x2876('0xc')][_0x2876('0xf')]);for(const _0x4846a2 of Array[_0x2876('0x2a')](this[_0x2876('0x15')]))this[_0x2876('0x12')](_0x4846a2);window['removeEventListener']('resize',this[_0x2876('0x30')]),this['_refreshPositioningDebounced'][_0x2876('0x2d')](),this[_0x2876('0x8')]=null,this[_0x2876('0x2')]=!0x1,this[_0x2876('0x23')]=null;}[_0x2876('0x1')](){this[_0x2876('0x2')]&&this[_0x2876('0x1e')]();}[_0x2876('0x13')](_0x4303b9){const _0x184246=_0x4303b9[_0x2876('0x26')][_0x2876('0xe')](_0x4498a2);if(!_0x184246)return;const _0x178252=()=>{const _0x2d8ee0=_0x184246[_0x2876('0x14')]({'annotations':this['annotations'],'activeAnnotation':this[_0x2876('0x8')]});this[_0x2876('0x3')](_0x2d8ee0[0x0]||null);};this['listenTo'](_0x184246,_0x2876('0x1f'),_0x178252),this[_0x2876('0x7')](_0x184246,_0x2876('0x2f'),(_0xccca39,{isAnnotationTracked:_0x1f9292})=>{this['activeAnnotation']&&_0x1f9292(this[_0x2876('0x8')])&&this[_0x2876('0x3')](null);}),this['listenTo'](_0x184246,'uiUpdate',()=>{this[_0x2876('0x30')]();}),this['listenTo'](this[_0x2876('0x23')],_0x2876('0x2f'),_0x344fc1=>{_0x184246[_0x2876('0x4')]()&&(_0x178252(),_0x344fc1[_0x2876('0x2b')]());},{'priority':_0x2876('0x24')}),this[_0x2876('0x15')]['add'](_0x184246);}[_0x2876('0x12')](_0x3a11a1){this[_0x2876('0x28')](_0x3a11a1),this[_0x2876('0x15')][_0x2876('0x16')](_0x3a11a1);}}
|
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';
|
|
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';
|
|
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 _0x7e00=['schema','addMarker','getRanges','document','_itemIsContent','change','backward','model','getItems','comment:','_hasContent','createRange','start','element','_trimToContent','item','editor','selection','isObject','isEnabled','execute','end','substr','getLastMatchingPosition'];(function(_0x274fd5,_0x7e000){const _0x2829e3=function(_0x1a69e0){while(--_0x1a69e0){_0x274fd5['push'](_0x274fd5['shift']());}};_0x2829e3(++_0x7e000);}(_0x7e00,0x109));const _0x2829=function(_0x274fd5,_0x7e000){_0x274fd5=_0x274fd5-0x0;let _0x2829e3=_0x7e00[_0x274fd5];return _0x2829e3;};import{Command as _0x129f26}from'ckeditor5/src/core';import{uid as _0x34765c}from'ckeditor5/src/utils';export default class q extends _0x129f26{['refresh'](){const _0x57c415=this[_0x2829('0xf')][_0x2829('0x6')][_0x2829('0x2')][_0x2829('0x10')];for(const _0x895b08 of _0x57c415[_0x2829('0x1')]())if(this[_0x2829('0x9')](_0x895b08))return void(this[_0x2829('0x12')]=!0x0);this[_0x2829('0x12')]=!0x1;}[_0x2829('0x13')]({threadId:_0x35af2f=_0x34765c()}={}){const _0x35ab11=this[_0x2829('0xf')][_0x2829('0x6')],_0x5a2a1e=[];for(const _0x333ce8 of _0x35ab11[_0x2829('0x2')][_0x2829('0x10')][_0x2829('0x1')]())this[_0x2829('0x9')](_0x333ce8)&&_0x5a2a1e['push'](this[_0x2829('0xd')](_0x333ce8));_0x35ab11[_0x2829('0x4')](_0xdbfb62=>{for(const _0x4e3089 of _0x5a2a1e){const _0x31a48c=_0x34765c()[_0x2829('0x15')](0x1,0x5),_0x26a8b6=_0x2829('0x8')+_0x35af2f+':'+_0x31a48c;_0xdbfb62[_0x2829('0x0')](_0x26a8b6,{'range':_0x4e3089,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x2829('0x9')](_0x208a0a){for(const _0x7e4d09 of _0x208a0a[_0x2829('0x7')]())if(this[_0x2829('0x3')](_0x7e4d09))return!0x0;return!0x1;}[_0x2829('0x3')](_0x2b4f5a){return _0x2b4f5a['is']('$textProxy')||this['editor']['model'][_0x2829('0x17')][_0x2829('0x11')](_0x2b4f5a)&&!_0x2b4f5a['is'](_0x2829('0xc'),'tableCell');}[_0x2829('0xd')](_0x5c88f8){const _0x76d80f=_0x3009c0=>!this[_0x2829('0x3')](_0x3009c0[_0x2829('0xe')]),_0x31375c=_0x5c88f8[_0x2829('0xb')][_0x2829('0x16')](_0x76d80f),_0x4beaf1=_0x5c88f8[_0x2829('0x14')][_0x2829('0x16')](_0x76d80f,{'direction':_0x2829('0x5')});return this['editor']['model'][_0x2829('0xa')](_0x31375c,_0x4beaf1);}}
|