@ckeditor/ckeditor5-comments 38.2.0-alpha.0 → 38.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/package.json +3 -3
- package/src/annotations/annotation.d.ts +6 -6
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +3 -3
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +6 -6
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +5 -5
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +4 -4
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +6 -6
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +6 -6
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +5 -5
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +2 -2
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +2 -2
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +2 -2
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +2 -2
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +5 -5
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +1 -1
- package/src/comments/addcommentthreadcommand.d.ts +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +4 -4
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +5 -5
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +6 -6
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +11 -11
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +5 -5
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +4 -4
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +3 -3
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +3 -3
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.d.ts +4 -4
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.d.ts +8 -8
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +4 -4
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +2 -2
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +2 -2
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +4 -4
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +3 -3
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.d.ts +5 -5
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +3 -3
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.d.ts +5 -5
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +7 -7
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +8 -8
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +10 -10
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +2 -2
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +7 -7
- package/src/index.d.ts +21 -21
- package/src/index.js +1 -1
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-comments",
|
|
3
|
-
"version": "38.2.0-alpha.
|
|
3
|
+
"version": "38.2.0-alpha.1",
|
|
4
4
|
"description": "Collaborative comments feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"CHANGELOG.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"ckeditor5": "38.2.0-alpha.
|
|
48
|
-
"ckeditor5-collaboration": "38.2.0-alpha.
|
|
47
|
+
"ckeditor5": "38.2.0-alpha.1",
|
|
48
|
+
"ckeditor5-collaboration": "38.2.0-alpha.1",
|
|
49
49
|
"lodash-es": "^4.17.11"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @module comments/annotations/annotation
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Rect, Collection } from 'ckeditor5/src/utils';
|
|
6
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
7
|
-
import type AnnotationView from './view/annotationview';
|
|
8
|
-
import type { AnnotationOptions } from './annotations';
|
|
5
|
+
import { Rect, Collection } from 'ckeditor5/src/utils.js';
|
|
6
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import type AnnotationView from './view/annotationview.js';
|
|
8
|
+
import type { AnnotationOptions } from './annotations.js';
|
|
9
9
|
declare const Annotation_base: {
|
|
10
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
11
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
10
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
11
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Represents an annotation.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x7d4a=['annotation-invalid-target','view','set','focusableElements','add','every','filter','destroy','targetRect','isArray','remove','function','_getNormalizedTarget','_type','refreshVisibility','render','target','item','mainView','_target','_assertCorrectTarget','isActive','stopListening','focusTracker','nodeType','offsetParent','isVisible','innerView'];(function(_0x504d8a,_0x7d4a06){const _0x59dd62=function(_0x3e80b2){while(--_0x3e80b2){_0x504d8a['push'](_0x504d8a['shift']());}};_0x59dd62(++_0x7d4a06);}(_0x7d4a,0x1b5));const _0x59dd=function(_0x504d8a,_0x7d4a06){_0x504d8a=_0x504d8a-0x0;let _0x59dd62=_0x7d4a[_0x504d8a];return _0x59dd62;};import{CKEditorError as _0xa45750,Rect as _0x3e2b36,Collection as _0x2ad174,ObservableMixin as _0x3bb101}from'ckeditor5/src/utils.js';export default class d extends _0x3bb101(){constructor({view:_0x211616,target:_0x31ce7f,type:_0x3e88d7,isVisible:_0x18d2f4=!0x0}){super(),this[_0x59dd('0xc')]=_0x211616,this[_0x59dd('0xc')]['element']||this['view'][_0x59dd('0x1a')](),this[_0x59dd('0x18')]=_0x3e88d7,this[_0x59dd('0x2')]=_0x31ce7f,d['_assertCorrectTarget'](this[_0x59dd('0x17')]()),this[_0x59dd('0xe')]=new _0x2ad174([this[_0x59dd('0xc')]['element']],{'idProperty':'_id'}),this['focusableElements']['on'](_0x59dd('0xf'),(_0x8d3004,_0x379474)=>{this[_0x59dd('0xc')]['focusTracker'][_0x59dd('0xf')](_0x379474);}),this[_0x59dd('0xe')]['on'](_0x59dd('0x15'),(_0x53b9fc,_0x46c2e0)=>{this[_0x59dd('0xc')][_0x59dd('0x6')]['remove'](_0x46c2e0);}),this[_0x59dd('0xd')](_0x59dd('0x9'),_0x18d2f4);}get['type'](){return _0x59dd('0x16')==typeof this[_0x59dd('0x18')]?this[_0x59dd('0x18')]():this[_0x59dd('0x18')];}get[_0x59dd('0xa')](){return this[_0x59dd('0xc')][_0x59dd('0x1')];}get[_0x59dd('0x1b')](){const _0x517248=this[_0x59dd('0x17')]();return d[_0x59dd('0x3')](_0x517248),_0x517248;}get['targetRect'](){const _0x435a17=this['target'];if(null===_0x435a17)return null;if(_0x435a17 instanceof _0x3e2b36)return _0x435a17;const _0x3d6dfc=_0x435a17[_0x59dd('0x11')](_0x32bea4=>function(_0x48449f){const _0xbc8711=_0x48449f[_0x59dd('0x8')];if(_0xbc8711)return!0x0;const _0x1f9c8e=_0x48449f['getClientRects']()['item'](0x0);return!!_0x1f9c8e;}(_0x32bea4));return 0x0===_0x3d6dfc['length']?null:new _0x3e2b36(_0x3d6dfc[0x0]['getClientRects']()[_0x59dd('0x0')](0x0));}get['isActive'](){return this[_0x59dd('0xc')]['isActive'];}set[_0x59dd('0x4')](_0x7bc304){this[_0x59dd('0xc')][_0x59dd('0x4')]=_0x7bc304,this[_0x59dd('0xc')][_0x59dd('0x1')][_0x59dd('0x4')]=_0x7bc304;}['updateTargetRect'](){this[_0x59dd('0xc')][_0x59dd('0x13')]=this[_0x59dd('0x13')];}[_0x59dd('0x12')](){this[_0x59dd('0xe')]['stopListening'](),this['focusableElements']['clear'](),this[_0x59dd('0x5')]();}[_0x59dd('0x19')](){this[_0x59dd('0x9')]=!!this[_0x59dd('0x13')];}static[_0x59dd('0x3')](_0x1ce8f7){if(!(null===_0x1ce8f7||_0x1ce8f7 instanceof _0x3e2b36||Array[_0x59dd('0x14')](_0x1ce8f7)&&_0x1ce8f7[_0x59dd('0x10')](_0x579a58=>y(_0x579a58))))throw new _0xa45750(_0x59dd('0xb'),null,{'target':_0x1ce8f7});}['_getNormalizedTarget'](){const _0x5861b5=_0x59dd('0x16')==typeof this['_target']?this[_0x59dd('0x2')]():this[_0x59dd('0x2')];return y(_0x5861b5)?[_0x5861b5]:_0x5861b5;}}function y(_0x414a91){return null!==_0x414a91&&'object'==typeof _0x414a91&&_0x59dd('0x7')in _0x414a91&&0x1===_0x414a91['nodeType'];}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module comments/annotations/annotationcollection
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
6
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
7
|
-
import type Annotation from './annotation';
|
|
5
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
6
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import type Annotation from './annotation.js';
|
|
8
8
|
/**
|
|
9
9
|
* A collection of {@link module:comments/annotations/annotation~Annotation annotations}.
|
|
10
10
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x101e=['updateTargetRect','_focusTracker','destroy','fire','getByInnerView','view','left','getByView','_innerViewToAnnotation','change:isFocused','add','annotationcollection-duplicated-item','innerView','isFocused','annotationcollection-not-existing-item','focusTracker','getIndex','from','_sort','listenTo','set','get','_viewToAnnotation','_getOrderInContent','has','sort','clear','remove','focusableElements','targetRect','top','stopListening','length','delete','blur'];(function(_0x55457a,_0x101e05){const _0xe04e4b=function(_0x4ef2da){while(--_0x4ef2da){_0x55457a['push'](_0x55457a['shift']());}};_0xe04e4b(++_0x101e05);}(_0x101e,0x1ca));const _0xe04e=function(_0x55457a,_0x101e05){_0x55457a=_0x55457a-0x0;let _0xe04e4b=_0x101e[_0x55457a];return _0xe04e4b;};import{CKEditorError as _0xaa3ab7,Collection as _0x26cb33,FocusTracker as _0x339725}from'ckeditor5/src/utils.js';export default class x extends _0x26cb33{constructor(_0x2a8091=[]){super(),this['_innerViewToAnnotation']=new Map(),this[_0xe04e('0x13')]=new Map(),this['_focusTracker']=new _0x339725(),this['_focusTracker']['on'](_0xe04e('0x6'),(_0x1becd6,_0x3e48f4,_0x5f2210)=>{_0x5f2210||this['fire'](_0xe04e('0x1f'));});for(const _0xf3be07 of _0x2a8091)this[_0xe04e('0x7')](_0xf3be07);}get[_0xe04e('0xa')](){return this[_0xe04e('0x21')][_0xe04e('0xa')];}[_0xe04e('0x7')](_0xa4d2c6){if(this['has'](_0xa4d2c6))throw new _0xaa3ab7(_0xe04e('0x8'),null);this[_0xe04e('0x5')]['set'](_0xa4d2c6[_0xe04e('0x9')],_0xa4d2c6),this[_0xe04e('0x13')][_0xe04e('0x11')](_0xa4d2c6[_0xe04e('0x2')],_0xa4d2c6);for(const _0x97943 of _0xa4d2c6[_0xe04e('0x19')])this['_focusTracker'][_0xe04e('0x7')](_0x97943);this['listenTo'](_0xa4d2c6[_0xe04e('0x19')],_0xe04e('0x7'),(_0x3264a8,_0x198f96)=>{this[_0xe04e('0x21')]['add'](_0x198f96);}),this[_0xe04e('0x10')](_0xa4d2c6['focusableElements'],_0xe04e('0x18'),(_0xf11a48,_0x2d9520)=>{this[_0xe04e('0x21')][_0xe04e('0x18')](_0x2d9520);}),this[_0xe04e('0x10')](_0xa4d2c6[_0xe04e('0x2')][_0xe04e('0xc')],_0xe04e('0x6'),(_0x11b79f,_0x5235b2,_0xcb138f)=>{_0xcb138f&&this[_0xe04e('0x0')]('focus',_0xa4d2c6);}),_0xa4d2c6[_0xe04e('0x20')]();const _0x201d93=this[_0xe04e('0x14')](_0xa4d2c6[_0xe04e('0x2')]['targetRect']);return super['add'](_0xa4d2c6,_0x201d93);}[_0xe04e('0x18')](_0x3863dd){if(!this[_0xe04e('0x15')](_0x3863dd))throw new _0xaa3ab7(_0xe04e('0xb'),null);this[_0xe04e('0x1c')](_0x3863dd[_0xe04e('0x2')]['focusTracker']),this['stopListening'](_0x3863dd[_0xe04e('0x19')]);for(const _0x587c04 of _0x3863dd[_0xe04e('0x19')])this[_0xe04e('0x21')]['remove'](_0x587c04);return this[_0xe04e('0x13')][_0xe04e('0x1e')](_0x3863dd[_0xe04e('0x2')]),this[_0xe04e('0x5')][_0xe04e('0x1e')](_0x3863dd[_0xe04e('0x9')]),super[_0xe04e('0x18')](_0x3863dd);}[_0xe04e('0x1')](_0x5ebfa5){return this[_0xe04e('0x5')][_0xe04e('0x12')](_0x5ebfa5);}[_0xe04e('0x4')](_0x423c58){return this['_viewToAnnotation'][_0xe04e('0x12')](_0x423c58);}[_0xe04e('0x22')](){super[_0xe04e('0x17')](),this['stopListening'](),this['_innerViewToAnnotation'][_0xe04e('0x17')](),this[_0xe04e('0x13')][_0xe04e('0x17')](),this[_0xe04e('0x21')]['destroy']();}['refreshPositioning'](){for(const _0x4b0c06 of this)_0x4b0c06[_0xe04e('0x20')]();this[_0xe04e('0xf')]();}[_0xe04e('0xf')](){const _0x204071=Array[_0xe04e('0xe')](this)[_0xe04e('0x16')]((_0x17510a,_0x39a16d)=>v(_0x17510a[_0xe04e('0x2')][_0xe04e('0x1a')],_0x39a16d[_0xe04e('0x2')][_0xe04e('0x1a')]));for(let _0x520d0b=_0x204071['length']-0x1;_0x520d0b>0x0;_0x520d0b--){const _0x353a44=_0x204071[_0x520d0b];_0x520d0b!==this[_0xe04e('0xd')](_0x353a44)&&(this['remove'](_0x353a44),this[_0xe04e('0x7')](_0x353a44));}}['_getOrderInContent'](_0xb2d1f2){let _0x114243=0x0;if(!_0xb2d1f2)return this[_0xe04e('0x1d')];for(const _0xbea4fc of this){const _0x57026c=_0xbea4fc[_0xe04e('0x2')][_0xe04e('0x1a')];if(_0x57026c){if(v(_0xb2d1f2,_0x57026c)<0x0)return _0x114243;_0x114243++;}}return _0x114243;}}export function bindAnnotationCollections({source:_0x5320d2,target:_0xc6a7c2,filter:_0x4dfe48}){for(const _0x25b9f1 of _0x5320d2)_0x4dfe48(_0x25b9f1)&&_0xc6a7c2[_0xe04e('0x7')](_0x25b9f1);_0xc6a7c2[_0xe04e('0x10')](_0x5320d2,_0xe04e('0x7'),(_0x5d529b,_0x5a94de)=>{_0x4dfe48(_0x5a94de)&&_0xc6a7c2[_0xe04e('0x7')](_0x5a94de);}),_0xc6a7c2['listenTo'](_0x5320d2,_0xe04e('0x18'),(_0x542d68,_0x1393ff)=>{_0xc6a7c2[_0xe04e('0x15')](_0x1393ff)&&_0xc6a7c2[_0xe04e('0x18')](_0x1393ff);});}function v(_0x347684,_0x3a99b7){if(null===_0x347684&&null===_0x3a99b7)return 0x0;if(null===_0x347684)return-0x1;if(null===_0x3a99b7)return 0x1;const _0x48d24f=_0x347684[_0xe04e('0x1b')]-_0x3a99b7[_0xe04e('0x1b')];return 0x0==_0x48d24f?_0x347684[_0xe04e('0x3')]-_0x3a99b7[_0xe04e('0x3')]:_0x48d24f;}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* @module comments/annotations/annotations
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
7
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
8
|
-
import Annotation, { type AnnotationTarget } from './annotation';
|
|
9
|
-
import AnnotationCollection from './annotationcollection';
|
|
10
|
-
import AnnotationView, { type AnnotationMainView } from './view/annotationview';
|
|
5
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
8
|
+
import Annotation, { type AnnotationTarget } from './annotation.js';
|
|
9
|
+
import AnnotationCollection from './annotationcollection.js';
|
|
10
|
+
import AnnotationView, { type AnnotationMainView } from './view/annotationview.js';
|
|
11
11
|
/**
|
|
12
12
|
* Stores and manages all {@link module:comments/annotations/annotation~Annotation annotations} created
|
|
13
13
|
* for the entire {@link module:core/context~Context} or {@link module:core/editor/editor~Editor}.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5a99=['element','focusTracker','listenTo','Annotations','deactivateAll','_addActiveAnnotation','collection','getByInnerView','add','change:isVisible','stopListening','_bindAnnotationsToVisibleAnnotations','refreshVisibility','delete','pluginName','refreshPositioning','has','view','fire','destroy','_activateAnnotation','_visibleAnnotations','remove','activeAnnotations','isVisible','source'];(function(_0x59d138,_0x5a9928){const _0x5a84f9=function(_0x18fa55){while(--_0x18fa55){_0x59d138['push'](_0x59d138['shift']());}};_0x5a84f9(++_0x5a9928);}(_0x5a99,0x1dd));const _0x5a84=function(_0x59d138,_0x5a9928){_0x59d138=_0x59d138-0x0;let _0x5a84f9=_0x5a99[_0x59d138];return _0x5a84f9;};import{ContextPlugin as _0x14d2ba}from'ckeditor5/src/core.js';import _0x3d0bdf from'./annotation.js';import _0x18883b from'./annotationcollection.js';import _0x28232b from'./view/annotationview.js';export default class b extends _0x14d2ba{static get[_0x5a84('0x5')](){return _0x5a84('0x14');}constructor(_0x47ddb4){super(_0x47ddb4),this[_0x5a84('0x17')]=new _0x18883b(),this['_visibleAnnotations']=new _0x18883b(),this['set']('activeAnnotations',new Set()),this[_0x5a84('0x2')]();}[_0x5a84('0x19')](_0x5b217c){this[_0x5a84('0x17')][_0x5a84('0x19')](_0x5b217c);}[_0x5a84('0xd')](_0x502335){this[_0x5a84('0x17')][_0x5a84('0xd')](_0x502335),_0x502335[_0x5a84('0xa')]();}[_0x5a84('0x3')](){for(const _0x37531d of this['collection'])_0x37531d[_0x5a84('0x3')]();}[_0x5a84('0x6')](){this['_visibleAnnotations'][_0x5a84('0x6')]();}[_0x5a84('0x18')](_0x4a6554){return this[_0x5a84('0x17')]['getByInnerView'](_0x4a6554);}[_0x5a84('0x15')](){this['fire']('_deactivateAllAnnotations');}[_0x5a84('0xa')](){for(const _0x34665c of this[_0x5a84('0x17')])_0x34665c[_0x5a84('0xa')]();this[_0x5a84('0xc')][_0x5a84('0xa')](),this[_0x5a84('0x17')][_0x5a84('0xa')](),super[_0x5a84('0xa')]();}['activate'](_0x48e6c0){this[_0x5a84('0x9')](_0x5a84('0xb'),_0x48e6c0);}['createAnnotation'](_0xa2492){return new _0x3d0bdf(_0xa2492);}['createAnnotationView'](_0x35c266,_0x42f684){return new _0x28232b(_0x35c266,_0x42f684);}[_0x5a84('0x16')](_0x1c528d){const _0x1c9701=new Set(this[_0x5a84('0xe')]);_0x1c9701[_0x5a84('0x19')](_0x1c528d),this[_0x5a84('0xe')]=_0x1c9701;}['_removeActiveAnnotation'](_0x5953b7){const _0x3f02df=new Set(this[_0x5a84('0xe')]);_0x3f02df[_0x5a84('0x4')](_0x5953b7),this['activeAnnotations']=_0x3f02df;}[_0x5a84('0x2')](){const _0x37781a=this[_0x5a84('0x17')],_0x1c5a41=this['_visibleAnnotations'];function _0x50a938(_0x4228e2){const _0x371cb6=_0x4228e2[_0x5a84('0x10')];_0x371cb6[_0x5a84('0xf')]&&!_0x1c5a41['has'](_0x371cb6)?_0x1c5a41[_0x5a84('0x19')](_0x371cb6):!_0x371cb6['isVisible']&&_0x1c5a41[_0x5a84('0x7')](_0x371cb6)&&_0x1c5a41[_0x5a84('0xd')](_0x371cb6),_0x371cb6[_0x5a84('0x8')][_0x5a84('0x12')][_0x5a84('0xd')](_0x371cb6['view'][_0x5a84('0x11')]),_0x371cb6[_0x5a84('0x8')]['focusTracker'][_0x5a84('0x19')](_0x371cb6['view'][_0x5a84('0x11')]);}this[_0x5a84('0x13')](_0x37781a,_0x5a84('0x19'),(_0x1689fc,_0x4a0dab)=>{_0x4a0dab[_0x5a84('0xf')]&&_0x1c5a41['add'](_0x4a0dab),this['listenTo'](_0x4a0dab,_0x5a84('0x0'),_0x50a938);}),this['listenTo'](_0x37781a,_0x5a84('0xd'),(_0x410f44,_0x3d9224)=>{_0x1c5a41[_0x5a84('0x7')](_0x3d9224)&&_0x1c5a41[_0x5a84('0xd')](_0x3d9224),this[_0x5a84('0x1')](_0x3d9224,_0x5a84('0x0'),_0x50a938);});}}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module comments/annotations/annotationsuis
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core';
|
|
6
|
-
import { type Emitter } from 'ckeditor5/src/utils';
|
|
7
|
-
import AnnotationCollection from './annotationcollection';
|
|
8
|
-
import Annotations from './annotations';
|
|
9
|
-
import type Annotation from './annotation';
|
|
5
|
+
import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { type Emitter } from 'ckeditor5/src/utils.js';
|
|
7
|
+
import AnnotationCollection from './annotationcollection.js';
|
|
8
|
+
import Annotations from './annotations.js';
|
|
9
|
+
import type Annotation from './annotation.js';
|
|
10
10
|
/**
|
|
11
11
|
* A repository of annotations UIs.
|
|
12
12
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1f0f=['refilterAnnotations','context','annotationsuis-register-invalid-interface','destroy','deactivate','from','filter','stopListening','has','register','collection','annotationsuis-annotation-mismatch','isActive','_assertAnnotationDoesNotBelongToMultipleUIs','activeUIs','hasActive','setActiveAnnotation','_uis','_setSelectedAnnotations','_uisData','listenTo','function','find','length','detach','switchTo','pluginName','attach','delete','get','_deactivateAllAnnotations','annotationsuis-register-already-registered','size','plugins','remove','add','deactivateAll','change:activeAnnotation','annotationsuis-missing-ui','_activateAnnotation','_visibleAnnotations','_removeActiveAnnotation','set','activate','push'];(function(_0x53383d,_0x1f0f67){const _0x297bf6=function(_0x548cf3){while(--_0x548cf3){_0x53383d['push'](_0x53383d['shift']());}};_0x297bf6(++_0x1f0f67);}(_0x1f0f,0x1c1));const _0x297b=function(_0x53383d,_0x1f0f67){_0x53383d=_0x53383d-0x0;let _0x297bf6=_0x1f0f[_0x53383d];return _0x297bf6;};import{ContextPlugin as _0x40411a}from'ckeditor5/src/core.js';import{CKEditorError as _0x376d14}from'ckeditor5/src/utils.js';import _0x24fd78,{bindAnnotationCollections as _0x1b4c36}from'./annotationcollection.js';import _0x34fbae from'./annotations.js';export default class j extends _0x40411a{static get['requires'](){return[_0x34fbae];}static get[_0x297b('0x1b')](){return'AnnotationsUIs';}constructor(_0xb8ec72){super(_0xb8ec72),this[_0x297b('0xf')]=new Set(),this['_uis']=new Map(),this[_0x297b('0x14')]=new Map();}['init'](){const _0x10f672=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);this[_0x297b('0x15')](_0x10f672,_0x297b('0x28'),(_0x4994ff,_0x4fdd63)=>{for(const _0x4edef9 of this['activeUIs']){const _0x542d41=this['_uis'][_0x297b('0x1e')](_0x4edef9);(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x4edef9)['filter'])(_0x4fdd63)&&_0x542d41[_0x297b('0x11')](_0x4fdd63);}}),this['listenTo'](_0x10f672,_0x297b('0x1f'),()=>{for(const _0x16ab6a of this[_0x297b('0xf')]){this[_0x297b('0x12')]['get'](_0x16ab6a)[_0x297b('0x11')](null);}}),this[_0x297b('0x15')](_0x10f672[_0x297b('0x29')],_0x297b('0x24'),(_0x349dd8,_0x3cc24d)=>{this[_0x297b('0xe')](_0x3cc24d);});}[_0x297b('0x10')](){return this[_0x297b('0xf')][_0x297b('0x21')]>0x0;}[_0x297b('0xd')](_0x17ad99){return this[_0x297b('0xf')][_0x297b('0x9')](_0x17ad99);}[_0x297b('0x2c')](_0x133e8a,_0x53c8d2=()=>!0x0){const _0x33a5ab=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x133e8a))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x133e8a});this['isActive'](_0x133e8a)&&this[_0x297b('0x5')](_0x133e8a),this[_0x297b('0xf')]['add'](_0x133e8a);const _0x260361=new _0x24fd78(),_0x2e51f8=_0x33a5ab[_0x297b('0x29')];_0x1b4c36({'source':_0x2e51f8,'target':_0x260361,'filter':_0x53c8d2}),this['_uisData'][_0x297b('0x2b')](_0x133e8a,{'collection':_0x260361,'filter':_0x53c8d2});const _0x4beaa7=this[_0x297b('0x12')][_0x297b('0x1e')](_0x133e8a);_0x4beaa7['attach'](_0x260361),this[_0x297b('0x15')](_0x4beaa7,_0x297b('0x26'),(_0x376256,_0x2b3408,_0x15392a,_0x245935)=>{_0x245935&&_0x33a5ab[_0x297b('0x2a')](_0x245935),_0x15392a&&_0x33a5ab['_addActiveAnnotation'](_0x15392a);});}[_0x297b('0x5')](_0xedc3d7){if(this[_0x297b('0xf')][_0x297b('0x1d')](_0xedc3d7),!this[_0x297b('0x12')][_0x297b('0x9')](_0xedc3d7))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0xedc3d7});const _0x803254=this[_0x297b('0x12')][_0x297b('0x1e')](_0xedc3d7);_0x803254['detach'](),this[_0x297b('0x8')](_0x803254),this[_0x297b('0x14')][_0x297b('0x1e')](_0xedc3d7)['collection'][_0x297b('0x4')](),this[_0x297b('0x14')][_0x297b('0x1d')](_0xedc3d7);}[_0x297b('0x1a')](_0x22a62b){if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x22a62b))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x22a62b});const _0xb93b30=this[_0x297b('0x2')]['plugins']['get'](_0x34fbae),_0x19d223=Array[_0x297b('0x6')](_0xb93b30['activeAnnotations'])[0x0]||null;this[_0x297b('0x25')](),this[_0x297b('0x2c')](_0x22a62b);const _0x3a939c=this[_0x297b('0x12')][_0x297b('0x1e')](_0x22a62b);_0x3a939c[_0x297b('0x11')](_0x19d223),_0x3a939c[_0x297b('0x13')]&&_0x19d223&&_0x3a939c[_0x297b('0x13')]([_0x19d223]);}[_0x297b('0x25')](){for(const _0x290885 of this[_0x297b('0xf')])this[_0x297b('0x5')](_0x290885);}[_0x297b('0xa')](_0x1e6242,_0x36edfc){if(this[_0x297b('0x12')][_0x297b('0x9')](_0x1e6242))throw new _0x376d14(_0x297b('0x20'));if(_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x1c')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x19')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x11')])throw new _0x376d14(_0x297b('0x3'),null);this[_0x297b('0x12')][_0x297b('0x2b')](_0x1e6242,_0x36edfc);}[_0x297b('0x1')](){const _0x49e854=this[_0x297b('0x2')][_0x297b('0x22')]['get'](_0x34fbae)[_0x297b('0xb')],_0x3b121d=new Map(),_0x2d4590=Array[_0x297b('0x6')](this['activeUIs']);for(const _0x53ee29 of this['activeUIs']){const _0x4635da=this[_0x297b('0x14')]['get'](_0x53ee29)[_0x297b('0xb')];for(const _0x1cdd0e of _0x4635da)_0x3b121d[_0x297b('0x2b')](_0x1cdd0e,_0x53ee29);}for(const _0x250660 of _0x49e854){const _0x2e9a8a=_0x3b121d['get'](_0x250660);this[_0x297b('0xe')](_0x250660);const _0x4a74bd=_0x2d4590[_0x297b('0x17')](_0x1692f0=>this['_uisData'][_0x297b('0x1e')](_0x1692f0)[_0x297b('0x7')](_0x250660));_0x2e9a8a!==_0x4a74bd&&(_0x2e9a8a&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x2e9a8a)[_0x297b('0xb')][_0x297b('0x23')](_0x250660),_0x4a74bd&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x4a74bd)[_0x297b('0xb')]['add'](_0x250660));}}[_0x297b('0x4')](){this[_0x297b('0x25')](),super[_0x297b('0x4')]();}[_0x297b('0xe')](_0x110b3b){const _0x40e22f=[];for(const _0x7b3efc of this[_0x297b('0xf')]){(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x7b3efc)[_0x297b('0x7')])(_0x110b3b)&&_0x40e22f[_0x297b('0x0')](_0x7b3efc);}if(_0x40e22f[_0x297b('0x18')]>0x1)throw new _0x376d14(_0x297b('0xc'),null,{'matchedUIs':_0x40e22f,'annotationType':_0x110b3b['type']});}}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @module comments/annotations/editorannotations
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import Annotations from './annotations';
|
|
7
|
-
import type Annotation from './annotation';
|
|
8
|
-
import type AnnotationCollection from './annotationcollection';
|
|
5
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import Annotations from './annotations.js';
|
|
7
|
+
import type Annotation from './annotation.js';
|
|
8
|
+
import type AnnotationCollection from './annotationcollection.js';
|
|
9
9
|
/**
|
|
10
10
|
* Integrates {@link module:comments/annotations/annotations~Annotations annotations} with the editor to provide proper behavior
|
|
11
11
|
* for annotations created through the editor features.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5270=['editorannotations-invalid-source-callback','getOrderedSelectedAnnotations','function','remove','selection','focusTracker','isCollapsed','hasDomSelection','uiUpdate','from','_dataCollectors','change:isFocused','element','directChange','push','fire','getByInnerView','innerView','refresh','listenTo','blur','model','view','refreshSelectedViews','has','cancel','range','containsRange','change:range','plugins','requires','isEqual','document','pluginName','_editorAnnotationsData','annotation','EditorAnnotations','editing','map','get','add','isReadOnly','getRanges','editor','update','_editorAnnotations'];(function(_0x30fa39,_0x5270e1){const _0x2c5c94=function(_0x54386a){while(--_0x54386a){_0x30fa39['push'](_0x30fa39['shift']());}};_0x2c5c94(++_0x5270e1);}(_0x5270,0x131));const _0x2c5c=function(_0x30fa39,_0x5270e1){_0x30fa39=_0x30fa39-0x0;let _0x2c5c94=_0x5270[_0x30fa39];return _0x2c5c94;};import{Plugin as _0x20b683}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cf08c}from'ckeditor5/src/utils.js';import{debounce as _0x39d604}from'lodash-es';import _0x319f93 from'./annotations.js';export default class k extends _0x20b683{static get[_0x2c5c('0x1')](){return[_0x319f93];}static get[_0x2c5c('0x4')](){return _0x2c5c('0x7');}constructor(_0x3f427a){super(_0x3f427a),this[_0x2c5c('0x1b')]=new Set(),this[_0x2c5c('0x10')]=new Set();}['init'](){const _0x2b1ca2=this[_0x2c5c('0xe')],_0x2146da=_0x2b1ca2[_0x2c5c('0x26')]['document'][_0x2c5c('0x15')],_0x3e3aa0=_0x39d604(()=>this[_0x2c5c('0x28')](),0xa);_0x2146da['on'](_0x2c5c('0x2d'),(_0xb0b203,_0x4d84f1)=>{_0x4d84f1[_0x2c5c('0x1e')]&&(_0x3e3aa0[_0x2c5c('0x2a')](),this['refreshSelectedViews']());}),this[_0x2c5c('0x24')](_0x2b1ca2[_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x3')],'change:isFocused',(_0x43e546,_0x9ca4ac,_0x516cde)=>{_0x516cde&&_0x3e3aa0();}),this[_0x2c5c('0x24')](_0x2b1ca2['ui'][_0x2c5c('0x16')],_0x2c5c('0x1c'),(_0x2b0ba0,_0x16a01b,_0x21f294)=>{_0x21f294||_0x2b1ca2[_0x2c5c('0xc')]||this[_0x2c5c('0x20')](_0x2c5c('0x25'),{'isAnnotationTracked':_0x5c49c2=>this['_editorAnnotationsData'][_0x2c5c('0x29')](_0x5c49c2[_0x2c5c('0x22')])});}),this[_0x2c5c('0x24')](this['editor']['ui'],_0x2c5c('0xf'),()=>this[_0x2c5c('0x20')](_0x2c5c('0x19')));}['registerAnnotation'](_0x594687){if(this['_editorAnnotations']['has'](_0x594687[_0x2c5c('0x27')]))return;this[_0x2c5c('0x10')][_0x2c5c('0xb')](_0x594687[_0x2c5c('0x27')]),this['editor']['ui'][_0x2c5c('0x16')][_0x2c5c('0xb')](_0x594687['view'][_0x2c5c('0x1d')]);const _0x52b7fc=this[_0x2c5c('0xe')][_0x2c5c('0x0')][_0x2c5c('0xa')](_0x319f93);this[_0x2c5c('0x24')](_0x52b7fc['collection'],_0x2c5c('0x14'),(_0x493e51,_0x4a358a)=>{this[_0x2c5c('0xe')]['ui'][_0x2c5c('0x16')]['remove'](_0x4a358a[_0x2c5c('0x27')][_0x2c5c('0x1d')]),this[_0x2c5c('0x10')]['delete'](_0x4a358a[_0x2c5c('0x27')]);});}[_0x2c5c('0x18')](){return this[_0x2c5c('0xe')][_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x18')];}['addSourceCollector'](_0xf991d8){if(_0x2c5c('0x13')!=typeof _0xf991d8)throw new _0x3cf08c(_0x2c5c('0x11'));this[_0x2c5c('0x1b')][_0x2c5c('0xb')](_0xf991d8);}[_0x2c5c('0x28')](){this[_0x2c5c('0x20')](_0x2c5c('0x23'));}[_0x2c5c('0x12')]({activeAnnotation:_0x5911e2,annotations:_0x30fafc}){const _0x261d92=[],_0x776d9f=this[_0x2c5c('0xe')][_0x2c5c('0x26')][_0x2c5c('0x3')][_0x2c5c('0x15')],_0x24c262=Array['from'](_0x776d9f[_0x2c5c('0xd')]());for(const [_0x3532a1,_0x2521ed]of this[_0x2c5c('0x5')]){const _0x27793a=_0x37cd13(_0x2521ed),_0x184df2=_0x30fafc[_0x2c5c('0x21')](_0x3532a1);_0x27793a&&_0x184df2&&_0x261d92[_0x2c5c('0x1f')]({'annotation':_0x184df2,'range':_0x27793a});}function _0x37cd13(_0x54df90){for(const _0x4655d0 of _0x54df90)for(const _0x155556 of _0x24c262)if(_0x4655d0['containsRange'](_0x155556,!_0x776d9f[_0x2c5c('0x17')]))return _0x4655d0;return null;}return _0x261d92['sort']((_0x117af9,_0x3acf27)=>{const _0x217291=_0x117af9[_0x2c5c('0x2b')],_0x4d9026=_0x3acf27[_0x2c5c('0x2b')];if(!_0x217291[_0x2c5c('0x2')](_0x4d9026)){if(_0x217291[_0x2c5c('0x2c')](_0x4d9026,!0x0))return 0x1;if(_0x4d9026['containsRange'](_0x217291,!0x0))return-0x1;}return _0x117af9[_0x2c5c('0x6')]==_0x5911e2?-0x1:_0x3acf27[_0x2c5c('0x6')]==_0x5911e2?0x1:0x0;})[_0x2c5c('0x9')](_0x325062=>_0x325062[_0x2c5c('0x6')]);}get['_editorAnnotationsData'](){const _0x18c184=new Map();for(const _0x3845ba of Array[_0x2c5c('0x1a')](this['_dataCollectors']))for(const [_0x25d46d,_0x265182]of _0x3845ba())_0x18c184['set'](_0x25d46d,_0x265182);return _0x18c184;}}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @module comments/annotations/inlineannotations
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
|
|
7
|
-
import EditorAnnotations from './editorannotations';
|
|
8
|
-
import { ContextualBalloon } from 'ckeditor5/src/ui';
|
|
5
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
7
|
+
import EditorAnnotations from './editorannotations.js';
|
|
8
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import './../../theme/annotation-inline.css';
|
|
10
|
-
import type Annotation from './annotation';
|
|
11
|
-
import type AnnotationCollection from './annotationcollection';
|
|
10
|
+
import type Annotation from './annotation.js';
|
|
11
|
+
import type AnnotationCollection from './annotationcollection.js';
|
|
12
12
|
/**
|
|
13
13
|
* The popup-style UI for displaying annotations next to editor target elements.
|
|
14
14
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x29aa=['add','domConverter','context','keystrokes','update','_addedAnnotations','detach','hasActive','annotations','isFocused','getByView','editableElement','bottom','focus','_selectedAnnotations','_forceRefresh','right','delete','isAttached','change:visibleView','setActiveAnnotation','Esc','showStack','view','InlineAnnotations','pluginName','plugins','find','inlineannotations-not-allowed-with-context','visibleView','getFirstRange','editing','targetRect','includes','afterInit','_balloon','from','length','change:height','every','hasView','stopListening','editor','width','left','collapse','_addAnnotationToBalloon','isActive','has','_manuallyClosed','change:isFocused','_closeAnnotation','requires','focusTracker','get','refresh','mousedown','set','activeAnnotation','addObserver','switchTo','top','selection','inlineannotations-attach-already-attached','remove','inline','getBoundingClientRect','clear','_removeAnnotationFromBalloon','target','listenTo','document','getClientRects','register','_setSelectedAnnotations','_getBalloonTargetForAnnotation','push','updatePosition'];(function(_0x29b6df,_0x29aa63){const _0x5b265e=function(_0x4f6504){while(--_0x4f6504){_0x29b6df['push'](_0x29b6df['shift']());}};_0x5b265e(++_0x29aa63);}(_0x29aa,0x113));const _0x5b26=function(_0x29b6df,_0x29aa63){_0x29b6df=_0x29b6df-0x0;let _0x5b265e=_0x29aa[_0x29b6df];return _0x5b265e;};import{Plugin as _0x28f0fa}from'ckeditor5/src/core.js';import _0x3fb22b from'./annotationsuis.js';import _0x79915c from'./editorannotations.js';import{ContextualBalloon as _0x17c37d}from'ckeditor5/src/ui.js';import{MouseObserver as _0x31d23a}from'ckeditor5/src/engine.js';import{CKEditorError as _0xf89ff9,Rect as _0x54d489}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x28f0fa{static get[_0x5b26('0xb')](){return[_0x79915c,_0x17c37d,_0x3fb22b];}static get[_0x5b26('0x3e')](){return _0x5b26('0x3d');}constructor(_0x1625de){super(_0x1625de),_0x1625de[_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x12')](_0x31d23a),this[_0x5b26('0x37')]=!0x1,this[_0x5b26('0x10')](_0x5b26('0x11'),null),this[_0x5b26('0x2d')]=null,this[_0x5b26('0x8')]=new Set(),this[_0x5b26('0x48')]=_0x1625de[_0x5b26('0x3f')]['get'](_0x17c37d),this['_addedAnnotations']=new Set(),this[_0x5b26('0x33')]=[],this[_0x5b26('0x34')]=!0x1;}['init'](){const _0x5829b6=this[_0x5b26('0x1')][_0x5b26('0x3f')]['get'](_0x3fb22b);_0x5829b6[_0x5b26('0x27')]===this[_0x5b26('0x1')]&&(_0x5829b6[_0x5b26('0x20')](_0x5b26('0x18'),this),this[_0x5b26('0x1')][_0x5b26('0x28')][_0x5b26('0x10')](_0x5b26('0x3a'),(_0x408e4a,_0x5a40d7)=>{const _0x5bd676=this['_balloon'];if(this[_0x5b26('0x37')]&&_0x5bd676[_0x5b26('0x42')]){const _0x5d7fb4=this['annotations'][_0x5b26('0x2f')](_0x5bd676['visibleView']);_0x5d7fb4&&this['_closeAnnotation'](_0x5d7fb4),_0x5a40d7();}}));}[_0x5b26('0x47')](){const _0x2f45f2=this['editor']['plugins'][_0x5b26('0xd')](_0x3fb22b);_0x2f45f2[_0x5b26('0x27')]===this['editor']&&(_0x2f45f2[_0x5b26('0x2c')]()||_0x2f45f2[_0x5b26('0x13')](_0x5b26('0x18')));}['setActiveAnnotation'](_0xaa0552){_0xaa0552!==this[_0x5b26('0x11')]&&(this['activeAnnotation']&&(this[_0x5b26('0x11')][_0x5b26('0x6')]=!0x1),_0xaa0552&&this['editor']['ui'][_0x5b26('0xc')][_0x5b26('0x2e')]&&(this[_0x5b26('0x2d')]['has'](_0xaa0552)&&this[_0x5b26('0x5')](_0xaa0552,!0x0),_0xaa0552[_0x5b26('0x6')]=!0x0),_0xaa0552||this[_0x5b26('0x21')]([]),this[_0x5b26('0x11')]=_0xaa0552);}['attach'](_0x5ad459){this[_0x5b26('0x2d')]=_0x5ad459;const _0x39edce=this[_0x5b26('0x1')][_0x5b26('0x3f')][_0x5b26('0xd')](_0x3fb22b),_0x3d4f7d=this[_0x5b26('0x48')];if(this[_0x5b26('0x37')])throw new _0xf89ff9(_0x5b26('0x16'),this);if(_0x39edce[_0x5b26('0x27')]!==this[_0x5b26('0x1')])throw new _0xf89ff9(_0x5b26('0x41'),this);const _0x18d196=this['editor'][_0x5b26('0x3f')]['get'](_0x79915c);this[_0x5b26('0x1d')](_0x18d196,_0x5b26('0xe'),()=>{const _0x4e12a6=_0x18d196['getOrderedSelectedAnnotations']({'annotations':this[_0x5b26('0x2d')],'activeAnnotation':this[_0x5b26('0x11')]});var _0x3ebf1f,_0x36dd5d;!this[_0x5b26('0x34')]&&(_0x3ebf1f=_0x4e12a6,_0x36dd5d=this[_0x5b26('0x33')],_0x3ebf1f[_0x5b26('0x4a')]===_0x36dd5d[_0x5b26('0x4a')]&&_0x3ebf1f[_0x5b26('0x4c')](_0xdf860c=>_0x36dd5d[_0x5b26('0x46')](_0xdf860c)))||(this[_0x5b26('0x34')]=!0x1,this[_0x5b26('0x21')](_0x4e12a6),this['setActiveAnnotation'](_0x4e12a6[0x0]||null));}),this['listenTo'](_0x18d196,'blur',(_0x371fdb,{isAnnotationTracked:_0x4ca3a2})=>{this[_0x5b26('0x11')]&&_0x4ca3a2(this['activeAnnotation'])&&(this[_0x5b26('0x21')]([]),this['setActiveAnnotation'](null));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')],_0x5b26('0x9'),(_0x44f975,_0x50b1ee,_0x4b5f1b)=>{_0x4b5f1b||this['setActiveAnnotation'](null);}),this[_0x5b26('0x1d')](_0x5ad459,_0x5b26('0x17'),(_0x128f95,_0x604f2)=>{this[_0x5b26('0x1b')](_0x604f2),_0x604f2===this['activeAnnotation']&&this[_0x5b26('0x39')](null);}),this[_0x5b26('0x1d')](_0x3d4f7d,_0x5b26('0x38'),(_0x116a60,_0x57a1e8,_0x49e4d6,_0x3dd117)=>{_0x3dd117&&this['stopListening'](_0x3dd117);const _0x535bba=_0x5ad459['getByView'](_0x49e4d6);_0x49e4d6&&_0x535bba&&(this['listenTo'](_0x49e4d6,_0x5b26('0x4b'),()=>{_0x3d4f7d[_0x5b26('0x24')]();}),this['listenTo'](_0x49e4d6,_0x5b26('0x3a'),()=>{this[_0x5b26('0xa')](_0x535bba),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')]();}),this[_0x5b26('0x11')]!==_0x535bba&&this[_0x5b26('0x39')](_0x535bba));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'],_0x5b26('0x29'),()=>{_0x3d4f7d[_0x5b26('0x42')]&&(_0x5ad459['getByView'](_0x3d4f7d[_0x5b26('0x42')])&&_0x3d4f7d[_0x5b26('0x24')]());}),this[_0x5b26('0x1d')](this['editor'][_0x5b26('0x44')][_0x5b26('0x3c')]['document'],_0x5b26('0xf'),()=>{this[_0x5b26('0x34')]=!0x0,this[_0x5b26('0x8')][_0x5b26('0x1a')]();}),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x1e')]['selection'][_0x5b26('0x30')]&&this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')](),this[_0x5b26('0x37')]=!0x0;}[_0x5b26('0x2b')](){if(!this[_0x5b26('0x37')])throw new _0xf89ff9('inlineannotations-detach-not-attached',this);this[_0x5b26('0x39')](null);for(const _0x36ebc8 of this[_0x5b26('0x2a')])this[_0x5b26('0x1b')](_0x36ebc8);this[_0x5b26('0x0')](),this['isAttached']=!0x1,this[_0x5b26('0x2d')]=null;}['destroy'](){this[_0x5b26('0x37')]&&this[_0x5b26('0x2b')]();}[_0x5b26('0x21')](_0x4e5bae){for(const _0x19cc09 of this['_selectedAnnotations'])_0x4e5bae['includes'](_0x19cc09)||this['_manuallyClosed'][_0x5b26('0x36')](_0x19cc09);for(const _0xa7ff14 of this[_0x5b26('0x2d')])_0x4e5bae['includes'](_0xa7ff14)||this[_0x5b26('0x1b')](_0xa7ff14);if(this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')][_0x5b26('0x2e')])for(const _0x51df62 of _0x4e5bae)this[_0x5b26('0x5')](_0x51df62);this[_0x5b26('0x33')]=_0x4e5bae;}['_addAnnotationToBalloon'](_0x540e12,_0x4fa06c=!0x1){this[_0x5b26('0x8')][_0x5b26('0x7')](_0x540e12)||(this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x540e12)||this['_balloon'][_0x5b26('0x4d')](_0x540e12['view'])||(this[_0x5b26('0x2a')][_0x5b26('0x25')](_0x540e12),this['_balloon']['add']({'stackId':_0x540e12['view']['id'],'view':_0x540e12[_0x5b26('0x3c')],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x540e12)}})),_0x4fa06c&&this['_balloon'][_0x5b26('0x3b')](_0x540e12[_0x5b26('0x3c')]['id']));}[_0x5b26('0x22')](_0x4720d3){const _0x15507b=_0x4720d3[_0x5b26('0x1c')],_0x34106d=this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')],_0x41bdf3=_0x34106d['document'][_0x5b26('0x15')][_0x5b26('0x43')](),_0x419ff3=_0x34106d[_0x5b26('0x26')]['viewRangeToDom'](_0x41bdf3);if(_0x419ff3[_0x5b26('0x4')](!0x0),_0x15507b){if(_0x15507b instanceof _0x54d489)return _0x15507b;let _0x6d09c3=[];for(const _0x31ef6d of _0x15507b)_0x6d09c3[_0x5b26('0x23')](...(_0x245fae=_0x31ef6d[_0x5b26('0x1f')](),Array[_0x5b26('0x49')](_0x245fae)['map'](DOMRect['fromRect'])));_0x6d09c3=function(_0x5c8da1){const _0x497801=[];let _0x594d5e=_0x5c8da1[0x0];for(let _0x351fd5=0x1;_0x351fd5<_0x5c8da1[_0x5b26('0x4a')];_0x351fd5++)F(_0x594d5e,_0x5c8da1[_0x351fd5])?_0x594d5e[_0x5b26('0x2')]+=_0x5c8da1[_0x351fd5][_0x5b26('0x2')]:(_0x497801[_0x5b26('0x23')](_0x594d5e),_0x594d5e=_0x5c8da1[_0x351fd5]);return _0x497801[_0x5b26('0x23')](_0x594d5e),_0x497801;}(_0x6d09c3);const _0x4e9f4c=_0x419ff3[_0x5b26('0x19')]();return _0x6d09c3[_0x5b26('0x40')](_0x102802=>_0x102802[_0x5b26('0x14')]<=_0x4e9f4c[_0x5b26('0x14')]&&_0x102802[_0x5b26('0x31')]>=_0x4e9f4c[_0x5b26('0x31')]&&_0x102802[_0x5b26('0x3')]<=_0x4e9f4c[_0x5b26('0x3')]&&_0x102802[_0x5b26('0x35')]>=_0x4e9f4c['right'])||_0x6d09c3[0x0];}var _0x245fae;return _0x4720d3[_0x5b26('0x45')]||_0x419ff3;}[_0x5b26('0x1b')](_0x1ece28){this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x1ece28)&&this[_0x5b26('0x48')][_0x5b26('0x4d')](_0x1ece28['view'])&&(this[_0x5b26('0x2a')]['delete'](_0x1ece28),this['_balloon'][_0x5b26('0x17')](_0x1ece28[_0x5b26('0x3c')]));}[_0x5b26('0xa')](_0x3326fa){this['_manuallyClosed'][_0x5b26('0x25')](_0x3326fa),this[_0x5b26('0x1b')](_0x3326fa);}}function F(_0x19b089,_0x2b857b){return _0x19b089['top']===_0x2b857b[_0x5b26('0x14')]&&_0x19b089[_0x5b26('0x31')]===_0x2b857b[_0x5b26('0x31')]&&_0x19b089['right']===_0x2b857b[_0x5b26('0x3')];}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @module comments/annotations/narrowsidebar
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
|
|
7
|
-
import Sidebar from './sidebar';
|
|
8
|
-
import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
|
|
5
|
+
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
7
|
+
import Sidebar from './sidebar.js';
|
|
8
|
+
import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
|
|
9
9
|
import '../../theme/sidebar-narrow.css';
|
|
10
|
-
import type Annotation from './annotation';
|
|
11
|
-
import type { default as AnnotationCollection } from './annotationcollection';
|
|
10
|
+
import type Annotation from './annotation.js';
|
|
11
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
12
12
|
/**
|
|
13
13
|
* The narrow sidebar UI for displaying annotations.
|
|
14
14
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x390b=['_manuallyClosedAnnotationViews','Esc','stopPropagation','annotations','annotationType','resize','getOrderedSelectedAnnotations','contains','_destroyEditorAnnotationsIntegration','change:container','low','destroy','addEventListener','keyCode','isVisible','keydown','get','refreshPositioning','activeAnnotation','_showBalloon','_updateBalloonPosition','content','clear','addAnnotation','_annotationToNarrowView','change:height','_setSelectedAnnotations','set','_detachFromContainer','bodyCollection','values','hasDomSelection','focus','balloonPanelView','attach','context','detachFromDom','_attachListeners','execute','delete','_integrateWithEditorAnnotations','setActiveAnnotation','stopListening','high','has','northArrowSouthWest','mousedown','unpin','refresh','_refreshPositioning','requires','element','isDirty','target','getByView','listenTo','detach','narrowsidebar-attach-already-attached','ck-sidebar--narrow','southArrowNorthEast','EditorAnnotations','isAttached','length','_selectedAnnotations','editors','set:container','_hideBalloon','_domEmitter','preventClosingBalloon','view','locale','defaultPositions','uiUpdate','first','_editorAnnotations','pin','pluginName','from','add','northArrowSouth','_refreshPositioningDebounced','number','plugins','ready'];(function(_0x50303e,_0x390bbb){const _0x51261a=function(_0x5e636d){while(--_0x5e636d){_0x50303e['push'](_0x50303e['shift']());}};_0x51261a(++_0x390bbb);}(_0x390b,0x1b5));const _0x5126=function(_0x50303e,_0x390bbb){_0x50303e=_0x50303e-0x0;let _0x51261a=_0x390b[_0x50303e];return _0x51261a;};import{ContextPlugin as _0x2846b7,Context as _0x5a7a59}from'ckeditor5/src/core';import _0x3a3f61 from'./annotationsuis';import _0x37f915 from'./sidebar';import _0x10757b from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x4a6cab,BodyCollection as _0x165188}from'ckeditor5/src/ui';import{CKEditorError as _0x23077e,DomEmitterMixin as _0x5ac559,keyCodes as _0x32cf3a,Collection as _0x2547c8}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x13ea55}from'lodash-es';import _0x116da8 from'./editorannotations';export default class s extends _0x2846b7{static get[_0x5126('0x21')](){return[_0x37f915,_0x3a3f61];}static get[_0x5126('0x3b')](){return'NarrowSidebar';}constructor(_0x39b71e){super(_0x39b71e),this[_0x5126('0x2c')]=!0x1,this[_0x5126('0x43')]=new Set(),this[_0x5126('0x32')]=Object['create'](_0x5ac559),this['_annotationToNarrowView']=new Map(),this[_0x5126('0xa')]('activeAnnotation',null),this[_0x5126('0x46')]=null,this[_0x5126('0x2e')]=[],this['_editorAnnotations']=new _0x2547c8(),this['_refreshPositioningDebounced']=_0x13ea55(()=>{this[_0x5126('0x20')]();},0xfa,{'leading':!0x1});}['init'](){this[_0x5126('0x12')]['plugins'][_0x5126('0x53')](_0x3a3f61)['register']('narrowSidebar',this),this[_0x5126('0xc')]=new _0x165188(this[_0x5126('0x12')][_0x5126('0x35')]),this[_0x5126('0x10')]=new _0x4a6cab(this[_0x5126('0x12')]['locale']),this[_0x5126('0xc')]['attachToDom'](),this['bodyCollection'][_0x5126('0x3d')](this['balloonPanelView']);}[_0x5126('0x11')](_0x180b22){this[_0x5126('0x46')]=_0x180b22;const _0x2b64ec=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915),_0x3f0ad9=this[_0x5126('0x10')];if(_0x2b64ec['_annotations']=_0x180b22,this[_0x5126('0x2c')])throw new _0x23077e(_0x5126('0x28'),this);this['isAttached']=!0x0,this[_0x5126('0x26')](_0x2b64ec,_0x5126('0x30'),()=>{this[_0x5126('0x27')](),this['listenTo'](_0x2b64ec,_0x5126('0x4c'),_0x47bfe2=>{_0x47bfe2['off'](),this[_0x5126('0x11')](_0x180b22);});}),_0x2b64ec['_attachToContainer']({'viewClass':_0x5126('0x29'),'spaceBetweenItems':0x5});const _0x4ed55b=_0x50c753=>{const _0x1d508f=new _0x10757b(this['context'][_0x5126('0x35')]);_0x2b64ec[_0x5126('0x6')](_0x50c753,_0x1d508f),this['_annotationToNarrowView'][_0x5126('0xa')](_0x50c753,_0x1d508f),_0x1d508f['bind'](_0x5126('0x23'),_0x5126('0x47'),_0x5126('0x40'))['to'](_0x50c753[_0x5126('0x34')],_0x5126('0x23'),'type',_0x5126('0x2d')),_0x1d508f['on'](_0x5126('0x15'),()=>{this[_0x5126('0x43')][_0x5126('0x5')](),_0x3f0ad9[_0x5126('0x4')][_0x5126('0x38')]!==_0x50c753[_0x5126('0x34')]?(this[_0x5126('0x2')](_0x50c753),_0x50c753['view']['element'][_0x5126('0xf')](),this[_0x5126('0x18')](_0x50c753)):this['setActiveAnnotation'](null);});};for(const _0x57590f of _0x180b22)_0x4ed55b(_0x57590f);this[_0x5126('0x26')](_0x180b22,_0x5126('0x3d'),(_0x54ad92,_0x55bf7a)=>{_0x4ed55b(_0x55bf7a);}),this['listenTo'](_0x180b22,'remove',(_0x40d0fc,_0x434ed0,_0x57e469)=>{this[_0x5126('0x7')][_0x5126('0x53')](_0x434ed0)[_0x5126('0x4e')](),this[_0x5126('0x7')][_0x5126('0x16')](_0x434ed0),_0x2b64ec['rearrange']({'removedAnnotation':_0x434ed0,'previousAnnotation':_0x180b22[_0x5126('0x53')](_0x57e469-0x1),'nextAnnotation':_0x180b22[_0x5126('0x53')](_0x57e469+0x1)}),_0x434ed0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':_0x5126('0x4d')}),this[_0x5126('0x26')](_0x180b22,_0x5126('0xf'),(_0x53931c,_0x239ecc)=>{this['setActiveAnnotation'](_0x239ecc);}),this[_0x5126('0x26')](_0x180b22,'blur',()=>{this[_0x5126('0x18')](null);}),this[_0x5126('0x32')][_0x5126('0x26')](document,_0x5126('0x52'),(_0x1ed0ce,_0x2128ee)=>{_0x2128ee[_0x5126('0x50')]===_0x32cf3a['esc']&&_0x3f0ad9['isVisible']&&(this[_0x5126('0x43')][_0x5126('0x3d')](_0x3f0ad9[_0x5126('0x4')][_0x5126('0x38')]),this[_0x5126('0x31')](),_0x2128ee[_0x5126('0x45')](),_0x2128ee['preventDefault']());}),this[_0x5126('0x32')][_0x5126('0x26')](document,_0x5126('0x1d'),(_0x41f8fd,_0x949ee1)=>{const _0x418d29=_0x949ee1[_0x5126('0x24')];_0x3f0ad9[_0x5126('0x51')]&&_0x3f0ad9[_0x5126('0x22')]['contains'](_0x418d29)||_0x2b64ec[_0x5126('0x34')]['element']['contains'](_0x418d29)||_0x41f8fd['preventClosingBalloon']||(this[_0x5126('0x43')]['clear'](),this[_0x5126('0x31')](),this['setActiveAnnotation'](null));});const _0x471260=this[_0x5126('0x12')]instanceof _0x5a7a59?this[_0x5126('0x12')][_0x5126('0x2f')]:new _0x2547c8([this[_0x5126('0x12')]]);for(const _0x256230 of _0x471260)this[_0x5126('0x17')](_0x256230);this[_0x5126('0x26')](_0x471260,_0x5126('0x3d'),(_0x4cc023,_0x145f16)=>{this[_0x5126('0x26')](_0x145f16,_0x5126('0x42'),()=>{this[_0x5126('0x17')](_0x145f16);});}),this['listenTo'](_0x471260,'remove',(_0x16ece8,_0x2deadd)=>{_0x2deadd['plugins'][_0x5126('0x1b')](_0x5126('0x2b'))&&this[_0x5126('0x4b')](_0x2deadd[_0x5126('0x41')]['get'](_0x5126('0x2b')));}),window[_0x5126('0x4f')](_0x5126('0x48'),this[_0x5126('0x3f')]),this[_0x5126('0x20')]();}[_0x5126('0x18')](_0x1d82e7){if(_0x1d82e7===this[_0x5126('0x1')])return;const _0x24e947=this[_0x5126('0x12')]['plugins'][_0x5126('0x53')](_0x37f915);if(_0x24e947[_0x5126('0x1f')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1d82e7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1d82e7)_0x24e947['getSidebarItemView'](_0x1d82e7)?this[_0x5126('0x2')](_0x1d82e7):this['_hideBalloon']();else this[_0x5126('0x31')]();this[_0x5126('0x1')]=_0x1d82e7;}['detach'](){if(!this['isAttached'])throw new _0x23077e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x342e6b=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915);this[_0x5126('0x31')](),Array[_0x5126('0x3c')](this[_0x5126('0x7')][_0x5126('0xd')](),_0x2a03d0=>_0x2a03d0[_0x5126('0x4e')]()),this[_0x5126('0x7')]['clear'](),_0x342e6b[_0x5126('0xb')](this[_0x5126('0x46')]),this[_0x5126('0x19')](),this[_0x5126('0x32')][_0x5126('0x19')](),this[_0x5126('0x12')]instanceof _0x5a7a59&&this[_0x5126('0x19')](this['context'][_0x5126('0x2f')]);for(const _0x5b2447 of Array['from'](this[_0x5126('0x39')]))this[_0x5126('0x4b')](_0x5b2447);window['removeEventListener'](_0x5126('0x48'),this[_0x5126('0x3f')]),this[_0x5126('0x3f')]['cancel'](),this[_0x5126('0x2e')]=[],this[_0x5126('0x2c')]=!0x1,this[_0x5126('0x46')]=null;}[_0x5126('0x4e')](){this[_0x5126('0x2c')]&&this[_0x5126('0x27')](),this[_0x5126('0xc')][_0x5126('0x13')]();}[_0x5126('0x17')](_0x5ecb0f){const _0x33b034=_0x5ecb0f[_0x5126('0x41')][_0x5126('0x53')](_0x116da8),_0x392568=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915),_0x374089=this[_0x5126('0x46')],_0x259550=this[_0x5126('0x10')],_0x38fe0d=()=>{const _0x569c17=_0x33b034[_0x5126('0x49')]({'annotations':this[_0x5126('0x46')],'activeAnnotation':this[_0x5126('0x1')]});this[_0x5126('0x9')](_0x569c17),this[_0x5126('0x18')](_0x569c17[0x0]||null);};this[_0x5126('0x26')](_0x33b034,_0x5126('0x1f'),_0x38fe0d),this['listenTo'](_0x33b034,'blur',(_0x4e7cb7,{isAnnotationTracked:_0x6f747b})=>{this[_0x5126('0x1')]&&_0x6f747b(this['activeAnnotation'])&&(this[_0x5126('0x9')]([]),this[_0x5126('0x18')](null));}),this[_0x5126('0x26')](_0x33b034,_0x5126('0x37'),()=>{this[_0x5126('0x3f')]();}),this[_0x5126('0x26')](_0x374089,'blur',_0x3f7527=>{_0x33b034[_0x5126('0xe')]()&&_0x3f7527['stop']();},{'priority':_0x5126('0x1a')}),this[_0x5126('0x26')](this['_domEmitter'],_0x5126('0x1d'),(_0x21c978,_0x21d275)=>{const _0x54770c=_0x21d275[_0x5126('0x24')];_0x259550[_0x5126('0x51')]&&_0x259550[_0x5126('0x22')][_0x5126('0x4a')](_0x54770c)||_0x392568[_0x5126('0x34')]['element'][_0x5126('0x4a')](_0x54770c)||this[_0x5126('0x1')]&&_0x33b034[_0x5126('0xe')]()&&(_0x38fe0d(),_0x21c978[_0x5126('0x33')]=!0x0);},{'priority':_0x5126('0x1a')}),this[_0x5126('0x39')][_0x5126('0x3d')](_0x33b034);}[_0x5126('0x4b')](_0xa6dd0d){_0xa6dd0d&&(this[_0x5126('0x19')](_0xa6dd0d),this['_editorAnnotations']['remove'](_0xa6dd0d));}[_0x5126('0x9')](_0x428932){for(const _0x3aa95c of this[_0x5126('0x2e')])_0x428932['includes'](_0x3aa95c)||this['_manuallyClosedAnnotationViews']['delete'](_0x3aa95c[_0x5126('0x34')]);this[_0x5126('0x2e')]=_0x428932;}[_0x5126('0x20')](){const _0x10aac8=this[_0x5126('0x10')];this[_0x5126('0x46')][_0x5126('0x0')](),_0x10aac8[_0x5126('0x51')]&&this[_0x5126('0x3')]();}[_0x5126('0x2')](_0x1126d6){if(this[_0x5126('0x43')][_0x5126('0x1b')](_0x1126d6['view']))return;const _0x519f3e=this[_0x5126('0x10')][_0x5126('0x4')][_0x5126('0x38')];_0x519f3e!==_0x1126d6[_0x5126('0x34')]?(_0x519f3e&&this['_detachListeners'](_0x519f3e),this[_0x5126('0x14')](_0x1126d6[_0x5126('0x34')]),this[_0x5126('0x10')]['content'][_0x5126('0x5')](),this[_0x5126('0x10')][_0x5126('0x4')]['add'](_0x1126d6[_0x5126('0x34')]),this[_0x5126('0x3')]()):this[_0x5126('0x3')]();}['_updateBalloonPosition'](){const _0x5546a2=this['balloonPanelView'][_0x5126('0x4')][_0x5126('0x38')],_0x65a631=_0x5546a2&&this[_0x5126('0x46')][_0x5126('0x25')](_0x5546a2);if(!_0x65a631||!this['_annotationToNarrowView'][_0x5126('0x1b')](_0x65a631))return;const _0x3e37e3=this[_0x5126('0x7')][_0x5126('0x53')](_0x65a631)[_0x5126('0x22')],_0x3418b6=function(){const _0x4598ce=_0x4a6cab[_0x5126('0x36')];return[_0x4598ce[_0x5126('0x2a')],_0x4598ce['northArrowSouthEast'],_0x4598ce['southArrowNorth'],_0x4598ce[_0x5126('0x3e')],_0x4598ce['southArrowNorthWest'],_0x4598ce[_0x5126('0x1c')]];}();this[_0x5126('0x10')][_0x5126('0x3a')]({'target':_0x3e37e3,'positions':_0x3418b6});}['_hideBalloon'](){const _0x1ba3f2=this[_0x5126('0x10')],_0x2abd38=_0x1ba3f2[_0x5126('0x4')][_0x5126('0x38')];_0x2abd38&&(this['_detachListeners'](_0x2abd38),_0x1ba3f2[_0x5126('0x1e')](),_0x1ba3f2[_0x5126('0x4')][_0x5126('0x5')]());}[_0x5126('0x14')](_0x311b5e){this[_0x5126('0x26')](_0x311b5e,_0x5126('0x8'),()=>this[_0x5126('0x3')]()),this['listenTo'](_0x311b5e,_0x5126('0x44'),(_0x32d9d9,_0x24673f)=>{this[_0x5126('0x43')][_0x5126('0x3d')](_0x311b5e),this[_0x5126('0x31')](),_0x24673f();});}['_detachListeners'](_0x3bd5e2){this['stopListening'](_0x3bd5e2);}}
|
|
23
|
+
const _0x7adf=['_detachFromContainer','southArrowNorth','northArrowSouth','ready','removeEventListener','detach','narrowsidebar-detach-not-attached','length','_updateBalloonPosition','stopListening','focusableElements','annotationType','contains','content','blur','attach','_manuallyClosedAnnotationViews','remove','_showBalloon','type','mousedown','delete','add','_attachListeners','_setSelectedAnnotations','high','EditorAnnotations','from','isAttached','set','northArrowSouthEast','isDirty','get','context','resize','_attachToContainer','_refreshPositioningDebounced','_annotationToNarrowView','editors','getOrderedSelectedAnnotations','keyCode','cancel','isVisible','target','init','getByView','northArrowSouthWest','register','_refreshPositioning','narrowsidebar-attach-already-attached','_editorAnnotations','bind','plugins','refresh','focus','locale','change:container','execute','_destroyEditorAnnotationsIntegration','annotations','defaultPositions','has','addAnnotation','activeAnnotation','listenTo','getSidebarItemView','keydown','first','Esc','preventDefault','preventClosingBalloon','element','low','setActiveAnnotation','balloonPanelView','narrowSidebar','ck-sidebar--narrow','_integrateWithEditorAnnotations','_selectedAnnotations','number','change:height','_domEmitter','view','southArrowNorthEast','set:container','destroy','bodyCollection','stopPropagation','_hideBalloon','_detachListeners','values','pin','_annotations','find','hasDomSelection'];(function(_0x379305,_0x7adf6a){const _0x9de2b9=function(_0x2f5d93){while(--_0x2f5d93){_0x379305['push'](_0x379305['shift']());}};_0x9de2b9(++_0x7adf6a);}(_0x7adf,0x14d));const _0x9de2=function(_0x379305,_0x7adf6a){_0x379305=_0x379305-0x0;let _0x9de2b9=_0x7adf[_0x379305];return _0x9de2b9;};import{ContextPlugin as _0x3fc041,Context as _0x1ffb9e}from'ckeditor5/src/core.js';import _0x1f5aa4 from'./annotationsuis.js';import _0x3c0dc3 from'./sidebar.js';import _0x42c2a9 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x413905,BodyCollection as _0x2b3093}from'ckeditor5/src/ui.js';import{CKEditorError as _0xb1407,DomEmitterMixin as _0x4cadf5,keyCodes as _0x16f04b,Collection as _0x4f82ae}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x17dd3f}from'lodash-es';import _0x314388 from'./editorannotations.js';export default class i extends _0x3fc041{static get['requires'](){return[_0x3c0dc3,_0x1f5aa4];}static get['pluginName'](){return'NarrowSidebar';}constructor(_0x531251){super(_0x531251),this[_0x9de2('0x4b')]=!0x1,this[_0x9de2('0x3f')]=new Set(),this[_0x9de2('0x21')]=Object['create'](_0x4cadf5),this[_0x9de2('0x54')]=new Map(),this[_0x9de2('0x4c')](_0x9de2('0xf'),null),this[_0x9de2('0xb')]=null,this[_0x9de2('0x1e')]=[],this[_0x9de2('0x2')]=new _0x4f82ae(),this['_refreshPositioningDebounced']=_0x17dd3f(()=>{this[_0x9de2('0x0')]();},0xfa,{'leading':!0x1});}[_0x9de2('0x5b')](){this[_0x9de2('0x50')][_0x9de2('0x4')][_0x9de2('0x4f')](_0x1f5aa4)[_0x9de2('0x5e')](_0x9de2('0x1b'),this),this['bodyCollection']=new _0x2b3093(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x1a')]=new _0x413905(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x26')]['attachToDom'](),this['bodyCollection'][_0x9de2('0x45')](this[_0x9de2('0x1a')]);}[_0x9de2('0x3e')](_0x1ea26a){this['annotations']=_0x1ea26a;const _0x295f26=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3),_0x2e9e48=this[_0x9de2('0x1a')];if(_0x295f26[_0x9de2('0x2c')]=_0x1ea26a,this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x1'),this);this[_0x9de2('0x4b')]=!0x0,this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x24'),()=>{this[_0x9de2('0x34')](),this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x8'),_0x1a7ada=>{_0x1a7ada['off'](),this[_0x9de2('0x3e')](_0x1ea26a);});}),_0x295f26[_0x9de2('0x52')]({'viewClass':_0x9de2('0x1c'),'spaceBetweenItems':0x5});const _0x5826c0=_0x2ec63e=>{const _0x4266f0=new _0x42c2a9(this['context'][_0x9de2('0x7')]);_0x295f26[_0x9de2('0xe')](_0x2ec63e,_0x4266f0),this[_0x9de2('0x54')][_0x9de2('0x4c')](_0x2ec63e,_0x4266f0),_0x4266f0[_0x9de2('0x3')]('isDirty',_0x9de2('0x3a'),_0x9de2('0x1f'))['to'](_0x2ec63e[_0x9de2('0x22')],_0x9de2('0x4e'),_0x9de2('0x42'),_0x9de2('0x36')),_0x4266f0['on'](_0x9de2('0x9'),()=>{this[_0x9de2('0x3f')]['clear'](),_0x2e9e48['content'][_0x9de2('0x13')]!==_0x2ec63e[_0x9de2('0x22')]?(this[_0x9de2('0x41')](_0x2ec63e),_0x2ec63e['view'][_0x9de2('0x17')]['focus'](),this[_0x9de2('0x19')](_0x2ec63e)):this[_0x9de2('0x19')](null);});};for(const _0x5cc5c9 of _0x1ea26a)_0x5826c0(_0x5cc5c9);this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x45'),(_0x4943cd,_0x585878)=>{_0x5826c0(_0x585878);}),this[_0x9de2('0x10')](_0x1ea26a,'remove',(_0x2523d2,_0x18ef2f,_0x273a2e)=>{this['_annotationToNarrowView'][_0x9de2('0x4f')](_0x18ef2f)['destroy'](),this[_0x9de2('0x54')][_0x9de2('0x44')](_0x18ef2f),_0x295f26['rearrange']({'removedAnnotation':_0x18ef2f,'previousAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e-0x1),'nextAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e+0x1)}),_0x18ef2f===this[_0x9de2('0xf')]&&this[_0x9de2('0x19')](null);},{'priority':_0x9de2('0x18')}),this['listenTo'](_0x1ea26a,_0x9de2('0x6'),(_0x354d90,_0x13bb46)=>{this[_0x9de2('0x19')](_0x13bb46);}),this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x3d'),()=>{this[_0x9de2('0x19')](null);}),this['_domEmitter'][_0x9de2('0x10')](document,_0x9de2('0x12'),(_0x577a8c,_0x5a96c8)=>{_0x5a96c8[_0x9de2('0x57')]===_0x16f04b['esc']&&_0x2e9e48['isVisible']&&(this[_0x9de2('0x3f')]['add'](_0x2e9e48[_0x9de2('0x3c')][_0x9de2('0x13')]),this[_0x9de2('0x28')](),_0x5a96c8[_0x9de2('0x27')](),_0x5a96c8[_0x9de2('0x15')]());}),this[_0x9de2('0x21')]['listenTo'](document,_0x9de2('0x43'),(_0x2f5b41,_0x1b61aa)=>{const _0xefb7f2=_0x1b61aa[_0x9de2('0x5a')];_0x2e9e48[_0x9de2('0x59')]&&_0x2e9e48[_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x295f26[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x2f5b41['preventClosingBalloon']||this[_0x9de2('0xf')]&&this[_0x9de2('0xf')][_0x9de2('0x39')][_0x9de2('0x2d')](_0x1c59a7=>_0x1c59a7[_0x9de2('0x3b')](_0xefb7f2))||(this['_manuallyClosedAnnotationViews']['clear'](),this[_0x9de2('0x28')](),this[_0x9de2('0x19')](null));});const _0x497e26=this['context']instanceof _0x1ffb9e?this[_0x9de2('0x50')][_0x9de2('0x55')]:new _0x4f82ae([this['context']]);for(const _0x584bd2 of _0x497e26)this['_integrateWithEditorAnnotations'](_0x584bd2);this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x45'),(_0x1f9e68,_0x4a81ca)=>{this[_0x9de2('0x10')](_0x4a81ca,_0x9de2('0x32'),()=>{this[_0x9de2('0x1d')](_0x4a81ca);});}),this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x40'),(_0x376aca,_0x38a3ae)=>{_0x38a3ae['plugins'][_0x9de2('0xd')](_0x9de2('0x49'))&&this['_destroyEditorAnnotationsIntegration'](_0x38a3ae[_0x9de2('0x4')][_0x9de2('0x4f')](_0x9de2('0x49')));}),window['addEventListener'](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x0')]();}['setActiveAnnotation'](_0x22ca18){if(_0x22ca18===this[_0x9de2('0xf')])return;const _0x49e114=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);if(_0x49e114[_0x9de2('0x5')]({'blurredAnnotation':this[_0x9de2('0xf')],'activatedAnnotation':_0x22ca18,'disableAnimationOnActivatedAnnotation':!0x0}),_0x22ca18)_0x49e114[_0x9de2('0x11')](_0x22ca18)?this[_0x9de2('0x41')](_0x22ca18):this[_0x9de2('0x28')]();else this[_0x9de2('0x28')]();this[_0x9de2('0xf')]=_0x22ca18;}[_0x9de2('0x34')](){if(!this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x35'),this);this[_0x9de2('0x19')](null);const _0x23df14=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);this[_0x9de2('0x28')](),Array[_0x9de2('0x4a')](this[_0x9de2('0x54')][_0x9de2('0x2a')](),_0x27a5f0=>_0x27a5f0[_0x9de2('0x25')]()),this[_0x9de2('0x54')]['clear'](),_0x23df14[_0x9de2('0x2f')](this[_0x9de2('0xb')]),this[_0x9de2('0x38')](),this[_0x9de2('0x21')][_0x9de2('0x38')](),this[_0x9de2('0x50')]instanceof _0x1ffb9e&&this[_0x9de2('0x38')](this[_0x9de2('0x50')][_0x9de2('0x55')]);for(const _0x57ea8a of Array[_0x9de2('0x4a')](this[_0x9de2('0x2')]))this[_0x9de2('0xa')](_0x57ea8a);window[_0x9de2('0x33')](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x53')][_0x9de2('0x58')](),this[_0x9de2('0x1e')]=[],this['isAttached']=!0x1,this[_0x9de2('0xb')]=null;}[_0x9de2('0x25')](){this[_0x9de2('0x4b')]&&this[_0x9de2('0x34')](),this[_0x9de2('0x26')]['detachFromDom']();}[_0x9de2('0x1d')](_0x4fd4c6){const _0xbb04ca=_0x4fd4c6[_0x9de2('0x4')][_0x9de2('0x4f')](_0x314388),_0x666bb4=this[_0x9de2('0x50')]['plugins'][_0x9de2('0x4f')](_0x3c0dc3),_0x330a5b=this['annotations'],_0x2e8471=this[_0x9de2('0x1a')],_0x2c6ef9=()=>{const _0x4f361c=_0xbb04ca[_0x9de2('0x56')]({'annotations':this[_0x9de2('0xb')],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4f361c),this['setActiveAnnotation'](_0x4f361c[0x0]||null);};this[_0x9de2('0x10')](_0xbb04ca,'refresh',_0x2c6ef9),this['listenTo'](_0xbb04ca,_0x9de2('0x3d'),(_0x501b3d,{isAnnotationTracked:_0x1348b9})=>{this['activeAnnotation']&&_0x1348b9(this[_0x9de2('0xf')])&&(this['_setSelectedAnnotations']([]),this[_0x9de2('0x19')](null));}),this['listenTo'](_0xbb04ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x9de2('0x10')](_0x330a5b,'blur',_0x45bd9d=>{_0xbb04ca['hasDomSelection']()&&_0x45bd9d['stop']();},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x10')](this['_domEmitter'],_0x9de2('0x43'),(_0x5e575e,_0x1f73ed)=>{const _0xc7437b=_0x1f73ed[_0x9de2('0x5a')];_0x2e8471[_0x9de2('0x59')]&&_0x2e8471[_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||_0x666bb4[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||this[_0x9de2('0xf')]&&_0xbb04ca[_0x9de2('0x2e')]()&&(_0x2c6ef9(),_0x5e575e[_0x9de2('0x16')]=!0x0);},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x2')]['add'](_0xbb04ca);}[_0x9de2('0xa')](_0x286c88){_0x286c88&&(this[_0x9de2('0x38')](_0x286c88),this[_0x9de2('0x2')][_0x9de2('0x40')](_0x286c88));}[_0x9de2('0x47')](_0x44c7fe){for(const _0x41c825 of this['_selectedAnnotations'])_0x44c7fe['includes'](_0x41c825)||this[_0x9de2('0x3f')]['delete'](_0x41c825[_0x9de2('0x22')]);this[_0x9de2('0x1e')]=_0x44c7fe;}[_0x9de2('0x0')](){const _0x3fb89f=this[_0x9de2('0x1a')];this['annotations']['refreshPositioning'](),_0x3fb89f[_0x9de2('0x59')]&&this['_updateBalloonPosition']();}[_0x9de2('0x41')](_0x51d801){if(this[_0x9de2('0x3f')]['has'](_0x51d801[_0x9de2('0x22')]))return;const _0x5c0c7e=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')];_0x5c0c7e!==_0x51d801[_0x9de2('0x22')]?(_0x5c0c7e&&this[_0x9de2('0x29')](_0x5c0c7e),this['_attachListeners'](_0x51d801[_0x9de2('0x22')]),this[_0x9de2('0x1a')][_0x9de2('0x3c')]['clear'](),this['balloonPanelView']['content']['add'](_0x51d801['view']),this['_updateBalloonPosition']()):this[_0x9de2('0x37')]();}['_updateBalloonPosition'](){const _0x3ff643=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')],_0x59e4cf=_0x3ff643&&this[_0x9de2('0xb')][_0x9de2('0x5c')](_0x3ff643);if(!_0x59e4cf||!this[_0x9de2('0x54')][_0x9de2('0xd')](_0x59e4cf))return;const _0x345bbe=this[_0x9de2('0x54')][_0x9de2('0x4f')](_0x59e4cf)[_0x9de2('0x17')],_0x111aac=function(){const _0x5017e7=_0x413905[_0x9de2('0xc')];return[_0x5017e7[_0x9de2('0x23')],_0x5017e7[_0x9de2('0x4d')],_0x5017e7[_0x9de2('0x30')],_0x5017e7[_0x9de2('0x31')],_0x5017e7['southArrowNorthWest'],_0x5017e7[_0x9de2('0x5d')]];}();this['balloonPanelView'][_0x9de2('0x2b')]({'target':_0x345bbe,'positions':_0x111aac});}[_0x9de2('0x28')](){const _0x379dcd=this[_0x9de2('0x1a')],_0x563520=_0x379dcd[_0x9de2('0x3c')][_0x9de2('0x13')];_0x563520&&(this[_0x9de2('0x29')](_0x563520),_0x379dcd['unpin'](),_0x379dcd[_0x9de2('0x3c')]['clear']());}[_0x9de2('0x46')](_0xc109d7){this['listenTo'](_0xc109d7,_0x9de2('0x20'),()=>this[_0x9de2('0x37')]()),this[_0x9de2('0x10')](_0xc109d7,_0x9de2('0x14'),(_0x11c58f,_0x326900)=>{this[_0x9de2('0x3f')]['add'](_0xc109d7),this[_0x9de2('0x28')](),_0x326900();});}[_0x9de2('0x29')](_0x5058db){this[_0x9de2('0x38')](_0x5058db);}}
|