@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
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module comments/annotations/sidebar
|
|
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 SidebarView from './view/sidebarview';
|
|
8
|
-
import SidebarItemView from './view/sidebaritemview';
|
|
9
|
-
import type Annotation from './annotation';
|
|
5
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import SidebarView from './view/sidebarview.js';
|
|
8
|
+
import SidebarItemView from './view/sidebaritemview.js';
|
|
9
|
+
import type Annotation from './annotation.js';
|
|
10
10
|
/**
|
|
11
11
|
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
12
12
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x454a=['rearrange','bottom','_targetTop','refresh','target','bind','get','_recalculate','_annotations','element','addAnnotation','config','getIndex','last','view','_createSidebarView','change:top','remove','sidebar-setcontainer-invalid-element','length','_alignAfterItem','_lastItem','unbind','minHeight','object','height','init','_alignToTargetRect','top','_alignBeforeItem','set','change:targetRect','_alignForTopChange','stopListening','updateHeight','listenTo','define','max','change:bottom','content','_activeAnnotation','_setItemTop','class','isActive','destroy','change:_lastItem','targetRect','_detachFromContainer','list','_getMaxAvailableTop','sidebar-attachtocontainer-missing-container','Sidebar','container','pluginName','_spaceBetweenItems','sidebar.container','_alignForBottomChange','_destroySidebarItemView','appendChild','_recalculateBuffer','_sidebarItemViewToAnnotation','add','_attachToContainer','nodeType','context','_updateLastItem','_getTargetTop','_getItemBefore','_annotationToSidebarItemView','_getItemAfter','delete','isAnimationDisabled','push','getSidebarItemView','clear','setContainer','sidebar.preventScrollOutOfView'];(function(_0x10dacf,_0x454a9c){const _0x12b522=function(_0x10d916){while(--_0x10d916){_0x10dacf['push'](_0x10dacf['shift']());}};_0x12b522(++_0x454a9c);}(_0x454a,0x68));const _0x12b5=function(_0x10dacf,_0x454a9c){_0x10dacf=_0x10dacf-0x0;let _0x12b522=_0x454a[_0x10dacf];return _0x12b522;};import{ContextPlugin as _0x12c93a}from'ckeditor5/src/core';import{Rect as _0x48f657,CKEditorError as _0x430ea4}from'ckeditor5/src/utils';import _0xe48452 from'./view/sidebarview';import _0x47901d from'./view/sidebaritemview';export default class z extends _0x12c93a{static get[_0x12b5('0x1a')](){return _0x12b5('0x18');}constructor(_0x49f9d5){super(_0x49f9d5),this[_0x12b5('0x3')]('_lastItem',void 0x0),this[_0x12b5('0x40')]=this[_0x12b5('0x41')](),this[_0x12b5('0x3')](_0x12b5('0x19'),null),this[_0x12b5('0x1b')]=0x19,this[_0x12b5('0x21')]=new Map(),this[_0x12b5('0x29')]=new Map(),this[_0x12b5('0x25')][_0x12b5('0x3d')][_0x12b5('0x9')]('sidebar.preventScrollOutOfView',!0x1),this[_0x12b5('0x3a')]=null,this[_0x12b5('0xd')]=null,this['_recalculateBuffer']=[];}[_0x12b5('0x4c')](){const _0x3a36e8=this[_0x12b5('0x25')]['config'][_0x12b5('0x38')](_0x12b5('0x1c'));_0x3a36e8&&this[_0x12b5('0x30')](_0x3a36e8);}[_0x12b5('0x30')](_0x1a76fd){if(!y(_0x1a76fd))throw new _0x430ea4(_0x12b5('0x44'));this['container']=_0x1a76fd;}[_0x12b5('0x23')]({viewClass:_0x59a5a0='',spaceBetweenItems:_0x1845e7=0x19}={}){if(!y(this[_0x12b5('0x19')]))throw new _0x430ea4(_0x12b5('0x17'),this);this[_0x12b5('0x19')][_0x12b5('0x1f')](this[_0x12b5('0x40')]['element']),this[_0x12b5('0x40')]['class']=_0x59a5a0,this[_0x12b5('0x1b')]=_0x1845e7;}[_0x12b5('0x32')]({removedAnnotation:_0x23e15b,previousAnnotation:_0x19f6ed,nextAnnotation:_0x5bc64c}){const _0x323af8=this[_0x12b5('0x2e')](_0x23e15b);this[_0x12b5('0x40')][_0x12b5('0x15')][_0x12b5('0x43')](_0x323af8),this[_0x12b5('0x1e')](_0x23e15b),_0x19f6ed&&this[_0x12b5('0x0')](this[_0x12b5('0x2e')](_0x19f6ed)),_0x5bc64c&&this[_0x12b5('0x0')](this[_0x12b5('0x2e')](_0x5bc64c)),this[_0x12b5('0x26')]();}[_0x12b5('0x35')]({blurredAnnotation:_0x402851,activatedAnnotation:_0xd32176,disableAnimationOnActivatedAnnotation:_0x8e30af}){if(this[_0x12b5('0xd')]=_0xd32176,_0x402851){_0x402851[_0x12b5('0x10')]=!0x1;const _0x348d24=this[_0x12b5('0x2e')](_0x402851);_0x348d24&&_0x8e30af&&(_0x348d24['isAnimationDisabled']=!0x1);}if(_0xd32176){const _0x37da8d=this[_0x12b5('0x2e')](_0xd32176);_0x37da8d&&(_0xd32176[_0x12b5('0x10')]=!0x0,_0x8e30af&&(_0x37da8d[_0x12b5('0x2c')]=!0x0,_0x37da8d[_0x12b5('0x1')]+=0x1),this[_0x12b5('0x0')](_0x37da8d));}}[_0x12b5('0x14')](_0x539608){if(this[_0x12b5('0x40')][_0x12b5('0x3b')][_0x12b5('0x43')](),_0x539608)for(const _0x373ff1 of _0x539608)this['_destroySidebarItemView'](_0x373ff1);this[_0x12b5('0x40')][_0x12b5('0x15')][_0x12b5('0x2f')](),this[_0x12b5('0x40')][_0x12b5('0xf')]='',this[_0x12b5('0x47')]=null;}[_0x12b5('0x3c')](_0x34d95e,_0x5339b8){_0x5339b8||(_0x5339b8=_0x34d95e[_0x12b5('0x40')]);const _0xa629fc=new _0x47901d(this[_0x12b5('0x25')]['locale']);this['_sidebarItemViewToAnnotation'][_0x12b5('0x3')](_0xa629fc,_0x34d95e),this[_0x12b5('0x29')][_0x12b5('0x3')](_0x34d95e,_0xa629fc),_0xa629fc[_0x12b5('0xc')]['add'](_0x5339b8),this['listenTo'](_0x34d95e[_0x12b5('0x40')],_0x12b5('0x4'),(_0x187ad8,_0x3e772c,_0x33e2e6)=>{const _0x3ec63b=this[_0x12b5('0x27')](_0x34d95e,_0x33e2e6);_0xa629fc[_0x12b5('0x34')]!=_0x3ec63b&&(_0xa629fc[_0x12b5('0x34')]=_0x3ec63b,this[_0x12b5('0xe')](_0xa629fc,_0x3ec63b));}),this[_0x12b5('0x8')](_0xa629fc,_0x12b5('0x42'),()=>{this['_recalculate'](_0xa629fc,_0x12b5('0x1'));}),this[_0x12b5('0x8')](_0xa629fc,_0x12b5('0xb'),()=>{this[_0x12b5('0x39')](_0xa629fc,_0x12b5('0x33'));}),this[_0x12b5('0x0')](_0xa629fc);const _0x48a1fb=this[_0x12b5('0x28')](_0xa629fc);if(_0x48a1fb)this['_alignAfterItem'](_0x48a1fb,_0xa629fc)||this['_alignToTargetRect'](_0xa629fc);else this[_0x12b5('0x0')](_0xa629fc);return this[_0x12b5('0x26')](),this[_0x12b5('0x40')][_0x12b5('0x15')][_0x12b5('0x22')](_0xa629fc),_0xa629fc;}[_0x12b5('0x5')](_0x394c72){if(!_0x394c72['content']['length'])return;const _0x46aa1c=this['_getItemBefore'](_0x394c72);if(!_0x46aa1c)return;const _0x203cf0=this[_0x12b5('0x21')][_0x12b5('0x38')](_0x46aa1c),_0xb3d3ca=this['_activeAnnotation'];_0xb3d3ca&&_0xb3d3ca===_0x203cf0?this[_0x12b5('0x46')](_0x46aa1c,_0x394c72):this[_0x12b5('0x2')](_0x394c72,_0x46aa1c);}[_0x12b5('0x1d')](_0xce392f){if(!_0xce392f[_0x12b5('0xc')][_0x12b5('0x45')])return;const _0x196b02=this[_0x12b5('0x2a')](_0xce392f);if(!_0x196b02)return;const _0x24a573=this[_0x12b5('0x21')][_0x12b5('0x38')](_0x196b02),_0x2950bf=this[_0x12b5('0x25')]['config'][_0x12b5('0x38')](_0x12b5('0x31')),_0x2a1636=this[_0x12b5('0xd')];_0x2a1636&&_0x2a1636===_0x24a573&&_0x2950bf?(this['_alignBeforeItem'](_0x196b02,_0xce392f),this[_0x12b5('0x46')](_0xce392f,_0x196b02)):_0x2a1636&&_0x2a1636===_0x24a573?this['_alignBeforeItem'](_0x196b02,_0xce392f):this[_0x12b5('0x46')](_0xce392f,_0x196b02);}[_0x12b5('0x39')](_0x3c07bc,_0x27ec4e){0x0===this['_recalculateBuffer'][_0x12b5('0x45')]&&setTimeout(()=>{for(const {sidebarItemView:_0x2d1e10,changedProp:_0x3d1d66}of this[_0x12b5('0x20')])_0x12b5('0x1')===_0x3d1d66?this['_alignForTopChange'](_0x2d1e10):this[_0x12b5('0x1d')](_0x2d1e10);this[_0x12b5('0x20')]=[];},0xa),this[_0x12b5('0x20')][_0x12b5('0x2d')]({'sidebarItemView':_0x3c07bc,'changedProp':_0x27ec4e});}[_0x12b5('0x2e')](_0x58af3f){return this['_annotationToSidebarItemView'][_0x12b5('0x38')](_0x58af3f);}[_0x12b5('0x11')](){this[_0x12b5('0x6')](),this[_0x12b5('0x40')]['destroy']();}['_destroySidebarItemView'](_0xa97bb0){const _0x4e8fc5=this[_0x12b5('0x2e')](_0xa97bb0);this['stopListening'](_0x4e8fc5),this[_0x12b5('0x6')](_0xa97bb0[_0x12b5('0x40')]),_0x4e8fc5[_0x12b5('0x11')](),this[_0x12b5('0x29')][_0x12b5('0x2b')](_0xa97bb0),this[_0x12b5('0x21')][_0x12b5('0x2b')](_0x4e8fc5);}[_0x12b5('0x41')](){const _0x5505d2=new _0xe48452(this['context']['locale']);return _0x5505d2['render'](),this['on'](_0x12b5('0x12'),(_0x22e399,_0x49afb1,_0x44eccb,_0x2f013c)=>{_0x2f013c&&_0x5505d2[_0x12b5('0x48')](_0x12b5('0x49')),_0x44eccb?_0x5505d2[_0x12b5('0x37')](_0x12b5('0x49'))['to'](_0x44eccb,'bottom'):_0x5505d2[_0x12b5('0x49')]=null;}),_0x5505d2;}[_0x12b5('0x26')](){var _0x2e5e2e;this[_0x12b5('0x47')]=(null===(_0x2e5e2e=this[_0x12b5('0x3a')])||void 0x0===_0x2e5e2e?void 0x0:_0x2e5e2e[_0x12b5('0x3f')])?this[_0x12b5('0x2e')](this[_0x12b5('0x3a')][_0x12b5('0x3f')]):null;}[_0x12b5('0x28')](_0x31481f){var _0xd576e2;const _0x1e2e33=this[_0x12b5('0x21')][_0x12b5('0x38')](_0x31481f),_0x8e7598=_0x1e2e33&&(null===(_0xd576e2=this[_0x12b5('0x3a')])||void 0x0===_0xd576e2?void 0x0:_0xd576e2[_0x12b5('0x38')](this[_0x12b5('0x3a')][_0x12b5('0x3e')](_0x1e2e33)-0x1));return _0x8e7598&&this[_0x12b5('0x2e')](_0x8e7598)||null;}[_0x12b5('0x2a')](_0x2ab42e){var _0x43419d;const _0x5dd66b=this[_0x12b5('0x21')][_0x12b5('0x38')](_0x2ab42e),_0xfdb2a0=_0x5dd66b&&(null===(_0x43419d=this['_annotations'])||void 0x0===_0x43419d?void 0x0:_0x43419d[_0x12b5('0x38')](this[_0x12b5('0x3a')][_0x12b5('0x3e')](_0x5dd66b)+0x1));return _0xfdb2a0&&this[_0x12b5('0x2e')](_0xfdb2a0)||null;}[_0x12b5('0x2')](_0x407c32,_0x148c7d){_0x407c32[_0x12b5('0x7')]();const _0x5acd66=H(_0x148c7d[_0x12b5('0x33')]+this[_0x12b5('0x1b')],_0x407c32[_0x12b5('0x1')]);return!!_0x5acd66&&(this[_0x12b5('0xe')](_0x148c7d,_0x148c7d[_0x12b5('0x1')]-_0x5acd66),!0x0);}[_0x12b5('0x46')](_0xe7681a,_0x4aed25){_0xe7681a[_0x12b5('0x7')]();const _0x38df8d=H(_0xe7681a[_0x12b5('0x33')]+this['_spaceBetweenItems'],_0x4aed25[_0x12b5('0x1')]);return!!_0x38df8d&&(this[_0x12b5('0xe')](_0x4aed25,_0x4aed25[_0x12b5('0x1')]+_0x38df8d,!0x1),!0x0);}[_0x12b5('0x0')](_0x5f3294){const _0x35c0fc=this[_0x12b5('0x21')][_0x12b5('0x38')](_0x5f3294);if(!_0x35c0fc||!_0x35c0fc[_0x12b5('0x36')]||!_0x35c0fc['targetRect'])return;const _0x46715e=this['_getTargetTop'](_0x35c0fc,_0x35c0fc[_0x12b5('0x13')]);this[_0x12b5('0xe')](_0x5f3294,_0x46715e);}[_0x12b5('0x27')](_0x1e4cba,_0x57180f){if(null===_0x57180f)return 0x0;if(_0x1e4cba[_0x12b5('0x36')]instanceof _0x48f657)return _0x57180f[_0x12b5('0x1')];{const _0x12433d=new _0x48f657(this[_0x12b5('0x40')][_0x12b5('0x3b')])[_0x12b5('0x1')];return _0x57180f[_0x12b5('0x1')]-_0x12433d;}}[_0x12b5('0xe')](_0x84be18,_0x6d915b,_0xbe6e9b=this[_0x12b5('0x25')][_0x12b5('0x3d')][_0x12b5('0x38')](_0x12b5('0x31'))){_0xbe6e9b&&(_0x6d915b=Math[_0x12b5('0xa')](_0x6d915b,this[_0x12b5('0x16')](_0x84be18))),_0x84be18[_0x12b5('0x1')]=_0x6d915b;}[_0x12b5('0x16')](_0x1f61a1){let _0x3f4631=this[_0x12b5('0x28')](_0x1f61a1),_0x2eb63d=0x0;for(;_0x3f4631;)_0x3f4631['updateHeight'](),_0x2eb63d+=this[_0x12b5('0x1b')]+_0x3f4631[_0x12b5('0x4b')],_0x3f4631=this[_0x12b5('0x28')](_0x3f4631);return _0x2eb63d;}}function H(_0x3668c7,_0x6e56f2){return Math[_0x12b5('0xa')](_0x3668c7-_0x6e56f2,0x0);}function y(_0x430582){return null!==_0x430582&&_0x12b5('0x4a')==typeof _0x430582&&0x1===_0x430582[_0x12b5('0x24')];}
|
|
23
|
+
const _0x6c28=['getIndex','remove','context','minHeight','_setItemTop','_alignAfterItem','targetRect','sidebar.preventScrollOutOfView','bind','class','change:bottom','change:top','_spaceBetweenItems','list','_lastItem','_alignToTargetRect','object','_createSidebarView','render','_alignForBottomChange','set','_getItemAfter','length','locale','Sidebar','_getItemBefore','_annotations','_activeAnnotation','_alignBeforeItem','last','delete','content','get','listenTo','refresh','nodeType','_sidebarItemViewToAnnotation','_destroySidebarItemView','init','height','_getTargetTop','change:targetRect','_annotationToSidebarItemView','max','sidebar-attachtocontainer-missing-container','config','bottom','sidebar.container','view','target','clear','isAnimationDisabled','_updateLastItem','_recalculate','_attachToContainer','stopListening','getSidebarItemView','addAnnotation','_alignForTopChange','top','_recalculateBuffer','change:_lastItem','container','_targetTop','element','define','updateHeight','_getMaxAvailableTop','destroy','isActive'];(function(_0x1bef2f,_0x6c2880){const _0x5c34ec=function(_0x47cd6f){while(--_0x47cd6f){_0x1bef2f['push'](_0x1bef2f['shift']());}};_0x5c34ec(++_0x6c2880);}(_0x6c28,0xd9));const _0x5c34=function(_0x1bef2f,_0x6c2880){_0x1bef2f=_0x1bef2f-0x0;let _0x5c34ec=_0x6c28[_0x1bef2f];return _0x5c34ec;};import{ContextPlugin as _0x11dba3}from'ckeditor5/src/core.js';import{Rect as _0x6b676f,CKEditorError as _0x95ebce}from'ckeditor5/src/utils.js';import _0x2cbdf4 from'./view/sidebarview.js';import _0x4fa075 from'./view/sidebaritemview.js';export default class z extends _0x11dba3{static get['pluginName'](){return _0x5c34('0x11');}constructor(_0x460082){super(_0x460082),this[_0x5c34('0xd')](_0x5c34('0x7'),void 0x0),this['view']=this[_0x5c34('0xa')](),this[_0x5c34('0xd')]('container',null),this[_0x5c34('0x5')]=0x19,this[_0x5c34('0x1d')]=new Map(),this[_0x5c34('0x23')]=new Map(),this[_0x5c34('0x41')]['config'][_0x5c34('0x3a')]('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this[_0x5c34('0x35')]=[];}[_0x5c34('0x1f')](){const _0x9ddfb9=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x28'));_0x9ddfb9&&this['setContainer'](_0x9ddfb9);}['setContainer'](_0x567c5a){if(!y(_0x567c5a))throw new _0x95ebce('sidebar-setcontainer-invalid-element');this[_0x5c34('0x37')]=_0x567c5a;}[_0x5c34('0x2f')]({viewClass:_0x10415b='',spaceBetweenItems:_0x2339f3=0x19}={}){if(!y(this[_0x5c34('0x37')]))throw new _0x95ebce(_0x5c34('0x25'),this);this[_0x5c34('0x37')]['appendChild'](this[_0x5c34('0x29')][_0x5c34('0x39')]),this[_0x5c34('0x29')][_0x5c34('0x2')]=_0x10415b,this[_0x5c34('0x5')]=_0x2339f3;}['rearrange']({removedAnnotation:_0x2e4bd9,previousAnnotation:_0x5c8e05,nextAnnotation:_0x552391}){const _0x2b8e8d=this[_0x5c34('0x31')](_0x2e4bd9);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x40')](_0x2b8e8d),this[_0x5c34('0x1e')](_0x2e4bd9),_0x5c8e05&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x5c8e05)),_0x552391&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x552391)),this[_0x5c34('0x2d')]();}[_0x5c34('0x1b')]({blurredAnnotation:_0x51046d,activatedAnnotation:_0x133719,disableAnimationOnActivatedAnnotation:_0x3c20a5}){if(this['_activeAnnotation']=_0x133719,_0x51046d){_0x51046d[_0x5c34('0x3e')]=!0x1;const _0x489845=this[_0x5c34('0x31')](_0x51046d);_0x489845&&_0x3c20a5&&(_0x489845[_0x5c34('0x2c')]=!0x1);}if(_0x133719){const _0x421bf6=this[_0x5c34('0x31')](_0x133719);_0x421bf6&&(_0x133719[_0x5c34('0x3e')]=!0x0,_0x3c20a5&&(_0x421bf6[_0x5c34('0x2c')]=!0x0,_0x421bf6[_0x5c34('0x34')]+=0x1),this[_0x5c34('0x8')](_0x421bf6));}}['_detachFromContainer'](_0x535684){if(this[_0x5c34('0x29')]['element'][_0x5c34('0x40')](),_0x535684)for(const _0x7cecb1 of _0x535684)this['_destroySidebarItemView'](_0x7cecb1);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x2b')](),this[_0x5c34('0x29')][_0x5c34('0x2')]='',this[_0x5c34('0x7')]=null;}[_0x5c34('0x32')](_0x45f56f,_0x2c59e7){_0x2c59e7||(_0x2c59e7=_0x45f56f['view']);const _0x6808bc=new _0x4fa075(this['context'][_0x5c34('0x10')]);this[_0x5c34('0x1d')]['set'](_0x6808bc,_0x45f56f),this[_0x5c34('0x23')][_0x5c34('0xd')](_0x45f56f,_0x6808bc),_0x6808bc[_0x5c34('0x18')]['add'](_0x2c59e7),this['listenTo'](_0x45f56f[_0x5c34('0x29')],_0x5c34('0x22'),(_0x2eac6,_0x559715,_0x504ef7)=>{const _0x18ab1=this[_0x5c34('0x21')](_0x45f56f,_0x504ef7);_0x6808bc[_0x5c34('0x38')]!=_0x18ab1&&(_0x6808bc[_0x5c34('0x38')]=_0x18ab1,this[_0x5c34('0x43')](_0x6808bc,_0x18ab1));}),this['listenTo'](_0x6808bc,_0x5c34('0x4'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x34'));}),this[_0x5c34('0x1a')](_0x6808bc,_0x5c34('0x3'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x27'));}),this['_alignToTargetRect'](_0x6808bc);const _0x5bbc6d=this['_getItemBefore'](_0x6808bc);if(_0x5bbc6d)this['_alignAfterItem'](_0x5bbc6d,_0x6808bc)||this['_alignToTargetRect'](_0x6808bc);else this[_0x5c34('0x8')](_0x6808bc);return this['_updateLastItem'](),this[_0x5c34('0x29')][_0x5c34('0x6')]['add'](_0x6808bc),_0x6808bc;}['_alignForTopChange'](_0x2e1626){if(!_0x2e1626['content']['length'])return;const _0xff19b9=this[_0x5c34('0x12')](_0x2e1626);if(!_0xff19b9)return;const _0x57b9cd=this['_sidebarItemViewToAnnotation'][_0x5c34('0x19')](_0xff19b9),_0x2f57bf=this[_0x5c34('0x14')];_0x2f57bf&&_0x2f57bf===_0x57b9cd?this[_0x5c34('0x44')](_0xff19b9,_0x2e1626):this['_alignBeforeItem'](_0x2e1626,_0xff19b9);}[_0x5c34('0xc')](_0x4a471e){if(!_0x4a471e[_0x5c34('0x18')]['length'])return;const _0x369c8d=this[_0x5c34('0xe')](_0x4a471e);if(!_0x369c8d)return;const _0x21b3a3=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x369c8d),_0x484fe6=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0')),_0x1a948c=this[_0x5c34('0x14')];_0x1a948c&&_0x1a948c===_0x21b3a3&&_0x484fe6?(this[_0x5c34('0x15')](_0x369c8d,_0x4a471e),this['_alignAfterItem'](_0x4a471e,_0x369c8d)):_0x1a948c&&_0x1a948c===_0x21b3a3?this[_0x5c34('0x15')](_0x369c8d,_0x4a471e):this[_0x5c34('0x44')](_0x4a471e,_0x369c8d);}[_0x5c34('0x2e')](_0xcf966d,_0xde88f1){0x0===this['_recalculateBuffer'][_0x5c34('0xf')]&&setTimeout(()=>{for(const {sidebarItemView:_0x9061f8,changedProp:_0x1f6d4c}of this[_0x5c34('0x35')])_0x5c34('0x34')===_0x1f6d4c?this[_0x5c34('0x33')](_0x9061f8):this[_0x5c34('0xc')](_0x9061f8);this['_recalculateBuffer']=[];},0xa),this[_0x5c34('0x35')]['push']({'sidebarItemView':_0xcf966d,'changedProp':_0xde88f1});}['getSidebarItemView'](_0x5ed5cf){return this['_annotationToSidebarItemView'][_0x5c34('0x19')](_0x5ed5cf);}[_0x5c34('0x3d')](){this[_0x5c34('0x30')](),this[_0x5c34('0x29')][_0x5c34('0x3d')]();}['_destroySidebarItemView'](_0x26bb88){const _0x155e34=this[_0x5c34('0x31')](_0x26bb88);this['stopListening'](_0x155e34),this[_0x5c34('0x30')](_0x26bb88[_0x5c34('0x29')]),_0x155e34[_0x5c34('0x3d')](),this[_0x5c34('0x23')][_0x5c34('0x17')](_0x26bb88),this[_0x5c34('0x1d')][_0x5c34('0x17')](_0x155e34);}[_0x5c34('0xa')](){const _0x13dc63=new _0x2cbdf4(this[_0x5c34('0x41')][_0x5c34('0x10')]);return _0x13dc63[_0x5c34('0xb')](),this['on'](_0x5c34('0x36'),(_0x58ff4f,_0x168047,_0x55ef8b,_0x34667c)=>{_0x34667c&&_0x13dc63['unbind'](_0x5c34('0x42')),_0x55ef8b?_0x13dc63[_0x5c34('0x1')](_0x5c34('0x42'))['to'](_0x55ef8b,_0x5c34('0x27')):_0x13dc63[_0x5c34('0x42')]=null;}),_0x13dc63;}[_0x5c34('0x2d')](){var _0x324a58;this[_0x5c34('0x7')]=(null===(_0x324a58=this[_0x5c34('0x13')])||void 0x0===_0x324a58?void 0x0:_0x324a58[_0x5c34('0x16')])?this[_0x5c34('0x31')](this[_0x5c34('0x13')][_0x5c34('0x16')]):null;}['_getItemBefore'](_0x99439a){var _0x34b021;const _0x419ca5=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x99439a),_0x63811f=_0x419ca5&&(null===(_0x34b021=this['_annotations'])||void 0x0===_0x34b021?void 0x0:_0x34b021[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x419ca5)-0x1));return _0x63811f&&this[_0x5c34('0x31')](_0x63811f)||null;}[_0x5c34('0xe')](_0x3ac7fe){var _0x324e17;const _0x157060=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x3ac7fe),_0x3aff75=_0x157060&&(null===(_0x324e17=this[_0x5c34('0x13')])||void 0x0===_0x324e17?void 0x0:_0x324e17[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x157060)+0x1));return _0x3aff75&&this[_0x5c34('0x31')](_0x3aff75)||null;}[_0x5c34('0x15')](_0x2d9c39,_0x1c84d3){_0x2d9c39[_0x5c34('0x3b')]();const _0x2e1ab4=M(_0x1c84d3['bottom']+this[_0x5c34('0x5')],_0x2d9c39[_0x5c34('0x34')]);return!!_0x2e1ab4&&(this['_setItemTop'](_0x1c84d3,_0x1c84d3['top']-_0x2e1ab4),!0x0);}[_0x5c34('0x44')](_0x49a022,_0x3f0bde){_0x49a022[_0x5c34('0x3b')]();const _0x27c3ae=M(_0x49a022['bottom']+this['_spaceBetweenItems'],_0x3f0bde['top']);return!!_0x27c3ae&&(this[_0x5c34('0x43')](_0x3f0bde,_0x3f0bde[_0x5c34('0x34')]+_0x27c3ae,!0x1),!0x0);}['_alignToTargetRect'](_0x2f7750){const _0x325063=this[_0x5c34('0x1d')]['get'](_0x2f7750);if(!_0x325063||!_0x325063[_0x5c34('0x2a')]||!_0x325063['targetRect'])return;const _0x351e54=this[_0x5c34('0x21')](_0x325063,_0x325063[_0x5c34('0x45')]);this[_0x5c34('0x43')](_0x2f7750,_0x351e54);}['_getTargetTop'](_0x39c090,_0x1b1d68){if(null===_0x1b1d68)return 0x0;if(_0x39c090[_0x5c34('0x2a')]instanceof _0x6b676f)return _0x1b1d68[_0x5c34('0x34')];{const _0x209fec=new _0x6b676f(this[_0x5c34('0x29')][_0x5c34('0x39')])[_0x5c34('0x34')];return _0x1b1d68[_0x5c34('0x34')]-_0x209fec;}}['_setItemTop'](_0x373311,_0x1465a0,_0x16bd11=this['context'][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0'))){_0x16bd11&&(_0x1465a0=Math[_0x5c34('0x24')](_0x1465a0,this[_0x5c34('0x3c')](_0x373311))),_0x373311[_0x5c34('0x34')]=_0x1465a0;}[_0x5c34('0x3c')](_0x3f696e){let _0x147cdc=this['_getItemBefore'](_0x3f696e),_0x255e4e=0x0;for(;_0x147cdc;)_0x147cdc['updateHeight'](),_0x255e4e+=this['_spaceBetweenItems']+_0x147cdc[_0x5c34('0x20')],_0x147cdc=this[_0x5c34('0x12')](_0x147cdc);return _0x255e4e;}}function M(_0x49b237,_0x4f9b5f){return Math['max'](_0x49b237-_0x4f9b5f,0x0);}function y(_0x3be8fd){return null!==_0x3be8fd&&_0x5c34('0x9')==typeof _0x3be8fd&&0x1===_0x3be8fd[_0x5c34('0x1c')];}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module comments/annotations/view/annotationcounterbuttonview
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { ButtonView, View } from 'ckeditor5/src/ui';
|
|
6
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
5
|
+
import { ButtonView, View } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
7
7
|
/**
|
|
8
8
|
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
9
9
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x100c=['bind','children','isDirty','_badge','span','annotationType','counterView','toString','set','ck-annotation-counter__badge','ck-annotation-counter__badge--','...','number','add','ck-annotation-counter','icon'];(function(_0x508987,_0x100cf4){const _0x554a46=function(_0x167d09){while(--_0x167d09){_0x508987['push'](_0x508987['shift']());}};_0x554a46(++_0x100cf4);}(_0x100c,0x1b6));const _0x554a=function(_0x508987,_0x100cf4){_0x508987=_0x508987-0x0;let _0x554a46=_0x100c[_0x508987];return _0x554a46;};import{ButtonView as _0x2ac189,View as _0x50cfb4}from'ckeditor5/src/ui.js';import _0x3b6bac from'../../../theme/icons/add-comment.svg';export default class D extends _0x2ac189{constructor(_0x51956e){super(_0x51956e);const _0x20bc60=this['bindTemplate'];this[_0x554a('0x2')](_0x554a('0xc'),!0x1),this[_0x554a('0x2')](_0x554a('0x6'),0x0),this[_0x554a('0xa')](_0x554a('0xd'))['to'](this,_0x554a('0xc'),this,_0x554a('0x6'),(_0x23d2a2,_0x22d9a4)=>_0x23d2a2?_0x554a('0x5'):_0x22d9a4[_0x554a('0x1')]()),this[_0x554a('0x2')](_0x554a('0xf'),''),this[_0x554a('0x9')]=_0x3b6bac,this['extendTemplate']({'attributes':{'class':[_0x554a('0x8')]}}),this[_0x554a('0x0')]=new _0x50cfb4(),this['counterView']['setTemplate']({'tag':_0x554a('0xe'),'attributes':{'class':[_0x554a('0x3'),_0x20bc60['to'](_0x554a('0xf'),_0x57c89c=>_0x554a('0x4')+_0x57c89c),_0x20bc60['if'](_0x554a('0xc'),'ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x20bc60['to']('_badge')}]}),this[_0x554a('0xb')][_0x554a('0x7')](this['counterView']);}}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module comments/annotations/view/annotationview
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
-
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils';
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils.js';
|
|
7
7
|
import '../../../theme/annotation.css';
|
|
8
8
|
/**
|
|
9
9
|
* A wrapping view for any view added to the `Annotations` plugin.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x23bf=['length','element','height','setTemplate','attach','isDirty','content','focus','mainView','_mutationObserver','clear','isActive','set','detach','targetRect','Esc','keystrokes','type','_updateHeight','destroy','ck-annotation-wrapper--active','clientHeight','add','render','focusTracker','createCollection','ck-annotation-wrapper','ck-rounded-corners'];(function(_0x42a0d0,_0x23bf09){const _0x36ca5d=function(_0x421dc8){while(--_0x421dc8){_0x42a0d0['push'](_0x42a0d0['shift']());}};_0x36ca5d(++_0x23bf09);}(_0x23bf,0x17c));const _0x36ca=function(_0x42a0d0,_0x23bf09){_0x42a0d0=_0x42a0d0-0x0;let _0x36ca5d=_0x23bf[_0x42a0d0];return _0x36ca5d;};import{View as _0x7a994}from'ckeditor5/src/ui.js';import{FocusTracker as _0x449993,KeystrokeHandler as _0x453a94,uid as _0x19961b}from'ckeditor5/src/utils.js';import _0x5e3c78 from'../../utils/createmutationobserver.js';import'../../../theme/annotation.css';export default class V extends _0x7a994{constructor(_0x1be4d8,_0x472f11){super(_0x1be4d8),this['id']=_0x19961b(),this[_0x36ca('0x8')]=new _0x449993(),this['keystrokes']=new _0x453a94(),this['keystrokes'][_0x36ca('0x18')](_0x36ca('0x1b'),(_0x2c11c9,_0x4719f3)=>this['fire'](_0x36ca('0x1b'),_0x4719f3)),this[_0x36ca('0x18')](_0x36ca('0x1a'),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this[_0x36ca('0x18')](_0x36ca('0xe'),0x0),this['set']('isActive',!0x1),this['set'](_0x36ca('0x11'),!0x1),this[_0x36ca('0x18')](_0x36ca('0xc'),0x0),this[_0x36ca('0x18')](_0x36ca('0x1'),''),this[_0x36ca('0x15')]=_0x5e3c78(()=>this[_0x36ca('0x2')]()),this[_0x36ca('0x12')]=this[_0x36ca('0x9')](),this[_0x36ca('0x12')]['add'](_0x472f11),this[_0x36ca('0x14')]=_0x472f11;const _0x1cf353=this['bindTemplate'];this[_0x36ca('0xf')]({'tag':'div','attributes':{'class':['ck',_0x36ca('0xa'),_0x36ca('0xb'),_0x1cf353['if'](_0x36ca('0x17'),_0x36ca('0x4'))],'tabindex':-0x1},'children':this[_0x36ca('0x12')]});}['render'](){super[_0x36ca('0x7')](),this[_0x36ca('0x8')][_0x36ca('0x6')](this[_0x36ca('0xd')]),this[_0x36ca('0x0')]['listenTo'](this[_0x36ca('0xd')]),this[_0x36ca('0x15')][_0x36ca('0x10')](this['element']);}['destroy'](){this[_0x36ca('0x12')][_0x36ca('0x16')](),this[_0x36ca('0x0')][_0x36ca('0x3')](),this[_0x36ca('0x8')][_0x36ca('0x3')](),this['_mutationObserver'][_0x36ca('0x19')](),super['destroy']();}[_0x36ca('0x13')](){this[_0x36ca('0xd')][_0x36ca('0x13')]();}['_updateHeight'](){const _0x527b91=this[_0x36ca('0xd')][_0x36ca('0x5')];_0x527b91&&(this[_0x36ca('0xe')]=_0x527b91);}}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module comments/annotations/view/sidebaritemview
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
7
7
|
/**
|
|
8
8
|
* A wrapper view that wraps given {@link module:ui/view~View} to display it as a {@link module:comments/annotations/sidebar~Sidebar} item.
|
|
9
9
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3808=['setTemplate','bottom','updateHeight','ck-sidebar-item','content','isAnimationDisabled','_targetTop','set','bind','createCollection','top','bindTemplate','div','destroy','detach','_mutationObserver','height','clear','render','element'];(function(_0x17828b,_0x3808e8){const _0x3cce8b=function(_0x4db904){while(--_0x4db904){_0x17828b['push'](_0x17828b['shift']());}};_0x3cce8b(++_0x3808e8);}(_0x3808,0xc6));const _0x3cce=function(_0x17828b,_0x3808e8){_0x17828b=_0x17828b-0x0;let _0x3cce8b=_0x3808[_0x17828b];return _0x3cce8b;};import{View as _0x13292e}from'ckeditor5/src/ui.js';import{toUnit as _0x2a4ab5}from'ckeditor5/src/utils.js';import _0x5eb6e4 from'../../utils/createmutationobserver.js';const At=_0x2a4ab5('px');export default class C extends _0x13292e{constructor(_0x596be){super(_0x596be),this[_0x3cce('0x9')](_0x3cce('0xc'),0x0),this[_0x3cce('0x9')]('height',0x0),this[_0x3cce('0xa')](_0x3cce('0x3'))['to'](this,'top',this,'height',(_0x1f6d28,_0x20d88d)=>_0x1f6d28+_0x20d88d),this[_0x3cce('0x9')]('isAnimationDisabled',!0x1),this[_0x3cce('0x11')]=_0x5eb6e4(()=>this['updateHeight']()),this[_0x3cce('0x8')]=null,this[_0x3cce('0x6')]=this[_0x3cce('0xb')]();const _0x1e75fe=this[_0x3cce('0xd')];this[_0x3cce('0x2')]({'tag':_0x3cce('0xe'),'attributes':{'class':[_0x3cce('0x5'),_0x1e75fe['to'](_0x3cce('0x7'),_0x29507f=>_0x29507f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1e75fe['to'](_0x3cce('0xc'),_0x8ae6ea=>At(_0x8ae6ea))}},'children':this[_0x3cce('0x6')]});}[_0x3cce('0x0')](){super['render'](),this[_0x3cce('0x11')]['attach'](this[_0x3cce('0x1')]);}[_0x3cce('0x4')](){const _0x160057=this[_0x3cce('0x1')]['clientHeight'];_0x160057&&(this[_0x3cce('0x12')]=_0x160057);}[_0x3cce('0xf')](){this[_0x3cce('0x6')][_0x3cce('0x13')](),this[_0x3cce('0x11')][_0x3cce('0x10')](),super[_0x3cce('0xf')]();}}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module comments/annotations/view/sidebarview
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
6
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
5
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
7
7
|
import '../../../theme/sidebar.css';
|
|
8
8
|
/**
|
|
9
9
|
* The sidebar view class that displays the collection of sidebar item views.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2dce=['createCollection','list','setTemplate','ck-reset','bindTemplate','div','number','class','ck-sidebar','set','minHeight'];(function(_0x4e4e4c,_0x2dce1e){const _0x96a86a=function(_0xc7d638){while(--_0xc7d638){_0x4e4e4c['push'](_0x4e4e4c['shift']());}};_0x96a86a(++_0x2dce1e);}(_0x2dce,0x1ad));const _0x96a8=function(_0x4e4e4c,_0x2dce1e){_0x4e4e4c=_0x4e4e4c-0x0;let _0x96a86a=_0x2dce[_0x4e4e4c];return _0x96a86a;};import{View as _0x4fc690}from'ckeditor5/src/ui.js';import{toUnit as _0x80d4a}from'ckeditor5/src/utils.js';import'../../../theme/sidebar.css';const At=_0x80d4a('px');export default class T extends _0x4fc690{constructor(_0xd5f2cc){super(_0xd5f2cc);const _0x4a8385=this[_0x96a8('0x4')];this[_0x96a8('0x9')]('minHeight',0x0),this['set'](_0x96a8('0x7'),''),this['list']=this[_0x96a8('0x0')](),this[_0x96a8('0x2')]({'tag':_0x96a8('0x5'),'attributes':{'class':['ck',_0x96a8('0x8'),_0x96a8('0x3'),_0x4a8385['to'](_0x96a8('0x7'))],'style':{'minHeight':_0x4a8385['to'](_0x96a8('0xa'),_0x96fa73=>_0x96a8('0x6')==typeof _0x96fa73?At(_0x96fa73+0xa):null)}},'children':this[_0x96a8('0x1')]});}}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module comments/annotations/widesidebar
|
|
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 type Annotation from './annotation';
|
|
9
|
-
import type { default as AnnotationCollection } from './annotationcollection';
|
|
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 type Annotation from './annotation.js';
|
|
9
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
10
10
|
/**
|
|
11
11
|
* The wide sidebar UI for displaying annotations.
|
|
12
12
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x29cd=['_editorAnnotations','off','WideSidebar','ck-sidebar--wide','change:container','remove','refreshPositioning','blur','ready','setActiveAnnotation','activeAnnotation','switchTo','register','_integrateWithEditorAnnotations','stopListening','set:container','detach','addEventListener','destroy','context','widesidebar-attach-already-attached','cancel','editors','uiUpdate','from','updateTargetRect','_destroyEditorAnnotationsIntegration','widesidebar-detach-not-attached','high','focus','_annotations','refresh','listenTo','add','EditorAnnotations','isAttached','getOrderedSelectedAnnotations','get','pluginName','container','has','plugins','_refreshPositioningDebounced','annotations','attach'];(function(_0xd10482,_0x29cd27){const _0x1e6c4f=function(_0x3542ab){while(--_0x3542ab){_0xd10482['push'](_0xd10482['shift']());}};_0x1e6c4f(++_0x29cd27);}(_0x29cd,0x9a));const _0x1e6c=function(_0xd10482,_0x29cd27){_0xd10482=_0xd10482-0x0;let _0x1e6c4f=_0x29cd[_0xd10482];return _0x1e6c4f;};import{ContextPlugin as _0x4fcc85,Context as _0x5c9a4d}from'ckeditor5/src/core.js';import _0x7c084 from'./annotationsuis.js';import _0x3b50f8 from'./sidebar.js';import{CKEditorError as _0x208568,Collection as _0x26e260}from'ckeditor5/src/utils.js';import{debounce as _0x365e6a}from'lodash-es';import _0x543e5d from'./editorannotations.js';export default class n extends _0x4fcc85{static get['requires'](){return[_0x3b50f8,_0x7c084];}static get[_0x1e6c('0x13')](){return _0x1e6c('0x1c');}constructor(_0x994934){super(_0x994934),this['isAttached']=!0x1,this['set'](_0x1e6c('0x24'),null),this[_0x1e6c('0x18')]=null,this[_0x1e6c('0x1a')]=new _0x26e260(),this[_0x1e6c('0x17')]=_0x365e6a(()=>{this['annotations'][_0x1e6c('0x20')]();},0xfa,{'leading':!0x1});}['init'](){const _0x1f21f2=this[_0x1e6c('0x0')]['plugins'][_0x1e6c('0x12')](_0x7c084),_0x5d0a7e=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);_0x1f21f2[_0x1e6c('0x26')]('wideSidebar',this),_0x5d0a7e[_0x1e6c('0x14')]&&_0x1f21f2[_0x1e6c('0x25')]('wideSidebar');}[_0x1e6c('0x23')](_0x569aff){if(_0x569aff===this['activeAnnotation'])return;const _0x241825=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);_0x241825['_activeAnnotation']=_0x569aff;const _0x24bed7=this[_0x1e6c('0x24')];this[_0x1e6c('0x24')]=_0x569aff,_0x241825[_0x1e6c('0xc')]({'blurredAnnotation':_0x24bed7,'activatedAnnotation':this['activeAnnotation']});}[_0x1e6c('0x19')](_0x2ef3cd){this[_0x1e6c('0x18')]=_0x2ef3cd;const _0x3bcc4e=this[_0x1e6c('0x0')][_0x1e6c('0x16')][_0x1e6c('0x12')](_0x3b50f8);if(_0x3bcc4e[_0x1e6c('0xb')]=_0x2ef3cd,this[_0x1e6c('0x10')])throw new _0x208568(_0x1e6c('0x1'),this);this['isAttached']=!0x0,this['listenTo'](_0x3bcc4e,_0x1e6c('0x29'),()=>{this[_0x1e6c('0x2a')](),this[_0x1e6c('0xd')](_0x3bcc4e,_0x1e6c('0x1e'),_0x2e7e94=>{_0x2e7e94[_0x1e6c('0x1b')](),this[_0x1e6c('0x19')](_0x2ef3cd);});}),_0x3bcc4e['_attachToContainer']({'viewClass':_0x1e6c('0x1d')});const _0x2cf81c=_0x19c973=>{_0x19c973[_0x1e6c('0x6')](),_0x3bcc4e['addAnnotation'](_0x19c973);};for(const _0x3f59f1 of _0x2ef3cd)_0x2cf81c(_0x3f59f1);this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0xe'),(_0x5f571e,_0x349241)=>{_0x2cf81c(_0x349241);}),this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0x1f'),(_0x89c9ce,_0x8c987f,_0x55698f)=>{_0x3bcc4e['rearrange']({'removedAnnotation':_0x8c987f,'previousAnnotation':_0x2ef3cd[_0x1e6c('0x12')](_0x55698f-0x1),'nextAnnotation':_0x2ef3cd[_0x1e6c('0x12')](_0x55698f+0x1)}),_0x8c987f===this[_0x1e6c('0x24')]&&this[_0x1e6c('0x23')](null);},{'priority':_0x1e6c('0x9')}),this[_0x1e6c('0xd')](_0x2ef3cd,_0x1e6c('0xa'),(_0x3b1752,_0x590285)=>{this[_0x1e6c('0x23')](_0x590285);}),this['listenTo'](_0x2ef3cd,_0x1e6c('0x21'),()=>{this[_0x1e6c('0x23')](null);});const _0x2f2e0c=this[_0x1e6c('0x0')]instanceof _0x5c9a4d?this['context'][_0x1e6c('0x3')]:new _0x26e260([this[_0x1e6c('0x0')]]);for(const _0x59bc04 of _0x2f2e0c)this['_integrateWithEditorAnnotations'](_0x59bc04);this[_0x1e6c('0xd')](_0x2f2e0c,'add',(_0x424a36,_0x10bb52)=>{this[_0x1e6c('0xd')](_0x10bb52,_0x1e6c('0x22'),()=>{this[_0x1e6c('0x27')](_0x10bb52);});}),this['listenTo'](_0x2f2e0c,_0x1e6c('0x1f'),(_0x431edd,_0x56f6b5)=>{_0x56f6b5[_0x1e6c('0x16')][_0x1e6c('0x15')](_0x1e6c('0xf'))&&this['_destroyEditorAnnotationsIntegration'](_0x56f6b5['plugins'][_0x1e6c('0x12')](_0x1e6c('0xf')));}),window[_0x1e6c('0x2b')]('resize',this[_0x1e6c('0x17')]),this['annotations']['refreshPositioning']();}['detach'](){if(!this[_0x1e6c('0x10')])throw new _0x208568(_0x1e6c('0x8'),this);this[_0x1e6c('0x23')](null);const _0x71b003=this[_0x1e6c('0x0')][_0x1e6c('0x16')]['get'](_0x3b50f8);_0x71b003['_detachFromContainer'](this[_0x1e6c('0x18')]),this['stopListening'](_0x71b003),this[_0x1e6c('0x28')](this['annotations']),this[_0x1e6c('0x0')]instanceof _0x5c9a4d&&this[_0x1e6c('0x28')](this[_0x1e6c('0x0')][_0x1e6c('0x3')]);for(const _0x40eba9 of Array[_0x1e6c('0x5')](this[_0x1e6c('0x1a')]))this[_0x1e6c('0x7')](_0x40eba9);window['removeEventListener']('resize',this[_0x1e6c('0x17')]),this['_refreshPositioningDebounced'][_0x1e6c('0x2')](),this['activeAnnotation']=null,this[_0x1e6c('0x10')]=!0x1,this[_0x1e6c('0x18')]=null;}[_0x1e6c('0x2c')](){this[_0x1e6c('0x10')]&&this[_0x1e6c('0x2a')]();}[_0x1e6c('0x27')](_0xe09982){const _0x504b47=_0xe09982['plugins']['get'](_0x543e5d);if(!_0x504b47)return;const _0x5bf97f=()=>{const _0x382720=_0x504b47[_0x1e6c('0x11')]({'annotations':this[_0x1e6c('0x18')],'activeAnnotation':this[_0x1e6c('0x24')]});this[_0x1e6c('0x23')](_0x382720[0x0]||null);};this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0xc'),_0x5bf97f),this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0x21'),(_0x5ae6fe,{isAnnotationTracked:_0x13055a})=>{this['activeAnnotation']&&_0x13055a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this[_0x1e6c('0xd')](_0x504b47,_0x1e6c('0x4'),()=>{this[_0x1e6c('0x17')]();}),this[_0x1e6c('0xd')](this[_0x1e6c('0x18')],_0x1e6c('0x21'),_0x569bd8=>{_0x504b47['hasDomSelection']()&&(_0x5bf97f(),_0x569bd8['stop']());},{'priority':'high'}),this[_0x1e6c('0x1a')][_0x1e6c('0xe')](_0x504b47);}[_0x1e6c('0x7')](_0x595f76){this['stopListening'](_0x595f76),this[_0x1e6c('0x1a')][_0x1e6c('0x1f')](_0x595f76);}}
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
|
|
1
|
+
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index.js';
|
|
2
2
|
declare module '@ckeditor/ckeditor5-core' {
|
|
3
3
|
interface EditorConfig {
|
|
4
4
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module comments/comments/addcommentthreadcommand
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Command } from 'ckeditor5/src/core';
|
|
5
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
6
6
|
/**
|
|
7
7
|
* Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
|
|
8
8
|
* Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1935=['_trimToContent','editor','createRange','refresh','change','addMarker','$textProxy','getLastMatchingPosition','backward','_hasContent','start','getItems','end','isObject','execute','document','_itemIsContent','element','model','push','selection','isEnabled','substr','getRanges','schema'];(function(_0x268abd,_0x1935f6){const _0x467eee=function(_0x45b5bb){while(--_0x45b5bb){_0x268abd['push'](_0x268abd['shift']());}};_0x467eee(++_0x1935f6);}(_0x1935,0x106));const _0x467e=function(_0x268abd,_0x1935f6){_0x268abd=_0x268abd-0x0;let _0x467eee=_0x1935[_0x268abd];return _0x467eee;};import{Command as _0x38ca43}from'ckeditor5/src/core.js';import{uid as _0x23bad3}from'ckeditor5/src/utils.js';export default class G extends _0x38ca43{[_0x467e('0x10')](){const _0x464986=this['editor'][_0x467e('0x6')][_0x467e('0x3')]['selection'];for(const _0x10798c of _0x464986[_0x467e('0xb')]())if(this[_0x467e('0x16')](_0x10798c))return void(this[_0x467e('0x9')]=!0x0);this[_0x467e('0x9')]=!0x1;}[_0x467e('0x2')]({threadId:_0x38e8f2=_0x23bad3()}={}){const _0x47c3cb=this['editor'][_0x467e('0x6')],_0x3260e9=[];for(const _0x4ac0d7 of _0x47c3cb[_0x467e('0x3')][_0x467e('0x8')]['getRanges']())this[_0x467e('0x16')](_0x4ac0d7)&&_0x3260e9[_0x467e('0x7')](this[_0x467e('0xd')](_0x4ac0d7));_0x47c3cb[_0x467e('0x11')](_0x47bf1c=>{for(const _0x488f4d of _0x3260e9){const _0x4f7e4d=_0x23bad3()[_0x467e('0xa')](0x1,0x5),_0x30dadc='comment:'+_0x38e8f2+':'+_0x4f7e4d;_0x47bf1c[_0x467e('0x12')](_0x30dadc,{'range':_0x488f4d,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x467e('0x16')](_0x52e0c6){for(const _0x34e374 of _0x52e0c6[_0x467e('0x18')]())if(this['_itemIsContent'](_0x34e374))return!0x0;return!0x1;}[_0x467e('0x4')](_0x303968){return _0x303968['is'](_0x467e('0x13'))||this['editor'][_0x467e('0x6')][_0x467e('0xc')][_0x467e('0x1')](_0x303968)&&!_0x303968['is'](_0x467e('0x5'),'tableCell');}[_0x467e('0xd')](_0x49ea6a){const _0x519c6c=_0x1692e6=>!this[_0x467e('0x4')](_0x1692e6['item']),_0x11feb1=_0x49ea6a[_0x467e('0x17')][_0x467e('0x14')](_0x519c6c),_0x240b09=_0x49ea6a[_0x467e('0x0')][_0x467e('0x14')](_0x519c6c,{'direction':_0x467e('0x15')});return this[_0x467e('0xe')]['model'][_0x467e('0xf')](_0x11feb1,_0x240b09);}}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @module comments/comments/commentsarchive
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
7
|
-
import CommentsRepository, { type CommentThread } from './commentsrepository';
|
|
8
|
-
import Annotations from '../annotations/annotations';
|
|
5
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
7
|
+
import CommentsRepository, { type CommentThread } from './commentsrepository.js';
|
|
8
|
+
import Annotations from '../annotations/annotations.js';
|
|
9
9
|
/**
|
|
10
10
|
* This plugin handles all operations on resolved threads needed for the comments archive.
|
|
11
11
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x47a6=['collection','pluginName','CommentsArchive','has','addCommentThread','highest','isActive','focus','remove','reopenCommentThread','listenTo','context','findIndex','requires','removeCommentThread','resolvedThreads','add','plugins','resolveCommentThread','get','getCommentThread','init','activate','_calculatePosition'];(function(_0x20f79f,_0x47a6b8){const _0x3febb0=function(_0x5d2791){while(--_0x5d2791){_0x20f79f['push'](_0x20f79f['shift']());}};_0x3febb0(++_0x47a6b8);}(_0x47a6,0xee));const _0x3feb=function(_0x20f79f,_0x47a6b8){_0x20f79f=_0x20f79f-0x0;let _0x3febb0=_0x47a6[_0x20f79f];return _0x3febb0;};import{ContextPlugin as _0x35eaa9}from'ckeditor5/src/core.js';import{Collection as _0x190c74}from'ckeditor5/src/utils.js';import _0x35d740 from'./commentsrepository.js';import _0x396880 from'../annotations/annotations.js';export default class p extends _0x35eaa9{static get[_0x3feb('0x3')](){return _0x3feb('0x4');}static get[_0x3feb('0xf')](){return[_0x35d740,_0x396880];}constructor(_0x4f9cec){super(_0x4f9cec),this[_0x3feb('0x11')]=new _0x190c74();}[_0x3feb('0x17')](){const _0x47e8bf=this[_0x3feb('0xd')],_0x5b0490=_0x47e8bf[_0x3feb('0x13')]['get'](_0x35d740),_0x528cd7=_0x47e8bf[_0x3feb('0x13')][_0x3feb('0x15')](_0x396880);this['listenTo'](_0x5b0490,_0x3feb('0x6'),(_0x547b7a,{threadId:_0x26c9dc,resolvedAt:_0x4d6b8c,deletedAt:_0x1ba313})=>{if(_0x4d6b8c&&!_0x1ba313){const _0x4123be=_0x5b0490[_0x3feb('0x16')](_0x26c9dc);this['resolvedThreads'][_0x3feb('0x12')](_0x4123be,this[_0x3feb('0x1')](_0x4d6b8c));}}),this[_0x3feb('0xc')](_0x5b0490,_0x3feb('0x14'),(_0x4a1b2a,{threadId:_0x41ebf2,resolvedAt:_0x4fa788})=>{const _0x5cb25e=_0x5b0490[_0x3feb('0x16')](_0x41ebf2);this['resolvedThreads'][_0x3feb('0x12')](_0x5cb25e,this[_0x3feb('0x1')](_0x4fa788));},{'priority':_0x3feb('0x7')}),this[_0x3feb('0xc')](_0x5b0490,_0x3feb('0xb'),(_0x5b34a5,{threadId:_0x5b6a5a})=>{const _0x22dabb=_0x5b0490['getCommentThread'](_0x5b6a5a);this[_0x3feb('0x11')]['has'](_0x22dabb)&&this['resolvedThreads'][_0x3feb('0xa')](_0x22dabb);},{'priority':_0x3feb('0x7')}),this[_0x3feb('0xc')](_0x5b0490,_0x3feb('0x10'),(_0x486940,{threadId:_0x4ec05f})=>{const _0x311668=_0x5b0490[_0x3feb('0x16')](_0x4ec05f);this[_0x3feb('0x11')][_0x3feb('0x5')](_0x311668)&&this['resolvedThreads'][_0x3feb('0xa')](_0x311668);},{'priority':'highest'}),this[_0x3feb('0xc')](_0x528cd7[_0x3feb('0x2')],_0x3feb('0x9'),(_0x1dc354,_0x3560e0)=>{_0x3560e0[_0x3feb('0x8')]=!0x0,_0x528cd7[_0x3feb('0x0')](_0x3560e0);});}[_0x3feb('0x1')](_0x39acca){const _0x4a9a86=[...this['resolvedThreads']][_0x3feb('0xe')](_0x57c2db=>_0x57c2db['resolvedAt']<_0x39acca);return _0x4a9a86>-0x1?_0x4a9a86:this[_0x3feb('0x11')]['length'];}}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
5
|
import '../../theme/commentsarchive.css';
|
|
6
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
7
|
-
import { ViewCollection } from 'ckeditor5/src/ui';
|
|
8
|
-
import CommentsArchiveView from './ui/view/commentsarchiveview';
|
|
9
|
-
import CommentsArchive from './commentsarchive';
|
|
10
|
-
import type AnnotationView from '../annotations/view/annotationview';
|
|
6
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
7
|
+
import { ViewCollection } from 'ckeditor5/src/ui.js';
|
|
8
|
+
import CommentsArchiveView from './ui/view/commentsarchiveview.js';
|
|
9
|
+
import CommentsArchive from './commentsarchive.js';
|
|
10
|
+
import type AnnotationView from '../annotations/view/annotationview.js';
|
|
11
11
|
/**
|
|
12
12
|
* Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
|
|
13
13
|
* resolved comment thread annotation views.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4b6b=['_pendingThreads','focusTracker','channelId','_calculatePosition','mainView','resolvedThreads','push','contains','_visibleAnnotations','length','plugins','commentsArchive','findIndex','splice','stopListening','commentsArchiveView','view','getByInnerView','find','classList','listenTo','add','set','componentFactory','indexOf','config','_handleAnnotationFocusableElements','remove','resolvedAt','_threadToController','ck-body','isVisible','CommentsRepository','_createArchiveUIDropdown','buttonView','Annotations','extendTemplate','locale','position','filter','CommentsArchiveUI','annotationViews','focusableElements','init','collaboration.channelId','children','get','panelView','ck-comments-archive-dropdown','requires','collection','innerView','editor'];(function(_0x23edbf,_0x4b6bfb){const _0x31b644=function(_0x1d7538){while(--_0x1d7538){_0x23edbf['push'](_0x23edbf['shift']());}};_0x31b644(++_0x4b6bfb);}(_0x4b6b,0xfb));const _0x31b6=function(_0x23edbf,_0x4b6bfb){_0x23edbf=_0x23edbf-0x0;let _0x31b644=_0x4b6b[_0x23edbf];return _0x31b644;};import'../../theme/commentsarchive.css';import{Plugin as _0x1386cf}from'ckeditor5/src/core.js';import{createDropdown as _0xfdd7ae,ViewCollection as _0x2d96d7}from'ckeditor5/src/ui.js';import _0x17cb7e from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x191d55}from'../utils/common-translations.js';import _0x38ebbf from'./ui/view/commentsarchiveview.js';import _0x77ef81 from'./commentsarchive.js';export default class a extends _0x1386cf{static get['pluginName'](){return _0x31b6('0x1');}static get[_0x31b6('0xa')](){return[_0x77ef81];}constructor(_0x267e83){super(_0x267e83),this[_0x31b6('0x2')]=new _0x2d96d7(),this[_0x31b6('0xe')]=[];}[_0x31b6('0x4')](){this['editor']['ui'][_0x31b6('0x25')]['add'](_0x31b6('0x19'),()=>this[_0x31b6('0x2f')]());const _0x5a19c1=this[_0x31b6('0xd')][_0x31b6('0x18')][_0x31b6('0x7')](_0x77ef81),_0x3da6fa=this['editor'][_0x31b6('0x18')][_0x31b6('0x7')]('Annotations'),_0x3b85e5=this[_0x31b6('0xd')][_0x31b6('0x18')]['get'](_0x31b6('0x2e'));this[_0x31b6('0x22')](_0x5a19c1[_0x31b6('0x13')],_0x31b6('0x23'),(_0x26c432,_0x26b00a)=>{const _0x2f7e3f=this[_0x31b6('0xd')]['config']['get']('collaboration.channelId');if(!_0x2f7e3f||_0x26b00a[_0x31b6('0x10')]===_0x2f7e3f){const _0x24bfe3=this[_0x31b6('0x11')](_0x26b00a[_0x31b6('0x2a')]),_0x1c7895=_0x3b85e5[_0x31b6('0x2b')][_0x31b6('0x7')](_0x26b00a);if(!_0x1c7895)return void this[_0x31b6('0xe')][_0x31b6('0x14')]({'thread':_0x26b00a,'position':_0x24bfe3});const _0xd07772=_0x3da6fa[_0x31b6('0x1f')](_0x1c7895[_0x31b6('0x1e')]);_0xd07772[_0x31b6('0x2d')]&&_0x3da6fa[_0x31b6('0x16')]['remove'](_0xd07772),this[_0x31b6('0x2')][_0x31b6('0x23')](_0xd07772['view'],_0x24bfe3);}}),this[_0x31b6('0x22')](_0x3da6fa[_0x31b6('0xb')],_0x31b6('0x23'),(_0x3e0c74,_0x379a8d)=>{const _0xece318=this[_0x31b6('0xe')][_0x31b6('0x20')](({thread:_0x1d1e76})=>{const _0x2b85e5=_0x3b85e5['_threadToController'][_0x31b6('0x7')](_0x1d1e76);return _0x2b85e5&&_0x379a8d[_0x31b6('0xc')]===_0x2b85e5[_0x31b6('0x1e')];});_0xece318&&(this[_0x31b6('0x2')][_0x31b6('0x23')](_0x379a8d[_0x31b6('0x1e')],_0xece318[_0x31b6('0x34')]),this[_0x31b6('0xe')][_0x31b6('0x1b')](this[_0x31b6('0xe')][_0x31b6('0x26')](_0xece318),0x1));}),this['listenTo'](_0x5a19c1[_0x31b6('0x13')],_0x31b6('0x29'),(_0x3ff7dd,_0x4e2cf2)=>{const _0x419f80=this[_0x31b6('0xd')][_0x31b6('0x27')]['get'](_0x31b6('0x5'));if(!_0x419f80||_0x4e2cf2[_0x31b6('0x10')]===_0x419f80){const _0x2e6b34=_0x3b85e5[_0x31b6('0x2b')][_0x31b6('0x7')](_0x4e2cf2),_0x1427e4=_0x3da6fa[_0x31b6('0x1f')](_0x2e6b34['view']);this[_0x31b6('0x2')][_0x31b6('0x29')](_0x1427e4[_0x31b6('0x1e')]),this[_0x31b6('0x1c')](_0x1427e4[_0x31b6('0x3')]);}});}[_0x31b6('0x28')](_0x1c0613,_0x311ccc){for(const _0x42b52c of _0x311ccc[_0x31b6('0x3')])_0x42b52c[_0x31b6('0x21')][_0x31b6('0x15')](_0x31b6('0x2c'))&&_0x1c0613['focusTracker']['add'](_0x42b52c);this[_0x31b6('0x22')](_0x311ccc[_0x31b6('0x3')],_0x31b6('0x23'),(_0x1c47ec,_0x91b671)=>{_0x91b671['classList']['contains'](_0x31b6('0x2c'))&&_0x1c0613[_0x31b6('0xf')][_0x31b6('0x23')](_0x91b671);}),this[_0x31b6('0x22')](_0x311ccc[_0x31b6('0x3')],_0x31b6('0x29'),(_0x131334,_0xa4cd41)=>{_0xa4cd41[_0x31b6('0x21')][_0x31b6('0x15')]('ck-body')&&_0x1c0613[_0x31b6('0xf')][_0x31b6('0x29')](_0xa4cd41);});}[_0x31b6('0x11')](_0x39932f){const _0x356fa3=this[_0x31b6('0xd')][_0x31b6('0x27')][_0x31b6('0x7')](_0x31b6('0x5')),_0x2b1844=[...this[_0x31b6('0xd')][_0x31b6('0x18')][_0x31b6('0x7')](_0x77ef81)[_0x31b6('0x13')]][_0x31b6('0x0')](_0x5a5cac=>_0x5a5cac[_0x31b6('0x10')]!==_0x356fa3)[_0x31b6('0x1a')](_0x55fb89=>_0x55fb89['resolvedAt']<_0x39932f);return _0x2b1844>-0x1?_0x2b1844:this[_0x31b6('0x2')][_0x31b6('0x17')];}['_createArchiveUIDropdown'](){const _0x54c79f=this['editor'],_0x4dabd3=this['editor'][_0x31b6('0x18')][_0x31b6('0x7')](_0x31b6('0x31')),_0x113829=_0xfdd7ae(_0x54c79f[_0x31b6('0x33')]);_0x113829[_0x31b6('0x30')][_0x31b6('0x24')]({'icon':_0x17cb7e,'label':_0x191d55(_0x54c79f[_0x31b6('0x33')],'COMMENTS_ARCHIVE'),'tooltip':!0x0}),_0x113829[_0x31b6('0x8')][_0x31b6('0x32')]({'attributes':{'class':_0x31b6('0x9')}}),_0x113829['on']('change:isOpen',(_0xad8937,_0x1a7a45,_0x14fea2)=>{this[_0x31b6('0x1d')]||(this[_0x31b6('0x1d')]=new _0x38ebbf(_0x54c79f[_0x31b6('0x33')],this[_0x31b6('0x2')])),_0x14fea2?_0x113829[_0x31b6('0x8')][_0x31b6('0x6')][_0x31b6('0x23')](this[_0x31b6('0x1d')]):_0x113829[_0x31b6('0x8')]['children'][_0x31b6('0x29')](this[_0x31b6('0x1d')]);});for(const _0x1138be of this['annotationViews']){const _0x335af6=_0x4dabd3[_0x31b6('0x1f')](_0x1138be[_0x31b6('0x12')]);this[_0x31b6('0x28')](_0x113829,_0x335af6);}return _0x113829[_0x31b6('0x22')](this['annotationViews'],_0x31b6('0x23'),(_0x2b1ab6,_0x288706)=>{const _0x14b209=_0x4dabd3[_0x31b6('0x1f')](_0x288706[_0x31b6('0x12')]);this[_0x31b6('0x28')](_0x113829,_0x14b209);}),_0x113829['listenTo'](this['annotationViews'],_0x31b6('0x29'),(_0x4e4547,_0x4385c6)=>{const _0x919a24=_0x4dabd3[_0x31b6('0x1f')](_0x4385c6[_0x31b6('0x12')]);for(const _0x50118f of _0x919a24['focusableElements'])_0x50118f[_0x31b6('0x21')]['contains']('ck-body')&&_0x113829[_0x31b6('0xf')]['remove'](_0x50118f);}),_0x113829;}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module comments/comments/commentsediting
|
|
3
3
|
*/
|
|
4
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
5
|
-
import type { Marker } from 'ckeditor5/src/engine';
|
|
6
|
-
import CommentsRepository from './commentsrepository';
|
|
7
|
-
import EditorAnnotations from '../annotations/editorannotations';
|
|
8
|
-
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode';
|
|
4
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
5
|
+
import type { Marker } from 'ckeditor5/src/engine.js';
|
|
6
|
+
import CommentsRepository from './commentsrepository.js';
|
|
7
|
+
import EditorAnnotations from '../annotations/editorannotations.js';
|
|
8
|
+
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode.js';
|
|
9
9
|
import '../../theme/commentmarker.css';
|
|
10
|
-
import CommentsImportWord from './integrations/importword';
|
|
10
|
+
import CommentsImportWord from './integrations/importword.js';
|
|
11
11
|
/**
|
|
12
12
|
* Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
|
|
13
13
|
* {@link module:engine/model/markercollection~Marker comment markers}.
|