@ckeditor/ckeditor5-comments 36.0.0 → 37.0.0-rc.0
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 +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +8 -1
- package/lang/translations/af.po +28 -0
- package/lang/translations/ar.po +28 -0
- package/lang/translations/bg.po +28 -0
- package/lang/translations/bn.po +28 -0
- package/lang/translations/bs.po +28 -0
- package/lang/translations/ca.po +28 -0
- package/lang/translations/cs.po +28 -0
- package/lang/translations/da.po +28 -0
- package/lang/translations/de-ch.po +28 -0
- package/lang/translations/de.po +28 -0
- package/lang/translations/el.po +28 -0
- package/lang/translations/en-au.po +28 -0
- package/lang/translations/en.po +28 -0
- package/lang/translations/es-co.po +28 -0
- package/lang/translations/es.po +28 -0
- package/lang/translations/et.po +28 -0
- package/lang/translations/fa.po +28 -0
- package/lang/translations/fi.po +28 -0
- package/lang/translations/fr.po +28 -0
- package/lang/translations/gl.po +28 -0
- package/lang/translations/he.po +28 -0
- package/lang/translations/hi.po +28 -0
- package/lang/translations/hr.po +28 -0
- package/lang/translations/hu.po +28 -0
- package/lang/translations/id.po +28 -0
- package/lang/translations/it.po +28 -0
- package/lang/translations/ja.po +28 -0
- package/lang/translations/jv.po +28 -0
- package/lang/translations/ko.po +28 -0
- package/lang/translations/lt.po +28 -0
- package/lang/translations/lv.po +28 -0
- package/lang/translations/ms.po +28 -0
- package/lang/translations/nl.po +28 -0
- package/lang/translations/no.po +28 -0
- package/lang/translations/pl.po +28 -0
- package/lang/translations/pt-br.po +28 -0
- package/lang/translations/pt.po +28 -0
- package/lang/translations/ro.po +28 -0
- package/lang/translations/ru.po +28 -0
- package/lang/translations/sk.po +28 -0
- package/lang/translations/sr-latn.po +28 -0
- package/lang/translations/sr.po +29 -1
- package/lang/translations/sv.po +28 -0
- package/lang/translations/th.po +28 -0
- package/lang/translations/tk.po +28 -0
- package/lang/translations/tr.po +28 -0
- package/lang/translations/tt.po +28 -0
- package/lang/translations/ug.po +28 -0
- package/lang/translations/uk.po +28 -0
- package/lang/translations/ur.po +28 -0
- package/lang/translations/vi.po +28 -0
- package/lang/translations/zh-cn.po +28 -0
- package/lang/translations/zh.po +28 -0
- package/package.json +20 -4
- package/src/annotations/annotation.d.ts +86 -0
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +94 -0
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +150 -0
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +227 -0
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +62 -0
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +84 -0
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +80 -0
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +96 -0
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -0
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +86 -0
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +51 -0
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +28 -0
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +72 -0
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +54 -0
- package/src/augmentation.js +23 -0
- package/src/comments/addcommentthreadcommand.d.ts +31 -0
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +25 -0
- package/src/comments/commentsarchive.js +23 -0
- package/src/comments/commentsarchiveui.d.ts +32 -0
- package/src/comments/commentsarchiveui.js +23 -0
- package/src/comments/commentsediting.d.ts +71 -0
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1009 -0
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +25 -0
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -0
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +17 -0
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -0
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -0
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -0
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.d.ts +64 -0
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.d.ts +108 -0
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +108 -0
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -0
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +10 -0
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +76 -0
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +34 -0
- package/src/comments/ui/view/commentsarchiveview.js +23 -0
- package/src/comments/ui/view/commentslistview.d.ts +96 -0
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -0
- package/src/comments/ui/view/commentthreadheaderview.js +23 -0
- package/src/comments/ui/view/commentthreadinputview.d.ts +37 -0
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +108 -0
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +231 -0
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +22 -0
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +28 -0
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +172 -0
- package/src/config.js +23 -0
- package/src/index.d.ts +19 -0
- package/src/index.js +1 -1
- package/src/utils/common-translations.d.ts +5 -0
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.d.ts +13 -0
- package/src/utils/createmutationobserver.js +1 -1
- package/theme/annotation.css +1 -0
- package/theme/comment.css +31 -0
- package/theme/commentsarchive.css +40 -0
- package/theme/commentthread.css +68 -1
- package/theme/icons/add-comment.svg +1 -1
- package/theme/icons/comments-archive.svg +11 -0
- package/theme/icons/undo.svg +1 -0
- package/theme/sidebar.css +4 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/annotations/view/annotationview
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
+
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils';
|
|
7
|
+
import '../../../theme/annotation.css';
|
|
8
|
+
/**
|
|
9
|
+
* A wrapping view for any view added to the `Annotations` plugin.
|
|
10
|
+
*
|
|
11
|
+
* It introduces functionalities that make the given view ready to be used as an annotation, such as focus tracking, height resizing,
|
|
12
|
+
* and other observable properties that help share current annotation state across different UIs.
|
|
13
|
+
*/
|
|
14
|
+
export default class AnnotationView extends View {
|
|
15
|
+
/**
|
|
16
|
+
* Tracks focus on the annotation view.
|
|
17
|
+
*
|
|
18
|
+
* Add a DOM element to this focus tracker to prevent blurring annotation view
|
|
19
|
+
* when the DOM element is focused.
|
|
20
|
+
*/
|
|
21
|
+
readonly focusTracker: FocusTracker;
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly keystrokes: KeystrokeHandler;
|
|
24
|
+
/**
|
|
25
|
+
* Target rectangle to which the annotation should be attached.
|
|
26
|
+
*
|
|
27
|
+
* @observable
|
|
28
|
+
*/
|
|
29
|
+
targetRect: Rect | null;
|
|
30
|
+
/**
|
|
31
|
+
* Annotation view height.
|
|
32
|
+
*
|
|
33
|
+
* @observable
|
|
34
|
+
*/
|
|
35
|
+
height: number;
|
|
36
|
+
/**
|
|
37
|
+
* Informs if an annotation is active.
|
|
38
|
+
*
|
|
39
|
+
* @observable
|
|
40
|
+
*/
|
|
41
|
+
isActive: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Informs if there are unsaved changes in the annotation.
|
|
44
|
+
*
|
|
45
|
+
* @observable
|
|
46
|
+
*/
|
|
47
|
+
isDirty: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The number of items in the annotation.
|
|
50
|
+
*
|
|
51
|
+
* @observable
|
|
52
|
+
*/
|
|
53
|
+
length: number;
|
|
54
|
+
/**
|
|
55
|
+
* @observable
|
|
56
|
+
*/
|
|
57
|
+
type: string;
|
|
58
|
+
element: HTMLElement;
|
|
59
|
+
/**
|
|
60
|
+
* Collection for content views.
|
|
61
|
+
*/
|
|
62
|
+
content: ViewCollection;
|
|
63
|
+
/**
|
|
64
|
+
* The inner annotation view.
|
|
65
|
+
*/
|
|
66
|
+
mainView: AnnotationMainView;
|
|
67
|
+
/**
|
|
68
|
+
* @inheritDoc
|
|
69
|
+
*/
|
|
70
|
+
constructor(locale: Locale, mainView: AnnotationMainView);
|
|
71
|
+
/**
|
|
72
|
+
* @inheritDoc
|
|
73
|
+
*/
|
|
74
|
+
render(): void;
|
|
75
|
+
/**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
78
|
+
destroy(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Focuses the annotation view.
|
|
81
|
+
*/
|
|
82
|
+
focus(): void;
|
|
83
|
+
}
|
|
84
|
+
export interface AnnotationMainView extends View {
|
|
85
|
+
isActive: boolean;
|
|
86
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2442=['add','div','isActive','_updateHeight','element','keystrokes','listenTo','_mutationObserver','type','ck-annotation-wrapper','focusTracker','render','set','fire','height','focus','bindTemplate','mainView','ck-rounded-corners','clientHeight','clear','destroy','setTemplate','ck-annotation-wrapper--active','content','length','detach','Esc'];(function(_0x49f9d7,_0x244296){const _0x19eadf=function(_0x4397d8){while(--_0x4397d8){_0x49f9d7['push'](_0x49f9d7['shift']());}};_0x19eadf(++_0x244296);}(_0x2442,0x19b));const _0x19ea=function(_0x49f9d7,_0x244296){_0x49f9d7=_0x49f9d7-0x0;let _0x19eadf=_0x2442[_0x49f9d7];return _0x19eadf;};import{View as _0x4f10f7}from'ckeditor5/src/ui';import{FocusTracker as _0x33d0eb,KeystrokeHandler as _0x4c3d70,uid as _0x13df42}from'ckeditor5/src/utils';import _0x34ead2 from'../../utils/createmutationobserver';import'../../../theme/annotation.css';export default class V extends _0x4f10f7{constructor(_0x2223dc,_0x1d0d73){super(_0x2223dc),this['id']=_0x13df42(),this[_0x19ea('0x13')]=new _0x33d0eb(),this[_0x19ea('0xe')]=new _0x4c3d70(),this['keystrokes'][_0x19ea('0x15')](_0x19ea('0x8'),(_0x40e75d,_0x58c38c)=>this[_0x19ea('0x16')](_0x19ea('0x8'),_0x58c38c)),this[_0x19ea('0x15')]('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this[_0x19ea('0x15')](_0x19ea('0x17'),0x0),this[_0x19ea('0x15')](_0x19ea('0xb'),!0x1),this[_0x19ea('0x15')]('isDirty',!0x1),this[_0x19ea('0x15')](_0x19ea('0x6'),0x0),this['set'](_0x19ea('0x11'),''),this[_0x19ea('0x10')]=_0x34ead2(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this[_0x19ea('0x5')][_0x19ea('0x9')](_0x1d0d73),this[_0x19ea('0x1a')]=_0x1d0d73;const _0x4b8a8d=this[_0x19ea('0x19')];this[_0x19ea('0x3')]({'tag':_0x19ea('0xa'),'attributes':{'class':['ck',_0x19ea('0x12'),_0x19ea('0x1b'),_0x4b8a8d['if'](_0x19ea('0xb'),_0x19ea('0x4'))],'tabindex':-0x1},'children':this[_0x19ea('0x5')]});}[_0x19ea('0x14')](){super[_0x19ea('0x14')](),this[_0x19ea('0x13')]['add'](this['element']),this[_0x19ea('0xe')][_0x19ea('0xf')](this[_0x19ea('0xd')]),this[_0x19ea('0x10')]['attach'](this[_0x19ea('0xd')]);}[_0x19ea('0x2')](){this['content'][_0x19ea('0x1')](),this[_0x19ea('0xe')][_0x19ea('0x2')](),this[_0x19ea('0x13')]['destroy'](),this[_0x19ea('0x10')][_0x19ea('0x7')](),super['destroy']();}[_0x19ea('0x18')](){this[_0x19ea('0xd')][_0x19ea('0x18')]();}[_0x19ea('0xc')](){const _0x19acf8=this[_0x19ea('0xd')][_0x19ea('0x0')];_0x19acf8&&(this[_0x19ea('0x17')]=_0x19acf8);}}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3d82=['render','element','top','content','clientHeight','bottom','_mutationObserver','isAnimationDisabled','createCollection','setTemplate','attach','ck-sidebar-item','div','height','updateHeight','_targetTop','set','clear','ck-sidebar-item--no-animation'];(function(_0x3f6664,_0x3d82ec){const _0x29c88a=function(_0xdba03b){while(--_0xdba03b){_0x3f6664['push'](_0x3f6664['shift']());}};_0x29c88a(++_0x3d82ec);}(_0x3d82,0x16e));const _0x29c8=function(_0x3f6664,_0x3d82ec){_0x3f6664=_0x3f6664-0x0;let _0x29c88a=_0x3d82[_0x3f6664];return _0x29c88a;};import{View as _0x588609}from'ckeditor5/src/ui';import{toUnit as _0x4a88cc}from'ckeditor5/src/utils';import _0x988c64 from'../../utils/createmutationobserver';const At=_0x4a88cc('px');export default class C extends _0x588609{constructor(_0x50a1bc){super(_0x50a1bc),this[_0x29c8('0xb')]('top',0x0),this['set'](_0x29c8('0x8'),0x0),this['bind'](_0x29c8('0x0'))['to'](this,_0x29c8('0x10'),this,_0x29c8('0x8'),(_0x22c445,_0x422ed6)=>_0x22c445+_0x422ed6),this[_0x29c8('0xb')](_0x29c8('0x2'),!0x1),this[_0x29c8('0x1')]=_0x988c64(()=>this[_0x29c8('0x9')]()),this[_0x29c8('0xa')]=null,this['content']=this[_0x29c8('0x3')]();const _0x4f8fa9=this['bindTemplate'];this[_0x29c8('0x4')]({'tag':_0x29c8('0x7'),'attributes':{'class':[_0x29c8('0x6'),_0x4f8fa9['to']('isAnimationDisabled',_0x19d4d3=>_0x19d4d3?_0x29c8('0xd'):'')],'style':{'top':_0x4f8fa9['to'](_0x29c8('0x10'),_0x219140=>At(_0x219140))}},'children':this[_0x29c8('0x11')]});}[_0x29c8('0xe')](){super[_0x29c8('0xe')](),this[_0x29c8('0x1')][_0x29c8('0x5')](this[_0x29c8('0xf')]);}[_0x29c8('0x9')](){const _0x1b58ff=this[_0x29c8('0xf')][_0x29c8('0x12')];_0x1b58ff&&(this[_0x29c8('0x8')]=_0x1b58ff);}['destroy'](){this['content'][_0x29c8('0xc')](),this[_0x29c8('0x1')]['detach'](),super['destroy']();}}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x540f=['minHeight','list','createCollection','bindTemplate','setTemplate','div','ck-reset','set','class','ck-sidebar'];(function(_0x597ae8,_0x540f71){const _0x19e27f=function(_0x4f344c){while(--_0x4f344c){_0x597ae8['push'](_0x597ae8['shift']());}};_0x19e27f(++_0x540f71);}(_0x540f,0x1dc));const _0x19e2=function(_0x597ae8,_0x540f71){_0x597ae8=_0x597ae8-0x0;let _0x19e27f=_0x540f[_0x597ae8];return _0x19e27f;};import{View as _0x21b99c}from'ckeditor5/src/ui';import{toUnit as _0x95b56f}from'ckeditor5/src/utils';import'../../../theme/sidebar.css';const At=_0x95b56f('px');export default class T extends _0x21b99c{constructor(_0x1dc2d0){super(_0x1dc2d0);const _0x178f68=this[_0x19e2('0x7')];this[_0x19e2('0x1')](_0x19e2('0x4'),0x0),this['set'](_0x19e2('0x2'),''),this[_0x19e2('0x5')]=this[_0x19e2('0x6')](),this[_0x19e2('0x8')]({'tag':_0x19e2('0x9'),'attributes':{'class':['ck',_0x19e2('0x3'),_0x19e2('0x0'),_0x178f68['to'](_0x19e2('0x2'))],'style':{'minHeight':_0x178f68['to'](_0x19e2('0x4'),_0x2fed8f=>'number'==typeof _0x2fed8f?At(_0x2fed8f+0xa):null)}},'children':this['list']});}}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/annotations/widesidebar
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { ContextPlugin, type ContextPluginDependencies, Context, type Editor } from 'ckeditor5/src/core';
|
|
6
|
+
import { type AnnotationsUI } from './annotationsuis';
|
|
7
|
+
import type Annotation from './annotation';
|
|
8
|
+
import type AnnotationCollection from './annotationcollection';
|
|
9
|
+
/**
|
|
10
|
+
* The wide sidebar UI for displaying annotations.
|
|
11
|
+
*
|
|
12
|
+
* In this implementation {@link module:comments/annotations/sidebar~Sidebar the sidebar} displays full
|
|
13
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView annotation views}.
|
|
14
|
+
*
|
|
15
|
+
* To activate this UI use one of the following:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'wideSidebar' );
|
|
19
|
+
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'wideSidebar', filter );
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
23
|
+
*/
|
|
24
|
+
export default class WideSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
|
|
25
|
+
/**
|
|
26
|
+
* An active annotation tracked by this UI.
|
|
27
|
+
*
|
|
28
|
+
* @observable
|
|
29
|
+
*/
|
|
30
|
+
activeAnnotation: Annotation | null;
|
|
31
|
+
isAttached: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A collection of annotations controlled by this UI.
|
|
34
|
+
*
|
|
35
|
+
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
36
|
+
*
|
|
37
|
+
* It is set to `null` if `WideSidebar` is not {@link module:comments/annotations/widesidebar~WideSidebar#attach attached}.
|
|
38
|
+
*/
|
|
39
|
+
annotations: AnnotationCollection | null;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
static get requires(): ContextPluginDependencies;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
static get pluginName(): 'WideSidebar';
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
constructor(context: Context | Editor);
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
init(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Sets the active annotation for this UI.
|
|
58
|
+
*/
|
|
59
|
+
setActiveAnnotation(annotation: Annotation | null): void;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
attach(annotations: AnnotationCollection): void;
|
|
64
|
+
/**
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
detach(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @inheritDoc
|
|
70
|
+
*/
|
|
71
|
+
destroy(): void;
|
|
72
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1a56=['change:container','isAttached','stopListening','addEventListener','_activeAnnotation','switchTo','register','refreshPositioning','high','ck-sidebar--wide','_refreshPositioningDebounced','_annotations','container','from','EditorAnnotations','_integrateWithEditorAnnotations','activeAnnotation','annotations','rearrange','stop','widesidebar-detach-not-attached','plugins','attach','uiUpdate','widesidebar-attach-already-attached','hasDomSelection','requires','destroy','set','setActiveAnnotation','addAnnotation','_attachToContainer','blur','editors','remove','ready','_destroyEditorAnnotationsIntegration','updateTargetRect','off','WideSidebar','context','listenTo','focus','detach','removeEventListener','set:container','wideSidebar','get','_detachFromContainer','refresh','getOrderedSelectedAnnotations','pluginName','add','_editorAnnotations'];(function(_0x14ef4c,_0x1a56c1){const _0x555b87=function(_0x4b6d01){while(--_0x4b6d01){_0x14ef4c['push'](_0x14ef4c['shift']());}};_0x555b87(++_0x1a56c1);}(_0x1a56,0xbb));const _0x555b=function(_0x14ef4c,_0x1a56c1){_0x14ef4c=_0x14ef4c-0x0;let _0x555b87=_0x1a56[_0x14ef4c];return _0x555b87;};import{ContextPlugin as _0x3c782a,Context as _0x1afcb1}from'ckeditor5/src/core';import _0x35c4c5 from'./annotationsuis';import _0x3a4c51 from'./sidebar';import{CKEditorError as _0x146d80,Collection as _0x1ae6d5}from'ckeditor5/src/utils';import{debounce as _0x495dd1}from'lodash-es';import _0x569253 from'./editorannotations';export default class i extends _0x3c782a{static get[_0x555b('0x1')](){return[_0x3a4c51,_0x35c4c5];}static get[_0x555b('0x1a')](){return _0x555b('0xe');}constructor(_0x2a3268){super(_0x2a3268),this['isAttached']=!0x1,this[_0x555b('0x3')](_0x555b('0x2d'),null),this[_0x555b('0x2e')]=null,this[_0x555b('0x1c')]=new _0x1ae6d5(),this[_0x555b('0x27')]=_0x495dd1(()=>{this[_0x555b('0x2e')][_0x555b('0x24')]();},0xfa,{'leading':!0x1});}['init'](){const _0x3b3190=this[_0x555b('0xf')][_0x555b('0x32')][_0x555b('0x16')](_0x35c4c5),_0x10bd0a=this[_0x555b('0xf')]['plugins'][_0x555b('0x16')](_0x3a4c51);_0x3b3190[_0x555b('0x23')]('wideSidebar',this),_0x10bd0a[_0x555b('0x29')]&&_0x3b3190[_0x555b('0x22')](_0x555b('0x15'));}[_0x555b('0x4')](_0x1e9bfc){if(_0x1e9bfc===this[_0x555b('0x2d')])return;const _0x484440=this[_0x555b('0xf')][_0x555b('0x32')][_0x555b('0x16')](_0x3a4c51);_0x484440[_0x555b('0x21')]=_0x1e9bfc;const _0x297273=this[_0x555b('0x2d')];this[_0x555b('0x2d')]=_0x1e9bfc,_0x484440[_0x555b('0x18')]({'blurredAnnotation':_0x297273,'activatedAnnotation':this[_0x555b('0x2d')]});}[_0x555b('0x33')](_0x400935){this[_0x555b('0x2e')]=_0x400935;const _0xae8693=this['context'][_0x555b('0x32')][_0x555b('0x16')](_0x3a4c51);if(_0xae8693[_0x555b('0x28')]=_0x400935,this[_0x555b('0x1e')])throw new _0x146d80(_0x555b('0x35'),this);this['isAttached']=!0x0,this[_0x555b('0x10')](_0xae8693,_0x555b('0x14'),()=>{this[_0x555b('0x12')](),this[_0x555b('0x10')](_0xae8693,_0x555b('0x1d'),_0x17a6ec=>{_0x17a6ec[_0x555b('0xd')](),this[_0x555b('0x33')](_0x400935);});}),_0xae8693[_0x555b('0x6')]({'viewClass':_0x555b('0x26')});const _0x17efb3=_0x428c11=>{_0x428c11[_0x555b('0xc')](),_0xae8693[_0x555b('0x5')](_0x428c11);};for(const _0x6dcc0b of _0x400935)_0x17efb3(_0x6dcc0b);this[_0x555b('0x10')](_0x400935,_0x555b('0x1b'),(_0x209412,_0x44a986)=>{_0x17efb3(_0x44a986);}),this[_0x555b('0x10')](_0x400935,_0x555b('0x9'),(_0x4c5346,_0xcf2ed2,_0x5725da)=>{_0xae8693[_0x555b('0x2f')]({'removedAnnotation':_0xcf2ed2,'previousAnnotation':_0x400935['get'](_0x5725da-0x1),'nextAnnotation':_0x400935[_0x555b('0x16')](_0x5725da+0x1)}),_0xcf2ed2===this[_0x555b('0x2d')]&&this[_0x555b('0x4')](null);},{'priority':_0x555b('0x25')}),this[_0x555b('0x10')](_0x400935,_0x555b('0x11'),(_0x2a2d90,_0x1a59a3)=>{this[_0x555b('0x4')](_0x1a59a3);}),this[_0x555b('0x10')](_0x400935,_0x555b('0x7'),()=>{this[_0x555b('0x4')](null);});const _0x28bc5d=this[_0x555b('0xf')]instanceof _0x1afcb1?this[_0x555b('0xf')][_0x555b('0x8')]:new _0x1ae6d5([this[_0x555b('0xf')]]);for(const _0x2be6e0 of _0x28bc5d)this['_integrateWithEditorAnnotations'](_0x2be6e0);this[_0x555b('0x10')](_0x28bc5d,'add',(_0x18bc5d,_0x3c9641)=>{this[_0x555b('0x10')](_0x3c9641,_0x555b('0xa'),()=>{this[_0x555b('0x2c')](_0x3c9641);});}),this['listenTo'](_0x28bc5d,_0x555b('0x9'),(_0x2146ed,_0x77fdfc)=>{_0x77fdfc['plugins']['has'](_0x555b('0x2b'))&&this[_0x555b('0xb')](_0x77fdfc['plugins'][_0x555b('0x16')](_0x555b('0x2b')));}),window[_0x555b('0x20')]('resize',()=>this[_0x555b('0x27')]()),this['annotations']['refreshPositioning']();}[_0x555b('0x12')](){if(!this[_0x555b('0x1e')])throw new _0x146d80(_0x555b('0x31'),this);this[_0x555b('0x4')](null);const _0x1d221e=this[_0x555b('0xf')][_0x555b('0x32')][_0x555b('0x16')](_0x3a4c51);_0x1d221e[_0x555b('0x17')](this[_0x555b('0x2e')]),this['stopListening'](_0x1d221e),this[_0x555b('0x1f')](this[_0x555b('0x2e')]),this[_0x555b('0xf')]instanceof _0x1afcb1&&this[_0x555b('0x1f')](this[_0x555b('0xf')][_0x555b('0x8')]);for(const _0x4120f0 of Array[_0x555b('0x2a')](this[_0x555b('0x1c')]))this[_0x555b('0xb')](_0x4120f0);window[_0x555b('0x13')]('resize',this[_0x555b('0x27')]),this['_refreshPositioningDebounced']['cancel'](),this[_0x555b('0x2d')]=null,this[_0x555b('0x1e')]=!0x1,this[_0x555b('0x2e')]=null;}[_0x555b('0x2')](){this[_0x555b('0x1e')]&&this['detach']();}[_0x555b('0x2c')](_0xabba53){const _0x2f5d17=_0xabba53[_0x555b('0x32')][_0x555b('0x16')](_0x569253);if(!_0x2f5d17)return;const _0xd47c10=()=>{const _0x65d73e=_0x2f5d17[_0x555b('0x19')]({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this[_0x555b('0x4')](_0x65d73e[0x0]||null);};this['listenTo'](_0x2f5d17,'refresh',_0xd47c10),this[_0x555b('0x10')](_0x2f5d17,'blur',(_0x16f4ff,{isAnnotationTracked:_0x6128a})=>{this['activeAnnotation']&&_0x6128a(this[_0x555b('0x2d')])&&this[_0x555b('0x4')](null);}),this[_0x555b('0x10')](_0x2f5d17,_0x555b('0x34'),()=>{this['_refreshPositioningDebounced']();}),this[_0x555b('0x10')](this[_0x555b('0x2e')],_0x555b('0x7'),_0x1be359=>{_0x2f5d17[_0x555b('0x0')]()&&(_0xd47c10(),_0x1be359[_0x555b('0x30')]());},{'priority':_0x555b('0x25')}),this[_0x555b('0x1c')][_0x555b('0x1b')](_0x2f5d17);}[_0x555b('0xb')](_0x1b5c59){this['stopListening'](_0x1b5c59),this[_0x555b('0x1c')]['remove'](_0x1b5c59);}}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CommentsConfig, SidebarConfig, Annotations, 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
|
+
* The license key for the CKEditor 5 premium features.
|
|
42
|
+
*
|
|
43
|
+
* If you do not have a key yet, please [contact us](https://ckeditor.com/contact/) or
|
|
44
|
+
* [order a trial](https://orders.ckeditor.com/trial/premium-features).
|
|
45
|
+
*/
|
|
46
|
+
licenseKey?: string;
|
|
47
|
+
}
|
|
48
|
+
interface PluginsMap {
|
|
49
|
+
[Annotations.pluginName]: Annotations;
|
|
50
|
+
[EditorAnnotations.pluginName]: EditorAnnotations;
|
|
51
|
+
[CommentsRepository.pluginName]: CommentsRepository;
|
|
52
|
+
[CommentsUI.pluginName]: CommentsUI;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x34f1=['change','document','model','_hasContent','getRanges','refresh','substr','start','$textProxy','schema','_trimToContent','push','_itemIsContent','isObject','selection','getLastMatchingPosition','isEnabled','addMarker','backward','getItems','editor','tableCell','end','execute','item'];(function(_0x3100e,_0x34f15c){const _0x141f04=function(_0x522470){while(--_0x522470){_0x3100e['push'](_0x3100e['shift']());}};_0x141f04(++_0x34f15c);}(_0x34f1,0x64));const _0x141f=function(_0x3100e,_0x34f15c){_0x3100e=_0x3100e-0x0;let _0x141f04=_0x34f1[_0x3100e];return _0x141f04;};import{Command as _0x5dc56e}from'ckeditor5/src/core';import{uid as _0x9e25da}from'ckeditor5/src/utils';export default class q extends _0x5dc56e{[_0x141f('0x5')](){const _0x47566d=this[_0x141f('0x14')][_0x141f('0x2')][_0x141f('0x1')]['selection'];for(const _0x21dc1f of _0x47566d[_0x141f('0x4')]())if(this[_0x141f('0x3')](_0x21dc1f))return void(this[_0x141f('0x10')]=!0x0);this[_0x141f('0x10')]=!0x1;}[_0x141f('0x17')]({threadId:_0x20ddf6=_0x9e25da()}={}){const _0x1141f4=this[_0x141f('0x14')]['model'],_0x22da3c=[];for(const _0x37627a of _0x1141f4[_0x141f('0x1')][_0x141f('0xe')][_0x141f('0x4')]())this[_0x141f('0x3')](_0x37627a)&&_0x22da3c[_0x141f('0xb')](this[_0x141f('0xa')](_0x37627a));_0x1141f4[_0x141f('0x0')](_0x1a629e=>{for(const _0x51d375 of _0x22da3c){const _0x3b7dcf=_0x9e25da()[_0x141f('0x6')](0x1,0x5),_0x2d5d3d='comment:'+_0x20ddf6+':'+_0x3b7dcf;_0x1a629e[_0x141f('0x11')](_0x2d5d3d,{'range':_0x51d375,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x30e237){for(const _0x39ed5c of _0x30e237[_0x141f('0x13')]())if(this['_itemIsContent'](_0x39ed5c))return!0x0;return!0x1;}[_0x141f('0xc')](_0x331c8c){return _0x331c8c['is'](_0x141f('0x8'))||this[_0x141f('0x14')][_0x141f('0x2')][_0x141f('0x9')][_0x141f('0xd')](_0x331c8c)&&!_0x331c8c['is']('element',_0x141f('0x15'));}['_trimToContent'](_0x182665){const _0x7b70de=_0x1673f8=>!this[_0x141f('0xc')](_0x1673f8[_0x141f('0x18')]),_0x28e837=_0x182665[_0x141f('0x7')][_0x141f('0xf')](_0x7b70de),_0x273241=_0x182665[_0x141f('0x16')]['getLastMatchingPosition'](_0x7b70de,{'direction':_0x141f('0x12')});return this[_0x141f('0x14')][_0x141f('0x2')]['createRange'](_0x28e837,_0x273241);}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/commentsarchive
|
|
3
|
+
*/
|
|
4
|
+
import { ContextPlugin, type Context, type Editor, type ContextPluginDependencies } from 'ckeditor5/src/core';
|
|
5
|
+
import { Collection } from 'ckeditor5/src/utils';
|
|
6
|
+
import { type CommentThread } from './commentsrepository';
|
|
7
|
+
/**
|
|
8
|
+
* This plugin handles all operations on resolved threads needed for the comments archive.
|
|
9
|
+
*/
|
|
10
|
+
export default class CommentsArchive extends ContextPlugin {
|
|
11
|
+
resolvedThreads: Collection<CommentThread>;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
static get pluginName(): 'CommentsArchive';
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): ContextPluginDependencies;
|
|
20
|
+
constructor(context: Context | Editor);
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
init(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4981=['isActive','resolveCommentThread','CommentsArchive','reopenCommentThread','listenTo','getCommentThread','focus','plugins','collection','pluginName','add','get','has','_calculatePosition','highest','context','resolvedAt','length','resolvedThreads','requires','removeCommentThread','activate'];(function(_0x4c7140,_0x4981c1){const _0x1ce093=function(_0x18c98e){while(--_0x18c98e){_0x4c7140['push'](_0x4c7140['shift']());}};_0x1ce093(++_0x4981c1);}(_0x4981,0x1a5));const _0x1ce0=function(_0x4c7140,_0x4981c1){_0x4c7140=_0x4c7140-0x0;let _0x1ce093=_0x4981[_0x4c7140];return _0x1ce093;};import{ContextPlugin as _0x5ee389}from'ckeditor5/src/core';import{Collection as _0x1c01ad}from'ckeditor5/src/utils';import _0x908d7 from'./commentsrepository';import _0x159017 from'../annotations/annotations';export default class p extends _0x5ee389{static get[_0x1ce0('0x6')](){return _0x1ce0('0x15');}static get[_0x1ce0('0x10')](){return[_0x908d7,_0x159017];}constructor(_0x3677ca){super(_0x3677ca),this[_0x1ce0('0xf')]=new _0x1c01ad();}['init'](){const _0x35c7c8=this[_0x1ce0('0xc')],_0x19295e=_0x35c7c8['plugins']['get'](_0x908d7),_0x225d5a=_0x35c7c8[_0x1ce0('0x4')][_0x1ce0('0x8')](_0x159017);this[_0x1ce0('0x1')](_0x19295e,'addCommentThread',(_0x1447ed,{threadId:_0x5a0e13,resolvedAt:_0x1e7c6d})=>{if(_0x1e7c6d){const _0x447242=_0x19295e['getCommentThread'](_0x5a0e13);this[_0x1ce0('0xf')][_0x1ce0('0x7')](_0x447242,this[_0x1ce0('0xa')](_0x1e7c6d));}}),this[_0x1ce0('0x1')](_0x19295e,_0x1ce0('0x14'),(_0x53218a,{threadId:_0xf3c1c3,resolvedAt:_0xcd5ec})=>{const _0xb70779=_0x19295e[_0x1ce0('0x2')](_0xf3c1c3);this[_0x1ce0('0xf')][_0x1ce0('0x7')](_0xb70779,this[_0x1ce0('0xa')](_0xcd5ec));},{'priority':_0x1ce0('0xb')}),this['listenTo'](_0x19295e,_0x1ce0('0x0'),(_0x3ff9ce,{threadId:_0x459f10})=>{const _0x5abeb1=_0x19295e[_0x1ce0('0x2')](_0x459f10);this[_0x1ce0('0xf')][_0x1ce0('0x9')](_0x5abeb1)&&this[_0x1ce0('0xf')]['remove'](_0x5abeb1);},{'priority':'highest'}),this['listenTo'](_0x19295e,_0x1ce0('0x11'),(_0x3f83dd,{threadId:_0x3b0007})=>{const _0x4fcbf3=_0x19295e[_0x1ce0('0x2')](_0x3b0007);this[_0x1ce0('0xf')][_0x1ce0('0x9')](_0x4fcbf3)&&this[_0x1ce0('0xf')]['remove'](_0x4fcbf3);},{'priority':_0x1ce0('0xb')}),this[_0x1ce0('0x1')](_0x225d5a[_0x1ce0('0x5')],_0x1ce0('0x3'),(_0x5dba09,_0x16281c)=>{_0x16281c[_0x1ce0('0x13')]=!0x0,_0x225d5a[_0x1ce0('0x12')](_0x16281c);});}[_0x1ce0('0xa')](_0x386b3e){const _0x125c71=[...this['resolvedThreads']]['findIndex'](_0x7b9be6=>_0x7b9be6[_0x1ce0('0xd')]<_0x386b3e);return _0x125c71>-0x1?_0x125c71:this['resolvedThreads'][_0x1ce0('0xe')];}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module comments/comments/commentsarchiveui
|
|
3
|
+
*/
|
|
4
|
+
import '../../theme/commentsarchive.css';
|
|
5
|
+
import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
|
|
6
|
+
import { ViewCollection } from 'ckeditor5/src/ui';
|
|
7
|
+
import CommentsArchiveView from './ui/view/commentsarchiveview';
|
|
8
|
+
import type AnnotationView from '../annotations/view/annotationview';
|
|
9
|
+
/**
|
|
10
|
+
* Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
|
|
11
|
+
* {@link module:comments/comments/commentsarchive~resolvedThreadAnnotationViews}.
|
|
12
|
+
*/
|
|
13
|
+
export default class CommentsArchiveUI extends Plugin {
|
|
14
|
+
commentsArchiveView: CommentsArchiveView | undefined;
|
|
15
|
+
annotationViews: ViewCollection<AnnotationView>;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): 'CommentsArchiveUI';
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): PluginDependencies;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(editor: Editor);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x1cab=['panelView','CommentsArchiveUI','componentFactory','requires','CommentsRepository','resolvedThreads','children','config','commentsArchiveView','stopListening','_createArchiveUIDropdown','locale','isVisible','channelId','annotationViews','COMMENTS_ARCHIVE','remove','_threadToController','editor','view','init','collaboration.channelId','buttonView','plugins','getByInnerView','commentsArchive','get','add','Annotations','pluginName','listenTo'];(function(_0x49b4c8,_0x1cab94){const _0x2a39f0=function(_0x5c533c){while(--_0x5c533c){_0x49b4c8['push'](_0x49b4c8['shift']());}};_0x2a39f0(++_0x1cab94);}(_0x1cab,0x199));const _0x2a39=function(_0x49b4c8,_0x1cab94){_0x49b4c8=_0x49b4c8-0x0;let _0x2a39f0=_0x1cab[_0x49b4c8];return _0x2a39f0;};import'../../theme/commentsarchive.css';import{Plugin as _0x2f6dad}from'ckeditor5/src/core';import{createDropdown as _0x49c0dc,ViewCollection as _0x49b979}from'ckeditor5/src/ui';import _0x39f4af from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x239c11}from'../utils/common-translations';import _0x44a8d4 from'./ui/view/commentsarchiveview';import _0x614cb7 from'./commentsarchive';export default class a extends _0x2f6dad{static get[_0x2a39('0x17')](){return _0x2a39('0x1a');}static get[_0x2a39('0x1c')](){return[_0x614cb7];}constructor(_0x318a17){super(_0x318a17),this[_0x2a39('0x8')]=new _0x49b979();}[_0x2a39('0xe')](){this[_0x2a39('0xc')]['ui'][_0x2a39('0x1b')][_0x2a39('0x15')](_0x2a39('0x13'),()=>this[_0x2a39('0x4')]());const _0x7aaa68=this['editor'][_0x2a39('0x11')][_0x2a39('0x14')](_0x614cb7),_0x14af19=this[_0x2a39('0xc')]['plugins'][_0x2a39('0x14')](_0x2a39('0x16')),_0x534020=this[_0x2a39('0xc')][_0x2a39('0x11')][_0x2a39('0x14')](_0x2a39('0x1d'));this[_0x2a39('0x18')](_0x7aaa68[_0x2a39('0x1e')],_0x2a39('0x15'),(_0x3eda91,_0x51578f,_0x371c9b)=>{const _0x31fbc2=this[_0x2a39('0xc')][_0x2a39('0x1')][_0x2a39('0x14')](_0x2a39('0xf'));if(!_0x31fbc2||_0x51578f['channelId']===_0x31fbc2){const _0x457462=_0x534020[_0x2a39('0xb')][_0x2a39('0x14')](_0x51578f),_0x26aa3e=_0x14af19[_0x2a39('0x12')](_0x457462[_0x2a39('0xd')]);_0x26aa3e[_0x2a39('0x6')]?this[_0x2a39('0x18')](_0x26aa3e,'change:isVisible',(_0x26fe61,_0x4e6833,_0x40b686)=>{_0x40b686||(this[_0x2a39('0x8')][_0x2a39('0x15')](_0x26aa3e[_0x2a39('0xd')],_0x371c9b),this[_0x2a39('0x3')](_0x26aa3e));}):this[_0x2a39('0x8')]['add'](_0x26aa3e[_0x2a39('0xd')],_0x371c9b);}}),this[_0x2a39('0x18')](_0x7aaa68[_0x2a39('0x1e')],_0x2a39('0xa'),(_0x2b6a57,_0x6b5f03)=>{const _0xac0ec=this[_0x2a39('0xc')][_0x2a39('0x1')][_0x2a39('0x14')]('collaboration.channelId');if(!_0xac0ec||_0x6b5f03[_0x2a39('0x7')]===_0xac0ec){const _0x596c7a=_0x534020[_0x2a39('0xb')][_0x2a39('0x14')](_0x6b5f03),_0xfd77ad=_0x14af19[_0x2a39('0x12')](_0x596c7a[_0x2a39('0xd')])[_0x2a39('0xd')];this[_0x2a39('0x8')][_0x2a39('0xa')](_0xfd77ad);}});}[_0x2a39('0x4')](){const _0x172c33=this[_0x2a39('0xc')],_0x2b3d26=_0x49c0dc(_0x172c33[_0x2a39('0x5')]);return _0x2b3d26[_0x2a39('0x10')]['set']({'icon':_0x39f4af,'label':_0x239c11(_0x172c33[_0x2a39('0x5')],_0x2a39('0x9')),'tooltip':!0x0}),_0x2b3d26['on']('change:isOpen',()=>{this[_0x2a39('0x2')]||(this[_0x2a39('0x2')]=new _0x44a8d4(_0x172c33[_0x2a39('0x5')],this['annotationViews']),_0x2b3d26[_0x2a39('0x19')][_0x2a39('0x0')][_0x2a39('0x15')](this['commentsArchiveView']));}),_0x2b3d26;}}
|