@ckeditor/ckeditor5-comments 36.0.1 → 37.0.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 +19 -3
- 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 _0x2620=['_updateHeight','bindTemplate','fire','element','setTemplate','isActive','attach','listenTo','height','ck-annotation-wrapper--active','type','ck-annotation-wrapper','isDirty','destroy','clear','ck-rounded-corners','_mutationObserver','div','set','detach','render','add','focus','keystrokes','focusTracker','Esc','mainView','content'];(function(_0x393546,_0x2620ac){const _0x3dfef8=function(_0x18336a){while(--_0x18336a){_0x393546['push'](_0x393546['shift']());}};_0x3dfef8(++_0x2620ac);}(_0x2620,0x154));const _0x3dfe=function(_0x393546,_0x2620ac){_0x393546=_0x393546-0x0;let _0x3dfef8=_0x2620[_0x393546];return _0x3dfef8;};import{View as _0x2a3dcf}from'ckeditor5/src/ui';import{FocusTracker as _0x3a59c5,KeystrokeHandler as _0x3f176a,uid as _0x2c8c03}from'ckeditor5/src/utils';import _0xd2c46b from'../../utils/createmutationobserver';import'../../../theme/annotation.css';export default class V extends _0x2a3dcf{constructor(_0x310bc8,_0x55fa49){super(_0x310bc8),this['id']=_0x2c8c03(),this['focusTracker']=new _0x3a59c5(),this['keystrokes']=new _0x3f176a(),this[_0x3dfe('0x13')][_0x3dfe('0xe')](_0x3dfe('0x15'),(_0x8f6580,_0x4e6e31)=>this[_0x3dfe('0x1a')](_0x3dfe('0x15'),_0x4e6e31)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set'](_0x3dfe('0x4'),0x0),this[_0x3dfe('0xe')](_0x3dfe('0x1'),!0x1),this[_0x3dfe('0xe')](_0x3dfe('0x8'),!0x1),this[_0x3dfe('0xe')]('length',0x0),this[_0x3dfe('0xe')](_0x3dfe('0x6'),''),this['_mutationObserver']=_0xd2c46b(()=>this[_0x3dfe('0x18')]()),this[_0x3dfe('0x17')]=this['createCollection'](),this[_0x3dfe('0x17')][_0x3dfe('0x11')](_0x55fa49),this[_0x3dfe('0x16')]=_0x55fa49;const _0x340c0b=this[_0x3dfe('0x19')];this[_0x3dfe('0x0')]({'tag':_0x3dfe('0xd'),'attributes':{'class':['ck',_0x3dfe('0x7'),_0x3dfe('0xb'),_0x340c0b['if'](_0x3dfe('0x1'),_0x3dfe('0x5'))],'tabindex':-0x1},'children':this[_0x3dfe('0x17')]});}[_0x3dfe('0x10')](){super['render'](),this[_0x3dfe('0x14')][_0x3dfe('0x11')](this[_0x3dfe('0x1b')]),this[_0x3dfe('0x13')][_0x3dfe('0x3')](this['element']),this[_0x3dfe('0xc')][_0x3dfe('0x2')](this[_0x3dfe('0x1b')]);}[_0x3dfe('0x9')](){this[_0x3dfe('0x17')][_0x3dfe('0xa')](),this[_0x3dfe('0x13')]['destroy'](),this[_0x3dfe('0x14')][_0x3dfe('0x9')](),this[_0x3dfe('0xc')][_0x3dfe('0xf')](),super[_0x3dfe('0x9')]();}['focus'](){this['element'][_0x3dfe('0x12')]();}[_0x3dfe('0x18')](){const _0x4d159e=this[_0x3dfe('0x1b')]['clientHeight'];_0x4d159e&&(this[_0x3dfe('0x4')]=_0x4d159e);}}
|
|
@@ -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 _0x140f=['clientHeight','top','destroy','height','bottom','createCollection','updateHeight','attach','bindTemplate','bind','render','div','isAnimationDisabled','clear','detach','element','content','set'];(function(_0x47b3c8,_0x140ff3){const _0x2ffb80=function(_0x543197){while(--_0x543197){_0x47b3c8['push'](_0x47b3c8['shift']());}};_0x2ffb80(++_0x140ff3);}(_0x140f,0x191));const _0x2ffb=function(_0x47b3c8,_0x140ff3){_0x47b3c8=_0x47b3c8-0x0;let _0x2ffb80=_0x140f[_0x47b3c8];return _0x2ffb80;};import{View as _0x15b993}from'ckeditor5/src/ui';import{toUnit as _0x103372}from'ckeditor5/src/utils';import _0x3d906c from'../../utils/createmutationobserver';const At=_0x103372('px');export default class C extends _0x15b993{constructor(_0x17c10e){super(_0x17c10e),this['set'](_0x2ffb('0xe'),0x0),this['set'](_0x2ffb('0x10'),0x0),this[_0x2ffb('0x4')](_0x2ffb('0x11'))['to'](this,_0x2ffb('0xe'),this,'height',(_0x34ae64,_0x5978e8)=>_0x34ae64+_0x5978e8),this[_0x2ffb('0xc')](_0x2ffb('0x7'),!0x1),this['_mutationObserver']=_0x3d906c(()=>this['updateHeight']()),this['_targetTop']=null,this[_0x2ffb('0xb')]=this[_0x2ffb('0x0')]();const _0x46cf1e=this[_0x2ffb('0x3')];this['setTemplate']({'tag':_0x2ffb('0x6'),'attributes':{'class':['ck-sidebar-item',_0x46cf1e['to'](_0x2ffb('0x7'),_0x2974c7=>_0x2974c7?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x46cf1e['to'](_0x2ffb('0xe'),_0x7fc5f7=>At(_0x7fc5f7))}},'children':this['content']});}['render'](){super[_0x2ffb('0x5')](),this['_mutationObserver'][_0x2ffb('0x2')](this['element']);}[_0x2ffb('0x1')](){const _0x4f057b=this[_0x2ffb('0xa')][_0x2ffb('0xd')];_0x4f057b&&(this['height']=_0x4f057b);}[_0x2ffb('0xf')](){this[_0x2ffb('0xb')][_0x2ffb('0x8')](),this['_mutationObserver'][_0x2ffb('0x9')](),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 _0x5dd4=['ck-sidebar','minHeight','class','set','list','ck-reset'];(function(_0x403050,_0x5dd435){const _0x3ca817=function(_0x537819){while(--_0x537819){_0x403050['push'](_0x403050['shift']());}};_0x3ca817(++_0x5dd435);}(_0x5dd4,0x171));const _0x3ca8=function(_0x403050,_0x5dd435){_0x403050=_0x403050-0x0;let _0x3ca817=_0x5dd4[_0x403050];return _0x3ca817;};import{View as _0x583617}from'ckeditor5/src/ui';import{toUnit as _0x2c10c9}from'ckeditor5/src/utils';import'../../../theme/sidebar.css';const At=_0x2c10c9('px');export default class T extends _0x583617{constructor(_0x2ef8a8){super(_0x2ef8a8);const _0x1ad2e4=this['bindTemplate'];this['set'](_0x3ca8('0x4'),0x0),this[_0x3ca8('0x0')](_0x3ca8('0x5'),''),this['list']=this['createCollection'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck',_0x3ca8('0x3'),_0x3ca8('0x2'),_0x1ad2e4['to'](_0x3ca8('0x5'))],'style':{'minHeight':_0x1ad2e4['to']('minHeight',_0x2183a2=>'number'==typeof _0x2183a2?At(_0x2183a2+0xa):null)}},'children':this[_0x3ca8('0x1')]});}}
|
|
@@ -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 _0x1054=['_detachFromContainer','off','removeEventListener','remove','widesidebar-detach-not-attached','cancel','wideSidebar','detach','listenTo','add','switchTo','ck-sidebar--wide','requires','refresh','_refreshPositioningDebounced','_annotations','hasDomSelection','stopListening','setActiveAnnotation','set','getOrderedSelectedAnnotations','container','attach','rearrange','blur','high','editors','init','get','_integrateWithEditorAnnotations','plugins','uiUpdate','annotations','register','isAttached','WideSidebar','pluginName','widesidebar-attach-already-attached','addEventListener','addAnnotation','ready','resize','has','_editorAnnotations','stop','_destroyEditorAnnotationsIntegration','from','activeAnnotation','context'];(function(_0x413aba,_0x1054e1){const _0x4529b2=function(_0x680f02){while(--_0x680f02){_0x413aba['push'](_0x413aba['shift']());}};_0x4529b2(++_0x1054e1);}(_0x1054,0x176));const _0x4529=function(_0x413aba,_0x1054e1){_0x413aba=_0x413aba-0x0;let _0x4529b2=_0x1054[_0x413aba];return _0x4529b2;};import{ContextPlugin as _0x53cc35,Context as _0x285ae4}from'ckeditor5/src/core';import _0x6879f1 from'./annotationsuis';import _0x22d9eb from'./sidebar';import{CKEditorError as _0x5d6b7c,Collection as _0x3704af}from'ckeditor5/src/utils';import{debounce as _0x45c99b}from'lodash-es';import _0x2ef266 from'./editorannotations';export default class i extends _0x53cc35{static get[_0x4529('0x1e')](){return[_0x22d9eb,_0x6879f1];}static get[_0x4529('0x5')](){return _0x4529('0x4');}constructor(_0x1112a8){super(_0x1112a8),this['isAttached']=!0x1,this[_0x4529('0x25')](_0x4529('0x10'),null),this[_0x4529('0x1')]=null,this['_editorAnnotations']=new _0x3704af(),this[_0x4529('0x20')]=_0x45c99b(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}[_0x4529('0x2d')](){const _0x506798=this[_0x4529('0x11')]['plugins']['get'](_0x6879f1),_0x189efb=this[_0x4529('0x11')][_0x4529('0x30')]['get'](_0x22d9eb);_0x506798[_0x4529('0x2')](_0x4529('0x18'),this),_0x189efb[_0x4529('0x27')]&&_0x506798[_0x4529('0x1c')](_0x4529('0x18'));}[_0x4529('0x24')](_0x2ece45){if(_0x2ece45===this['activeAnnotation'])return;const _0x329e36=this[_0x4529('0x11')]['plugins'][_0x4529('0x2e')](_0x22d9eb);_0x329e36['_activeAnnotation']=_0x2ece45;const _0x322eec=this['activeAnnotation'];this['activeAnnotation']=_0x2ece45,_0x329e36['refresh']({'blurredAnnotation':_0x322eec,'activatedAnnotation':this['activeAnnotation']});}[_0x4529('0x28')](_0x212a87){this[_0x4529('0x1')]=_0x212a87;const _0x336966=this[_0x4529('0x11')][_0x4529('0x30')][_0x4529('0x2e')](_0x22d9eb);if(_0x336966[_0x4529('0x21')]=_0x212a87,this[_0x4529('0x3')])throw new _0x5d6b7c(_0x4529('0x6'),this);this[_0x4529('0x3')]=!0x0,this[_0x4529('0x1a')](_0x336966,'set:container',()=>{this[_0x4529('0x19')](),this[_0x4529('0x1a')](_0x336966,'change:container',_0x4564f7=>{_0x4564f7[_0x4529('0x13')](),this[_0x4529('0x28')](_0x212a87);});}),_0x336966['_attachToContainer']({'viewClass':_0x4529('0x1d')});const _0xf6a24e=_0x4aafdf=>{_0x4aafdf['updateTargetRect'](),_0x336966[_0x4529('0x8')](_0x4aafdf);};for(const _0x3512f9 of _0x212a87)_0xf6a24e(_0x3512f9);this[_0x4529('0x1a')](_0x212a87,_0x4529('0x1b'),(_0x11d066,_0x2488a5)=>{_0xf6a24e(_0x2488a5);}),this[_0x4529('0x1a')](_0x212a87,_0x4529('0x15'),(_0x5b6fbb,_0x5d4906,_0x700c97)=>{_0x336966[_0x4529('0x29')]({'removedAnnotation':_0x5d4906,'previousAnnotation':_0x212a87[_0x4529('0x2e')](_0x700c97-0x1),'nextAnnotation':_0x212a87[_0x4529('0x2e')](_0x700c97+0x1)}),_0x5d4906===this['activeAnnotation']&&this[_0x4529('0x24')](null);},{'priority':_0x4529('0x2b')}),this[_0x4529('0x1a')](_0x212a87,'focus',(_0x466555,_0xf77f37)=>{this[_0x4529('0x24')](_0xf77f37);}),this[_0x4529('0x1a')](_0x212a87,'blur',()=>{this[_0x4529('0x24')](null);});const _0x331ed5=this[_0x4529('0x11')]instanceof _0x285ae4?this[_0x4529('0x11')][_0x4529('0x2c')]:new _0x3704af([this[_0x4529('0x11')]]);for(const _0x352d8e of _0x331ed5)this['_integrateWithEditorAnnotations'](_0x352d8e);this[_0x4529('0x1a')](_0x331ed5,_0x4529('0x1b'),(_0x3a28bf,_0x3c40a4)=>{this[_0x4529('0x1a')](_0x3c40a4,_0x4529('0x9'),()=>{this[_0x4529('0x2f')](_0x3c40a4);});}),this[_0x4529('0x1a')](_0x331ed5,_0x4529('0x15'),(_0x148606,_0x958a85)=>{_0x958a85[_0x4529('0x30')][_0x4529('0xb')]('EditorAnnotations')&&this[_0x4529('0xe')](_0x958a85[_0x4529('0x30')]['get']('EditorAnnotations'));}),window[_0x4529('0x7')](_0x4529('0xa'),this['_refreshPositioningDebounced']),this[_0x4529('0x1')]['refreshPositioning']();}[_0x4529('0x19')](){if(!this[_0x4529('0x3')])throw new _0x5d6b7c(_0x4529('0x16'),this);this[_0x4529('0x24')](null);const _0x5f4d9b=this[_0x4529('0x11')]['plugins'][_0x4529('0x2e')](_0x22d9eb);_0x5f4d9b[_0x4529('0x12')](this[_0x4529('0x1')]),this['stopListening'](_0x5f4d9b),this[_0x4529('0x23')](this[_0x4529('0x1')]),this[_0x4529('0x11')]instanceof _0x285ae4&&this[_0x4529('0x23')](this['context'][_0x4529('0x2c')]);for(const _0x3f02ae of Array[_0x4529('0xf')](this[_0x4529('0xc')]))this[_0x4529('0xe')](_0x3f02ae);window[_0x4529('0x14')]('resize',this['_refreshPositioningDebounced']),this[_0x4529('0x20')][_0x4529('0x17')](),this[_0x4529('0x10')]=null,this[_0x4529('0x3')]=!0x1,this['annotations']=null;}['destroy'](){this[_0x4529('0x3')]&&this[_0x4529('0x19')]();}[_0x4529('0x2f')](_0x601dcc){const _0x3afc53=_0x601dcc[_0x4529('0x30')][_0x4529('0x2e')](_0x2ef266);if(!_0x3afc53)return;const _0x3b1f9f=()=>{const _0x3e0370=_0x3afc53[_0x4529('0x26')]({'annotations':this[_0x4529('0x1')],'activeAnnotation':this['activeAnnotation']});this[_0x4529('0x24')](_0x3e0370[0x0]||null);};this['listenTo'](_0x3afc53,_0x4529('0x1f'),_0x3b1f9f),this['listenTo'](_0x3afc53,_0x4529('0x2a'),(_0x3b1e1f,{isAnnotationTracked:_0x53a09c})=>{this['activeAnnotation']&&_0x53a09c(this[_0x4529('0x10')])&&this[_0x4529('0x24')](null);}),this[_0x4529('0x1a')](_0x3afc53,_0x4529('0x0'),()=>{this[_0x4529('0x20')]();}),this['listenTo'](this[_0x4529('0x1')],_0x4529('0x2a'),_0x49cd4c=>{_0x3afc53[_0x4529('0x22')]()&&(_0x3b1f9f(),_0x49cd4c[_0x4529('0xd')]());},{'priority':_0x4529('0x2b')}),this[_0x4529('0xc')]['add'](_0x3afc53);}[_0x4529('0xe')](_0x116675){this[_0x4529('0x23')](_0x116675),this[_0x4529('0xc')][_0x4529('0x15')](_0x116675);}}
|
|
@@ -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 _0x49ed=['editor','item','element','isObject','getRanges','$textProxy','model','getLastMatchingPosition','change','tableCell','selection','start','createRange','addMarker','push','_hasContent','_trimToContent','_itemIsContent','comment:','getItems','refresh','isEnabled','substr','schema'];(function(_0x2123a9,_0x49ed0a){const _0x31789e=function(_0x56ad87){while(--_0x56ad87){_0x2123a9['push'](_0x2123a9['shift']());}};_0x31789e(++_0x49ed0a);}(_0x49ed,0xef));const _0x3178=function(_0x2123a9,_0x49ed0a){_0x2123a9=_0x2123a9-0x0;let _0x31789e=_0x49ed[_0x2123a9];return _0x31789e;};import{Command as _0x5b3d43}from'ckeditor5/src/core';import{uid as _0x1b3d1}from'ckeditor5/src/utils';export default class q extends _0x5b3d43{[_0x3178('0x15')](){const _0x55c3e9=this[_0x3178('0x1')][_0x3178('0x7')]['document'][_0x3178('0xb')];for(const _0x125899 of _0x55c3e9[_0x3178('0x5')]())if(this['_hasContent'](_0x125899))return void(this[_0x3178('0x16')]=!0x0);this[_0x3178('0x16')]=!0x1;}['execute']({threadId:_0x30c253=_0x1b3d1()}={}){const _0x4c639a=this[_0x3178('0x1')][_0x3178('0x7')],_0x1bbc5a=[];for(const _0x37080d of _0x4c639a['document']['selection'][_0x3178('0x5')]())this[_0x3178('0x10')](_0x37080d)&&_0x1bbc5a[_0x3178('0xf')](this[_0x3178('0x11')](_0x37080d));_0x4c639a[_0x3178('0x9')](_0xaaf3f3=>{for(const _0x100bea of _0x1bbc5a){const _0x2c992b=_0x1b3d1()[_0x3178('0x17')](0x1,0x5),_0x5d191f=_0x3178('0x13')+_0x30c253+':'+_0x2c992b;_0xaaf3f3[_0x3178('0xe')](_0x5d191f,{'range':_0x100bea,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x3178('0x10')](_0x299132){for(const _0x577118 of _0x299132[_0x3178('0x14')]())if(this[_0x3178('0x12')](_0x577118))return!0x0;return!0x1;}[_0x3178('0x12')](_0x337150){return _0x337150['is'](_0x3178('0x6'))||this['editor']['model'][_0x3178('0x0')][_0x3178('0x4')](_0x337150)&&!_0x337150['is'](_0x3178('0x3'),_0x3178('0xa'));}[_0x3178('0x11')](_0x5b26aa){const _0x58330a=_0x1afb40=>!this[_0x3178('0x12')](_0x1afb40[_0x3178('0x2')]),_0x450dcf=_0x5b26aa[_0x3178('0xc')][_0x3178('0x8')](_0x58330a),_0x2b56b7=_0x5b26aa['end'][_0x3178('0x8')](_0x58330a,{'direction':'backward'});return this[_0x3178('0x1')][_0x3178('0x7')][_0x3178('0xd')](_0x450dcf,_0x2b56b7);}}
|
|
@@ -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 _0x28af=['isActive','highest','addCommentThread','activate','has','listenTo','removeCommentThread','remove','resolvedThreads','findIndex','_calculatePosition','get','focus','resolveCommentThread','reopenCommentThread','add','plugins','getCommentThread'];(function(_0x220fd0,_0x28af99){const _0x5dfd11=function(_0x127d10){while(--_0x127d10){_0x220fd0['push'](_0x220fd0['shift']());}};_0x5dfd11(++_0x28af99);}(_0x28af,0xf3));const _0x5dfd=function(_0x220fd0,_0x28af99){_0x220fd0=_0x220fd0-0x0;let _0x5dfd11=_0x28af[_0x220fd0];return _0x5dfd11;};import{ContextPlugin as _0x177e6e}from'ckeditor5/src/core';import{Collection as _0x113b05}from'ckeditor5/src/utils';import _0x4c744d from'./commentsrepository';import _0x5a78fd from'../annotations/annotations';export default class p extends _0x177e6e{static get['pluginName'](){return'CommentsArchive';}static get['requires'](){return[_0x4c744d,_0x5a78fd];}constructor(_0x5dc3b8){super(_0x5dc3b8),this['resolvedThreads']=new _0x113b05();}['init'](){const _0x1cff2c=this['context'],_0x31aec8=_0x1cff2c['plugins'][_0x5dfd('0x2')](_0x4c744d),_0x1a75db=_0x1cff2c[_0x5dfd('0x7')][_0x5dfd('0x2')](_0x5a78fd);this[_0x5dfd('0xe')](_0x31aec8,_0x5dfd('0xb'),(_0x1a7f23,{threadId:_0x273a63,resolvedAt:_0x41a745})=>{if(_0x41a745){const _0x4065cc=_0x31aec8[_0x5dfd('0x8')](_0x273a63);this[_0x5dfd('0x11')][_0x5dfd('0x6')](_0x4065cc,this[_0x5dfd('0x1')](_0x41a745));}}),this[_0x5dfd('0xe')](_0x31aec8,_0x5dfd('0x4'),(_0x12ec11,{threadId:_0x3e618c,resolvedAt:_0x5d9d12})=>{const _0x8d21a0=_0x31aec8[_0x5dfd('0x8')](_0x3e618c);this[_0x5dfd('0x11')][_0x5dfd('0x6')](_0x8d21a0,this[_0x5dfd('0x1')](_0x5d9d12));},{'priority':_0x5dfd('0xa')}),this['listenTo'](_0x31aec8,_0x5dfd('0x5'),(_0x1737d0,{threadId:_0x3dba09})=>{const _0xf42de8=_0x31aec8[_0x5dfd('0x8')](_0x3dba09);this[_0x5dfd('0x11')][_0x5dfd('0xd')](_0xf42de8)&&this[_0x5dfd('0x11')][_0x5dfd('0x10')](_0xf42de8);},{'priority':_0x5dfd('0xa')}),this[_0x5dfd('0xe')](_0x31aec8,_0x5dfd('0xf'),(_0x1c9842,{threadId:_0x50f796})=>{const _0x3d5cc7=_0x31aec8[_0x5dfd('0x8')](_0x50f796);this[_0x5dfd('0x11')][_0x5dfd('0xd')](_0x3d5cc7)&&this[_0x5dfd('0x11')][_0x5dfd('0x10')](_0x3d5cc7);},{'priority':'highest'}),this['listenTo'](_0x1a75db['collection'],_0x5dfd('0x3'),(_0x581ad5,_0x7c2aef)=>{_0x7c2aef[_0x5dfd('0x9')]=!0x0,_0x1a75db[_0x5dfd('0xc')](_0x7c2aef);});}[_0x5dfd('0x1')](_0x1f35e9){const _0x4e76d0=[...this[_0x5dfd('0x11')]][_0x5dfd('0x0')](_0xeb2cf3=>_0xeb2cf3['resolvedAt']<_0x1f35e9);return _0x4e76d0>-0x1?_0x4e76d0:this['resolvedThreads']['length'];}}
|
|
@@ -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 _0x3e0f=['commentsArchiveView','CommentsArchiveUI','panelView','_threadToController','isVisible','channelId','locale','stopListening','listenTo','config','requires','annotationViews','buttonView','change:isOpen','CommentsRepository','resolvedThreads','init','set','pluginName','collaboration.channelId','plugins','get','remove','change:isVisible','COMMENTS_ARCHIVE','componentFactory','editor','getByInnerView','commentsArchive','add','view','_createArchiveUIDropdown'];(function(_0x1521b2,_0x3e0f7c){const _0x984b24=function(_0xa09122){while(--_0xa09122){_0x1521b2['push'](_0x1521b2['shift']());}};_0x984b24(++_0x3e0f7c);}(_0x3e0f,0xbc));const _0x984b=function(_0x1521b2,_0x3e0f7c){_0x1521b2=_0x1521b2-0x0;let _0x984b24=_0x3e0f[_0x1521b2];return _0x984b24;};import'../../theme/commentsarchive.css';import{Plugin as _0x1cfc03}from'ckeditor5/src/core';import{createDropdown as _0x2839bb,ViewCollection as _0x11af99}from'ckeditor5/src/ui';import _0x2704e4 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x345bc4}from'../utils/common-translations';import _0x491950 from'./ui/view/commentsarchiveview';import _0x5382d2 from'./commentsarchive';export default class a extends _0x1cfc03{static get[_0x984b('0x16')](){return _0x984b('0x5');}static get[_0x984b('0xe')](){return[_0x5382d2];}constructor(_0x86af6b){super(_0x86af6b),this[_0x984b('0xf')]=new _0x11af99();}[_0x984b('0x14')](){this['editor']['ui'][_0x984b('0x1d')][_0x984b('0x1')](_0x984b('0x0'),()=>this[_0x984b('0x3')]());const _0x36379b=this[_0x984b('0x1e')][_0x984b('0x18')]['get'](_0x5382d2),_0x4bd286=this[_0x984b('0x1e')][_0x984b('0x18')]['get']('Annotations'),_0x471b34=this[_0x984b('0x1e')]['plugins'][_0x984b('0x19')](_0x984b('0x12'));this[_0x984b('0xc')](_0x36379b[_0x984b('0x13')],_0x984b('0x1'),(_0x15f34b,_0x17f0d5,_0x4caa2e)=>{const _0x33fb43=this[_0x984b('0x1e')][_0x984b('0xd')][_0x984b('0x19')](_0x984b('0x17'));if(!_0x33fb43||_0x17f0d5[_0x984b('0x9')]===_0x33fb43){const _0x3cc8e5=_0x471b34[_0x984b('0x7')][_0x984b('0x19')](_0x17f0d5),_0x2435fc=_0x4bd286[_0x984b('0x1f')](_0x3cc8e5[_0x984b('0x2')]);_0x2435fc[_0x984b('0x8')]?this[_0x984b('0xc')](_0x2435fc,_0x984b('0x1b'),(_0x45cf28,_0x282347,_0x2ec02e)=>{_0x2ec02e||(this[_0x984b('0xf')][_0x984b('0x1')](_0x2435fc[_0x984b('0x2')],_0x4caa2e),this[_0x984b('0xb')](_0x2435fc));}):this['annotationViews'][_0x984b('0x1')](_0x2435fc['view'],_0x4caa2e);}}),this[_0x984b('0xc')](_0x36379b[_0x984b('0x13')],_0x984b('0x1a'),(_0x28fbd7,_0x57fa33)=>{const _0x10a65a=this[_0x984b('0x1e')][_0x984b('0xd')][_0x984b('0x19')](_0x984b('0x17'));if(!_0x10a65a||_0x57fa33['channelId']===_0x10a65a){const _0x466599=_0x471b34['_threadToController'][_0x984b('0x19')](_0x57fa33),_0x27ed19=_0x4bd286[_0x984b('0x1f')](_0x466599[_0x984b('0x2')])[_0x984b('0x2')];this[_0x984b('0xf')]['remove'](_0x27ed19);}});}['_createArchiveUIDropdown'](){const _0x9be32b=this[_0x984b('0x1e')],_0x3cc47b=_0x2839bb(_0x9be32b['locale']);return _0x3cc47b[_0x984b('0x10')][_0x984b('0x15')]({'icon':_0x2704e4,'label':_0x345bc4(_0x9be32b[_0x984b('0xa')],_0x984b('0x1c')),'tooltip':!0x0}),_0x3cc47b['on'](_0x984b('0x11'),()=>{this[_0x984b('0x4')]||(this['commentsArchiveView']=new _0x491950(_0x9be32b['locale'],this['annotationViews']),_0x3cc47b[_0x984b('0x6')]['children'][_0x984b('0x1')](this['commentsArchiveView']));}),_0x3cc47b;}}
|