@ckeditor/ckeditor5-comments 0.0.0-nightly-20231214.0 → 0.0.0-nightly-20231216.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/package.json +4 -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 +3 -3
- package/src/index.d.ts +20 -20
- 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": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20231216.0",
|
|
4
4
|
"description": "Collaborative comments feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"discussion",
|
|
33
33
|
"discussions"
|
|
34
34
|
],
|
|
35
|
+
"type": "module",
|
|
35
36
|
"main": "src/index.js",
|
|
36
37
|
"files": [
|
|
37
38
|
"build",
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"CHANGELOG.md"
|
|
44
45
|
],
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"ckeditor5": "0.0.0-nightly-
|
|
47
|
-
"ckeditor5-collaboration": "0.0.0-nightly-
|
|
47
|
+
"ckeditor5": "0.0.0-nightly-20231216.0",
|
|
48
|
+
"ckeditor5-collaboration": "0.0.0-nightly-20231216.0",
|
|
48
49
|
"lodash-es": "4.17.21"
|
|
49
50
|
},
|
|
50
51
|
"types": "src/index.d.ts",
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* @module comments/annotations/annotation
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Rect, Collection } from 'ckeditor5/src/utils';
|
|
10
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
11
|
-
import type AnnotationView from './view/annotationview';
|
|
12
|
-
import type { AnnotationOptions } from './annotations';
|
|
9
|
+
import { Rect, Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import type AnnotationView from './view/annotationview.js';
|
|
12
|
+
import type { AnnotationOptions } from './annotations.js';
|
|
13
13
|
declare const Annotation_base: {
|
|
14
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
15
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
14
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
15
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Represents an annotation.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1f8d=['item','length','isActive','every','stopListening','isVisible','view','element','object','focusTracker','focusableElements','isArray','function','_assertCorrectTarget','clear','target','mainView','_type','destroy','updateTargetRect','nodeType','_getNormalizedTarget','annotation-invalid-target','render','set','add','_id','refreshVisibility','innerView','remove','_target','targetRect'];(function(_0x43bf7e,_0x1f8df8){const _0x5f5c7d=function(_0x3e7855){while(--_0x3e7855){_0x43bf7e['push'](_0x43bf7e['shift']());}};_0x5f5c7d(++_0x1f8df8);}(_0x1f8d,0x75));const _0x5f5c=function(_0x43bf7e,_0x1f8df8){_0x43bf7e=_0x43bf7e-0x0;let _0x5f5c7d=_0x1f8d[_0x43bf7e];return _0x5f5c7d;};import{CKEditorError as _0x453d4a,Rect as _0x39f4c6,Collection as _0xffd559,ObservableMixin as _0x570e24}from'ckeditor5/src/utils.js';export default class d extends _0x570e24(){constructor({view:_0x2f28e3,target:_0x3447f8,type:_0x7c3dd6,isVisible:_0x5ac082=!0x0}){super(),this[_0x5f5c('0x11')]=_0x2f28e3,this['view']['element']||this['view'][_0x5f5c('0x2')](),this[_0x5f5c('0x1c')]=_0x7c3dd6,this[_0x5f5c('0x9')]=_0x3447f8,d[_0x5f5c('0x18')](this[_0x5f5c('0x0')]()),this[_0x5f5c('0x15')]=new _0xffd559([this[_0x5f5c('0x11')][_0x5f5c('0x12')]],{'idProperty':_0x5f5c('0x5')}),this[_0x5f5c('0x15')]['on'](_0x5f5c('0x4'),(_0x5a10e1,_0x11f3df)=>{this[_0x5f5c('0x11')]['focusTracker'][_0x5f5c('0x4')](_0x11f3df);}),this[_0x5f5c('0x15')]['on']('remove',(_0x15894e,_0xa8a7c0)=>{this[_0x5f5c('0x11')][_0x5f5c('0x14')][_0x5f5c('0x8')](_0xa8a7c0);}),this[_0x5f5c('0x3')](_0x5f5c('0x10'),_0x5ac082);}get['type'](){return _0x5f5c('0x17')==typeof this[_0x5f5c('0x1c')]?this[_0x5f5c('0x1c')]():this[_0x5f5c('0x1c')];}get[_0x5f5c('0x7')](){return this[_0x5f5c('0x11')][_0x5f5c('0x1b')];}get[_0x5f5c('0x1a')](){const _0x5a2d84=this[_0x5f5c('0x0')]();return d['_assertCorrectTarget'](_0x5a2d84),_0x5a2d84;}get[_0x5f5c('0xa')](){const _0x2ab2d8=this[_0x5f5c('0x1a')];if(null===_0x2ab2d8)return null;if(_0x2ab2d8 instanceof _0x39f4c6)return _0x2ab2d8;const _0x3ef8ca=_0x2ab2d8['filter'](_0x1c7d77=>function(_0x966fa8){const _0x4a15dd=_0x966fa8['offsetParent'];if(_0x4a15dd)return!0x0;const _0x59bdc4=_0x966fa8['getClientRects']()[_0x5f5c('0xb')](0x0);return!!_0x59bdc4;}(_0x1c7d77));return 0x0===_0x3ef8ca[_0x5f5c('0xc')]?null:new _0x39f4c6(_0x3ef8ca[0x0]['getClientRects']()[_0x5f5c('0xb')](0x0));}get[_0x5f5c('0xd')](){return this[_0x5f5c('0x11')][_0x5f5c('0xd')];}set[_0x5f5c('0xd')](_0x102ba8){this[_0x5f5c('0x11')]['isActive']=_0x102ba8,this['view'][_0x5f5c('0x1b')][_0x5f5c('0xd')]=_0x102ba8;}[_0x5f5c('0x1e')](){this[_0x5f5c('0x11')][_0x5f5c('0xa')]=this[_0x5f5c('0xa')];}[_0x5f5c('0x1d')](){this['focusableElements'][_0x5f5c('0xf')](),this[_0x5f5c('0x15')][_0x5f5c('0x19')](),this['stopListening']();}[_0x5f5c('0x6')](){this[_0x5f5c('0x10')]=!!this[_0x5f5c('0xa')];}static[_0x5f5c('0x18')](_0x1f4430){if(!(null===_0x1f4430||_0x1f4430 instanceof _0x39f4c6||Array[_0x5f5c('0x16')](_0x1f4430)&&_0x1f4430[_0x5f5c('0xe')](_0x5ba4d2=>y(_0x5ba4d2))))throw new _0x453d4a(_0x5f5c('0x1'),null,{'target':_0x1f4430});}[_0x5f5c('0x0')](){const _0x304fad='function'==typeof this[_0x5f5c('0x9')]?this[_0x5f5c('0x9')]():this[_0x5f5c('0x9')];return y(_0x304fad)?[_0x304fad]:_0x304fad;}}function y(_0x2c7af6){return null!==_0x2c7af6&&_0x5f5c('0x13')==typeof _0x2c7af6&&_0x5f5c('0x1f')in _0x2c7af6&&0x1===_0x2c7af6[_0x5f5c('0x1f')];}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @module comments/annotations/annotationcollection
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
10
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
11
|
-
import type Annotation from './annotation';
|
|
9
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import type Annotation from './annotation.js';
|
|
12
12
|
/**
|
|
13
13
|
* A collection of {@link module:comments/annotations/annotation~Annotation annotations}.
|
|
14
14
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2809=['view','_sort','change:isFocused','sort','_focusTracker','get','blur','_getOrderInContent','has','from','targetRect','listenTo','annotationcollection-duplicated-item','set','innerView','refreshPositioning','focusTracker','stopListening','add','getByView','focus','clear','getIndex','top','focusableElements','updateTargetRect','remove','delete','_viewToAnnotation','isFocused','destroy','fire','_innerViewToAnnotation'];(function(_0x37439,_0x280925){const _0xac4d8d=function(_0x257576){while(--_0x257576){_0x37439['push'](_0x37439['shift']());}};_0xac4d8d(++_0x280925);}(_0x2809,0x64));const _0xac4d=function(_0x37439,_0x280925){_0x37439=_0x37439-0x0;let _0xac4d8d=_0x2809[_0x37439];return _0xac4d8d;};import{CKEditorError as _0x51643c,Collection as _0x38a61d,FocusTracker as _0x5a5bcb}from'ckeditor5/src/utils.js';export default class x extends _0x38a61d{constructor(_0x15923e=[]){super(),this[_0xac4d('0x1f')]=new Map(),this[_0xac4d('0x1b')]=new Map(),this[_0xac4d('0x3')]=new _0x5a5bcb(),this[_0xac4d('0x3')]['on'](_0xac4d('0x1'),(_0x4812a6,_0x474911,_0x477378)=>{_0x477378||this[_0xac4d('0x1e')](_0xac4d('0x5'));});for(const _0x255ab6 of _0x15923e)this['add'](_0x255ab6);}get[_0xac4d('0x1c')](){return this[_0xac4d('0x3')][_0xac4d('0x1c')];}[_0xac4d('0x11')](_0x54c59){if(this['has'](_0x54c59))throw new _0x51643c(_0xac4d('0xb'),null);this['_innerViewToAnnotation'][_0xac4d('0xc')](_0x54c59[_0xac4d('0xd')],_0x54c59),this['_viewToAnnotation'][_0xac4d('0xc')](_0x54c59[_0xac4d('0x20')],_0x54c59);for(const _0x49f413 of _0x54c59[_0xac4d('0x17')])this[_0xac4d('0x3')]['add'](_0x49f413);this[_0xac4d('0xa')](_0x54c59[_0xac4d('0x17')],'add',(_0x2805e1,_0x15c171)=>{this['_focusTracker']['add'](_0x15c171);}),this[_0xac4d('0xa')](_0x54c59['focusableElements'],_0xac4d('0x19'),(_0x4472bf,_0xd9d2d3)=>{this[_0xac4d('0x3')][_0xac4d('0x19')](_0xd9d2d3);}),this[_0xac4d('0xa')](_0x54c59['view']['focusTracker'],_0xac4d('0x1'),(_0x227de9,_0x2b56e0,_0x4f143d)=>{_0x4f143d&&this[_0xac4d('0x1e')](_0xac4d('0x13'),_0x54c59);}),_0x54c59[_0xac4d('0x18')]();const _0xaf17d1=this['_getOrderInContent'](_0x54c59[_0xac4d('0x20')]['targetRect']);return super[_0xac4d('0x11')](_0x54c59,_0xaf17d1);}[_0xac4d('0x19')](_0x3c22b8){if(!this[_0xac4d('0x7')](_0x3c22b8))throw new _0x51643c('annotationcollection-not-existing-item',null);this['stopListening'](_0x3c22b8['view'][_0xac4d('0xf')]),this[_0xac4d('0x10')](_0x3c22b8[_0xac4d('0x17')]);for(const _0x42a393 of _0x3c22b8['focusableElements'])this[_0xac4d('0x3')][_0xac4d('0x19')](_0x42a393);return this[_0xac4d('0x1b')]['delete'](_0x3c22b8[_0xac4d('0x20')]),this[_0xac4d('0x1f')][_0xac4d('0x1a')](_0x3c22b8[_0xac4d('0xd')]),super[_0xac4d('0x19')](_0x3c22b8);}['getByInnerView'](_0x5dbfc1){return this['_innerViewToAnnotation'][_0xac4d('0x4')](_0x5dbfc1);}[_0xac4d('0x12')](_0x447ac6){return this['_viewToAnnotation']['get'](_0x447ac6);}[_0xac4d('0x1d')](){super['clear'](),this[_0xac4d('0x10')](),this[_0xac4d('0x1f')][_0xac4d('0x14')](),this[_0xac4d('0x1b')][_0xac4d('0x14')](),this[_0xac4d('0x3')][_0xac4d('0x1d')]();}[_0xac4d('0xe')](){for(const _0x5dfd05 of this)_0x5dfd05['updateTargetRect']();this[_0xac4d('0x0')]();}['_sort'](){const _0x31ae89=Array[_0xac4d('0x8')](this)[_0xac4d('0x2')]((_0x459f57,_0x3cc8d8)=>v(_0x459f57[_0xac4d('0x20')]['targetRect'],_0x3cc8d8[_0xac4d('0x20')]['targetRect']));for(let _0x109fda=_0x31ae89['length']-0x1;_0x109fda>0x0;_0x109fda--){const _0x134d4b=_0x31ae89[_0x109fda];_0x109fda!==this[_0xac4d('0x15')](_0x134d4b)&&(this[_0xac4d('0x19')](_0x134d4b),this['add'](_0x134d4b));}}[_0xac4d('0x6')](_0x201e01){let _0x147c1a=0x0;if(!_0x201e01)return this['length'];for(const _0x5cad0b of this){const _0x324526=_0x5cad0b[_0xac4d('0x20')][_0xac4d('0x9')];if(_0x324526){if(v(_0x201e01,_0x324526)<0x0)return _0x147c1a;_0x147c1a++;}}return _0x147c1a;}}export function bindAnnotationCollections({source:_0x241e03,target:_0x19d7c8,filter:_0x3a45a4}){for(const _0x277f6c of _0x241e03)_0x3a45a4(_0x277f6c)&&_0x19d7c8[_0xac4d('0x11')](_0x277f6c);_0x19d7c8[_0xac4d('0xa')](_0x241e03,_0xac4d('0x11'),(_0x205ac7,_0x51b65e)=>{_0x3a45a4(_0x51b65e)&&_0x19d7c8[_0xac4d('0x11')](_0x51b65e);}),_0x19d7c8['listenTo'](_0x241e03,_0xac4d('0x19'),(_0x14875c,_0x306c82)=>{_0x19d7c8[_0xac4d('0x7')](_0x306c82)&&_0x19d7c8['remove'](_0x306c82);});}function v(_0x30bd4b,_0xe2fd6f){if(null===_0x30bd4b&&null===_0xe2fd6f)return 0x0;if(null===_0x30bd4b)return-0x1;if(null===_0xe2fd6f)return 0x1;const _0x774f21=_0x30bd4b[_0xac4d('0x16')]-_0xe2fd6f[_0xac4d('0x16')];return 0x0==_0x774f21?_0x30bd4b['left']-_0xe2fd6f['left']:_0x774f21;}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @module comments/annotations/annotations
|
|
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 { type Locale } from 'ckeditor5/src/utils';
|
|
12
|
-
import Annotation, { type AnnotationTarget } from './annotation';
|
|
13
|
-
import AnnotationCollection from './annotationcollection';
|
|
14
|
-
import AnnotationView, { type AnnotationMainView } from './view/annotationview';
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
12
|
+
import Annotation, { type AnnotationTarget } from './annotation.js';
|
|
13
|
+
import AnnotationCollection from './annotationcollection.js';
|
|
14
|
+
import AnnotationView, { type AnnotationMainView } from './view/annotationview.js';
|
|
15
15
|
/**
|
|
16
16
|
* Stores and manages all {@link module:comments/annotations/annotation~Annotation annotations} created
|
|
17
17
|
* 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 _0x296b=['delete','pluginName','source','destroy','_visibleAnnotations','_deactivateAllAnnotations','set','createAnnotationView','fire','createAnnotation','collection','_bindAnnotationsToVisibleAnnotations','getByInnerView','activeAnnotations','refreshPositioning','has','isVisible','activate','stopListening','view','listenTo','element','refreshVisibility','change:isVisible','focusTracker','add','_removeActiveAnnotation','_addActiveAnnotation','remove'];(function(_0x4a5304,_0x296b42){const _0x1db1b6=function(_0x5ab27d){while(--_0x5ab27d){_0x4a5304['push'](_0x4a5304['shift']());}};_0x1db1b6(++_0x296b42);}(_0x296b,0x19c));const _0x1db1=function(_0x4a5304,_0x296b42){_0x4a5304=_0x4a5304-0x0;let _0x1db1b6=_0x296b[_0x4a5304];return _0x1db1b6;};import{ContextPlugin as _0x4e190c}from'ckeditor5/src/core.js';import _0x21e5ff from'./annotation.js';import _0x17305d from'./annotationcollection.js';import _0x1461b9 from'./view/annotationview.js';export default class b extends _0x4e190c{static get[_0x1db1('0x18')](){return'Annotations';}constructor(_0x42074d){super(_0x42074d),this[_0x1db1('0x4')]=new _0x17305d(),this[_0x1db1('0x1b')]=new _0x17305d(),this[_0x1db1('0x0')](_0x1db1('0x7'),new Set()),this[_0x1db1('0x5')]();}['add'](_0x58a42d){this[_0x1db1('0x4')][_0x1db1('0x13')](_0x58a42d);}[_0x1db1('0x16')](_0x507d2c){this[_0x1db1('0x4')]['remove'](_0x507d2c),_0x507d2c[_0x1db1('0x1a')]();}[_0x1db1('0x10')](){for(const _0x4eeccc of this['collection'])_0x4eeccc[_0x1db1('0x10')]();}[_0x1db1('0x8')](){this[_0x1db1('0x1b')][_0x1db1('0x8')]();}[_0x1db1('0x6')](_0x56fd23){return this[_0x1db1('0x4')][_0x1db1('0x6')](_0x56fd23);}['deactivateAll'](){this[_0x1db1('0x2')](_0x1db1('0x1c'));}['destroy'](){for(const _0x4bdc71 of this[_0x1db1('0x4')])_0x4bdc71[_0x1db1('0x1a')]();this[_0x1db1('0x1b')]['destroy'](),this[_0x1db1('0x4')]['destroy'](),super[_0x1db1('0x1a')]();}[_0x1db1('0xb')](_0x84d96f){this[_0x1db1('0x2')]('_activateAnnotation',_0x84d96f);}[_0x1db1('0x3')](_0x32d10b){return new _0x21e5ff(_0x32d10b);}[_0x1db1('0x1')](_0x340d28,_0x12d9fa){return new _0x1461b9(_0x340d28,_0x12d9fa);}[_0x1db1('0x15')](_0x32888b){const _0x39473c=new Set(this['activeAnnotations']);_0x39473c[_0x1db1('0x13')](_0x32888b),this[_0x1db1('0x7')]=_0x39473c;}[_0x1db1('0x14')](_0x5aeeca){const _0x58e350=new Set(this['activeAnnotations']);_0x58e350[_0x1db1('0x17')](_0x5aeeca),this['activeAnnotations']=_0x58e350;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5bab6a=this[_0x1db1('0x4')],_0x23c6c4=this[_0x1db1('0x1b')];function _0x464726(_0x482dc2){const _0x4c2fd0=_0x482dc2[_0x1db1('0x19')];_0x4c2fd0[_0x1db1('0xa')]&&!_0x23c6c4[_0x1db1('0x9')](_0x4c2fd0)?_0x23c6c4[_0x1db1('0x13')](_0x4c2fd0):!_0x4c2fd0[_0x1db1('0xa')]&&_0x23c6c4[_0x1db1('0x9')](_0x4c2fd0)&&_0x23c6c4[_0x1db1('0x16')](_0x4c2fd0),_0x4c2fd0['view'][_0x1db1('0x12')][_0x1db1('0x16')](_0x4c2fd0['view']['element']),_0x4c2fd0[_0x1db1('0xd')]['focusTracker'][_0x1db1('0x13')](_0x4c2fd0[_0x1db1('0xd')][_0x1db1('0xf')]);}this['listenTo'](_0x5bab6a,_0x1db1('0x13'),(_0x127e05,_0x3354a5)=>{_0x3354a5[_0x1db1('0xa')]&&_0x23c6c4[_0x1db1('0x13')](_0x3354a5),this[_0x1db1('0xe')](_0x3354a5,_0x1db1('0x11'),_0x464726);}),this[_0x1db1('0xe')](_0x5bab6a,_0x1db1('0x16'),(_0x461f0e,_0x5e81bc)=>{_0x23c6c4[_0x1db1('0x9')](_0x5e81bc)&&_0x23c6c4[_0x1db1('0x16')](_0x5e81bc),this[_0x1db1('0xc')](_0x5e81bc,_0x1db1('0x11'),_0x464726);});}}
|
|
@@ -6,11 +6,11 @@
|
|
|
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
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3666=['_deactivateAllAnnotations','delete','annotationsuis-register-invalid-interface','function','AnnotationsUIs','listenTo','deactivate','activeAnnotations','init','change:activeAnnotation','register','_setSelectedAnnotations','_uis','plugins','hasActive','deactivateAll','activate','collection','switchTo','set','has','from','annotationsuis-register-already-registered','detach','annotationsuis-annotation-mismatch','destroy','_addActiveAnnotation','_uisData','setActiveAnnotation','add','_assertAnnotationDoesNotBelongToMultipleUIs','isActive','_removeActiveAnnotation','context','filter','activeUIs','get','attach','pluginName','remove','length','annotationsuis-missing-ui'];(function(_0x40a65e,_0x366611){const _0x30dbd3=function(_0x309852){while(--_0x309852){_0x40a65e['push'](_0x40a65e['shift']());}};_0x30dbd3(++_0x366611);}(_0x3666,0x173));const _0x30db=function(_0x40a65e,_0x366611){_0x40a65e=_0x40a65e-0x0;let _0x30dbd3=_0x3666[_0x40a65e];return _0x30dbd3;};import{ContextPlugin as _0x162358}from'ckeditor5/src/core.js';import{CKEditorError as _0x1b15e3}from'ckeditor5/src/utils.js';import _0x31514e,{bindAnnotationCollections as _0x30442c}from'./annotationcollection.js';import _0x48f346 from'./annotations.js';export default class j extends _0x162358{static get['requires'](){return[_0x48f346];}static get[_0x30db('0x3')](){return _0x30db('0xb');}constructor(_0x2b9cc7){super(_0x2b9cc7),this['activeUIs']=new Set(),this[_0x30db('0x13')]=new Map(),this['_uisData']=new Map();}[_0x30db('0xf')](){const _0x459e97=this[_0x30db('0x28')][_0x30db('0x14')][_0x30db('0x1')](_0x48f346);this['listenTo'](_0x459e97,'_activateAnnotation',(_0x21c9f5,_0x38332e)=>{for(const _0x5624a2 of this[_0x30db('0x0')]){const _0x3f2327=this['_uis']['get'](_0x5624a2);(0x0,this[_0x30db('0x22')][_0x30db('0x1')](_0x5624a2)[_0x30db('0x29')])(_0x38332e)&&_0x3f2327[_0x30db('0x23')](_0x38332e);}}),this[_0x30db('0xc')](_0x459e97,_0x30db('0x7'),()=>{for(const _0x5d8e62 of this[_0x30db('0x0')]){this[_0x30db('0x13')][_0x30db('0x1')](_0x5d8e62)[_0x30db('0x23')](null);}}),this[_0x30db('0xc')](_0x459e97['_visibleAnnotations'],_0x30db('0x24'),(_0x1e3f5a,_0xb8bb58)=>{this[_0x30db('0x25')](_0xb8bb58);});}[_0x30db('0x15')](){return this[_0x30db('0x0')]['size']>0x0;}[_0x30db('0x26')](_0x281fd5){return this[_0x30db('0x0')][_0x30db('0x1b')](_0x281fd5);}['activate'](_0x470183,_0x557428=()=>!0x0){const _0x5016fb=this[_0x30db('0x28')][_0x30db('0x14')][_0x30db('0x1')](_0x48f346);if(!this['_uis'][_0x30db('0x1b')](_0x470183))throw new _0x1b15e3(_0x30db('0x6'),this,{'uiName':_0x470183});this['isActive'](_0x470183)&&this[_0x30db('0xd')](_0x470183),this[_0x30db('0x0')][_0x30db('0x24')](_0x470183);const _0x23e8f4=new _0x31514e(),_0x1b0a4e=_0x5016fb['_visibleAnnotations'];_0x30442c({'source':_0x1b0a4e,'target':_0x23e8f4,'filter':_0x557428}),this['_uisData'][_0x30db('0x1a')](_0x470183,{'collection':_0x23e8f4,'filter':_0x557428});const _0x3b026d=this[_0x30db('0x13')][_0x30db('0x1')](_0x470183);_0x3b026d['attach'](_0x23e8f4),this[_0x30db('0xc')](_0x3b026d,_0x30db('0x10'),(_0x580e96,_0x22e7f4,_0x16c94d,_0x41d244)=>{_0x41d244&&_0x5016fb[_0x30db('0x27')](_0x41d244),_0x16c94d&&_0x5016fb[_0x30db('0x21')](_0x16c94d);});}[_0x30db('0xd')](_0x5568e7){if(this['activeUIs'][_0x30db('0x8')](_0x5568e7),!this[_0x30db('0x13')][_0x30db('0x1b')](_0x5568e7))throw new _0x1b15e3(_0x30db('0x6'),this,{'uiName':_0x5568e7});const _0x370654=this[_0x30db('0x13')][_0x30db('0x1')](_0x5568e7);_0x370654['detach'](),this['stopListening'](_0x370654),this[_0x30db('0x22')]['get'](_0x5568e7)[_0x30db('0x18')]['destroy'](),this[_0x30db('0x22')][_0x30db('0x8')](_0x5568e7);}[_0x30db('0x19')](_0x24f3b4){if(!this[_0x30db('0x13')]['has'](_0x24f3b4))throw new _0x1b15e3('annotationsuis-missing-ui',this,{'uiName':_0x24f3b4});const _0x2a9b61=this[_0x30db('0x28')][_0x30db('0x14')][_0x30db('0x1')](_0x48f346),_0x18f8b5=Array['from'](_0x2a9b61[_0x30db('0xe')])[0x0]||null;this[_0x30db('0x16')](),this[_0x30db('0x17')](_0x24f3b4);const _0x46391e=this[_0x30db('0x13')]['get'](_0x24f3b4);_0x46391e[_0x30db('0x23')](_0x18f8b5),_0x46391e['_setSelectedAnnotations']&&_0x18f8b5&&_0x46391e[_0x30db('0x12')]([_0x18f8b5]);}[_0x30db('0x16')](){for(const _0x15fd62 of this[_0x30db('0x0')])this[_0x30db('0xd')](_0x15fd62);}[_0x30db('0x11')](_0x3d04c6,_0x53ac04){if(this[_0x30db('0x13')]['has'](_0x3d04c6))throw new _0x1b15e3(_0x30db('0x1d'));if(_0x30db('0xa')!=typeof _0x53ac04[_0x30db('0x2')]||_0x30db('0xa')!=typeof _0x53ac04[_0x30db('0x1e')]||_0x30db('0xa')!=typeof _0x53ac04[_0x30db('0x23')])throw new _0x1b15e3(_0x30db('0x9'),null);this[_0x30db('0x13')][_0x30db('0x1a')](_0x3d04c6,_0x53ac04);}['refilterAnnotations'](){const _0x1603f5=this['context']['plugins'][_0x30db('0x1')](_0x48f346)[_0x30db('0x18')],_0x1cc659=new Map(),_0x173236=Array[_0x30db('0x1c')](this['activeUIs']);for(const _0x2b6cf8 of this[_0x30db('0x0')]){const _0x4e850a=this[_0x30db('0x22')][_0x30db('0x1')](_0x2b6cf8)[_0x30db('0x18')];for(const _0x25d50c of _0x4e850a)_0x1cc659['set'](_0x25d50c,_0x2b6cf8);}for(const _0x4f313b of _0x1603f5){const _0x514c2f=_0x1cc659[_0x30db('0x1')](_0x4f313b);this[_0x30db('0x25')](_0x4f313b);const _0x5b3ab4=_0x173236['find'](_0x914a7=>this[_0x30db('0x22')][_0x30db('0x1')](_0x914a7)['filter'](_0x4f313b));_0x514c2f!==_0x5b3ab4&&(_0x514c2f&&this[_0x30db('0x22')]['get'](_0x514c2f)[_0x30db('0x18')][_0x30db('0x4')](_0x4f313b),_0x5b3ab4&&this[_0x30db('0x22')][_0x30db('0x1')](_0x5b3ab4)[_0x30db('0x18')][_0x30db('0x24')](_0x4f313b));}}[_0x30db('0x20')](){this[_0x30db('0x16')](),super[_0x30db('0x20')]();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xbe5515){const _0x23ab83=[];for(const _0x108def of this[_0x30db('0x0')]){(0x0,this[_0x30db('0x22')][_0x30db('0x1')](_0x108def)['filter'])(_0xbe5515)&&_0x23ab83['push'](_0x108def);}if(_0x23ab83[_0x30db('0x5')]>0x1)throw new _0x1b15e3(_0x30db('0x1f'),null,{'matchedUIs':_0x23ab83,'annotationType':_0xbe5515['type']});}}
|
|
@@ -6,10 +6,10 @@
|
|
|
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.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4093=['directChange','push','editor','_dataCollectors','hasDomSelection','plugins','requires','isEqual','has','from','editorannotations-invalid-source-callback','refreshSelectedViews','set','range','fire','element','isReadOnly','document','get','getRanges','update','registerAnnotation','blur','change:isFocused','addSourceCollector','EditorAnnotations','annotation','isCollapsed','delete','_editorAnnotations','listenTo','innerView','containsRange','getOrderedSelectedAnnotations','editing','focusTracker','selection','add','refresh','view'];(function(_0x2b72a1,_0x409334){const _0x48adad=function(_0x48873c){while(--_0x48873c){_0x2b72a1['push'](_0x2b72a1['shift']());}};_0x48adad(++_0x409334);}(_0x4093,0x11a));const _0x48ad=function(_0x2b72a1,_0x409334){_0x2b72a1=_0x2b72a1-0x0;let _0x48adad=_0x4093[_0x2b72a1];return _0x48adad;};import{Plugin as _0x526651}from'ckeditor5/src/core.js';import{CKEditorError as _0x4425b0}from'ckeditor5/src/utils.js';import{debounce as _0x466e3f}from'lodash-es';import _0x4e5538 from'./annotations.js';export default class k extends _0x526651{static get[_0x48ad('0x4')](){return[_0x4e5538];}static get['pluginName'](){return _0x48ad('0x17');}constructor(_0x4b40bb){super(_0x4b40bb),this[_0x48ad('0x1')]=new Set(),this[_0x48ad('0x1b')]=new Set();}['init'](){const _0x2d0b97=this[_0x48ad('0x0')],_0x5f1985=_0x2d0b97['model'][_0x48ad('0xf')][_0x48ad('0x22')],_0x15c902=_0x466e3f(()=>this[_0x48ad('0x9')](),0xa);_0x5f1985['on']('change:range',(_0x4ccb9e,_0x251d62)=>{_0x251d62[_0x48ad('0x26')]&&(_0x15c902['cancel'](),this[_0x48ad('0x9')]());}),this[_0x48ad('0x1c')](_0x2d0b97[_0x48ad('0x20')][_0x48ad('0x25')][_0x48ad('0xf')],_0x48ad('0x15'),(_0x4abc89,_0x1bf1ed,_0x560eb2)=>{_0x560eb2&&_0x15c902();}),this['listenTo'](_0x2d0b97['ui']['focusTracker'],'change:isFocused',(_0x492608,_0x568d65,_0x221d26)=>{_0x221d26||_0x2d0b97[_0x48ad('0xe')]||this[_0x48ad('0xc')](_0x48ad('0x14'),{'isAnnotationTracked':_0x422440=>this['_editorAnnotationsData'][_0x48ad('0x6')](_0x422440[_0x48ad('0x1d')])});}),this[_0x48ad('0x1c')](this[_0x48ad('0x0')]['ui'],_0x48ad('0x12'),()=>this['fire']('uiUpdate'));}[_0x48ad('0x13')](_0x389c77){if(this[_0x48ad('0x1b')][_0x48ad('0x6')](_0x389c77['view']))return;this[_0x48ad('0x1b')][_0x48ad('0x23')](_0x389c77['view']),this[_0x48ad('0x0')]['ui']['focusTracker'][_0x48ad('0x23')](_0x389c77[_0x48ad('0x25')][_0x48ad('0xd')]);const _0x57eb5a=this['editor'][_0x48ad('0x3')][_0x48ad('0x10')](_0x4e5538);this['listenTo'](_0x57eb5a['collection'],'remove',(_0x21d460,_0x57b82e)=>{this['editor']['ui'][_0x48ad('0x21')]['remove'](_0x57b82e[_0x48ad('0x25')][_0x48ad('0xd')]),this[_0x48ad('0x1b')][_0x48ad('0x1a')](_0x57b82e['view']);});}[_0x48ad('0x2')](){return this['editor'][_0x48ad('0x20')][_0x48ad('0x25')][_0x48ad('0x2')];}[_0x48ad('0x16')](_0xae4177){if('function'!=typeof _0xae4177)throw new _0x4425b0(_0x48ad('0x8'));this['_dataCollectors'][_0x48ad('0x23')](_0xae4177);}[_0x48ad('0x9')](){this[_0x48ad('0xc')](_0x48ad('0x24'));}[_0x48ad('0x1f')]({activeAnnotation:_0x17eed0,annotations:_0x3a59e9}){const _0x5217e2=[],_0x4c6fe0=this['editor']['model'][_0x48ad('0xf')][_0x48ad('0x22')],_0x3cb96f=Array[_0x48ad('0x7')](_0x4c6fe0[_0x48ad('0x11')]());for(const [_0x13641a,_0x258a8c]of this['_editorAnnotationsData']){const _0x307aaf=_0x1300ac(_0x258a8c),_0x29772b=_0x3a59e9['getByInnerView'](_0x13641a);_0x307aaf&&_0x29772b&&_0x5217e2[_0x48ad('0x27')]({'annotation':_0x29772b,'range':_0x307aaf});}function _0x1300ac(_0x1cbd5c){for(const _0x4a5d66 of _0x1cbd5c)for(const _0x2ff974 of _0x3cb96f)if(_0x4a5d66[_0x48ad('0x1e')](_0x2ff974,!_0x4c6fe0[_0x48ad('0x19')]))return _0x4a5d66;return null;}return _0x5217e2['sort']((_0x1fef31,_0x539364)=>{const _0x34190c=_0x1fef31[_0x48ad('0xb')],_0xbe527b=_0x539364[_0x48ad('0xb')];if(!_0x34190c[_0x48ad('0x5')](_0xbe527b)){if(_0x34190c['containsRange'](_0xbe527b,!0x0))return 0x1;if(_0xbe527b[_0x48ad('0x1e')](_0x34190c,!0x0))return-0x1;}return _0x1fef31[_0x48ad('0x18')]==_0x17eed0?-0x1:_0x539364[_0x48ad('0x18')]==_0x17eed0?0x1:0x0;})['map'](_0x460947=>_0x460947['annotation']);}get['_editorAnnotationsData'](){const _0x51b8e5=new Map();for(const _0x158866 of Array[_0x48ad('0x7')](this['_dataCollectors']))for(const [_0x20b2d4,_0x5b72e6]of _0x158866())_0x51b8e5[_0x48ad('0xa')](_0x20b2d4,_0x5b72e6);return _0x51b8e5;}}
|
|
@@ -6,13 +6,13 @@
|
|
|
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
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5a81=['width','change:isFocused','focusTracker','hasActive','length','hasView','pluginName','listenTo','plugins','_closeAnnotation','_removeAnnotationFromBalloon','keystrokes','every','remove','document','get','editor','detach','getClientRects','editing','destroy','Esc','includes','blur','afterInit','targetRect','isAttached','selection','view','find','_selectedAnnotations','delete','activeAnnotation','viewRangeToDom','right','getFirstRange','set','_balloon','inline','attach','fromRect','update','left','setActiveAnnotation','change:height','has','getBoundingClientRect','_manuallyClosed','inlineannotations-detach-not-attached','InlineAnnotations','refresh','focus','clear','getByView','target','showStack','add','mousedown','collapse','_addAnnotationToBalloon','_addedAnnotations','visibleView','register','_getBalloonTargetForAnnotation','bottom','switchTo','domConverter','_setSelectedAnnotations','isActive','isFocused','_forceRefresh','requires','stopListening','annotations','updatePosition','top','init','push'];(function(_0x1696af,_0x5a814a){const _0x1e081a=function(_0x19398b){while(--_0x19398b){_0x1696af['push'](_0x1696af['shift']());}};_0x1e081a(++_0x5a814a);}(_0x5a81,0xc2));const _0x1e08=function(_0x1696af,_0x5a814a){_0x1696af=_0x1696af-0x0;let _0x1e081a=_0x5a81[_0x1696af];return _0x1e081a;};import{Plugin as _0x3a842a}from'ckeditor5/src/core.js';import _0x43df81 from'./annotationsuis.js';import _0x24d69d from'./editorannotations.js';import{ContextualBalloon as _0x8771c9}from'ckeditor5/src/ui.js';import{MouseObserver as _0x559f4b}from'ckeditor5/src/engine.js';import{CKEditorError as _0x3214f6,Rect as _0x28cf49}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x3a842a{static get[_0x1e08('0x21')](){return[_0x24d69d,_0x8771c9,_0x43df81];}static get[_0x1e08('0x2e')](){return _0x1e08('0xb');}constructor(_0x1570b){super(_0x1570b),_0x1570b['editing'][_0x1e08('0x44')]['addObserver'](_0x559f4b),this[_0x1e08('0x42')]=!0x1,this[_0x1e08('0x4c')](_0x1e08('0x48'),null),this[_0x1e08('0x23')]=null,this[_0x1e08('0x9')]=new Set(),this[_0x1e08('0x4d')]=_0x1570b['plugins']['get'](_0x8771c9),this[_0x1e08('0x16')]=new Set(),this[_0x1e08('0x46')]=[],this[_0x1e08('0x20')]=!0x1;}[_0x1e08('0x26')](){const _0x32093c=this['editor'][_0x1e08('0x30')][_0x1e08('0x37')](_0x43df81);_0x32093c['context']===this['editor']&&(_0x32093c[_0x1e08('0x18')](_0x1e08('0x0'),this),this[_0x1e08('0x38')][_0x1e08('0x33')][_0x1e08('0x4c')](_0x1e08('0x3d'),(_0x4d04c7,_0x4d66a8)=>{const _0x1467db=this[_0x1e08('0x4d')];if(this[_0x1e08('0x42')]&&_0x1467db['visibleView']){const _0x22b2fc=this[_0x1e08('0x23')][_0x1e08('0xf')](_0x1467db[_0x1e08('0x17')]);_0x22b2fc&&this[_0x1e08('0x31')](_0x22b2fc),_0x4d66a8();}}));}[_0x1e08('0x40')](){const _0x4da36b=this[_0x1e08('0x38')][_0x1e08('0x30')][_0x1e08('0x37')](_0x43df81);_0x4da36b['context']===this[_0x1e08('0x38')]&&(_0x4da36b[_0x1e08('0x2b')]()||_0x4da36b[_0x1e08('0x1b')](_0x1e08('0x0')));}[_0x1e08('0x5')](_0x37286e){_0x37286e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this[_0x1e08('0x48')][_0x1e08('0x1e')]=!0x1),_0x37286e&&this['editor']['ui'][_0x1e08('0x2a')][_0x1e08('0x1f')]&&(this[_0x1e08('0x23')][_0x1e08('0x7')](_0x37286e)&&this[_0x1e08('0x15')](_0x37286e,!0x0),_0x37286e[_0x1e08('0x1e')]=!0x0),_0x37286e||this['_setSelectedAnnotations']([]),this[_0x1e08('0x48')]=_0x37286e);}[_0x1e08('0x1')](_0x52b1d1){this[_0x1e08('0x23')]=_0x52b1d1;const _0x47964a=this[_0x1e08('0x38')][_0x1e08('0x30')][_0x1e08('0x37')](_0x43df81),_0x1dd044=this[_0x1e08('0x4d')];if(this[_0x1e08('0x42')])throw new _0x3214f6('inlineannotations-attach-already-attached',this);if(_0x47964a['context']!==this['editor'])throw new _0x3214f6('inlineannotations-not-allowed-with-context',this);const _0x4fb140=this[_0x1e08('0x38')][_0x1e08('0x30')][_0x1e08('0x37')](_0x24d69d);this[_0x1e08('0x2f')](_0x4fb140,_0x1e08('0xc'),()=>{const _0x9efed3=_0x4fb140['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xfb39e6,_0xdc1837;!this[_0x1e08('0x20')]&&(_0xfb39e6=_0x9efed3,_0xdc1837=this[_0x1e08('0x46')],_0xfb39e6[_0x1e08('0x2c')]===_0xdc1837[_0x1e08('0x2c')]&&_0xfb39e6[_0x1e08('0x34')](_0x586b13=>_0xdc1837['includes'](_0x586b13)))||(this[_0x1e08('0x20')]=!0x1,this[_0x1e08('0x1d')](_0x9efed3),this[_0x1e08('0x5')](_0x9efed3[0x0]||null));}),this[_0x1e08('0x2f')](_0x4fb140,_0x1e08('0x3f'),(_0x3cdda1,{isAnnotationTracked:_0x581cef})=>{this[_0x1e08('0x48')]&&_0x581cef(this['activeAnnotation'])&&(this[_0x1e08('0x1d')]([]),this[_0x1e08('0x5')](null));}),this[_0x1e08('0x2f')](this['editor']['ui'][_0x1e08('0x2a')],_0x1e08('0x29'),(_0x120dae,_0x389455,_0x2665d5)=>{_0x2665d5||this[_0x1e08('0x5')](null);}),this[_0x1e08('0x2f')](_0x52b1d1,_0x1e08('0x35'),(_0x54b4d2,_0x40f890)=>{this[_0x1e08('0x32')](_0x40f890),_0x40f890===this[_0x1e08('0x48')]&&this['setActiveAnnotation'](null);}),this[_0x1e08('0x2f')](_0x1dd044,'change:visibleView',(_0x5c2937,_0x44d266,_0x523239,_0x24971e)=>{_0x24971e&&this[_0x1e08('0x22')](_0x24971e);const _0x511ae4=_0x52b1d1[_0x1e08('0xf')](_0x523239);_0x523239&&_0x511ae4&&(this['listenTo'](_0x523239,_0x1e08('0x6'),()=>{_0x1dd044[_0x1e08('0x24')]();}),this[_0x1e08('0x2f')](_0x523239,_0x1e08('0x3d'),()=>{this[_0x1e08('0x31')](_0x511ae4),this[_0x1e08('0x38')][_0x1e08('0x3b')]['view'][_0x1e08('0xd')]();}),this[_0x1e08('0x48')]!==_0x511ae4&&this[_0x1e08('0x5')](_0x511ae4));}),this[_0x1e08('0x2f')](this[_0x1e08('0x38')]['ui'],_0x1e08('0x3'),()=>{_0x1dd044['visibleView']&&(_0x52b1d1['getByView'](_0x1dd044[_0x1e08('0x17')])&&_0x1dd044['updatePosition']());}),this['listenTo'](this[_0x1e08('0x38')][_0x1e08('0x3b')][_0x1e08('0x44')][_0x1e08('0x36')],_0x1e08('0x13'),()=>{this[_0x1e08('0x20')]=!0x0,this[_0x1e08('0x9')][_0x1e08('0xe')]();}),this[_0x1e08('0x38')][_0x1e08('0x3b')]['view']['document'][_0x1e08('0x43')]['editableElement']&&this[_0x1e08('0x38')]['editing'][_0x1e08('0x44')][_0x1e08('0xd')](),this['isAttached']=!0x0;}['detach'](){if(!this[_0x1e08('0x42')])throw new _0x3214f6(_0x1e08('0xa'),this);this[_0x1e08('0x5')](null);for(const _0x51ab96 of this[_0x1e08('0x16')])this[_0x1e08('0x32')](_0x51ab96);this[_0x1e08('0x22')](),this[_0x1e08('0x42')]=!0x1,this[_0x1e08('0x23')]=null;}[_0x1e08('0x3c')](){this[_0x1e08('0x42')]&&this[_0x1e08('0x39')]();}['_setSelectedAnnotations'](_0x1c29d9){for(const _0x51ed32 of this['_selectedAnnotations'])_0x1c29d9[_0x1e08('0x3e')](_0x51ed32)||this[_0x1e08('0x9')][_0x1e08('0x47')](_0x51ed32);for(const _0x506b8c of this[_0x1e08('0x23')])_0x1c29d9[_0x1e08('0x3e')](_0x506b8c)||this[_0x1e08('0x32')](_0x506b8c);if(this['editor']['ui']['focusTracker'][_0x1e08('0x1f')])for(const _0x18563d of _0x1c29d9)this[_0x1e08('0x15')](_0x18563d);this['_selectedAnnotations']=_0x1c29d9;}[_0x1e08('0x15')](_0x4e7019,_0x2e83be=!0x1){this[_0x1e08('0x9')][_0x1e08('0x7')](_0x4e7019)||(this[_0x1e08('0x16')][_0x1e08('0x7')](_0x4e7019)||this[_0x1e08('0x4d')][_0x1e08('0x2d')](_0x4e7019['view'])||(this[_0x1e08('0x16')][_0x1e08('0x12')](_0x4e7019),this['_balloon'][_0x1e08('0x12')]({'stackId':_0x4e7019[_0x1e08('0x44')]['id'],'view':_0x4e7019['view'],'position':{'target':()=>this[_0x1e08('0x19')](_0x4e7019)}})),_0x2e83be&&this[_0x1e08('0x4d')][_0x1e08('0x11')](_0x4e7019[_0x1e08('0x44')]['id']));}['_getBalloonTargetForAnnotation'](_0x2b611a){const _0x3a3fef=_0x2b611a[_0x1e08('0x10')],_0xb7525=this[_0x1e08('0x38')][_0x1e08('0x3b')][_0x1e08('0x44')],_0x561a8b=_0xb7525['document'][_0x1e08('0x43')][_0x1e08('0x4b')](),_0x546d0e=_0xb7525[_0x1e08('0x1c')][_0x1e08('0x49')](_0x561a8b);if(_0x546d0e[_0x1e08('0x14')](!0x0),_0x3a3fef){if(_0x3a3fef instanceof _0x28cf49)return _0x3a3fef;let _0x36e295=[];for(const _0x3d5d71 of _0x3a3fef)_0x36e295[_0x1e08('0x27')](...(_0x17e076=_0x3d5d71[_0x1e08('0x3a')](),Array['from'](_0x17e076)['map'](DOMRect[_0x1e08('0x2')])));_0x36e295=function(_0x1a77fc){const _0x50d6c6=[];let _0xf9cae2=_0x1a77fc[0x0];for(let _0x1122ab=0x1;_0x1122ab<_0x1a77fc[_0x1e08('0x2c')];_0x1122ab++)F(_0xf9cae2,_0x1a77fc[_0x1122ab])?_0xf9cae2[_0x1e08('0x28')]+=_0x1a77fc[_0x1122ab]['width']:(_0x50d6c6[_0x1e08('0x27')](_0xf9cae2),_0xf9cae2=_0x1a77fc[_0x1122ab]);return _0x50d6c6[_0x1e08('0x27')](_0xf9cae2),_0x50d6c6;}(_0x36e295);const _0x272f28=_0x546d0e[_0x1e08('0x8')]();return _0x36e295[_0x1e08('0x45')](_0x10d206=>_0x10d206[_0x1e08('0x25')]<=_0x272f28[_0x1e08('0x25')]&&_0x10d206['bottom']>=_0x272f28[_0x1e08('0x1a')]&&_0x10d206[_0x1e08('0x4')]<=_0x272f28[_0x1e08('0x4')]&&_0x10d206['right']>=_0x272f28['right'])||_0x36e295[0x0];}var _0x17e076;return _0x2b611a[_0x1e08('0x41')]||_0x546d0e;}['_removeAnnotationFromBalloon'](_0x25b217){this['_addedAnnotations']['has'](_0x25b217)&&this[_0x1e08('0x4d')][_0x1e08('0x2d')](_0x25b217[_0x1e08('0x44')])&&(this[_0x1e08('0x16')][_0x1e08('0x47')](_0x25b217),this[_0x1e08('0x4d')][_0x1e08('0x35')](_0x25b217[_0x1e08('0x44')]));}[_0x1e08('0x31')](_0xf98494){this['_manuallyClosed'][_0x1e08('0x12')](_0xf98494),this[_0x1e08('0x32')](_0xf98494);}}function F(_0x3f93c2,_0x5664db){return _0x3f93c2[_0x1e08('0x25')]===_0x5664db['top']&&_0x3f93c2[_0x1e08('0x1a')]===_0x5664db[_0x1e08('0x1a')]&&_0x3f93c2[_0x1e08('0x4a')]===_0x5664db['left'];}
|
|
@@ -6,13 +6,13 @@
|
|
|
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
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x3e6f=['southArrowNorthWest','_annotations','set:container','off','defaultPositions','northArrowSouthWest','getSidebarItemView','refresh','set','type','create','includes','has','change:container','register','requires','destroy','NarrowSidebar','attach','focus','removeEventListener','pin','activeAnnotation','_integrateWithEditorAnnotations','narrowsidebar-detach-not-attached','_selectedAnnotations','content','annotations','clear','mousedown','low','esc','isDirty','element','values','_detachListeners','_refreshPositioning','keyCode','detach','_editorAnnotations','_updateBalloonPosition','balloonPanelView','from','_showBalloon','cancel','plugins','contains','EditorAnnotations','getOrderedSelectedAnnotations','getByView','_hideBalloon','remove','ck-sidebar--narrow','_setSelectedAnnotations','focusableElements','view','setActiveAnnotation','uiUpdate','stopListening','southArrowNorth','_annotationToNarrowView','attachToDom','annotationType','rearrange','isAttached','bind','bodyCollection','get','_attachListeners','editors','hasDomSelection','narrowsidebar-attach-already-attached','delete','ready','_destroyEditorAnnotationsIntegration','first','_domEmitter','find','listenTo','northArrowSouth','isVisible','addEventListener','target','resize','preventClosingBalloon','narrowSidebar','context','add','blur','keydown','locale','_refreshPositioningDebounced','change:height','southArrowNorthEast','detachFromDom','high','_manuallyClosedAnnotationViews'];(function(_0x3e7f49,_0x3e6fc4){const _0x29c638=function(_0x4a08ed){while(--_0x4a08ed){_0x3e7f49['push'](_0x3e7f49['shift']());}};_0x29c638(++_0x3e6fc4);}(_0x3e6f,0x16a));const _0x29c6=function(_0x3e7f49,_0x3e6fc4){_0x3e7f49=_0x3e7f49-0x0;let _0x29c638=_0x3e6f[_0x3e7f49];return _0x29c638;};import{ContextPlugin as _0x365b2e,Context as _0x72ef77}from'ckeditor5/src/core';import _0x4f00bd from'./annotationsuis';import _0x548c7a from'./sidebar';import _0x3e6229 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x3c64ec,BodyCollection as _0x519f20}from'ckeditor5/src/ui';import{CKEditorError as _0x5adb75,DomEmitterMixin as _0x1b64da,keyCodes as _0x3682a6,Collection as _0x5ee14d}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0xf10f22}from'lodash-es';import _0x42789e from'./editorannotations';export default class s extends _0x365b2e{static get[_0x29c6('0x29')](){return[_0x548c7a,_0x4f00bd];}static get['pluginName'](){return _0x29c6('0x2b');}constructor(_0x4e6882){super(_0x4e6882),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this[_0x29c6('0x5')]=Object[_0x29c6('0x24')](_0x1b64da),this[_0x29c6('0x56')]=new Map(),this[_0x29c6('0x22')]('activeAnnotation',null),this[_0x29c6('0x35')]=null,this[_0x29c6('0x33')]=[],this[_0x29c6('0x41')]=new _0x5ee14d(),this[_0x29c6('0x14')]=_0xf10f22(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this[_0x29c6('0xf')][_0x29c6('0x47')][_0x29c6('0x5d')](_0x4f00bd)[_0x29c6('0x28')](_0x29c6('0xe'),this),this[_0x29c6('0x5c')]=new _0x519f20(this[_0x29c6('0xf')][_0x29c6('0x13')]),this[_0x29c6('0x43')]=new _0x3c64ec(this['context']['locale']),this['bodyCollection'][_0x29c6('0x57')](),this[_0x29c6('0x5c')][_0x29c6('0x10')](this[_0x29c6('0x43')]);}[_0x29c6('0x2c')](_0x38ca5d){this[_0x29c6('0x35')]=_0x38ca5d;const _0x2933fa=this[_0x29c6('0xf')][_0x29c6('0x47')][_0x29c6('0x5d')](_0x548c7a),_0x5cd0ed=this[_0x29c6('0x43')];if(_0x2933fa[_0x29c6('0x1b')]=_0x38ca5d,this[_0x29c6('0x5a')])throw new _0x5adb75(_0x29c6('0x0'),this);this[_0x29c6('0x5a')]=!0x0,this[_0x29c6('0x7')](_0x2933fa,_0x29c6('0x1c'),()=>{this[_0x29c6('0x40')](),this[_0x29c6('0x7')](_0x2933fa,_0x29c6('0x27'),_0x144569=>{_0x144569[_0x29c6('0x1d')](),this['attach'](_0x38ca5d);});}),_0x2933fa['_attachToContainer']({'viewClass':_0x29c6('0x4e'),'spaceBetweenItems':0x5});const _0x4e3139=_0x17aaa4=>{const _0x4267ab=new _0x3e6229(this['context'][_0x29c6('0x13')]);_0x2933fa['addAnnotation'](_0x17aaa4,_0x4267ab),this['_annotationToNarrowView'][_0x29c6('0x22')](_0x17aaa4,_0x4267ab),_0x4267ab[_0x29c6('0x5b')](_0x29c6('0x3a'),_0x29c6('0x58'),'number')['to'](_0x17aaa4[_0x29c6('0x51')],'isDirty',_0x29c6('0x23'),'length'),_0x4267ab['on']('execute',()=>{this['_manuallyClosedAnnotationViews'][_0x29c6('0x36')](),_0x5cd0ed[_0x29c6('0x34')][_0x29c6('0x4')]!==_0x17aaa4[_0x29c6('0x51')]?(this['_showBalloon'](_0x17aaa4),_0x17aaa4[_0x29c6('0x51')]['element']['focus'](),this[_0x29c6('0x52')](_0x17aaa4)):this[_0x29c6('0x52')](null);});};for(const _0x593019 of _0x38ca5d)_0x4e3139(_0x593019);this[_0x29c6('0x7')](_0x38ca5d,_0x29c6('0x10'),(_0x97dde,_0x2dde50)=>{_0x4e3139(_0x2dde50);}),this[_0x29c6('0x7')](_0x38ca5d,_0x29c6('0x4d'),(_0x398bbb,_0x309ecd,_0x3aa5ec)=>{this[_0x29c6('0x56')][_0x29c6('0x5d')](_0x309ecd)[_0x29c6('0x2a')](),this['_annotationToNarrowView'][_0x29c6('0x1')](_0x309ecd),_0x2933fa[_0x29c6('0x59')]({'removedAnnotation':_0x309ecd,'previousAnnotation':_0x38ca5d[_0x29c6('0x5d')](_0x3aa5ec-0x1),'nextAnnotation':_0x38ca5d[_0x29c6('0x5d')](_0x3aa5ec+0x1)}),_0x309ecd===this[_0x29c6('0x30')]&&this[_0x29c6('0x52')](null);},{'priority':_0x29c6('0x38')}),this[_0x29c6('0x7')](_0x38ca5d,_0x29c6('0x2d'),(_0x5b0b0c,_0x345e22)=>{this['setActiveAnnotation'](_0x345e22);}),this['listenTo'](_0x38ca5d,_0x29c6('0x11'),()=>{this[_0x29c6('0x52')](null);}),this['_domEmitter'][_0x29c6('0x7')](document,_0x29c6('0x12'),(_0x290905,_0x4abfaa)=>{_0x4abfaa[_0x29c6('0x3f')]===_0x3682a6[_0x29c6('0x39')]&&_0x5cd0ed['isVisible']&&(this[_0x29c6('0x19')][_0x29c6('0x10')](_0x5cd0ed['content'][_0x29c6('0x4')]),this[_0x29c6('0x4c')](),_0x4abfaa['stopPropagation'](),_0x4abfaa['preventDefault']());}),this[_0x29c6('0x5')][_0x29c6('0x7')](document,_0x29c6('0x37'),(_0x395e72,_0x2618d6)=>{const _0xa99400=_0x2618d6[_0x29c6('0xb')];_0x5cd0ed[_0x29c6('0x9')]&&_0x5cd0ed['element'][_0x29c6('0x48')](_0xa99400)||_0x2933fa['view'][_0x29c6('0x3b')]['contains'](_0xa99400)||_0x395e72[_0x29c6('0xd')]||this[_0x29c6('0x30')]&&this[_0x29c6('0x30')][_0x29c6('0x50')][_0x29c6('0x6')](_0x32cff0=>_0x32cff0[_0x29c6('0x48')](_0xa99400))||(this[_0x29c6('0x19')][_0x29c6('0x36')](),this[_0x29c6('0x4c')](),this[_0x29c6('0x52')](null));});const _0x5a1517=this[_0x29c6('0xf')]instanceof _0x72ef77?this[_0x29c6('0xf')]['editors']:new _0x5ee14d([this[_0x29c6('0xf')]]);for(const _0x166229 of _0x5a1517)this[_0x29c6('0x31')](_0x166229);this[_0x29c6('0x7')](_0x5a1517,_0x29c6('0x10'),(_0x461f28,_0x1f4a0e)=>{this[_0x29c6('0x7')](_0x1f4a0e,_0x29c6('0x2'),()=>{this['_integrateWithEditorAnnotations'](_0x1f4a0e);});}),this[_0x29c6('0x7')](_0x5a1517,_0x29c6('0x4d'),(_0x544964,_0x15a396)=>{_0x15a396['plugins'][_0x29c6('0x26')](_0x29c6('0x49'))&&this['_destroyEditorAnnotationsIntegration'](_0x15a396[_0x29c6('0x47')][_0x29c6('0x5d')](_0x29c6('0x49')));}),window[_0x29c6('0xa')]('resize',this['_refreshPositioningDebounced']),this[_0x29c6('0x3e')]();}[_0x29c6('0x52')](_0x4adc08){if(_0x4adc08===this[_0x29c6('0x30')])return;const _0x453d10=this[_0x29c6('0xf')][_0x29c6('0x47')]['get'](_0x548c7a);if(_0x453d10[_0x29c6('0x21')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4adc08,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4adc08)_0x453d10[_0x29c6('0x20')](_0x4adc08)?this['_showBalloon'](_0x4adc08):this[_0x29c6('0x4c')]();else this['_hideBalloon']();this[_0x29c6('0x30')]=_0x4adc08;}[_0x29c6('0x40')](){if(!this[_0x29c6('0x5a')])throw new _0x5adb75(_0x29c6('0x32'),this);this[_0x29c6('0x52')](null);const _0x2a5de2=this[_0x29c6('0xf')][_0x29c6('0x47')]['get'](_0x548c7a);this[_0x29c6('0x4c')](),Array[_0x29c6('0x44')](this['_annotationToNarrowView'][_0x29c6('0x3c')](),_0x26c511=>_0x26c511[_0x29c6('0x2a')]()),this['_annotationToNarrowView']['clear'](),_0x2a5de2['_detachFromContainer'](this[_0x29c6('0x35')]),this[_0x29c6('0x54')](),this['_domEmitter']['stopListening'](),this[_0x29c6('0xf')]instanceof _0x72ef77&&this[_0x29c6('0x54')](this['context'][_0x29c6('0x5f')]);for(const _0x2146ab of Array[_0x29c6('0x44')](this['_editorAnnotations']))this[_0x29c6('0x3')](_0x2146ab);window[_0x29c6('0x2e')](_0x29c6('0xc'),this[_0x29c6('0x14')]),this[_0x29c6('0x14')][_0x29c6('0x46')](),this[_0x29c6('0x33')]=[],this[_0x29c6('0x5a')]=!0x1,this['annotations']=null;}['destroy'](){this[_0x29c6('0x5a')]&&this[_0x29c6('0x40')](),this[_0x29c6('0x5c')][_0x29c6('0x17')]();}[_0x29c6('0x31')](_0x448e0c){const _0x1eb836=_0x448e0c[_0x29c6('0x47')][_0x29c6('0x5d')](_0x42789e),_0x294c6e=this[_0x29c6('0xf')]['plugins'][_0x29c6('0x5d')](_0x548c7a),_0x577fd5=this[_0x29c6('0x35')],_0x260adf=this['balloonPanelView'],_0x407970=()=>{const _0x4b6a8d=_0x1eb836[_0x29c6('0x4a')]({'annotations':this[_0x29c6('0x35')],'activeAnnotation':this[_0x29c6('0x30')]});this[_0x29c6('0x4f')](_0x4b6a8d),this['setActiveAnnotation'](_0x4b6a8d[0x0]||null);};this[_0x29c6('0x7')](_0x1eb836,_0x29c6('0x21'),_0x407970),this[_0x29c6('0x7')](_0x1eb836,_0x29c6('0x11'),(_0x400e27,{isAnnotationTracked:_0xd55619})=>{this[_0x29c6('0x30')]&&_0xd55619(this[_0x29c6('0x30')])&&(this['_setSelectedAnnotations']([]),this[_0x29c6('0x52')](null));}),this[_0x29c6('0x7')](_0x1eb836,_0x29c6('0x53'),()=>{this[_0x29c6('0x14')]();}),this[_0x29c6('0x7')](_0x577fd5,'blur',_0x4a4eb5=>{_0x1eb836[_0x29c6('0x60')]()&&_0x4a4eb5['stop']();},{'priority':_0x29c6('0x18')}),this[_0x29c6('0x7')](this[_0x29c6('0x5')],'mousedown',(_0x264b65,_0x40abd9)=>{const _0x382558=_0x40abd9[_0x29c6('0xb')];_0x260adf[_0x29c6('0x9')]&&_0x260adf[_0x29c6('0x3b')][_0x29c6('0x48')](_0x382558)||_0x294c6e['view'][_0x29c6('0x3b')][_0x29c6('0x48')](_0x382558)||this[_0x29c6('0x30')]&&_0x1eb836[_0x29c6('0x60')]()&&(_0x407970(),_0x264b65[_0x29c6('0xd')]=!0x0);},{'priority':_0x29c6('0x18')}),this[_0x29c6('0x41')][_0x29c6('0x10')](_0x1eb836);}[_0x29c6('0x3')](_0x286fbd){_0x286fbd&&(this['stopListening'](_0x286fbd),this['_editorAnnotations'][_0x29c6('0x4d')](_0x286fbd));}[_0x29c6('0x4f')](_0x42d15e){for(const _0x2e8c70 of this[_0x29c6('0x33')])_0x42d15e[_0x29c6('0x25')](_0x2e8c70)||this[_0x29c6('0x19')][_0x29c6('0x1')](_0x2e8c70[_0x29c6('0x51')]);this[_0x29c6('0x33')]=_0x42d15e;}[_0x29c6('0x3e')](){const _0x193151=this[_0x29c6('0x43')];this[_0x29c6('0x35')]['refreshPositioning'](),_0x193151['isVisible']&&this[_0x29c6('0x42')]();}[_0x29c6('0x45')](_0x472621){if(this[_0x29c6('0x19')][_0x29c6('0x26')](_0x472621['view']))return;const _0x3aafa5=this[_0x29c6('0x43')]['content']['first'];_0x3aafa5!==_0x472621['view']?(_0x3aafa5&&this['_detachListeners'](_0x3aafa5),this[_0x29c6('0x5e')](_0x472621[_0x29c6('0x51')]),this[_0x29c6('0x43')]['content']['clear'](),this[_0x29c6('0x43')]['content'][_0x29c6('0x10')](_0x472621[_0x29c6('0x51')]),this[_0x29c6('0x42')]()):this[_0x29c6('0x42')]();}[_0x29c6('0x42')](){const _0x16f421=this['balloonPanelView'][_0x29c6('0x34')][_0x29c6('0x4')],_0x5154e2=_0x16f421&&this[_0x29c6('0x35')][_0x29c6('0x4b')](_0x16f421);if(!_0x5154e2||!this['_annotationToNarrowView'][_0x29c6('0x26')](_0x5154e2))return;const _0x18b293=this[_0x29c6('0x56')][_0x29c6('0x5d')](_0x5154e2)[_0x29c6('0x3b')],_0x378b01=function(){const _0x406669=_0x3c64ec[_0x29c6('0x1e')];return[_0x406669[_0x29c6('0x16')],_0x406669['northArrowSouthEast'],_0x406669[_0x29c6('0x55')],_0x406669[_0x29c6('0x8')],_0x406669[_0x29c6('0x1a')],_0x406669[_0x29c6('0x1f')]];}();this['balloonPanelView'][_0x29c6('0x2f')]({'target':_0x18b293,'positions':_0x378b01});}[_0x29c6('0x4c')](){const _0x1efe41=this[_0x29c6('0x43')],_0x19ba47=_0x1efe41['content'][_0x29c6('0x4')];_0x19ba47&&(this[_0x29c6('0x3d')](_0x19ba47),_0x1efe41['unpin'](),_0x1efe41[_0x29c6('0x34')][_0x29c6('0x36')]());}[_0x29c6('0x5e')](_0x54f732){this[_0x29c6('0x7')](_0x54f732,_0x29c6('0x15'),()=>this[_0x29c6('0x42')]()),this[_0x29c6('0x7')](_0x54f732,'Esc',(_0x16f829,_0x415e6c)=>{this[_0x29c6('0x19')][_0x29c6('0x10')](_0x54f732),this[_0x29c6('0x4c')](),_0x415e6c();});}[_0x29c6('0x3d')](_0x46552e){this[_0x29c6('0x54')](_0x46552e);}}
|
|
23
|
+
const _0x1e1a=['detach','focus','execute','refresh','cancel','addAnnotation','ck-sidebar--narrow','detachFromDom','_destroyEditorAnnotationsIntegration','length','first','context','_showBalloon','_refreshPositioningDebounced','_annotationToNarrowView','stopPropagation','stopListening','_hideBalloon','find','plugins','isDirty','bodyCollection','_detachListeners','has','get','set','southArrowNorthEast','_attachListeners','_editorAnnotations','focusableElements','northArrowSouthEast','keydown','keyCode','element','isAttached','content','init','_annotations','delete','balloonPanelView','requires','activeAnnotation','refreshPositioning','attach','narrowsidebar-attach-already-attached','_updateBalloonPosition','removeEventListener','bind','southArrowNorth','editors','ready','low','register','_domEmitter','hasDomSelection','clear','annotationType','_setSelectedAnnotations','listenTo','attachToDom','change:height','resize','remove','type','_refreshPositioning','off','narrowsidebar-detach-not-attached','rearrange','EditorAnnotations','northArrowSouthWest','add','esc','locale','setActiveAnnotation','getByView','includes','narrowSidebar','getOrderedSelectedAnnotations','getSidebarItemView','_integrateWithEditorAnnotations','southArrowNorthWest','Esc','number','_manuallyClosedAnnotationViews','from','change:container','northArrowSouth','NarrowSidebar','unpin','preventClosingBalloon','uiUpdate','annotations','_selectedAnnotations','blur','destroy','isVisible','target','view','stop','addEventListener','defaultPositions','high'];(function(_0x29a6a3,_0x1e1ac2){const _0x56066c=function(_0x178228){while(--_0x178228){_0x29a6a3['push'](_0x29a6a3['shift']());}};_0x56066c(++_0x1e1ac2);}(_0x1e1a,0x113));const _0x5606=function(_0x29a6a3,_0x1e1ac2){_0x29a6a3=_0x29a6a3-0x0;let _0x56066c=_0x1e1a[_0x29a6a3];return _0x56066c;};import{ContextPlugin as _0x56caee,Context as _0x1d5bce}from'ckeditor5/src/core.js';import _0x1230f7 from'./annotationsuis.js';import _0x49f883 from'./sidebar.js';import _0x1446e2 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x53861b,BodyCollection as _0x5982f4}from'ckeditor5/src/ui.js';import{CKEditorError as _0x1d0713,DomEmitterMixin as _0x52f7ee,keyCodes as _0x76bd3e,Collection as _0x1530f2}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x532b8d}from'lodash-es';import _0x180b5e from'./editorannotations.js';export default class i extends _0x56caee{static get[_0x5606('0x47')](){return[_0x49f883,_0x1230f7];}static get['pluginName'](){return _0x5606('0x10');}constructor(_0x426213){super(_0x426213),this['isAttached']=!0x1,this[_0x5606('0xc')]=new Set(),this['_domEmitter']=Object['create'](_0x52f7ee),this[_0x5606('0x2d')]=new Map(),this[_0x5606('0x38')](_0x5606('0x48'),null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1530f2(),this[_0x5606('0x2c')]=_0x532b8d(()=>{this[_0x5606('0x5f')]();},0xfa,{'leading':!0x1});}[_0x5606('0x43')](){this[_0x5606('0x2a')][_0x5606('0x32')][_0x5606('0x37')](_0x1230f7)[_0x5606('0x53')](_0x5606('0x5'),this),this[_0x5606('0x34')]=new _0x5982f4(this['context'][_0x5606('0x1')]),this[_0x5606('0x46')]=new _0x53861b(this[_0x5606('0x2a')]['locale']),this['bodyCollection'][_0x5606('0x5a')](),this[_0x5606('0x34')]['add'](this[_0x5606('0x46')]);}[_0x5606('0x4a')](_0x5e4fd9){this['annotations']=_0x5e4fd9;const _0x5b8c1b=this[_0x5606('0x2a')]['plugins']['get'](_0x49f883),_0x196715=this[_0x5606('0x46')];if(_0x5b8c1b[_0x5606('0x44')]=_0x5e4fd9,this['isAttached'])throw new _0x1d0713(_0x5606('0x4b'),this);this[_0x5606('0x41')]=!0x0,this[_0x5606('0x59')](_0x5b8c1b,'set:container',()=>{this[_0x5606('0x1f')](),this[_0x5606('0x59')](_0x5b8c1b,_0x5606('0xe'),_0x2cc854=>{_0x2cc854[_0x5606('0x60')](),this[_0x5606('0x4a')](_0x5e4fd9);});}),_0x5b8c1b['_attachToContainer']({'viewClass':_0x5606('0x25'),'spaceBetweenItems':0x5});const _0x2ebb86=_0x4142ec=>{const _0x264be1=new _0x1446e2(this['context']['locale']);_0x5b8c1b[_0x5606('0x24')](_0x4142ec,_0x264be1),this[_0x5606('0x2d')]['set'](_0x4142ec,_0x264be1),_0x264be1[_0x5606('0x4e')](_0x5606('0x33'),_0x5606('0x57'),_0x5606('0xb'))['to'](_0x4142ec[_0x5606('0x1a')],_0x5606('0x33'),_0x5606('0x5e'),_0x5606('0x28')),_0x264be1['on'](_0x5606('0x21'),()=>{this[_0x5606('0xc')]['clear'](),_0x196715[_0x5606('0x42')][_0x5606('0x29')]!==_0x4142ec['view']?(this[_0x5606('0x2b')](_0x4142ec),_0x4142ec[_0x5606('0x1a')][_0x5606('0x40')]['focus'](),this[_0x5606('0x2')](_0x4142ec)):this[_0x5606('0x2')](null);});};for(const _0x1ccbf5 of _0x5e4fd9)_0x2ebb86(_0x1ccbf5);this[_0x5606('0x59')](_0x5e4fd9,_0x5606('0x65'),(_0x30d412,_0x25d738)=>{_0x2ebb86(_0x25d738);}),this[_0x5606('0x59')](_0x5e4fd9,_0x5606('0x5d'),(_0x450918,_0x185a79,_0x40bbd8)=>{this['_annotationToNarrowView'][_0x5606('0x37')](_0x185a79)[_0x5606('0x17')](),this[_0x5606('0x2d')][_0x5606('0x45')](_0x185a79),_0x5b8c1b[_0x5606('0x62')]({'removedAnnotation':_0x185a79,'previousAnnotation':_0x5e4fd9[_0x5606('0x37')](_0x40bbd8-0x1),'nextAnnotation':_0x5e4fd9[_0x5606('0x37')](_0x40bbd8+0x1)}),_0x185a79===this[_0x5606('0x48')]&&this[_0x5606('0x2')](null);},{'priority':_0x5606('0x52')}),this[_0x5606('0x59')](_0x5e4fd9,_0x5606('0x20'),(_0x1afcac,_0x2b4639)=>{this[_0x5606('0x2')](_0x2b4639);}),this['listenTo'](_0x5e4fd9,'blur',()=>{this[_0x5606('0x2')](null);}),this[_0x5606('0x54')][_0x5606('0x59')](document,_0x5606('0x3e'),(_0x168f93,_0x1a96a0)=>{_0x1a96a0[_0x5606('0x3f')]===_0x76bd3e[_0x5606('0x0')]&&_0x196715[_0x5606('0x18')]&&(this[_0x5606('0xc')]['add'](_0x196715[_0x5606('0x42')][_0x5606('0x29')]),this['_hideBalloon'](),_0x1a96a0[_0x5606('0x2e')](),_0x1a96a0['preventDefault']());}),this[_0x5606('0x54')]['listenTo'](document,'mousedown',(_0x4c9837,_0x9219d6)=>{const _0x2b74bf=_0x9219d6[_0x5606('0x19')];_0x196715[_0x5606('0x18')]&&_0x196715[_0x5606('0x40')]['contains'](_0x2b74bf)||_0x5b8c1b[_0x5606('0x1a')]['element']['contains'](_0x2b74bf)||_0x4c9837[_0x5606('0x12')]||this[_0x5606('0x48')]&&this[_0x5606('0x48')][_0x5606('0x3c')][_0x5606('0x31')](_0x12b811=>_0x12b811['contains'](_0x2b74bf))||(this[_0x5606('0xc')][_0x5606('0x56')](),this[_0x5606('0x30')](),this['setActiveAnnotation'](null));});const _0xc3f294=this[_0x5606('0x2a')]instanceof _0x1d5bce?this['context']['editors']:new _0x1530f2([this[_0x5606('0x2a')]]);for(const _0x4d62d4 of _0xc3f294)this['_integrateWithEditorAnnotations'](_0x4d62d4);this[_0x5606('0x59')](_0xc3f294,_0x5606('0x65'),(_0x1250cc,_0x51dc8d)=>{this[_0x5606('0x59')](_0x51dc8d,_0x5606('0x51'),()=>{this[_0x5606('0x8')](_0x51dc8d);});}),this['listenTo'](_0xc3f294,'remove',(_0x5cc32c,_0x5074c8)=>{_0x5074c8[_0x5606('0x32')][_0x5606('0x36')](_0x5606('0x63'))&&this[_0x5606('0x27')](_0x5074c8['plugins']['get'](_0x5606('0x63')));}),window[_0x5606('0x1c')]('resize',this[_0x5606('0x2c')]),this[_0x5606('0x5f')]();}[_0x5606('0x2')](_0x13d85c){if(_0x13d85c===this[_0x5606('0x48')])return;const _0x2a56aa=this[_0x5606('0x2a')][_0x5606('0x32')][_0x5606('0x37')](_0x49f883);if(_0x2a56aa['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x13d85c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x13d85c)_0x2a56aa[_0x5606('0x7')](_0x13d85c)?this[_0x5606('0x2b')](_0x13d85c):this['_hideBalloon']();else this[_0x5606('0x30')]();this[_0x5606('0x48')]=_0x13d85c;}[_0x5606('0x1f')](){if(!this[_0x5606('0x41')])throw new _0x1d0713(_0x5606('0x61'),this);this['setActiveAnnotation'](null);const _0x5e26c0=this[_0x5606('0x2a')][_0x5606('0x32')][_0x5606('0x37')](_0x49f883);this[_0x5606('0x30')](),Array[_0x5606('0xd')](this[_0x5606('0x2d')]['values'](),_0x41f198=>_0x41f198[_0x5606('0x17')]()),this[_0x5606('0x2d')][_0x5606('0x56')](),_0x5e26c0['_detachFromContainer'](this[_0x5606('0x14')]),this[_0x5606('0x2f')](),this['_domEmitter'][_0x5606('0x2f')](),this[_0x5606('0x2a')]instanceof _0x1d5bce&&this[_0x5606('0x2f')](this[_0x5606('0x2a')][_0x5606('0x50')]);for(const _0x328dcd of Array[_0x5606('0xd')](this[_0x5606('0x3b')]))this[_0x5606('0x27')](_0x328dcd);window[_0x5606('0x4d')](_0x5606('0x5c'),this[_0x5606('0x2c')]),this[_0x5606('0x2c')][_0x5606('0x23')](),this['_selectedAnnotations']=[],this[_0x5606('0x41')]=!0x1,this[_0x5606('0x14')]=null;}['destroy'](){this[_0x5606('0x41')]&&this[_0x5606('0x1f')](),this[_0x5606('0x34')][_0x5606('0x26')]();}['_integrateWithEditorAnnotations'](_0x226ae7){const _0x2d62e2=_0x226ae7[_0x5606('0x32')][_0x5606('0x37')](_0x180b5e),_0x1aabbf=this[_0x5606('0x2a')][_0x5606('0x32')][_0x5606('0x37')](_0x49f883),_0x213a5e=this['annotations'],_0x1f4189=this[_0x5606('0x46')],_0x3b6601=()=>{const _0x150efe=_0x2d62e2[_0x5606('0x6')]({'annotations':this[_0x5606('0x14')],'activeAnnotation':this[_0x5606('0x48')]});this['_setSelectedAnnotations'](_0x150efe),this[_0x5606('0x2')](_0x150efe[0x0]||null);};this[_0x5606('0x59')](_0x2d62e2,_0x5606('0x22'),_0x3b6601),this[_0x5606('0x59')](_0x2d62e2,_0x5606('0x16'),(_0x18e9f1,{isAnnotationTracked:_0x426de2})=>{this[_0x5606('0x48')]&&_0x426de2(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this[_0x5606('0x2')](null));}),this[_0x5606('0x59')](_0x2d62e2,_0x5606('0x13'),()=>{this[_0x5606('0x2c')]();}),this[_0x5606('0x59')](_0x213a5e,_0x5606('0x16'),_0x49f105=>{_0x2d62e2[_0x5606('0x55')]()&&_0x49f105[_0x5606('0x1b')]();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5cad6e,_0x5275d6)=>{const _0x13ad61=_0x5275d6[_0x5606('0x19')];_0x1f4189[_0x5606('0x18')]&&_0x1f4189['element']['contains'](_0x13ad61)||_0x1aabbf['view'][_0x5606('0x40')]['contains'](_0x13ad61)||this['activeAnnotation']&&_0x2d62e2[_0x5606('0x55')]()&&(_0x3b6601(),_0x5cad6e[_0x5606('0x12')]=!0x0);},{'priority':_0x5606('0x1e')}),this[_0x5606('0x3b')][_0x5606('0x65')](_0x2d62e2);}[_0x5606('0x27')](_0x2ed1da){_0x2ed1da&&(this[_0x5606('0x2f')](_0x2ed1da),this[_0x5606('0x3b')]['remove'](_0x2ed1da));}[_0x5606('0x58')](_0x5ba02d){for(const _0x32754d of this[_0x5606('0x15')])_0x5ba02d[_0x5606('0x4')](_0x32754d)||this[_0x5606('0xc')]['delete'](_0x32754d[_0x5606('0x1a')]);this[_0x5606('0x15')]=_0x5ba02d;}['_refreshPositioning'](){const _0x56d704=this[_0x5606('0x46')];this['annotations'][_0x5606('0x49')](),_0x56d704[_0x5606('0x18')]&&this[_0x5606('0x4c')]();}[_0x5606('0x2b')](_0x4c6beb){if(this[_0x5606('0xc')]['has'](_0x4c6beb[_0x5606('0x1a')]))return;const _0x48a1ef=this[_0x5606('0x46')][_0x5606('0x42')][_0x5606('0x29')];_0x48a1ef!==_0x4c6beb['view']?(_0x48a1ef&&this[_0x5606('0x35')](_0x48a1ef),this[_0x5606('0x3a')](_0x4c6beb[_0x5606('0x1a')]),this['balloonPanelView'][_0x5606('0x42')]['clear'](),this[_0x5606('0x46')][_0x5606('0x42')]['add'](_0x4c6beb[_0x5606('0x1a')]),this['_updateBalloonPosition']()):this[_0x5606('0x4c')]();}[_0x5606('0x4c')](){const _0x106e7c=this[_0x5606('0x46')][_0x5606('0x42')][_0x5606('0x29')],_0x126a42=_0x106e7c&&this[_0x5606('0x14')][_0x5606('0x3')](_0x106e7c);if(!_0x126a42||!this[_0x5606('0x2d')][_0x5606('0x36')](_0x126a42))return;const _0x487fe3=this[_0x5606('0x2d')][_0x5606('0x37')](_0x126a42)[_0x5606('0x40')],_0x158030=function(){const _0x5bc49f=_0x53861b[_0x5606('0x1d')];return[_0x5bc49f[_0x5606('0x39')],_0x5bc49f[_0x5606('0x3d')],_0x5bc49f[_0x5606('0x4f')],_0x5bc49f[_0x5606('0xf')],_0x5bc49f[_0x5606('0x9')],_0x5bc49f[_0x5606('0x64')]];}();this[_0x5606('0x46')]['pin']({'target':_0x487fe3,'positions':_0x158030});}['_hideBalloon'](){const _0x3b0827=this[_0x5606('0x46')],_0x335f6b=_0x3b0827[_0x5606('0x42')][_0x5606('0x29')];_0x335f6b&&(this[_0x5606('0x35')](_0x335f6b),_0x3b0827[_0x5606('0x11')](),_0x3b0827['content'][_0x5606('0x56')]());}[_0x5606('0x3a')](_0x5c8e04){this['listenTo'](_0x5c8e04,_0x5606('0x5b'),()=>this[_0x5606('0x4c')]()),this[_0x5606('0x59')](_0x5c8e04,_0x5606('0xa'),(_0x5876eb,_0x2ea8fd)=>{this[_0x5606('0xc')]['add'](_0x5c8e04),this[_0x5606('0x30')](),_0x2ea8fd();});}[_0x5606('0x35')](_0x561161){this['stopListening'](_0x561161);}}
|