@ckeditor/ckeditor5-comments 40.2.0 → 41.1.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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/build/comments.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +4 -3
- package/src/annotations/annotation.d.ts +7 -7
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.d.ts +4 -4
- package/src/annotations/annotationcollection.js +2 -2
- package/src/annotations/annotations.d.ts +7 -7
- package/src/annotations/annotations.js +2 -2
- package/src/annotations/annotationsuis.d.ts +6 -6
- package/src/annotations/annotationsuis.js +2 -2
- package/src/annotations/editorannotations.d.ts +5 -5
- package/src/annotations/editorannotations.js +2 -2
- package/src/annotations/inlineannotations.d.ts +7 -7
- package/src/annotations/inlineannotations.js +2 -2
- package/src/annotations/narrowsidebar.d.ts +7 -7
- package/src/annotations/narrowsidebar.js +2 -2
- package/src/annotations/sidebar.d.ts +6 -6
- package/src/annotations/sidebar.js +2 -2
- package/src/annotations/view/annotationcounterbuttonview.d.ts +3 -3
- package/src/annotations/view/annotationcounterbuttonview.js +2 -2
- package/src/annotations/view/annotationview.d.ts +3 -3
- package/src/annotations/view/annotationview.js +2 -2
- package/src/annotations/view/sidebaritemview.d.ts +3 -3
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.d.ts +3 -3
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.d.ts +6 -6
- package/src/annotations/widesidebar.js +2 -2
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/comments/addcommentthreadcommand.d.ts +2 -2
- package/src/comments/addcommentthreadcommand.js +2 -2
- package/src/comments/commentsarchive.d.ts +5 -5
- package/src/comments/commentsarchive.js +2 -2
- package/src/comments/commentsarchiveui.d.ts +6 -6
- package/src/comments/commentsarchiveui.js +2 -2
- package/src/comments/commentsediting.d.ts +7 -7
- package/src/comments/commentsediting.js +2 -2
- package/src/comments/commentsrepository.d.ts +12 -12
- package/src/comments/commentsrepository.js +2 -2
- package/src/comments/commentsui.d.ts +6 -6
- package/src/comments/commentsui.js +2 -2
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +2 -2
- package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
- package/src/comments/integrations/importword.d.ts +2 -2
- package/src/comments/integrations/importword.js +2 -2
- package/src/comments/ui/commenteditor/commenteditor.d.ts +5 -5
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +4 -4
- package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +5 -5
- package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
- package/src/comments/ui/commentthreadcontroller.d.ts +5 -5
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.d.ts +9 -9
- package/src/comments/ui/view/basecommentthreadview.js +2 -2
- package/src/comments/ui/view/basecommentview.d.ts +5 -5
- package/src/comments/ui/view/basecommentview.js +2 -2
- package/src/comments/ui/view/collapsedcommentsview.d.ts +3 -3
- package/src/comments/ui/view/collapsedcommentsview.js +2 -2
- package/src/comments/ui/view/commentcontentview.d.ts +3 -3
- package/src/comments/ui/view/commentcontentview.js +2 -2
- package/src/comments/ui/view/commentinputview.d.ts +5 -5
- package/src/comments/ui/view/commentinputview.js +2 -2
- package/src/comments/ui/view/commentsarchiveview.d.ts +4 -4
- package/src/comments/ui/view/commentsarchiveview.js +2 -2
- package/src/comments/ui/view/commentslistview.d.ts +6 -6
- package/src/comments/ui/view/commentslistview.js +2 -2
- package/src/comments/ui/view/commentthreadheaderview.d.ts +4 -4
- package/src/comments/ui/view/commentthreadheaderview.js +2 -2
- package/src/comments/ui/view/commentthreadinputview.d.ts +6 -6
- package/src/comments/ui/view/commentthreadinputview.js +2 -2
- package/src/comments/ui/view/commentthreadview.d.ts +8 -8
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.d.ts +9 -9
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.d.ts +11 -11
- package/src/comments.js +2 -2
- package/src/commentsonly.d.ts +3 -3
- package/src/commentsonly.js +2 -2
- package/src/config.d.ts +4 -4
- package/src/config.js +1 -1
- package/src/index.d.ts +21 -21
- package/src/index.js +2 -2
- package/src/utils/common-translations.d.ts +2 -2
- package/src/utils/common-translations.js +2 -2
- package/src/utils/createmutationobserver.d.ts +1 -1
- package/src/utils/createmutationobserver.js +2 -2
- package/theme/annotation-inline.css +1 -1
- package/theme/annotation.css +5 -1
- package/theme/comment.css +1 -1
- package/theme/commentinput.css +1 -1
- package/theme/commentmarker.css +1 -1
- package/theme/commentsarchive.css +2 -2
- package/theme/commentthread.css +5 -1
- package/theme/icons/add-comment.svg +1 -1
- package/theme/icons/comments-archive.svg +1 -1
- package/theme/icons/edit-comment.svg +1 -1
- package/theme/icons/remove-comment.svg +1 -1
- package/theme/sidebar-narrow.css +1 -1
- package/theme/sidebar.css +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x267b=['_bindAnnotationsToVisibleAnnotations','activeAnnotations','set','stopListening','createAnnotationView','getByInnerView','collection','source','pluginName','activate','fire','destroy','refreshPositioning','element','focusTracker','deactivateAll','createAnnotation','add','_activateAnnotation','_deactivateAllAnnotations','isVisible','change:isVisible','listenTo','has','remove','_visibleAnnotations','refreshVisibility','view','_addActiveAnnotation'];(function(_0x5882d3,_0x267b3c){const _0x216930=function(_0x1e2bee){while(--_0x1e2bee){_0x5882d3['push'](_0x5882d3['shift']());}};_0x216930(++_0x267b3c);}(_0x267b,0x1d8));const _0x2169=function(_0x5882d3,_0x267b3c){_0x5882d3=_0x5882d3-0x0;let _0x216930=_0x267b[_0x5882d3];return _0x216930;};import{ContextPlugin as _0xfe1013}from'ckeditor5/src/core.js';import _0x453fdf from'./annotation.js';import _0x3cd295 from'./annotationcollection.js';import _0x4244ee from'./view/annotationview.js';export default class b extends _0xfe1013{static get[_0x2169('0x0')](){return'Annotations';}constructor(_0x3faa8a){super(_0x3faa8a),this[_0x2169('0x1b')]=new _0x3cd295(),this['_visibleAnnotations']=new _0x3cd295(),this[_0x2169('0x17')](_0x2169('0x16'),new Set()),this['_bindAnnotationsToVisibleAnnotations']();}['add'](_0x15ab00){this[_0x2169('0x1b')][_0x2169('0x9')](_0x15ab00);}[_0x2169('0x10')](_0x5919d0){this[_0x2169('0x1b')][_0x2169('0x10')](_0x5919d0),_0x5919d0['destroy']();}[_0x2169('0x12')](){for(const _0x2248e7 of this[_0x2169('0x1b')])_0x2248e7[_0x2169('0x12')]();}['refreshPositioning'](){this[_0x2169('0x11')][_0x2169('0x4')]();}['getByInnerView'](_0xcc06b7){return this[_0x2169('0x1b')][_0x2169('0x1a')](_0xcc06b7);}[_0x2169('0x7')](){this[_0x2169('0x2')](_0x2169('0xb'));}[_0x2169('0x3')](){for(const _0x51c52d of this[_0x2169('0x1b')])_0x51c52d[_0x2169('0x3')]();this[_0x2169('0x11')][_0x2169('0x3')](),this[_0x2169('0x1b')][_0x2169('0x3')](),super['destroy']();}[_0x2169('0x1')](_0x24d0ea){this['fire'](_0x2169('0xa'),_0x24d0ea);}[_0x2169('0x8')](_0x431ec3){return new _0x453fdf(_0x431ec3);}[_0x2169('0x19')](_0x2de991,_0x373fe7){return new _0x4244ee(_0x2de991,_0x373fe7);}[_0x2169('0x14')](_0x44a1d3){const _0x81b2eb=new Set(this[_0x2169('0x16')]);_0x81b2eb['add'](_0x44a1d3),this[_0x2169('0x16')]=_0x81b2eb;}['_removeActiveAnnotation'](_0x5cb436){const _0x4c46fd=new Set(this[_0x2169('0x16')]);_0x4c46fd['delete'](_0x5cb436),this['activeAnnotations']=_0x4c46fd;}[_0x2169('0x15')](){const _0x19fd62=this[_0x2169('0x1b')],_0x1a42c3=this[_0x2169('0x11')];function _0x35a73b(_0x44b6a2){const _0x47dbd7=_0x44b6a2[_0x2169('0x1c')];_0x47dbd7[_0x2169('0xc')]&&!_0x1a42c3[_0x2169('0xf')](_0x47dbd7)?_0x1a42c3['add'](_0x47dbd7):!_0x47dbd7[_0x2169('0xc')]&&_0x1a42c3['has'](_0x47dbd7)&&_0x1a42c3[_0x2169('0x10')](_0x47dbd7),_0x47dbd7[_0x2169('0x13')][_0x2169('0x6')][_0x2169('0x10')](_0x47dbd7[_0x2169('0x13')][_0x2169('0x5')]),_0x47dbd7[_0x2169('0x13')][_0x2169('0x6')][_0x2169('0x9')](_0x47dbd7[_0x2169('0x13')][_0x2169('0x5')]);}this[_0x2169('0xe')](_0x19fd62,_0x2169('0x9'),(_0x30869f,_0x841ad4)=>{_0x841ad4['isVisible']&&_0x1a42c3['add'](_0x841ad4),this[_0x2169('0xe')](_0x841ad4,_0x2169('0xd'),_0x35a73b);}),this[_0x2169('0xe')](_0x19fd62,'remove',(_0x47f6aa,_0x369220)=>{_0x1a42c3[_0x2169('0xf')](_0x369220)&&_0x1a42c3[_0x2169('0x10')](_0x369220),this[_0x2169('0x18')](_0x369220,_0x2169('0xd'),_0x35a73b);});}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/annotations/annotationsuis
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core';
|
|
10
|
-
import { type Emitter } from 'ckeditor5/src/utils';
|
|
11
|
-
import AnnotationCollection from './annotationcollection';
|
|
12
|
-
import Annotations from './annotations';
|
|
13
|
-
import type Annotation from './annotation';
|
|
9
|
+
import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { type Emitter } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import AnnotationCollection from './annotationcollection.js';
|
|
12
|
+
import Annotations from './annotations.js';
|
|
13
|
+
import type Annotation from './annotation.js';
|
|
14
14
|
/**
|
|
15
15
|
* A repository of annotations UIs.
|
|
16
16
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x41b6=['collection','_visibleAnnotations','_removeActiveAnnotation','_assertAnnotationDoesNotBelongToMultipleUIs','activate','add','attach','annotationsuis-annotation-mismatch','find','_uis','detach','listenTo','from','filter','remove','change:activeAnnotation','isActive','activeUIs','destroy','push','deactivateAll','_addActiveAnnotation','_setSelectedAnnotations','delete','hasActive','register','stopListening','setActiveAnnotation','AnnotationsUIs','context','switchTo','get','has','init','set','_activateAnnotation','_uisData','function','_deactivateAllAnnotations','type','plugins','deactivate','activeAnnotations','annotationsuis-missing-ui'];(function(_0x4d77eb,_0x41b67a){const _0x17f635=function(_0x217354){while(--_0x217354){_0x4d77eb['push'](_0x4d77eb['shift']());}};_0x17f635(++_0x41b67a);}(_0x41b6,0x1a9));const _0x17f6=function(_0x4d77eb,_0x41b67a){_0x4d77eb=_0x4d77eb-0x0;let _0x17f635=_0x41b6[_0x4d77eb];return _0x17f635;};import{ContextPlugin as _0x49a866}from'ckeditor5/src/core.js';import{CKEditorError as _0x3539a4}from'ckeditor5/src/utils.js';import _0x4dd8b2,{bindAnnotationCollections as _0xbe23fd}from'./annotationcollection.js';import _0x106ebf from'./annotations.js';export default class j extends _0x49a866{static get['requires'](){return[_0x106ebf];}static get['pluginName'](){return _0x17f6('0x2b');}constructor(_0x4e3e74){super(_0x4e3e74),this[_0x17f6('0x20')]=new Set(),this[_0x17f6('0x18')]=new Map(),this[_0x17f6('0x7')]=new Map();}[_0x17f6('0x4')](){const _0xd39175=this[_0x17f6('0x0')]['plugins'][_0x17f6('0x2')](_0x106ebf);this[_0x17f6('0x1a')](_0xd39175,_0x17f6('0x6'),(_0x25d599,_0x13d44d)=>{for(const _0x43d356 of this[_0x17f6('0x20')]){const _0x270d3b=this[_0x17f6('0x18')][_0x17f6('0x2')](_0x43d356);(0x0,this[_0x17f6('0x7')][_0x17f6('0x2')](_0x43d356)['filter'])(_0x13d44d)&&_0x270d3b[_0x17f6('0x2a')](_0x13d44d);}}),this[_0x17f6('0x1a')](_0xd39175,_0x17f6('0x9'),()=>{for(const _0x1f341f of this['activeUIs']){this[_0x17f6('0x18')][_0x17f6('0x2')](_0x1f341f)['setActiveAnnotation'](null);}}),this[_0x17f6('0x1a')](_0xd39175[_0x17f6('0x10')],_0x17f6('0x14'),(_0x529757,_0x22a5e5)=>{this[_0x17f6('0x12')](_0x22a5e5);});}[_0x17f6('0x27')](){return this[_0x17f6('0x20')]['size']>0x0;}['isActive'](_0x70eb38){return this[_0x17f6('0x20')][_0x17f6('0x3')](_0x70eb38);}[_0x17f6('0x13')](_0x191b65,_0x1aa98a=()=>!0x0){const _0xb3f6df=this[_0x17f6('0x0')][_0x17f6('0xb')][_0x17f6('0x2')](_0x106ebf);if(!this[_0x17f6('0x18')][_0x17f6('0x3')](_0x191b65))throw new _0x3539a4(_0x17f6('0xe'),this,{'uiName':_0x191b65});this[_0x17f6('0x1f')](_0x191b65)&&this['deactivate'](_0x191b65),this['activeUIs'][_0x17f6('0x14')](_0x191b65);const _0x31cdfe=new _0x4dd8b2(),_0x15f4cf=_0xb3f6df[_0x17f6('0x10')];_0xbe23fd({'source':_0x15f4cf,'target':_0x31cdfe,'filter':_0x1aa98a}),this[_0x17f6('0x7')][_0x17f6('0x5')](_0x191b65,{'collection':_0x31cdfe,'filter':_0x1aa98a});const _0x3ab273=this[_0x17f6('0x18')][_0x17f6('0x2')](_0x191b65);_0x3ab273[_0x17f6('0x15')](_0x31cdfe),this[_0x17f6('0x1a')](_0x3ab273,_0x17f6('0x1e'),(_0x297c00,_0x1f2a59,_0x9aa215,_0x14065b)=>{_0x14065b&&_0xb3f6df[_0x17f6('0x11')](_0x14065b),_0x9aa215&&_0xb3f6df[_0x17f6('0x24')](_0x9aa215);});}[_0x17f6('0xc')](_0x5a0d2f){if(this[_0x17f6('0x20')][_0x17f6('0x26')](_0x5a0d2f),!this['_uis'][_0x17f6('0x3')](_0x5a0d2f))throw new _0x3539a4(_0x17f6('0xe'),this,{'uiName':_0x5a0d2f});const _0x5a807a=this['_uis'][_0x17f6('0x2')](_0x5a0d2f);_0x5a807a[_0x17f6('0x19')](),this[_0x17f6('0x29')](_0x5a807a),this[_0x17f6('0x7')]['get'](_0x5a0d2f)['collection'][_0x17f6('0x21')](),this['_uisData']['delete'](_0x5a0d2f);}[_0x17f6('0x1')](_0x47aab3){if(!this[_0x17f6('0x18')][_0x17f6('0x3')](_0x47aab3))throw new _0x3539a4(_0x17f6('0xe'),this,{'uiName':_0x47aab3});const _0x423236=this[_0x17f6('0x0')][_0x17f6('0xb')][_0x17f6('0x2')](_0x106ebf),_0x160951=Array[_0x17f6('0x1b')](_0x423236[_0x17f6('0xd')])[0x0]||null;this['deactivateAll'](),this[_0x17f6('0x13')](_0x47aab3);const _0x10cd1c=this[_0x17f6('0x18')]['get'](_0x47aab3);_0x10cd1c[_0x17f6('0x2a')](_0x160951),_0x10cd1c[_0x17f6('0x25')]&&_0x160951&&_0x10cd1c[_0x17f6('0x25')]([_0x160951]);}[_0x17f6('0x23')](){for(const _0x3e6753 of this[_0x17f6('0x20')])this[_0x17f6('0xc')](_0x3e6753);}[_0x17f6('0x28')](_0x4182ae,_0x3f7f2a){if(this[_0x17f6('0x18')][_0x17f6('0x3')](_0x4182ae))throw new _0x3539a4('annotationsuis-register-already-registered');if(_0x17f6('0x8')!=typeof _0x3f7f2a[_0x17f6('0x15')]||_0x17f6('0x8')!=typeof _0x3f7f2a[_0x17f6('0x19')]||_0x17f6('0x8')!=typeof _0x3f7f2a['setActiveAnnotation'])throw new _0x3539a4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4182ae,_0x3f7f2a);}['refilterAnnotations'](){const _0xcff963=this[_0x17f6('0x0')]['plugins'][_0x17f6('0x2')](_0x106ebf)['collection'],_0x69e746=new Map(),_0x4d63a1=Array['from'](this[_0x17f6('0x20')]);for(const _0x446585 of this['activeUIs']){const _0x10c07a=this[_0x17f6('0x7')]['get'](_0x446585)[_0x17f6('0xf')];for(const _0x447ef4 of _0x10c07a)_0x69e746[_0x17f6('0x5')](_0x447ef4,_0x446585);}for(const _0x329bff of _0xcff963){const _0x466f48=_0x69e746[_0x17f6('0x2')](_0x329bff);this[_0x17f6('0x12')](_0x329bff);const _0x5f4277=_0x4d63a1[_0x17f6('0x17')](_0x487a7a=>this['_uisData']['get'](_0x487a7a)[_0x17f6('0x1c')](_0x329bff));_0x466f48!==_0x5f4277&&(_0x466f48&&this[_0x17f6('0x7')][_0x17f6('0x2')](_0x466f48)[_0x17f6('0xf')][_0x17f6('0x1d')](_0x329bff),_0x5f4277&&this['_uisData'][_0x17f6('0x2')](_0x5f4277)['collection'][_0x17f6('0x14')](_0x329bff));}}[_0x17f6('0x21')](){this['deactivateAll'](),super[_0x17f6('0x21')]();}[_0x17f6('0x12')](_0x2251f1){const _0x1aff67=[];for(const _0x26426a of this['activeUIs']){(0x0,this['_uisData'][_0x17f6('0x2')](_0x26426a)['filter'])(_0x2251f1)&&_0x1aff67[_0x17f6('0x22')](_0x26426a);}if(_0x1aff67['length']>0x1)throw new _0x3539a4(_0x17f6('0x16'),null,{'matchedUIs':_0x1aff67,'annotationType':_0x2251f1[_0x17f6('0xa')]});}}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/annotations/editorannotations
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import Annotations from './annotations';
|
|
11
|
-
import type Annotation from './annotation';
|
|
12
|
-
import type AnnotationCollection from './annotationcollection';
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import Annotations from './annotations.js';
|
|
11
|
+
import type Annotation from './annotation.js';
|
|
12
|
+
import type AnnotationCollection from './annotationcollection.js';
|
|
13
13
|
/**
|
|
14
14
|
* Integrates {@link module:comments/annotations/annotations~Annotations annotations} with the editor to provide proper behavior
|
|
15
15
|
* for annotations created through the editor features.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5234=['delete','model','isReadOnly','getRanges','_editorAnnotationsData','registerAnnotation','cancel','push','_dataCollectors','annotation','requires','refreshSelectedViews','isEqual','remove','from','_editorAnnotations','selection','editor','element','isCollapsed','containsRange','map','collection','get','focusTracker','has','blur','view','getOrderedSelectedAnnotations','init','pluginName','directChange','fire','addSourceCollector','function','listenTo','add','editing','update','document','hasDomSelection','change:range','change:isFocused'];(function(_0x207e67,_0x523480){const _0x212f6e=function(_0xf3473b){while(--_0xf3473b){_0x207e67['push'](_0x207e67['shift']());}};_0x212f6e(++_0x523480);}(_0x5234,0xec));const _0x212f=function(_0x207e67,_0x523480){_0x207e67=_0x207e67-0x0;let _0x212f6e=_0x5234[_0x207e67];return _0x212f6e;};import{Plugin as _0x372de3}from'ckeditor5/src/core.js';import{CKEditorError as _0xcbee8b}from'ckeditor5/src/utils.js';import{debounce as _0x28b127}from'lodash-es';import _0x1ecf18 from'./annotations.js';export default class k extends _0x372de3{static get[_0x212f('0x20')](){return[_0x1ecf18];}static get[_0x212f('0x9')](){return'EditorAnnotations';}constructor(_0xfe05d6){super(_0xfe05d6),this['_dataCollectors']=new Set(),this[_0x212f('0x25')]=new Set();}[_0x212f('0x8')](){const _0x4f59b0=this[_0x212f('0x27')],_0x2a23ac=_0x4f59b0[_0x212f('0x17')][_0x212f('0x12')]['selection'],_0x2a2c4d=_0x28b127(()=>this[_0x212f('0x21')](),0xa);_0x2a23ac['on'](_0x212f('0x14'),(_0x4e8d75,_0x1aa0d3)=>{_0x1aa0d3[_0x212f('0xa')]&&(_0x2a2c4d[_0x212f('0x1c')](),this[_0x212f('0x21')]());}),this['listenTo'](_0x4f59b0[_0x212f('0x10')][_0x212f('0x6')][_0x212f('0x12')],_0x212f('0x15'),(_0x6af1ee,_0xd79798,_0x18750a)=>{_0x18750a&&_0x2a2c4d();}),this['listenTo'](_0x4f59b0['ui']['focusTracker'],'change:isFocused',(_0x4f5d4d,_0x48d42b,_0x1d2293)=>{_0x1d2293||_0x4f59b0[_0x212f('0x18')]||this[_0x212f('0xb')](_0x212f('0x5'),{'isAnnotationTracked':_0x302ad2=>this[_0x212f('0x1a')][_0x212f('0x4')](_0x302ad2['innerView'])});}),this['listenTo'](this['editor']['ui'],_0x212f('0x11'),()=>this[_0x212f('0xb')]('uiUpdate'));}[_0x212f('0x1b')](_0x32444e){if(this[_0x212f('0x25')][_0x212f('0x4')](_0x32444e['view']))return;this[_0x212f('0x25')]['add'](_0x32444e[_0x212f('0x6')]),this[_0x212f('0x27')]['ui'][_0x212f('0x3')][_0x212f('0xf')](_0x32444e[_0x212f('0x6')][_0x212f('0x28')]);const _0x1261d7=this[_0x212f('0x27')]['plugins'][_0x212f('0x2')](_0x1ecf18);this[_0x212f('0xe')](_0x1261d7[_0x212f('0x1')],_0x212f('0x23'),(_0x80fd3e,_0x36218b)=>{this[_0x212f('0x27')]['ui']['focusTracker'][_0x212f('0x23')](_0x36218b[_0x212f('0x6')]['element']),this[_0x212f('0x25')][_0x212f('0x16')](_0x36218b['view']);});}[_0x212f('0x13')](){return this[_0x212f('0x27')][_0x212f('0x10')][_0x212f('0x6')][_0x212f('0x13')];}[_0x212f('0xc')](_0x43bbcf){if(_0x212f('0xd')!=typeof _0x43bbcf)throw new _0xcbee8b('editorannotations-invalid-source-callback');this[_0x212f('0x1e')][_0x212f('0xf')](_0x43bbcf);}[_0x212f('0x21')](){this['fire']('refresh');}[_0x212f('0x7')]({activeAnnotation:_0x1a3339,annotations:_0x4623ea}){const _0x4b955c=[],_0x1953b5=this[_0x212f('0x27')]['model'][_0x212f('0x12')][_0x212f('0x26')],_0x4e46b3=Array[_0x212f('0x24')](_0x1953b5[_0x212f('0x19')]());for(const [_0x49934f,_0x5a0fd5]of this['_editorAnnotationsData']){const _0x2c5975=_0x1083ed(_0x5a0fd5),_0x289ca4=_0x4623ea['getByInnerView'](_0x49934f);_0x2c5975&&_0x289ca4&&_0x4b955c[_0x212f('0x1d')]({'annotation':_0x289ca4,'range':_0x2c5975});}function _0x1083ed(_0x22f0b2){for(const _0x3ce17a of _0x22f0b2)for(const _0xe01491 of _0x4e46b3)if(_0x3ce17a[_0x212f('0x2a')](_0xe01491,!_0x1953b5[_0x212f('0x29')]))return _0x3ce17a;return null;}return _0x4b955c['sort']((_0x4eec96,_0x4a7eef)=>{const _0x500b24=_0x4eec96['range'],_0x520d8c=_0x4a7eef['range'];if(!_0x500b24[_0x212f('0x22')](_0x520d8c)){if(_0x500b24['containsRange'](_0x520d8c,!0x0))return 0x1;if(_0x520d8c['containsRange'](_0x500b24,!0x0))return-0x1;}return _0x4eec96[_0x212f('0x1f')]==_0x1a3339?-0x1:_0x4a7eef[_0x212f('0x1f')]==_0x1a3339?0x1:0x0;})[_0x212f('0x0')](_0x1ffe0c=>_0x1ffe0c[_0x212f('0x1f')]);}get['_editorAnnotationsData'](){const _0x24d2d9=new Map();for(const _0x29b4d7 of Array[_0x212f('0x24')](this[_0x212f('0x1e')]))for(const [_0x249808,_0x3360c1]of _0x29b4d7())_0x24d2d9['set'](_0x249808,_0x3360c1);return _0x24d2d9;}}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/annotations/inlineannotations
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
|
|
11
|
-
import EditorAnnotations from './editorannotations';
|
|
12
|
-
import { ContextualBalloon } from 'ckeditor5/src/ui';
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
11
|
+
import EditorAnnotations from './editorannotations.js';
|
|
12
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
13
13
|
import './../../theme/annotation-inline.css';
|
|
14
|
-
import type Annotation from './annotation';
|
|
15
|
-
import type AnnotationCollection from './annotationcollection';
|
|
14
|
+
import type Annotation from './annotation.js';
|
|
15
|
+
import type AnnotationCollection from './annotationcollection.js';
|
|
16
16
|
/**
|
|
17
17
|
* The popup-style UI for displaying annotations next to editor target elements.
|
|
18
18
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4b54=['inlineannotations-attach-already-attached','setActiveAnnotation','right','updatePosition','length','stopListening','getByView','_removeAnnotationFromBalloon','init','editor','focusTracker','push','isFocused','getClientRects','update','_setSelectedAnnotations','getBoundingClientRect','_manuallyClosed','hasView','Esc','left','blur','addObserver','viewRangeToDom','find','annotations','inlineannotations-detach-not-attached','clear','_selectedAnnotations','visibleView','mousedown','has','destroy','plugins','afterInit','isActive','keystrokes','_addedAnnotations','_closeAnnotation','editableElement','attach','isAttached','context','_forceRefresh','listenTo','requires','switchTo','get','focus','targetRect','_addAnnotationToBalloon','inline','document','from','InlineAnnotations','width','selection','add','_balloon','set','editing','bottom','includes','register','collapse','delete','remove','activeAnnotation','view','top','target'];(function(_0x41fd9d,_0x4b54b8){const _0x5d82c3=function(_0x559dd6){while(--_0x559dd6){_0x41fd9d['push'](_0x41fd9d['shift']());}};_0x5d82c3(++_0x4b54b8);}(_0x4b54,0x179));const _0x5d82=function(_0x41fd9d,_0x4b54b8){_0x41fd9d=_0x41fd9d-0x0;let _0x5d82c3=_0x4b54[_0x41fd9d];return _0x5d82c3;};import{Plugin as _0x424f45}from'ckeditor5/src/core.js';import _0x52b44d from'./annotationsuis.js';import _0x5af9e3 from'./editorannotations.js';import{ContextualBalloon as _0x29abf3}from'ckeditor5/src/ui.js';import{MouseObserver as _0x35deab}from'ckeditor5/src/engine.js';import{CKEditorError as _0x5244fc,Rect as _0x175c7c}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x424f45{static get[_0x5d82('0x17')](){return[_0x5af9e3,_0x29abf3,_0x52b44d];}static get['pluginName'](){return _0x5d82('0x20');}constructor(_0x3dcefa){super(_0x3dcefa),_0x3dcefa['editing'][_0x5d82('0x2e')][_0x5d82('0x0')](_0x35deab),this[_0x5d82('0x13')]=!0x1,this[_0x5d82('0x25')](_0x5d82('0x2d'),null),this[_0x5d82('0x3')]=null,this[_0x5d82('0x42')]=new Set(),this['_balloon']=_0x3dcefa['plugins']['get'](_0x29abf3),this[_0x5d82('0xf')]=new Set(),this['_selectedAnnotations']=[],this[_0x5d82('0x15')]=!0x1;}[_0x5d82('0x39')](){const _0x5c0e0a=this[_0x5d82('0x3a')]['plugins']['get'](_0x52b44d);_0x5c0e0a[_0x5d82('0x14')]===this[_0x5d82('0x3a')]&&(_0x5c0e0a[_0x5d82('0x29')](_0x5d82('0x1d'),this),this[_0x5d82('0x3a')][_0x5d82('0xe')][_0x5d82('0x25')](_0x5d82('0x44'),(_0x3493a3,_0x50a129)=>{const _0x41f5bc=this['_balloon'];if(this['isAttached']&&_0x41f5bc[_0x5d82('0x7')]){const _0x131a42=this[_0x5d82('0x3')][_0x5d82('0x37')](_0x41f5bc[_0x5d82('0x7')]);_0x131a42&&this[_0x5d82('0x10')](_0x131a42),_0x50a129();}}));}[_0x5d82('0xc')](){const _0x15fc95=this[_0x5d82('0x3a')][_0x5d82('0xb')][_0x5d82('0x19')](_0x52b44d);_0x15fc95[_0x5d82('0x14')]===this[_0x5d82('0x3a')]&&(_0x15fc95['hasActive']()||_0x15fc95[_0x5d82('0x18')](_0x5d82('0x1d')));}[_0x5d82('0x32')](_0x3cef9c){_0x3cef9c!==this[_0x5d82('0x2d')]&&(this[_0x5d82('0x2d')]&&(this[_0x5d82('0x2d')][_0x5d82('0xd')]=!0x1),_0x3cef9c&&this[_0x5d82('0x3a')]['ui'][_0x5d82('0x3b')]['isFocused']&&(this[_0x5d82('0x3')][_0x5d82('0x9')](_0x3cef9c)&&this['_addAnnotationToBalloon'](_0x3cef9c,!0x0),_0x3cef9c[_0x5d82('0xd')]=!0x0),_0x3cef9c||this[_0x5d82('0x40')]([]),this[_0x5d82('0x2d')]=_0x3cef9c);}[_0x5d82('0x12')](_0x1f65ca){this[_0x5d82('0x3')]=_0x1f65ca;const _0x4610b2=this[_0x5d82('0x3a')]['plugins']['get'](_0x52b44d),_0x54bd45=this['_balloon'];if(this['isAttached'])throw new _0x5244fc(_0x5d82('0x31'),this);if(_0x4610b2['context']!==this[_0x5d82('0x3a')])throw new _0x5244fc('inlineannotations-not-allowed-with-context',this);const _0x3c44b5=this['editor'][_0x5d82('0xb')][_0x5d82('0x19')](_0x5af9e3);this[_0x5d82('0x16')](_0x3c44b5,'refresh',()=>{const _0x3bd889=_0x3c44b5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this[_0x5d82('0x2d')]});var _0x221244,_0x5af112;!this[_0x5d82('0x15')]&&(_0x221244=_0x3bd889,_0x5af112=this['_selectedAnnotations'],_0x221244[_0x5d82('0x35')]===_0x5af112[_0x5d82('0x35')]&&_0x221244['every'](_0x3f8ee0=>_0x5af112['includes'](_0x3f8ee0)))||(this[_0x5d82('0x15')]=!0x1,this[_0x5d82('0x40')](_0x3bd889),this[_0x5d82('0x32')](_0x3bd889[0x0]||null));}),this[_0x5d82('0x16')](_0x3c44b5,_0x5d82('0x46'),(_0x5e2cc0,{isAnnotationTracked:_0x2b9c38})=>{this[_0x5d82('0x2d')]&&_0x2b9c38(this[_0x5d82('0x2d')])&&(this[_0x5d82('0x40')]([]),this['setActiveAnnotation'](null));}),this['listenTo'](this[_0x5d82('0x3a')]['ui']['focusTracker'],'change:isFocused',(_0x1c80fb,_0x2b2ebb,_0x424d1d)=>{_0x424d1d||this[_0x5d82('0x32')](null);}),this[_0x5d82('0x16')](_0x1f65ca,_0x5d82('0x2c'),(_0x40d9c0,_0xa917c5)=>{this[_0x5d82('0x38')](_0xa917c5),_0xa917c5===this[_0x5d82('0x2d')]&&this[_0x5d82('0x32')](null);}),this[_0x5d82('0x16')](_0x54bd45,'change:visibleView',(_0x534306,_0x232b68,_0x36d4c7,_0x198335)=>{_0x198335&&this['stopListening'](_0x198335);const _0x4aea9b=_0x1f65ca[_0x5d82('0x37')](_0x36d4c7);_0x36d4c7&&_0x4aea9b&&(this['listenTo'](_0x36d4c7,'change:height',()=>{_0x54bd45['updatePosition']();}),this[_0x5d82('0x16')](_0x36d4c7,'Esc',()=>{this['_closeAnnotation'](_0x4aea9b),this[_0x5d82('0x3a')][_0x5d82('0x26')]['view']['focus']();}),this[_0x5d82('0x2d')]!==_0x4aea9b&&this[_0x5d82('0x32')](_0x4aea9b));}),this['listenTo'](this[_0x5d82('0x3a')]['ui'],_0x5d82('0x3f'),()=>{_0x54bd45[_0x5d82('0x7')]&&(_0x1f65ca[_0x5d82('0x37')](_0x54bd45[_0x5d82('0x7')])&&_0x54bd45[_0x5d82('0x34')]());}),this['listenTo'](this[_0x5d82('0x3a')][_0x5d82('0x26')][_0x5d82('0x2e')]['document'],_0x5d82('0x8'),()=>{this[_0x5d82('0x15')]=!0x0,this[_0x5d82('0x42')][_0x5d82('0x5')]();}),this[_0x5d82('0x3a')][_0x5d82('0x26')][_0x5d82('0x2e')][_0x5d82('0x1e')][_0x5d82('0x22')][_0x5d82('0x11')]&&this['editor']['editing'][_0x5d82('0x2e')][_0x5d82('0x1a')](),this[_0x5d82('0x13')]=!0x0;}['detach'](){if(!this[_0x5d82('0x13')])throw new _0x5244fc(_0x5d82('0x4'),this);this[_0x5d82('0x32')](null);for(const _0x5e4c20 of this[_0x5d82('0xf')])this['_removeAnnotationFromBalloon'](_0x5e4c20);this[_0x5d82('0x36')](),this['isAttached']=!0x1,this[_0x5d82('0x3')]=null;}[_0x5d82('0xa')](){this['isAttached']&&this['detach']();}[_0x5d82('0x40')](_0x107958){for(const _0x45503a of this[_0x5d82('0x6')])_0x107958[_0x5d82('0x28')](_0x45503a)||this['_manuallyClosed'][_0x5d82('0x2b')](_0x45503a);for(const _0x12a132 of this[_0x5d82('0x3')])_0x107958[_0x5d82('0x28')](_0x12a132)||this['_removeAnnotationFromBalloon'](_0x12a132);if(this['editor']['ui'][_0x5d82('0x3b')][_0x5d82('0x3d')])for(const _0x28278e of _0x107958)this[_0x5d82('0x1c')](_0x28278e);this[_0x5d82('0x6')]=_0x107958;}['_addAnnotationToBalloon'](_0x113b75,_0x3f1c2b=!0x1){this[_0x5d82('0x42')]['has'](_0x113b75)||(this[_0x5d82('0xf')][_0x5d82('0x9')](_0x113b75)||this[_0x5d82('0x24')][_0x5d82('0x43')](_0x113b75[_0x5d82('0x2e')])||(this[_0x5d82('0xf')][_0x5d82('0x23')](_0x113b75),this[_0x5d82('0x24')][_0x5d82('0x23')]({'stackId':_0x113b75[_0x5d82('0x2e')]['id'],'view':_0x113b75[_0x5d82('0x2e')],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x113b75)}})),_0x3f1c2b&&this['_balloon']['showStack'](_0x113b75[_0x5d82('0x2e')]['id']));}['_getBalloonTargetForAnnotation'](_0x4172ae){const _0x44221b=_0x4172ae[_0x5d82('0x30')],_0x349f49=this['editor'][_0x5d82('0x26')][_0x5d82('0x2e')],_0x134e38=_0x349f49['document'][_0x5d82('0x22')]['getFirstRange'](),_0x21e594=_0x349f49['domConverter'][_0x5d82('0x1')](_0x134e38);if(_0x21e594[_0x5d82('0x2a')](!0x0),_0x44221b){if(_0x44221b instanceof _0x175c7c)return _0x44221b;let _0x111efa=[];for(const _0x235d32 of _0x44221b)_0x111efa[_0x5d82('0x3c')](...(_0x363dec=_0x235d32[_0x5d82('0x3e')](),Array[_0x5d82('0x1f')](_0x363dec)['map'](DOMRect['fromRect'])));_0x111efa=function(_0x5ac571){const _0x4b04da=[];let _0x569f0e=_0x5ac571[0x0];for(let _0x5cd73c=0x1;_0x5cd73c<_0x5ac571[_0x5d82('0x35')];_0x5cd73c++)F(_0x569f0e,_0x5ac571[_0x5cd73c])?_0x569f0e[_0x5d82('0x21')]+=_0x5ac571[_0x5cd73c][_0x5d82('0x21')]:(_0x4b04da[_0x5d82('0x3c')](_0x569f0e),_0x569f0e=_0x5ac571[_0x5cd73c]);return _0x4b04da[_0x5d82('0x3c')](_0x569f0e),_0x4b04da;}(_0x111efa);const _0x51dccb=_0x21e594[_0x5d82('0x41')]();return _0x111efa[_0x5d82('0x2')](_0x2258a6=>_0x2258a6[_0x5d82('0x2f')]<=_0x51dccb[_0x5d82('0x2f')]&&_0x2258a6[_0x5d82('0x27')]>=_0x51dccb[_0x5d82('0x27')]&&_0x2258a6[_0x5d82('0x45')]<=_0x51dccb['left']&&_0x2258a6[_0x5d82('0x33')]>=_0x51dccb[_0x5d82('0x33')])||_0x111efa[0x0];}var _0x363dec;return _0x4172ae[_0x5d82('0x1b')]||_0x21e594;}[_0x5d82('0x38')](_0x2288fc){this[_0x5d82('0xf')][_0x5d82('0x9')](_0x2288fc)&&this[_0x5d82('0x24')][_0x5d82('0x43')](_0x2288fc[_0x5d82('0x2e')])&&(this['_addedAnnotations']['delete'](_0x2288fc),this[_0x5d82('0x24')][_0x5d82('0x2c')](_0x2288fc[_0x5d82('0x2e')]));}[_0x5d82('0x10')](_0x1f1efc){this[_0x5d82('0x42')][_0x5d82('0x23')](_0x1f1efc),this[_0x5d82('0x38')](_0x1f1efc);}}function F(_0x2075c3,_0x24857b){return _0x2075c3[_0x5d82('0x2f')]===_0x24857b[_0x5d82('0x2f')]&&_0x2075c3[_0x5d82('0x27')]===_0x24857b[_0x5d82('0x27')]&&_0x2075c3[_0x5d82('0x33')]===_0x24857b[_0x5d82('0x45')];}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/annotations/narrowsidebar
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
|
|
11
|
-
import Sidebar from './sidebar';
|
|
12
|
-
import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
|
|
9
|
+
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
11
|
+
import Sidebar from './sidebar.js';
|
|
12
|
+
import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
|
|
13
13
|
import '../../theme/sidebar-narrow.css';
|
|
14
|
-
import type Annotation from './annotation';
|
|
15
|
-
import type { default as AnnotationCollection } from './annotationcollection';
|
|
14
|
+
import type Annotation from './annotation.js';
|
|
15
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
16
16
|
/**
|
|
17
17
|
* The narrow sidebar UI for displaying annotations.
|
|
18
18
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2158=['listenTo','context','set','_setSelectedAnnotations','high','view','refresh','_annotationToNarrowView','refreshPositioning','annotationType','off','requires','southArrowNorthEast','_refreshPositioningDebounced','length','remove','getByView','contains','content','change:height','_refreshPositioning','bodyCollection','create','getSidebarItemView','change:container','_detachListeners','set:container','ready','esc','_editorAnnotations','rearrange','balloonPanelView','low','_showBalloon','first','target','detach','setActiveAnnotation','execute','find','_annotations','isAttached','init','NarrowSidebar','hasDomSelection','editors','_updateBalloonPosition','keyCode','pin','mousedown','_integrateWithEditorAnnotations','_attachListeners','unpin','southArrowNorthWest','delete','addEventListener','_domEmitter','locale','northArrowSouth','clear','activeAnnotation','element','EditorAnnotations','values','preventClosingBalloon','_destroyEditorAnnotationsIntegration','removeEventListener','has','from','stopListening','destroy','add','getOrderedSelectedAnnotations','type','get','includes','_attachToContainer','number','annotations','stop','ck-sidebar--narrow','detachFromDom','focus','narrowsidebar-detach-not-attached','resize','register','_manuallyClosedAnnotationViews','bind','_selectedAnnotations','plugins','focusableElements','blur','keydown','isDirty','attach','isVisible','_hideBalloon'];(function(_0x3ca809,_0x215890){const _0x2c09c9=function(_0x57593d){while(--_0x57593d){_0x3ca809['push'](_0x3ca809['shift']());}};_0x2c09c9(++_0x215890);}(_0x2158,0x163));const _0x2c09=function(_0x3ca809,_0x215890){_0x3ca809=_0x3ca809-0x0;let _0x2c09c9=_0x2158[_0x3ca809];return _0x2c09c9;};import{ContextPlugin as _0x1e1122,Context as _0x5399e4}from'ckeditor5/src/core';import _0x2b334e from'./annotationsuis';import _0x361a7f from'./sidebar';import _0x326e38 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x37c988,BodyCollection as _0x5265ad}from'ckeditor5/src/ui';import{CKEditorError as _0x178521,DomEmitterMixin as _0x1b14f5,keyCodes as _0x28d4bc,Collection as _0x2f0a8b}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x5b8eb3}from'lodash-es';import _0x3c33a6 from'./editorannotations';export default class s extends _0x1e1122{static get[_0x2c09('0x2c')](){return[_0x361a7f,_0x2b334e];}static get['pluginName'](){return _0x2c09('0x4c');}constructor(_0x124282){super(_0x124282),this['isAttached']=!0x1,this[_0x2c09('0x16')]=new Set(),this[_0x2c09('0x59')]=Object[_0x2c09('0x37')](_0x1b14f5),this['_annotationToNarrowView']=new Map(),this[_0x2c09('0x23')](_0x2c09('0x5d'),null),this[_0x2c09('0xe')]=null,this[_0x2c09('0x18')]=[],this[_0x2c09('0x3e')]=new _0x2f0a8b(),this['_refreshPositioningDebounced']=_0x5b8eb3(()=>{this[_0x2c09('0x35')]();},0xfa,{'leading':!0x1});}[_0x2c09('0x4b')](){this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x2b334e)[_0x2c09('0x15')]('narrowSidebar',this),this[_0x2c09('0x36')]=new _0x5265ad(this['context'][_0x2c09('0x5a')]),this[_0x2c09('0x40')]=new _0x37c988(this[_0x2c09('0x22')][_0x2c09('0x5a')]),this[_0x2c09('0x36')]['attachToDom'](),this['bodyCollection'][_0x2c09('0x7')](this[_0x2c09('0x40')]);}[_0x2c09('0x1e')](_0x1ecf0b){this[_0x2c09('0xe')]=_0x1ecf0b;const _0x1727ac=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f),_0x58c019=this[_0x2c09('0x40')];if(_0x1727ac[_0x2c09('0x49')]=_0x1ecf0b,this[_0x2c09('0x4a')])throw new _0x178521('narrowsidebar-attach-already-attached',this);this[_0x2c09('0x4a')]=!0x0,this[_0x2c09('0x21')](_0x1727ac,_0x2c09('0x3b'),()=>{this['detach'](),this['listenTo'](_0x1727ac,_0x2c09('0x39'),_0x338154=>{_0x338154[_0x2c09('0x2b')](),this[_0x2c09('0x1e')](_0x1ecf0b);});}),_0x1727ac[_0x2c09('0xc')]({'viewClass':_0x2c09('0x10'),'spaceBetweenItems':0x5});const _0xc2a731=_0x3dda65=>{const _0x3a0e1f=new _0x326e38(this[_0x2c09('0x22')][_0x2c09('0x5a')]);_0x1727ac['addAnnotation'](_0x3dda65,_0x3a0e1f),this['_annotationToNarrowView']['set'](_0x3dda65,_0x3a0e1f),_0x3a0e1f[_0x2c09('0x17')](_0x2c09('0x1d'),_0x2c09('0x2a'),_0x2c09('0xd'))['to'](_0x3dda65[_0x2c09('0x26')],_0x2c09('0x1d'),_0x2c09('0x9'),_0x2c09('0x2f')),_0x3a0e1f['on'](_0x2c09('0x47'),()=>{this[_0x2c09('0x16')][_0x2c09('0x5c')](),_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]!==_0x3dda65[_0x2c09('0x26')]?(this[_0x2c09('0x42')](_0x3dda65),_0x3dda65[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x12')](),this[_0x2c09('0x46')](_0x3dda65)):this['setActiveAnnotation'](null);});};for(const _0x1c299e of _0x1ecf0b)_0xc2a731(_0x1c299e);this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x7'),(_0xf42abf,_0x5a91a)=>{_0xc2a731(_0x5a91a);}),this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x30'),(_0xb99e77,_0x37343c,_0x275ef9)=>{this[_0x2c09('0x28')][_0x2c09('0xa')](_0x37343c)[_0x2c09('0x6')](),this['_annotationToNarrowView']['delete'](_0x37343c),_0x1727ac[_0x2c09('0x3f')]({'removedAnnotation':_0x37343c,'previousAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9-0x1),'nextAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9+0x1)}),_0x37343c===this[_0x2c09('0x5d')]&&this[_0x2c09('0x46')](null);},{'priority':_0x2c09('0x41')}),this['listenTo'](_0x1ecf0b,_0x2c09('0x12'),(_0x1ff267,_0x274e72)=>{this[_0x2c09('0x46')](_0x274e72);}),this[_0x2c09('0x21')](_0x1ecf0b,'blur',()=>{this[_0x2c09('0x46')](null);}),this[_0x2c09('0x59')]['listenTo'](document,_0x2c09('0x1c'),(_0x2e33df,_0x1aebda)=>{_0x1aebda[_0x2c09('0x50')]===_0x28d4bc[_0x2c09('0x3d')]&&_0x58c019[_0x2c09('0x1f')]&&(this['_manuallyClosedAnnotationViews']['add'](_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]),this[_0x2c09('0x20')](),_0x1aebda['stopPropagation'](),_0x1aebda['preventDefault']());}),this[_0x2c09('0x59')][_0x2c09('0x21')](document,_0x2c09('0x52'),(_0x3d78e1,_0x25ceb3)=>{const _0x425e94=_0x25ceb3[_0x2c09('0x44')];_0x58c019[_0x2c09('0x1f')]&&_0x58c019[_0x2c09('0x5e')]['contains'](_0x425e94)||_0x1727ac[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x32')](_0x425e94)||_0x3d78e1['preventClosingBalloon']||this[_0x2c09('0x5d')]&&this[_0x2c09('0x5d')][_0x2c09('0x1a')][_0x2c09('0x48')](_0xffdb32=>_0xffdb32[_0x2c09('0x32')](_0x425e94))||(this[_0x2c09('0x16')][_0x2c09('0x5c')](),this[_0x2c09('0x20')](),this[_0x2c09('0x46')](null));});const _0x2dba46=this[_0x2c09('0x22')]instanceof _0x5399e4?this[_0x2c09('0x22')]['editors']:new _0x2f0a8b([this[_0x2c09('0x22')]]);for(const _0x1cfc1e of _0x2dba46)this[_0x2c09('0x53')](_0x1cfc1e);this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x7'),(_0x487fff,_0x3db0d9)=>{this[_0x2c09('0x21')](_0x3db0d9,_0x2c09('0x3c'),()=>{this[_0x2c09('0x53')](_0x3db0d9);});}),this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x30'),(_0x430111,_0x17fd87)=>{_0x17fd87[_0x2c09('0x19')][_0x2c09('0x3')](_0x2c09('0x5f'))&&this['_destroyEditorAnnotationsIntegration'](_0x17fd87[_0x2c09('0x19')][_0x2c09('0xa')](_0x2c09('0x5f')));}),window[_0x2c09('0x58')](_0x2c09('0x14'),this['_refreshPositioningDebounced']),this[_0x2c09('0x35')]();}[_0x2c09('0x46')](_0x4cced0){if(_0x4cced0===this['activeAnnotation'])return;const _0x479233=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);if(_0x479233[_0x2c09('0x27')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4cced0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4cced0)_0x479233[_0x2c09('0x38')](_0x4cced0)?this['_showBalloon'](_0x4cced0):this['_hideBalloon']();else this[_0x2c09('0x20')]();this[_0x2c09('0x5d')]=_0x4cced0;}[_0x2c09('0x45')](){if(!this['isAttached'])throw new _0x178521(_0x2c09('0x13'),this);this[_0x2c09('0x46')](null);const _0x5b4201=this['context'][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);this[_0x2c09('0x20')](),Array[_0x2c09('0x4')](this[_0x2c09('0x28')][_0x2c09('0x60')](),_0x14ff0c=>_0x14ff0c[_0x2c09('0x6')]()),this['_annotationToNarrowView'][_0x2c09('0x5c')](),_0x5b4201['_detachFromContainer'](this['annotations']),this[_0x2c09('0x5')](),this[_0x2c09('0x59')][_0x2c09('0x5')](),this[_0x2c09('0x22')]instanceof _0x5399e4&&this[_0x2c09('0x5')](this[_0x2c09('0x22')][_0x2c09('0x4e')]);for(const _0x5e0a4d of Array[_0x2c09('0x4')](this[_0x2c09('0x3e')]))this[_0x2c09('0x1')](_0x5e0a4d);window[_0x2c09('0x2')](_0x2c09('0x14'),this[_0x2c09('0x2e')]),this[_0x2c09('0x2e')]['cancel'](),this[_0x2c09('0x18')]=[],this[_0x2c09('0x4a')]=!0x1,this[_0x2c09('0xe')]=null;}[_0x2c09('0x6')](){this[_0x2c09('0x4a')]&&this[_0x2c09('0x45')](),this[_0x2c09('0x36')][_0x2c09('0x11')]();}[_0x2c09('0x53')](_0x3cc88){const _0x128e00=_0x3cc88[_0x2c09('0x19')][_0x2c09('0xa')](_0x3c33a6),_0x24d94e=this[_0x2c09('0x22')][_0x2c09('0x19')]['get'](_0x361a7f),_0x5ce962=this[_0x2c09('0xe')],_0x3dd83b=this[_0x2c09('0x40')],_0x1ac5f4=()=>{const _0x239f31=_0x128e00[_0x2c09('0x8')]({'annotations':this['annotations'],'activeAnnotation':this[_0x2c09('0x5d')]});this['_setSelectedAnnotations'](_0x239f31),this['setActiveAnnotation'](_0x239f31[0x0]||null);};this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x27'),_0x1ac5f4),this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x1b'),(_0x647157,{isAnnotationTracked:_0x1315be})=>{this[_0x2c09('0x5d')]&&_0x1315be(this['activeAnnotation'])&&(this[_0x2c09('0x24')]([]),this[_0x2c09('0x46')](null));}),this[_0x2c09('0x21')](_0x128e00,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x2c09('0x21')](_0x5ce962,_0x2c09('0x1b'),_0x5db006=>{_0x128e00[_0x2c09('0x4d')]()&&_0x5db006[_0x2c09('0xf')]();},{'priority':_0x2c09('0x25')}),this['listenTo'](this[_0x2c09('0x59')],'mousedown',(_0x1ac87e,_0x2dcc4a)=>{const _0x3912f2=_0x2dcc4a[_0x2c09('0x44')];_0x3dd83b['isVisible']&&_0x3dd83b[_0x2c09('0x5e')][_0x2c09('0x32')](_0x3912f2)||_0x24d94e[_0x2c09('0x26')]['element'][_0x2c09('0x32')](_0x3912f2)||this['activeAnnotation']&&_0x128e00[_0x2c09('0x4d')]()&&(_0x1ac5f4(),_0x1ac87e[_0x2c09('0x0')]=!0x0);},{'priority':_0x2c09('0x25')}),this[_0x2c09('0x3e')]['add'](_0x128e00);}[_0x2c09('0x1')](_0x460dd1){_0x460dd1&&(this[_0x2c09('0x5')](_0x460dd1),this[_0x2c09('0x3e')][_0x2c09('0x30')](_0x460dd1));}[_0x2c09('0x24')](_0x3e8387){for(const _0x4828e4 of this[_0x2c09('0x18')])_0x3e8387[_0x2c09('0xb')](_0x4828e4)||this[_0x2c09('0x16')][_0x2c09('0x57')](_0x4828e4[_0x2c09('0x26')]);this[_0x2c09('0x18')]=_0x3e8387;}[_0x2c09('0x35')](){const _0x598ca3=this['balloonPanelView'];this[_0x2c09('0xe')][_0x2c09('0x29')](),_0x598ca3[_0x2c09('0x1f')]&&this[_0x2c09('0x4f')]();}[_0x2c09('0x42')](_0x28c720){if(this[_0x2c09('0x16')][_0x2c09('0x3')](_0x28c720[_0x2c09('0x26')]))return;const _0x4d17d2=this[_0x2c09('0x40')]['content'][_0x2c09('0x43')];_0x4d17d2!==_0x28c720[_0x2c09('0x26')]?(_0x4d17d2&&this[_0x2c09('0x3a')](_0x4d17d2),this['_attachListeners'](_0x28c720[_0x2c09('0x26')]),this[_0x2c09('0x40')][_0x2c09('0x33')]['clear'](),this[_0x2c09('0x40')][_0x2c09('0x33')][_0x2c09('0x7')](_0x28c720['view']),this[_0x2c09('0x4f')]()):this[_0x2c09('0x4f')]();}[_0x2c09('0x4f')](){const _0x2a309a=this['balloonPanelView'][_0x2c09('0x33')][_0x2c09('0x43')],_0x535600=_0x2a309a&&this[_0x2c09('0xe')][_0x2c09('0x31')](_0x2a309a);if(!_0x535600||!this['_annotationToNarrowView'][_0x2c09('0x3')](_0x535600))return;const _0x488ac8=this[_0x2c09('0x28')][_0x2c09('0xa')](_0x535600)[_0x2c09('0x5e')],_0x5c9e4e=function(){const _0x430156=_0x37c988['defaultPositions'];return[_0x430156[_0x2c09('0x2d')],_0x430156['northArrowSouthEast'],_0x430156['southArrowNorth'],_0x430156[_0x2c09('0x5b')],_0x430156[_0x2c09('0x56')],_0x430156['northArrowSouthWest']];}();this['balloonPanelView'][_0x2c09('0x51')]({'target':_0x488ac8,'positions':_0x5c9e4e});}[_0x2c09('0x20')](){const _0x47c731=this[_0x2c09('0x40')],_0x37a3b7=_0x47c731[_0x2c09('0x33')][_0x2c09('0x43')];_0x37a3b7&&(this[_0x2c09('0x3a')](_0x37a3b7),_0x47c731[_0x2c09('0x55')](),_0x47c731['content'][_0x2c09('0x5c')]());}[_0x2c09('0x54')](_0x5aac5a){this[_0x2c09('0x21')](_0x5aac5a,_0x2c09('0x34'),()=>this[_0x2c09('0x4f')]()),this[_0x2c09('0x21')](_0x5aac5a,'Esc',(_0x48c590,_0x388976)=>{this[_0x2c09('0x16')][_0x2c09('0x7')](_0x5aac5a),this[_0x2c09('0x20')](),_0x388976();});}[_0x2c09('0x3a')](_0xa27e41){this['stopListening'](_0xa27e41);}}
|
|
23
|
+
const _0x2f07=['_annotations','_setSelectedAnnotations','balloonPanelView','addEventListener','_attachListeners','element','execute','mousedown','_showBalloon','context','setActiveAnnotation','set','_refreshPositioning','annotations','length','_selectedAnnotations','addAnnotation','southArrowNorth','has','stopPropagation','getByView','find','_editorAnnotations','editors','northArrowSouthWest','get','narrowSidebar','hasDomSelection','create','EditorAnnotations','change:height','view','isAttached','pluginName','high','focusableElements','bind','_updateBalloonPosition','focus','from','add','delete','northArrowSouthEast','attachToDom','_detachListeners','isVisible','_integrateWithEditorAnnotations','cancel','narrowsidebar-attach-already-attached','listenTo','includes','content','removeEventListener','plugins','Esc','first','bodyCollection','getSidebarItemView','blur','uiUpdate','_domEmitter','stop','activeAnnotation','preventClosingBalloon','unpin','stopListening','remove','attach','detach','_destroyEditorAnnotationsIntegration','_detachFromContainer','keydown','off','getOrderedSelectedAnnotations','clear','isDirty','_refreshPositioningDebounced','type','rearrange','locale','annotationType','_manuallyClosedAnnotationViews','_hideBalloon','_annotationToNarrowView','refresh','destroy','northArrowSouth','contains','southArrowNorthWest'];(function(_0x5989ba,_0x2f07cc){const _0x3fdf0d=function(_0x48d5ec){while(--_0x48d5ec){_0x5989ba['push'](_0x5989ba['shift']());}};_0x3fdf0d(++_0x2f07cc);}(_0x2f07,0x1dc));const _0x3fdf=function(_0x5989ba,_0x2f07cc){_0x5989ba=_0x5989ba-0x0;let _0x3fdf0d=_0x2f07[_0x5989ba];return _0x3fdf0d;};import{ContextPlugin as _0x25c751,Context as _0x50a52f}from'ckeditor5/src/core.js';import _0x3d5dc3 from'./annotationsuis.js';import _0x4b8423 from'./sidebar.js';import _0x5debf8 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x15d68b,BodyCollection as _0x13b213}from'ckeditor5/src/ui.js';import{CKEditorError as _0x15dff,DomEmitterMixin as _0x390176,keyCodes as _0x1ba893,Collection as _0x2387c9}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x2c0230}from'lodash-es';import _0x20e517 from'./editorannotations.js';export default class i extends _0x25c751{static get['requires'](){return[_0x4b8423,_0x3d5dc3];}static get[_0x3fdf('0x2')](){return'NarrowSidebar';}constructor(_0x4b1f38){super(_0x4b1f38),this[_0x3fdf('0x1')]=!0x1,this[_0x3fdf('0x32')]=new Set(),this[_0x3fdf('0x1d')]=Object[_0x3fdf('0x56')](_0x390176),this[_0x3fdf('0x34')]=new Map(),this[_0x3fdf('0x45')](_0x3fdf('0x1f'),null),this[_0x3fdf('0x47')]=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2387c9(),this['_refreshPositioningDebounced']=_0x2c0230(()=>{this[_0x3fdf('0x46')]();},0xfa,{'leading':!0x1});}['init'](){this[_0x3fdf('0x43')][_0x3fdf('0x16')]['get'](_0x3d5dc3)['register'](_0x3fdf('0x54'),this),this['bodyCollection']=new _0x13b213(this[_0x3fdf('0x43')][_0x3fdf('0x30')]),this[_0x3fdf('0x3c')]=new _0x15d68b(this[_0x3fdf('0x43')][_0x3fdf('0x30')]),this[_0x3fdf('0x19')][_0x3fdf('0xc')](),this[_0x3fdf('0x19')][_0x3fdf('0x9')](this[_0x3fdf('0x3c')]);}['attach'](_0x3649f0){this[_0x3fdf('0x47')]=_0x3649f0;const _0x10db49=this[_0x3fdf('0x43')][_0x3fdf('0x16')][_0x3fdf('0x53')](_0x4b8423),_0x100212=this[_0x3fdf('0x3c')];if(_0x10db49[_0x3fdf('0x3a')]=_0x3649f0,this[_0x3fdf('0x1')])throw new _0x15dff(_0x3fdf('0x11'),this);this['isAttached']=!0x0,this['listenTo'](_0x10db49,'set:container',()=>{this['detach'](),this[_0x3fdf('0x12')](_0x10db49,'change:container',_0x48195d=>{_0x48195d[_0x3fdf('0x29')](),this[_0x3fdf('0x24')](_0x3649f0);});}),_0x10db49['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x32d645=_0x20fab1=>{const _0x57f345=new _0x5debf8(this['context'][_0x3fdf('0x30')]);_0x10db49[_0x3fdf('0x4a')](_0x20fab1,_0x57f345),this[_0x3fdf('0x34')][_0x3fdf('0x45')](_0x20fab1,_0x57f345),_0x57f345[_0x3fdf('0x5')](_0x3fdf('0x2c'),_0x3fdf('0x31'),'number')['to'](_0x20fab1[_0x3fdf('0x0')],_0x3fdf('0x2c'),_0x3fdf('0x2e'),_0x3fdf('0x48')),_0x57f345['on'](_0x3fdf('0x40'),()=>{this[_0x3fdf('0x32')][_0x3fdf('0x2b')](),_0x100212['content'][_0x3fdf('0x18')]!==_0x20fab1['view']?(this[_0x3fdf('0x42')](_0x20fab1),_0x20fab1[_0x3fdf('0x0')]['element']['focus'](),this['setActiveAnnotation'](_0x20fab1)):this[_0x3fdf('0x44')](null);});};for(const _0x2b2503 of _0x3649f0)_0x32d645(_0x2b2503);this[_0x3fdf('0x12')](_0x3649f0,_0x3fdf('0x9'),(_0x715e61,_0x304a3e)=>{_0x32d645(_0x304a3e);}),this[_0x3fdf('0x12')](_0x3649f0,_0x3fdf('0x23'),(_0x1a5b8f,_0x150cdf,_0x15414b)=>{this[_0x3fdf('0x34')]['get'](_0x150cdf)[_0x3fdf('0x36')](),this['_annotationToNarrowView'][_0x3fdf('0xa')](_0x150cdf),_0x10db49[_0x3fdf('0x2f')]({'removedAnnotation':_0x150cdf,'previousAnnotation':_0x3649f0['get'](_0x15414b-0x1),'nextAnnotation':_0x3649f0[_0x3fdf('0x53')](_0x15414b+0x1)}),_0x150cdf===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3649f0,_0x3fdf('0x7'),(_0x3a329c,_0x41d061)=>{this[_0x3fdf('0x44')](_0x41d061);}),this[_0x3fdf('0x12')](_0x3649f0,_0x3fdf('0x1b'),()=>{this[_0x3fdf('0x44')](null);}),this[_0x3fdf('0x1d')][_0x3fdf('0x12')](document,_0x3fdf('0x28'),(_0x278326,_0x3939f2)=>{_0x3939f2['keyCode']===_0x1ba893['esc']&&_0x100212['isVisible']&&(this['_manuallyClosedAnnotationViews'][_0x3fdf('0x9')](_0x100212['content'][_0x3fdf('0x18')]),this[_0x3fdf('0x33')](),_0x3939f2[_0x3fdf('0x4d')](),_0x3939f2['preventDefault']());}),this[_0x3fdf('0x1d')]['listenTo'](document,_0x3fdf('0x41'),(_0x17af90,_0x47e4f2)=>{const _0x10902b=_0x47e4f2['target'];_0x100212['isVisible']&&_0x100212[_0x3fdf('0x3f')][_0x3fdf('0x38')](_0x10902b)||_0x10db49[_0x3fdf('0x0')][_0x3fdf('0x3f')][_0x3fdf('0x38')](_0x10902b)||_0x17af90[_0x3fdf('0x20')]||this[_0x3fdf('0x1f')]&&this[_0x3fdf('0x1f')][_0x3fdf('0x4')][_0x3fdf('0x4f')](_0x29bb99=>_0x29bb99['contains'](_0x10902b))||(this['_manuallyClosedAnnotationViews'][_0x3fdf('0x2b')](),this[_0x3fdf('0x33')](),this['setActiveAnnotation'](null));});const _0x4b6210=this['context']instanceof _0x50a52f?this['context'][_0x3fdf('0x51')]:new _0x2387c9([this[_0x3fdf('0x43')]]);for(const _0x2ab291 of _0x4b6210)this['_integrateWithEditorAnnotations'](_0x2ab291);this[_0x3fdf('0x12')](_0x4b6210,'add',(_0x12c0ec,_0x2b7a76)=>{this[_0x3fdf('0x12')](_0x2b7a76,'ready',()=>{this[_0x3fdf('0xf')](_0x2b7a76);});}),this[_0x3fdf('0x12')](_0x4b6210,_0x3fdf('0x23'),(_0x2b6eac,_0x25cfa7)=>{_0x25cfa7[_0x3fdf('0x16')][_0x3fdf('0x4c')](_0x3fdf('0x57'))&&this[_0x3fdf('0x26')](_0x25cfa7[_0x3fdf('0x16')][_0x3fdf('0x53')](_0x3fdf('0x57')));}),window[_0x3fdf('0x3d')]('resize',this[_0x3fdf('0x2d')]),this['_refreshPositioning']();}[_0x3fdf('0x44')](_0x54dfce){if(_0x54dfce===this['activeAnnotation'])return;const _0x5b3674=this[_0x3fdf('0x43')]['plugins']['get'](_0x4b8423);if(_0x5b3674[_0x3fdf('0x35')]({'blurredAnnotation':this[_0x3fdf('0x1f')],'activatedAnnotation':_0x54dfce,'disableAnimationOnActivatedAnnotation':!0x0}),_0x54dfce)_0x5b3674[_0x3fdf('0x1a')](_0x54dfce)?this[_0x3fdf('0x42')](_0x54dfce):this[_0x3fdf('0x33')]();else this[_0x3fdf('0x33')]();this[_0x3fdf('0x1f')]=_0x54dfce;}[_0x3fdf('0x25')](){if(!this['isAttached'])throw new _0x15dff('narrowsidebar-detach-not-attached',this);this[_0x3fdf('0x44')](null);const _0x1e99b5=this[_0x3fdf('0x43')][_0x3fdf('0x16')]['get'](_0x4b8423);this['_hideBalloon'](),Array[_0x3fdf('0x8')](this[_0x3fdf('0x34')]['values'](),_0x3918db=>_0x3918db['destroy']()),this[_0x3fdf('0x34')][_0x3fdf('0x2b')](),_0x1e99b5[_0x3fdf('0x27')](this['annotations']),this['stopListening'](),this[_0x3fdf('0x1d')][_0x3fdf('0x22')](),this[_0x3fdf('0x43')]instanceof _0x50a52f&&this[_0x3fdf('0x22')](this[_0x3fdf('0x43')][_0x3fdf('0x51')]);for(const _0x475e6c of Array['from'](this['_editorAnnotations']))this[_0x3fdf('0x26')](_0x475e6c);window[_0x3fdf('0x15')]('resize',this[_0x3fdf('0x2d')]),this[_0x3fdf('0x2d')][_0x3fdf('0x10')](),this[_0x3fdf('0x49')]=[],this[_0x3fdf('0x1')]=!0x1,this['annotations']=null;}[_0x3fdf('0x36')](){this[_0x3fdf('0x1')]&&this[_0x3fdf('0x25')](),this['bodyCollection']['detachFromDom']();}[_0x3fdf('0xf')](_0x1639f0){const _0xafbf32=_0x1639f0[_0x3fdf('0x16')][_0x3fdf('0x53')](_0x20e517),_0x38a541=this[_0x3fdf('0x43')]['plugins'][_0x3fdf('0x53')](_0x4b8423),_0x376492=this[_0x3fdf('0x47')],_0x1e7108=this[_0x3fdf('0x3c')],_0x4437ef=()=>{const _0x985469=_0xafbf32[_0x3fdf('0x2a')]({'annotations':this[_0x3fdf('0x47')],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x985469),this[_0x3fdf('0x44')](_0x985469[0x0]||null);};this['listenTo'](_0xafbf32,_0x3fdf('0x35'),_0x4437ef),this['listenTo'](_0xafbf32,_0x3fdf('0x1b'),(_0xe793a,{isAnnotationTracked:_0x465c84})=>{this[_0x3fdf('0x1f')]&&_0x465c84(this['activeAnnotation'])&&(this[_0x3fdf('0x3b')]([]),this[_0x3fdf('0x44')](null));}),this['listenTo'](_0xafbf32,_0x3fdf('0x1c'),()=>{this[_0x3fdf('0x2d')]();}),this[_0x3fdf('0x12')](_0x376492,_0x3fdf('0x1b'),_0x2def82=>{_0xafbf32[_0x3fdf('0x55')]()&&_0x2def82[_0x3fdf('0x1e')]();},{'priority':'high'}),this[_0x3fdf('0x12')](this[_0x3fdf('0x1d')],_0x3fdf('0x41'),(_0x2debe9,_0xcf599c)=>{const _0x4d0046=_0xcf599c['target'];_0x1e7108[_0x3fdf('0xe')]&&_0x1e7108[_0x3fdf('0x3f')]['contains'](_0x4d0046)||_0x38a541[_0x3fdf('0x0')][_0x3fdf('0x3f')][_0x3fdf('0x38')](_0x4d0046)||this['activeAnnotation']&&_0xafbf32[_0x3fdf('0x55')]()&&(_0x4437ef(),_0x2debe9[_0x3fdf('0x20')]=!0x0);},{'priority':_0x3fdf('0x3')}),this[_0x3fdf('0x50')][_0x3fdf('0x9')](_0xafbf32);}[_0x3fdf('0x26')](_0x51a4db){_0x51a4db&&(this[_0x3fdf('0x22')](_0x51a4db),this[_0x3fdf('0x50')][_0x3fdf('0x23')](_0x51a4db));}['_setSelectedAnnotations'](_0x3a6e50){for(const _0x22f0d5 of this[_0x3fdf('0x49')])_0x3a6e50[_0x3fdf('0x13')](_0x22f0d5)||this[_0x3fdf('0x32')][_0x3fdf('0xa')](_0x22f0d5[_0x3fdf('0x0')]);this[_0x3fdf('0x49')]=_0x3a6e50;}[_0x3fdf('0x46')](){const _0x19eb44=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x19eb44[_0x3fdf('0xe')]&&this[_0x3fdf('0x6')]();}['_showBalloon'](_0x48b94f){if(this[_0x3fdf('0x32')][_0x3fdf('0x4c')](_0x48b94f['view']))return;const _0x384923=this['balloonPanelView'][_0x3fdf('0x14')][_0x3fdf('0x18')];_0x384923!==_0x48b94f[_0x3fdf('0x0')]?(_0x384923&&this[_0x3fdf('0xd')](_0x384923),this[_0x3fdf('0x3e')](_0x48b94f[_0x3fdf('0x0')]),this['balloonPanelView'][_0x3fdf('0x14')][_0x3fdf('0x2b')](),this[_0x3fdf('0x3c')]['content'][_0x3fdf('0x9')](_0x48b94f[_0x3fdf('0x0')]),this[_0x3fdf('0x6')]()):this[_0x3fdf('0x6')]();}[_0x3fdf('0x6')](){const _0x46ccf0=this[_0x3fdf('0x3c')][_0x3fdf('0x14')]['first'],_0x50e983=_0x46ccf0&&this[_0x3fdf('0x47')][_0x3fdf('0x4e')](_0x46ccf0);if(!_0x50e983||!this['_annotationToNarrowView'][_0x3fdf('0x4c')](_0x50e983))return;const _0x2debcc=this[_0x3fdf('0x34')][_0x3fdf('0x53')](_0x50e983)[_0x3fdf('0x3f')],_0x29e589=function(){const _0x5beb64=_0x15d68b['defaultPositions'];return[_0x5beb64['southArrowNorthEast'],_0x5beb64[_0x3fdf('0xb')],_0x5beb64[_0x3fdf('0x4b')],_0x5beb64[_0x3fdf('0x37')],_0x5beb64[_0x3fdf('0x39')],_0x5beb64[_0x3fdf('0x52')]];}();this[_0x3fdf('0x3c')]['pin']({'target':_0x2debcc,'positions':_0x29e589});}[_0x3fdf('0x33')](){const _0x4951d0=this[_0x3fdf('0x3c')],_0x1b63e5=_0x4951d0[_0x3fdf('0x14')][_0x3fdf('0x18')];_0x1b63e5&&(this[_0x3fdf('0xd')](_0x1b63e5),_0x4951d0[_0x3fdf('0x21')](),_0x4951d0['content'][_0x3fdf('0x2b')]());}['_attachListeners'](_0x161b5a){this[_0x3fdf('0x12')](_0x161b5a,_0x3fdf('0x58'),()=>this[_0x3fdf('0x6')]()),this['listenTo'](_0x161b5a,_0x3fdf('0x17'),(_0x28666c,_0xe28cc6)=>{this[_0x3fdf('0x32')]['add'](_0x161b5a),this[_0x3fdf('0x33')](),_0xe28cc6();});}['_detachListeners'](_0x539522){this[_0x3fdf('0x22')](_0x539522);}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/annotations/sidebar
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
11
|
-
import SidebarView from './view/sidebarview';
|
|
12
|
-
import SidebarItemView from './view/sidebaritemview';
|
|
13
|
-
import type Annotation from './annotation';
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import SidebarView from './view/sidebarview.js';
|
|
12
|
+
import SidebarItemView from './view/sidebaritemview.js';
|
|
13
|
+
import type Annotation from './annotation.js';
|
|
14
14
|
/**
|
|
15
15
|
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
16
|
*
|