@ckeditor/ckeditor5-comments 0.0.0-nightly-20231215.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
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @module comments/annotations/sidebar
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import type { View } from 'ckeditor5/src/ui';
|
|
11
|
-
import SidebarView from './view/sidebarview';
|
|
12
|
-
import SidebarItemView from './view/sidebaritemview';
|
|
13
|
-
import type Annotation from './annotation';
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { View } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import SidebarView from './view/sidebarview.js';
|
|
12
|
+
import SidebarItemView from './view/sidebaritemview.js';
|
|
13
|
+
import type Annotation from './annotation.js';
|
|
14
14
|
/**
|
|
15
15
|
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
16
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x37df=['list','getSidebarItemView','refresh','Sidebar','bind','_getMaxAvailableTop','container','_createSidebarView','_recalculateBuffer','init','_annotationToSidebarItemView','context','isAnimationDisabled','pluginName','_spaceBetweenItems','_getItemAfter','view','change:_lastItem','_targetTop','define','_sidebarItemViewToAnnotation','top','_destroySidebarItemView','rearrange','_updateLastItem','_recalculate','render','_getTargetTop','clear','_detachFromContainer','target','set','_setItemTop','get','change:top','setContainer','_lastItem','_getItemBefore','_alignBeforeItem','listenTo','_alignToTargetRect','_activeAnnotation','targetRect','bottom','destroy','last','length','_alignAfterItem','_attachToContainer','unbind','content','_alignForBottomChange','minHeight','remove','sidebar-setcontainer-invalid-element','sidebar.preventScrollOutOfView','_alignForTopChange','element','addAnnotation','config','_annotations','locale','height','getIndex','stopListening','max','add','updateHeight'];(function(_0x464d37,_0x37dfa9){const _0x3e659c=function(_0x4586c5){while(--_0x4586c5){_0x464d37['push'](_0x464d37['shift']());}};_0x3e659c(++_0x37dfa9);}(_0x37df,0x18b));const _0x3e65=function(_0x464d37,_0x37dfa9){_0x464d37=_0x464d37-0x0;let _0x3e659c=_0x37df[_0x464d37];return _0x3e659c;};import{ContextPlugin as _0x1638af}from'ckeditor5/src/core.js';import{Rect as _0x13578f,CKEditorError as _0x11b4bf}from'ckeditor5/src/utils.js';import _0x212e6f from'./view/sidebarview.js';import _0x498100 from'./view/sidebaritemview.js';export default class z extends _0x1638af{static get[_0x3e65('0x1a')](){return _0x3e65('0x10');}constructor(_0x5b3a8f){super(_0x5b3a8f),this[_0x3e65('0x2c')]('_lastItem',void 0x0),this['view']=this[_0x3e65('0x14')](),this[_0x3e65('0x2c')]('container',null),this[_0x3e65('0x1b')]=0x19,this[_0x3e65('0x21')]=new Map(),this['_annotationToSidebarItemView']=new Map(),this[_0x3e65('0x18')][_0x3e65('0x4')][_0x3e65('0x20')](_0x3e65('0x0'),!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}[_0x3e65('0x16')](){const _0x549a1b=this[_0x3e65('0x18')][_0x3e65('0x4')]['get']('sidebar.container');_0x549a1b&&this[_0x3e65('0x30')](_0x549a1b);}[_0x3e65('0x30')](_0x5f27cf){if(!y(_0x5f27cf))throw new _0x11b4bf(_0x3e65('0x43'));this[_0x3e65('0x13')]=_0x5f27cf;}[_0x3e65('0x3d')]({viewClass:_0x47775f='',spaceBetweenItems:_0x393501=0x19}={}){if(!y(this[_0x3e65('0x13')]))throw new _0x11b4bf('sidebar-attachtocontainer-missing-container',this);this[_0x3e65('0x13')]['appendChild'](this['view'][_0x3e65('0x2')]),this[_0x3e65('0x1d')]['class']=_0x47775f,this['_spaceBetweenItems']=_0x393501;}[_0x3e65('0x24')]({removedAnnotation:_0x2a1c4f,previousAnnotation:_0x1999a3,nextAnnotation:_0x347f95}){const _0x187905=this[_0x3e65('0xe')](_0x2a1c4f);this[_0x3e65('0x1d')][_0x3e65('0xd')][_0x3e65('0x42')](_0x187905),this[_0x3e65('0x23')](_0x2a1c4f),_0x1999a3&&this['_alignToTargetRect'](this[_0x3e65('0xe')](_0x1999a3)),_0x347f95&&this[_0x3e65('0x35')](this['getSidebarItemView'](_0x347f95)),this['_updateLastItem']();}[_0x3e65('0xf')]({blurredAnnotation:_0x31819b,activatedAnnotation:_0x28cf40,disableAnimationOnActivatedAnnotation:_0x4882d1}){if(this['_activeAnnotation']=_0x28cf40,_0x31819b){_0x31819b['isActive']=!0x1;const _0x3ca498=this[_0x3e65('0xe')](_0x31819b);_0x3ca498&&_0x4882d1&&(_0x3ca498[_0x3e65('0x19')]=!0x1);}if(_0x28cf40){const _0x149923=this[_0x3e65('0xe')](_0x28cf40);_0x149923&&(_0x28cf40['isActive']=!0x0,_0x4882d1&&(_0x149923[_0x3e65('0x19')]=!0x0,_0x149923[_0x3e65('0x22')]+=0x1),this[_0x3e65('0x35')](_0x149923));}}[_0x3e65('0x2a')](_0xd0cd59){if(this[_0x3e65('0x1d')][_0x3e65('0x2')][_0x3e65('0x42')](),_0xd0cd59)for(const _0x2d3e6c of _0xd0cd59)this['_destroySidebarItemView'](_0x2d3e6c);this[_0x3e65('0x1d')][_0x3e65('0xd')][_0x3e65('0x29')](),this[_0x3e65('0x1d')]['class']='',this[_0x3e65('0x31')]=null;}[_0x3e65('0x3')](_0x140500,_0x42e533){_0x42e533||(_0x42e533=_0x140500['view']);const _0x2f55e6=new _0x498100(this[_0x3e65('0x18')][_0x3e65('0x6')]);this[_0x3e65('0x21')][_0x3e65('0x2c')](_0x2f55e6,_0x140500),this[_0x3e65('0x17')][_0x3e65('0x2c')](_0x140500,_0x2f55e6),_0x2f55e6['content'][_0x3e65('0xb')](_0x42e533),this[_0x3e65('0x34')](_0x140500[_0x3e65('0x1d')],'change:targetRect',(_0x2da963,_0xb9ce1a,_0x4147b0)=>{const _0x4322ee=this[_0x3e65('0x28')](_0x140500,_0x4147b0);_0x2f55e6[_0x3e65('0x1f')]!=_0x4322ee&&(_0x2f55e6[_0x3e65('0x1f')]=_0x4322ee,this['_setItemTop'](_0x2f55e6,_0x4322ee));}),this[_0x3e65('0x34')](_0x2f55e6,_0x3e65('0x2f'),()=>{this['_recalculate'](_0x2f55e6,_0x3e65('0x22'));}),this[_0x3e65('0x34')](_0x2f55e6,'change:bottom',()=>{this[_0x3e65('0x26')](_0x2f55e6,_0x3e65('0x38'));}),this[_0x3e65('0x35')](_0x2f55e6);const _0x27f047=this[_0x3e65('0x32')](_0x2f55e6);if(_0x27f047)this['_alignAfterItem'](_0x27f047,_0x2f55e6)||this[_0x3e65('0x35')](_0x2f55e6);else this[_0x3e65('0x35')](_0x2f55e6);return this[_0x3e65('0x25')](),this[_0x3e65('0x1d')]['list'][_0x3e65('0xb')](_0x2f55e6),_0x2f55e6;}[_0x3e65('0x1')](_0x2b1526){if(!_0x2b1526[_0x3e65('0x3f')][_0x3e65('0x3b')])return;const _0x19546c=this[_0x3e65('0x32')](_0x2b1526);if(!_0x19546c)return;const _0x26cf98=this[_0x3e65('0x21')][_0x3e65('0x2e')](_0x19546c),_0x1c0448=this[_0x3e65('0x36')];_0x1c0448&&_0x1c0448===_0x26cf98?this['_alignAfterItem'](_0x19546c,_0x2b1526):this['_alignBeforeItem'](_0x2b1526,_0x19546c);}['_alignForBottomChange'](_0x3a38ac){if(!_0x3a38ac['content'][_0x3e65('0x3b')])return;const _0x28fc21=this[_0x3e65('0x1c')](_0x3a38ac);if(!_0x28fc21)return;const _0x2c534d=this[_0x3e65('0x21')][_0x3e65('0x2e')](_0x28fc21),_0x2f8986=this['context'][_0x3e65('0x4')][_0x3e65('0x2e')](_0x3e65('0x0')),_0x7417c5=this[_0x3e65('0x36')];_0x7417c5&&_0x7417c5===_0x2c534d&&_0x2f8986?(this[_0x3e65('0x33')](_0x28fc21,_0x3a38ac),this[_0x3e65('0x3c')](_0x3a38ac,_0x28fc21)):_0x7417c5&&_0x7417c5===_0x2c534d?this[_0x3e65('0x33')](_0x28fc21,_0x3a38ac):this['_alignAfterItem'](_0x3a38ac,_0x28fc21);}['_recalculate'](_0x19cc57,_0x5d1bf7){0x0===this[_0x3e65('0x15')]['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x19f4b2,changedProp:_0x28b39}of this[_0x3e65('0x15')])'top'===_0x28b39?this['_alignForTopChange'](_0x19f4b2):this[_0x3e65('0x40')](_0x19f4b2);this[_0x3e65('0x15')]=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x19cc57,'changedProp':_0x5d1bf7});}[_0x3e65('0xe')](_0x4a16d2){return this[_0x3e65('0x17')][_0x3e65('0x2e')](_0x4a16d2);}[_0x3e65('0x39')](){this[_0x3e65('0x9')](),this[_0x3e65('0x1d')]['destroy']();}[_0x3e65('0x23')](_0x35f064){const _0x50a4d3=this[_0x3e65('0xe')](_0x35f064);this[_0x3e65('0x9')](_0x50a4d3),this['stopListening'](_0x35f064['view']),_0x50a4d3[_0x3e65('0x39')](),this[_0x3e65('0x17')]['delete'](_0x35f064),this[_0x3e65('0x21')]['delete'](_0x50a4d3);}[_0x3e65('0x14')](){const _0x57b06e=new _0x212e6f(this[_0x3e65('0x18')]['locale']);return _0x57b06e[_0x3e65('0x27')](),this['on'](_0x3e65('0x1e'),(_0x2e1d4b,_0x12fac9,_0x155b74,_0x179505)=>{_0x179505&&_0x57b06e[_0x3e65('0x3e')]('minHeight'),_0x155b74?_0x57b06e[_0x3e65('0x11')](_0x3e65('0x41'))['to'](_0x155b74,_0x3e65('0x38')):_0x57b06e['minHeight']=null;}),_0x57b06e;}[_0x3e65('0x25')](){var _0x35b7f3;this[_0x3e65('0x31')]=(null===(_0x35b7f3=this[_0x3e65('0x5')])||void 0x0===_0x35b7f3?void 0x0:_0x35b7f3[_0x3e65('0x3a')])?this['getSidebarItemView'](this['_annotations'][_0x3e65('0x3a')]):null;}[_0x3e65('0x32')](_0xb9a424){var _0x2abb39;const _0x4fba0a=this[_0x3e65('0x21')][_0x3e65('0x2e')](_0xb9a424),_0x575930=_0x4fba0a&&(null===(_0x2abb39=this[_0x3e65('0x5')])||void 0x0===_0x2abb39?void 0x0:_0x2abb39[_0x3e65('0x2e')](this[_0x3e65('0x5')][_0x3e65('0x8')](_0x4fba0a)-0x1));return _0x575930&&this[_0x3e65('0xe')](_0x575930)||null;}[_0x3e65('0x1c')](_0x12a275){var _0x3d60f8;const _0x2f9fc1=this[_0x3e65('0x21')][_0x3e65('0x2e')](_0x12a275),_0x3efea4=_0x2f9fc1&&(null===(_0x3d60f8=this[_0x3e65('0x5')])||void 0x0===_0x3d60f8?void 0x0:_0x3d60f8['get'](this[_0x3e65('0x5')][_0x3e65('0x8')](_0x2f9fc1)+0x1));return _0x3efea4&&this['getSidebarItemView'](_0x3efea4)||null;}[_0x3e65('0x33')](_0x43f1e8,_0xcb01d5){_0x43f1e8[_0x3e65('0xc')]();const _0x750874=M(_0xcb01d5[_0x3e65('0x38')]+this[_0x3e65('0x1b')],_0x43f1e8[_0x3e65('0x22')]);return!!_0x750874&&(this[_0x3e65('0x2d')](_0xcb01d5,_0xcb01d5[_0x3e65('0x22')]-_0x750874),!0x0);}[_0x3e65('0x3c')](_0x3098b1,_0xc58e67){_0x3098b1[_0x3e65('0xc')]();const _0x3a96ee=M(_0x3098b1['bottom']+this[_0x3e65('0x1b')],_0xc58e67[_0x3e65('0x22')]);return!!_0x3a96ee&&(this[_0x3e65('0x2d')](_0xc58e67,_0xc58e67[_0x3e65('0x22')]+_0x3a96ee,!0x1),!0x0);}[_0x3e65('0x35')](_0x32d387){const _0x36dbaa=this[_0x3e65('0x21')][_0x3e65('0x2e')](_0x32d387);if(!_0x36dbaa||!_0x36dbaa[_0x3e65('0x2b')]||!_0x36dbaa[_0x3e65('0x37')])return;const _0x5d29c8=this['_getTargetTop'](_0x36dbaa,_0x36dbaa[_0x3e65('0x37')]);this[_0x3e65('0x2d')](_0x32d387,_0x5d29c8);}[_0x3e65('0x28')](_0x2e8256,_0x2e5729){if(null===_0x2e5729)return 0x0;if(_0x2e8256[_0x3e65('0x2b')]instanceof _0x13578f)return _0x2e5729[_0x3e65('0x22')];{const _0x1db171=new _0x13578f(this[_0x3e65('0x1d')]['element'])[_0x3e65('0x22')];return _0x2e5729[_0x3e65('0x22')]-_0x1db171;}}[_0x3e65('0x2d')](_0x33e110,_0x1695be,_0x3d1581=this['context']['config']['get'](_0x3e65('0x0'))){_0x3d1581&&(_0x1695be=Math['max'](_0x1695be,this['_getMaxAvailableTop'](_0x33e110))),_0x33e110[_0x3e65('0x22')]=_0x1695be;}[_0x3e65('0x12')](_0x56ae26){let _0x228ac1=this[_0x3e65('0x32')](_0x56ae26),_0x2ce709=0x0;for(;_0x228ac1;)_0x228ac1[_0x3e65('0xc')](),_0x2ce709+=this['_spaceBetweenItems']+_0x228ac1[_0x3e65('0x7')],_0x228ac1=this[_0x3e65('0x32')](_0x228ac1);return _0x2ce709;}}function M(_0xf25c9e,_0x47e506){return Math[_0x3e65('0xa')](_0xf25c9e-_0x47e506,0x0);}function y(_0x514e2a){return null!==_0x514e2a&&'object'==typeof _0x514e2a&&0x1===_0x514e2a['nodeType'];}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module comments/annotations/view/annotationcounterbuttonview
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ButtonView, View } from 'ckeditor5/src/ui';
|
|
10
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { ButtonView, View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
11
11
|
/**
|
|
12
12
|
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
13
13
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4ec9=['number','annotationType','set','counterView','ck-annotation-counter','ck-annotation-counter__badge--edit-mode','icon','children','ck-annotation-counter__badge--','setTemplate','...','add','_badge','span','bindTemplate','toString','extendTemplate','ck-annotation-counter__badge','isDirty'];(function(_0xe45409,_0x4ec958){const _0x3edd2b=function(_0xd570d7){while(--_0xd570d7){_0xe45409['push'](_0xe45409['shift']());}};_0x3edd2b(++_0x4ec958);}(_0x4ec9,0x9f));const _0x3edd=function(_0xe45409,_0x4ec958){_0xe45409=_0xe45409-0x0;let _0x3edd2b=_0x4ec9[_0xe45409];return _0x3edd2b;};import{ButtonView as _0x47a48c,View as _0xa0e6f}from'ckeditor5/src/ui.js';import _0x336ab8 from'../../../theme/icons/add-comment.svg';export default class D extends _0x47a48c{constructor(_0x546254){super(_0x546254);const _0x223dd7=this[_0x3edd('0x7')];this[_0x3edd('0xe')](_0x3edd('0xb'),!0x1),this['set'](_0x3edd('0xc'),0x0),this['bind'](_0x3edd('0x5'))['to'](this,_0x3edd('0xb'),this,_0x3edd('0xc'),(_0x5832b9,_0x4666fa)=>_0x5832b9?_0x3edd('0x3'):_0x4666fa[_0x3edd('0x8')]()),this[_0x3edd('0xe')](_0x3edd('0xd'),''),this[_0x3edd('0x12')]=_0x336ab8,this[_0x3edd('0x9')]({'attributes':{'class':[_0x3edd('0x10')]}}),this['counterView']=new _0xa0e6f(),this['counterView'][_0x3edd('0x2')]({'tag':_0x3edd('0x6'),'attributes':{'class':[_0x3edd('0xa'),_0x223dd7['to'](_0x3edd('0xd'),_0xe996d3=>_0x3edd('0x1')+_0xe996d3),_0x223dd7['if'](_0x3edd('0xb'),_0x3edd('0x11'))]},'children':[{'text':_0x223dd7['to'](_0x3edd('0x5'))}]}),this[_0x3edd('0x0')][_0x3edd('0x4')](this[_0x3edd('0xf')]);}}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module comments/annotations/view/annotationview
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
10
|
-
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils.js';
|
|
11
11
|
import '../../../theme/annotation.css';
|
|
12
12
|
/**
|
|
13
13
|
* 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 _0x2d53=['content','bindTemplate','ck-annotation-wrapper--active','render','isActive','keystrokes','length','detach','add','focus','set','isDirty','fire','attach','focusTracker','setTemplate','listenTo','element','type','clear','destroy','_mutationObserver','targetRect','div','height','createCollection','_updateHeight','clientHeight','ck-annotation-wrapper','Esc','ck-rounded-corners'];(function(_0xcbf6a2,_0x2d53e2){const _0x2a9bda=function(_0x2af78f){while(--_0x2af78f){_0xcbf6a2['push'](_0xcbf6a2['shift']());}};_0x2a9bda(++_0x2d53e2);}(_0x2d53,0x99));const _0x2a9b=function(_0xcbf6a2,_0x2d53e2){_0xcbf6a2=_0xcbf6a2-0x0;let _0x2a9bda=_0x2d53[_0xcbf6a2];return _0x2a9bda;};import{View as _0x1a57ad}from'ckeditor5/src/ui.js';import{FocusTracker as _0x3c1c39,KeystrokeHandler as _0x42a631,uid as _0x4ee566}from'ckeditor5/src/utils.js';import _0xfde7c from'../../utils/createmutationobserver.js';import'../../../theme/annotation.css';export default class V extends _0x1a57ad{constructor(_0x4dd90b,_0x5b9b13){super(_0x4dd90b),this['id']=_0x4ee566(),this[_0x2a9b('0x10')]=new _0x3c1c39(),this[_0x2a9b('0x7')]=new _0x42a631(),this[_0x2a9b('0x7')]['set']('Esc',(_0x2c7069,_0x273e37)=>this[_0x2a9b('0xe')](_0x2a9b('0x0'),_0x273e37)),this[_0x2a9b('0xc')](_0x2a9b('0x18'),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set'](_0x2a9b('0x1a'),0x0),this[_0x2a9b('0xc')]('isActive',!0x1),this[_0x2a9b('0xc')](_0x2a9b('0xd'),!0x1),this[_0x2a9b('0xc')](_0x2a9b('0x8'),0x0),this[_0x2a9b('0xc')](_0x2a9b('0x14'),''),this[_0x2a9b('0x17')]=_0xfde7c(()=>this[_0x2a9b('0x1c')]()),this[_0x2a9b('0x2')]=this[_0x2a9b('0x1b')](),this[_0x2a9b('0x2')][_0x2a9b('0xa')](_0x5b9b13),this['mainView']=_0x5b9b13;const _0x519444=this[_0x2a9b('0x3')];this[_0x2a9b('0x11')]({'tag':_0x2a9b('0x19'),'attributes':{'class':['ck',_0x2a9b('0x1e'),_0x2a9b('0x1'),_0x519444['if'](_0x2a9b('0x6'),_0x2a9b('0x4'))],'tabindex':-0x1},'children':this['content']});}[_0x2a9b('0x5')](){super[_0x2a9b('0x5')](),this['focusTracker']['add'](this['element']),this[_0x2a9b('0x7')][_0x2a9b('0x12')](this[_0x2a9b('0x13')]),this[_0x2a9b('0x17')][_0x2a9b('0xf')](this[_0x2a9b('0x13')]);}[_0x2a9b('0x16')](){this['content'][_0x2a9b('0x15')](),this[_0x2a9b('0x7')]['destroy'](),this[_0x2a9b('0x10')][_0x2a9b('0x16')](),this[_0x2a9b('0x17')][_0x2a9b('0x9')](),super[_0x2a9b('0x16')]();}[_0x2a9b('0xb')](){this[_0x2a9b('0x13')][_0x2a9b('0xb')]();}[_0x2a9b('0x1c')](){const _0x40c5d3=this[_0x2a9b('0x13')][_0x2a9b('0x1d')];_0x40c5d3&&(this[_0x2a9b('0x1a')]=_0x40c5d3);}}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module comments/annotations/view/sidebaritemview
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
10
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
11
11
|
/**
|
|
12
12
|
* A wrapper view that wraps given {@link module:ui/view~View} to display it as a {@link module:comments/annotations/sidebar~Sidebar} item.
|
|
13
13
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x10b0=['_targetTop','div','ck-sidebar-item','element','clear','_mutationObserver','destroy','setTemplate','top','createCollection','set','isAnimationDisabled','attach','content','ck-sidebar-item--no-animation','clientHeight','height','detach','render','bind','bottom'];(function(_0xdaef3f,_0x10b0bd){const _0x109974=function(_0x1226f1){while(--_0x1226f1){_0xdaef3f['push'](_0xdaef3f['shift']());}};_0x109974(++_0x10b0bd);}(_0x10b0,0x9d));const _0x1099=function(_0xdaef3f,_0x10b0bd){_0xdaef3f=_0xdaef3f-0x0;let _0x109974=_0x10b0[_0xdaef3f];return _0x109974;};import{View as _0x1e6c94}from'ckeditor5/src/ui.js';import{toUnit as _0xd5b64f}from'ckeditor5/src/utils.js';import _0x38cbd6 from'../../utils/createmutationobserver.js';const Ht=_0xd5b64f('px');export default class C extends _0x1e6c94{constructor(_0x56f338){super(_0x56f338),this['set']('top',0x0),this['set'](_0x1099('0x6'),0x0),this[_0x1099('0x9')](_0x1099('0xa'))['to'](this,_0x1099('0x13'),this,'height',(_0x4cac86,_0x57576f)=>_0x4cac86+_0x57576f),this[_0x1099('0x0')](_0x1099('0x1'),!0x1),this['_mutationObserver']=_0x38cbd6(()=>this['updateHeight']()),this[_0x1099('0xb')]=null,this[_0x1099('0x3')]=this[_0x1099('0x14')]();const _0x9252a0=this['bindTemplate'];this[_0x1099('0x12')]({'tag':_0x1099('0xc'),'attributes':{'class':[_0x1099('0xd'),_0x9252a0['to']('isAnimationDisabled',_0x330835=>_0x330835?_0x1099('0x4'):'')],'style':{'top':_0x9252a0['to']('top',_0x3b34c4=>Ht(_0x3b34c4))}},'children':this[_0x1099('0x3')]});}[_0x1099('0x8')](){super[_0x1099('0x8')](),this['_mutationObserver'][_0x1099('0x2')](this['element']);}['updateHeight'](){const _0x4735b3=this[_0x1099('0xe')][_0x1099('0x5')];_0x4735b3&&(this['height']=_0x4735b3);}['destroy'](){this[_0x1099('0x3')][_0x1099('0xf')](),this[_0x1099('0x10')][_0x1099('0x7')](),super[_0x1099('0x11')]();}}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module comments/annotations/view/sidebarview
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
10
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
11
11
|
import '../../../theme/sidebar.css';
|
|
12
12
|
/**
|
|
13
13
|
* 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 _0x1d6c=['minHeight','set','bindTemplate','list','ck-sidebar','createCollection','class','setTemplate'];(function(_0x1a73d6,_0x1d6c76){const _0x5d2abb=function(_0x4bb368){while(--_0x4bb368){_0x1a73d6['push'](_0x1a73d6['shift']());}};_0x5d2abb(++_0x1d6c76);}(_0x1d6c,0xd3));const _0x5d2a=function(_0x1a73d6,_0x1d6c76){_0x1a73d6=_0x1a73d6-0x0;let _0x5d2abb=_0x1d6c[_0x1a73d6];return _0x5d2abb;};import{View as _0x1ebf2e}from'ckeditor5/src/ui.js';import{toUnit as _0x3816c1}from'ckeditor5/src/utils.js';import'../../../theme/sidebar.css';const Ht=_0x3816c1('px');export default class T extends _0x1ebf2e{constructor(_0x1f7bfd){super(_0x1f7bfd);const _0x103d4f=this[_0x5d2a('0x7')];this['set'](_0x5d2a('0x5'),0x0),this[_0x5d2a('0x6')](_0x5d2a('0x3'),''),this[_0x5d2a('0x0')]=this[_0x5d2a('0x2')](),this[_0x5d2a('0x4')]({'tag':'div','attributes':{'class':['ck',_0x5d2a('0x1'),'ck-reset',_0x103d4f['to'](_0x5d2a('0x3'))],'style':{'minHeight':_0x103d4f['to'](_0x5d2a('0x5'),_0x788e41=>'number'==typeof _0x788e41?Ht(_0x788e41+0xa):null)}},'children':this[_0x5d2a('0x0')]});}}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @module comments/annotations/widesidebar
|
|
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 type Annotation from './annotation';
|
|
13
|
-
import type { default as AnnotationCollection } from './annotationcollection';
|
|
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 type Annotation from './annotation.js';
|
|
13
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
14
14
|
/**
|
|
15
15
|
* The wide sidebar UI for displaying annotations.
|
|
16
16
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1aa8=['blur','updateTargetRect','container','get','_integrateWithEditorAnnotations','plugins','set','_editorAnnotations','off','set:container','remove','uiUpdate','_activeAnnotation','pluginName','_refreshPositioningDebounced','widesidebar-attach-already-attached','refresh','addEventListener','addAnnotation','removeEventListener','from','refreshPositioning','_destroyEditorAnnotationsIntegration','cancel','init','high','widesidebar-detach-not-attached','setActiveAnnotation','hasDomSelection','register','listenTo','destroy','activeAnnotation','change:container','context','resize','has','_annotations','wideSidebar','attach','editors','stopListening','ck-sidebar--wide','isAttached','getOrderedSelectedAnnotations','annotations','stop','focus'];(function(_0x34697d,_0x1aa80d){const _0x35c27e=function(_0x298837){while(--_0x298837){_0x34697d['push'](_0x34697d['shift']());}};_0x35c27e(++_0x1aa80d);}(_0x1aa8,0x140));const _0x35c2=function(_0x34697d,_0x1aa80d){_0x34697d=_0x34697d-0x0;let _0x35c27e=_0x1aa8[_0x34697d];return _0x35c27e;};import{ContextPlugin as _0x31bb59,Context as _0x819592}from'ckeditor5/src/core.js';import _0x2c4e53 from'./annotationsuis.js';import _0x1dedeb from'./sidebar.js';import{CKEditorError as _0x2593b7,Collection as _0x52196f}from'ckeditor5/src/utils.js';import{debounce as _0x574fb4}from'lodash-es';import _0x5d5ece from'./editorannotations.js';export default class n extends _0x31bb59{static get['requires'](){return[_0x1dedeb,_0x2c4e53];}static get[_0x35c2('0x1d')](){return'WideSidebar';}constructor(_0xdbac72){super(_0xdbac72),this[_0x35c2('0xb')]=!0x1,this[_0x35c2('0x16')](_0x35c2('0x0'),null),this['annotations']=null,this['_editorAnnotations']=new _0x52196f(),this[_0x35c2('0x1e')]=_0x574fb4(()=>{this[_0x35c2('0xd')][_0x35c2('0x25')]();},0xfa,{'leading':!0x1});}[_0x35c2('0x28')](){const _0x7cbacd=this[_0x35c2('0x2')]['plugins'][_0x35c2('0x13')](_0x2c4e53),_0xa5bd90=this['context'][_0x35c2('0x15')]['get'](_0x1dedeb);_0x7cbacd[_0x35c2('0x2d')](_0x35c2('0x6'),this),_0xa5bd90[_0x35c2('0x12')]&&_0x7cbacd['switchTo']('wideSidebar');}[_0x35c2('0x2b')](_0x17c91a){if(_0x17c91a===this[_0x35c2('0x0')])return;const _0x12f4f1=this[_0x35c2('0x2')][_0x35c2('0x15')][_0x35c2('0x13')](_0x1dedeb);_0x12f4f1[_0x35c2('0x1c')]=_0x17c91a;const _0x499b86=this[_0x35c2('0x0')];this['activeAnnotation']=_0x17c91a,_0x12f4f1[_0x35c2('0x20')]({'blurredAnnotation':_0x499b86,'activatedAnnotation':this[_0x35c2('0x0')]});}[_0x35c2('0x7')](_0x24d0d4){this[_0x35c2('0xd')]=_0x24d0d4;const _0x4256bc=this[_0x35c2('0x2')][_0x35c2('0x15')]['get'](_0x1dedeb);if(_0x4256bc[_0x35c2('0x5')]=_0x24d0d4,this[_0x35c2('0xb')])throw new _0x2593b7(_0x35c2('0x1f'),this);this[_0x35c2('0xb')]=!0x0,this['listenTo'](_0x4256bc,_0x35c2('0x19'),()=>{this['detach'](),this[_0x35c2('0x2e')](_0x4256bc,_0x35c2('0x1'),_0x2884b9=>{_0x2884b9[_0x35c2('0x18')](),this[_0x35c2('0x7')](_0x24d0d4);});}),_0x4256bc['_attachToContainer']({'viewClass':_0x35c2('0xa')});const _0x55d2ea=_0x496147=>{_0x496147[_0x35c2('0x11')](),_0x4256bc[_0x35c2('0x22')](_0x496147);};for(const _0x569346 of _0x24d0d4)_0x55d2ea(_0x569346);this[_0x35c2('0x2e')](_0x24d0d4,'add',(_0x3afabe,_0x330049)=>{_0x55d2ea(_0x330049);}),this['listenTo'](_0x24d0d4,_0x35c2('0x1a'),(_0xd980,_0x9c05e4,_0x208e26)=>{_0x4256bc['rearrange']({'removedAnnotation':_0x9c05e4,'previousAnnotation':_0x24d0d4[_0x35c2('0x13')](_0x208e26-0x1),'nextAnnotation':_0x24d0d4['get'](_0x208e26+0x1)}),_0x9c05e4===this['activeAnnotation']&&this[_0x35c2('0x2b')](null);},{'priority':'high'}),this['listenTo'](_0x24d0d4,_0x35c2('0xf'),(_0x1f6ef6,_0x2caf85)=>{this[_0x35c2('0x2b')](_0x2caf85);}),this[_0x35c2('0x2e')](_0x24d0d4,_0x35c2('0x10'),()=>{this['setActiveAnnotation'](null);});const _0x4acc2c=this[_0x35c2('0x2')]instanceof _0x819592?this[_0x35c2('0x2')][_0x35c2('0x8')]:new _0x52196f([this[_0x35c2('0x2')]]);for(const _0x586599 of _0x4acc2c)this[_0x35c2('0x14')](_0x586599);this[_0x35c2('0x2e')](_0x4acc2c,'add',(_0x2bc4be,_0x444925)=>{this[_0x35c2('0x2e')](_0x444925,'ready',()=>{this[_0x35c2('0x14')](_0x444925);});}),this[_0x35c2('0x2e')](_0x4acc2c,_0x35c2('0x1a'),(_0xc6cc6f,_0x3efea1)=>{_0x3efea1['plugins'][_0x35c2('0x4')]('EditorAnnotations')&&this[_0x35c2('0x26')](_0x3efea1[_0x35c2('0x15')]['get']('EditorAnnotations'));}),window[_0x35c2('0x21')](_0x35c2('0x3'),this[_0x35c2('0x1e')]),this[_0x35c2('0xd')][_0x35c2('0x25')]();}['detach'](){if(!this[_0x35c2('0xb')])throw new _0x2593b7(_0x35c2('0x2a'),this);this[_0x35c2('0x2b')](null);const _0x248999=this[_0x35c2('0x2')][_0x35c2('0x15')][_0x35c2('0x13')](_0x1dedeb);_0x248999['_detachFromContainer'](this[_0x35c2('0xd')]),this[_0x35c2('0x9')](_0x248999),this[_0x35c2('0x9')](this[_0x35c2('0xd')]),this[_0x35c2('0x2')]instanceof _0x819592&&this[_0x35c2('0x9')](this[_0x35c2('0x2')][_0x35c2('0x8')]);for(const _0x4df4cf of Array[_0x35c2('0x24')](this[_0x35c2('0x17')]))this[_0x35c2('0x26')](_0x4df4cf);window[_0x35c2('0x23')]('resize',this[_0x35c2('0x1e')]),this[_0x35c2('0x1e')][_0x35c2('0x27')](),this['activeAnnotation']=null,this[_0x35c2('0xb')]=!0x1,this[_0x35c2('0xd')]=null;}[_0x35c2('0x2f')](){this[_0x35c2('0xb')]&&this['detach']();}[_0x35c2('0x14')](_0x598253){const _0x24a8f4=_0x598253[_0x35c2('0x15')][_0x35c2('0x13')](_0x5d5ece);if(!_0x24a8f4)return;const _0x32ed25=()=>{const _0x90fe76=_0x24a8f4[_0x35c2('0xc')]({'annotations':this[_0x35c2('0xd')],'activeAnnotation':this['activeAnnotation']});this[_0x35c2('0x2b')](_0x90fe76[0x0]||null);};this[_0x35c2('0x2e')](_0x24a8f4,_0x35c2('0x20'),_0x32ed25),this['listenTo'](_0x24a8f4,_0x35c2('0x10'),(_0x438f44,{isAnnotationTracked:_0x8c2d1e})=>{this[_0x35c2('0x0')]&&_0x8c2d1e(this['activeAnnotation'])&&this[_0x35c2('0x2b')](null);}),this[_0x35c2('0x2e')](_0x24a8f4,_0x35c2('0x1b'),()=>{this[_0x35c2('0x1e')]();}),this['listenTo'](this[_0x35c2('0xd')],_0x35c2('0x10'),_0x46f4ad=>{_0x24a8f4[_0x35c2('0x2c')]()&&(_0x32ed25(),_0x46f4ad[_0x35c2('0xe')]());},{'priority':_0x35c2('0x29')}),this['_editorAnnotations']['add'](_0x24a8f4);}['_destroyEditorAnnotationsIntegration'](_0x4b2193){this[_0x35c2('0x9')](_0x4b2193),this[_0x35c2('0x17')][_0x35c2('0x1a')](_0x4b2193);}}
|
package/src/augmentation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
|
|
5
|
+
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module comments/comments/addcommentthreadcommand
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Command } from 'ckeditor5/src/core';
|
|
9
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
10
10
|
/**
|
|
11
11
|
* Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
|
|
12
12
|
* 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 _0x2b3a=['tableCell','_hasContent','addMarker','document','getRanges','model','comment:','change','start','getItems','_itemIsContent','_trimToContent','element','selection','refresh','getLastMatchingPosition','isEnabled','item','schema','editor','createRange'];(function(_0x4eb2af,_0x2b3afa){const _0xc5c7a1=function(_0x2b8a15){while(--_0x2b8a15){_0x4eb2af['push'](_0x4eb2af['shift']());}};_0xc5c7a1(++_0x2b3afa);}(_0x2b3a,0x1ae));const _0xc5c7=function(_0x4eb2af,_0x2b3afa){_0x4eb2af=_0x4eb2af-0x0;let _0xc5c7a1=_0x2b3a[_0x4eb2af];return _0xc5c7a1;};import{Command as _0xd11b1}from'ckeditor5/src/core.js';import{uid as _0x51345e}from'ckeditor5/src/utils.js';export default class G extends _0xd11b1{[_0xc5c7('0x4')](){const _0x519d22=this[_0xc5c7('0x9')][_0xc5c7('0x10')][_0xc5c7('0xe')]['selection'];for(const _0x36a2fd of _0x519d22[_0xc5c7('0xf')]())if(this[_0xc5c7('0xc')](_0x36a2fd))return void(this[_0xc5c7('0x6')]=!0x0);this[_0xc5c7('0x6')]=!0x1;}['execute']({threadId:_0x3a76c4=_0x51345e()}={}){const _0x476e94=this[_0xc5c7('0x9')][_0xc5c7('0x10')],_0xb98edb=[];for(const _0x581fed of _0x476e94[_0xc5c7('0xe')][_0xc5c7('0x3')]['getRanges']())this[_0xc5c7('0xc')](_0x581fed)&&_0xb98edb['push'](this['_trimToContent'](_0x581fed));_0x476e94[_0xc5c7('0x12')](_0x2d8fb5=>{for(const _0x8fde89 of _0xb98edb){const _0x36a9e6=_0x51345e()['substr'](0x1,0x5),_0x25c4ea=_0xc5c7('0x11')+_0x3a76c4+':'+_0x36a9e6;_0x2d8fb5[_0xc5c7('0xd')](_0x25c4ea,{'range':_0x8fde89,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0xc5c7('0xc')](_0x5b3f73){for(const _0x4336ce of _0x5b3f73[_0xc5c7('0x14')]())if(this[_0xc5c7('0x0')](_0x4336ce))return!0x0;return!0x1;}[_0xc5c7('0x0')](_0xa8b018){return _0xa8b018['is']('$textProxy')||this[_0xc5c7('0x9')]['model'][_0xc5c7('0x8')]['isObject'](_0xa8b018)&&!_0xa8b018['is'](_0xc5c7('0x2'),_0xc5c7('0xb'));}[_0xc5c7('0x1')](_0x15e948){const _0x4f8e0a=_0x1f4a58=>!this['_itemIsContent'](_0x1f4a58[_0xc5c7('0x7')]),_0x5dce5c=_0x15e948[_0xc5c7('0x13')][_0xc5c7('0x5')](_0x4f8e0a),_0xbf29bc=_0x15e948['end'][_0xc5c7('0x5')](_0x4f8e0a,{'direction':'backward'});return this['editor']['model'][_0xc5c7('0xa')](_0x5dce5c,_0xbf29bc);}}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @module comments/comments/commentsarchive
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
11
|
-
import CommentsRepository, { type CommentThread } from './commentsrepository';
|
|
12
|
-
import Annotations from '../annotations/annotations';
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import CommentsRepository, { type CommentThread } from './commentsrepository.js';
|
|
12
|
+
import Annotations from '../annotations/annotations.js';
|
|
13
13
|
/**
|
|
14
14
|
* This plugin handles all operations on archived threads needed for the comments archive.
|
|
15
15
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x26b0=['collection','archivedAt','stopListening','activate','listenTo','remove','context','has','highest','get','plugins','archivedThreads','change:archivedAt','add','length','addCommentThread','init','CommentsArchive','_calculatePosition'];(function(_0x93e21e,_0x26b088){const _0x19ed8c=function(_0x2bcdaa){while(--_0x2bcdaa){_0x93e21e['push'](_0x93e21e['shift']());}};_0x19ed8c(++_0x26b088);}(_0x26b0,0x8a));const _0x19ed=function(_0x93e21e,_0x26b088){_0x93e21e=_0x93e21e-0x0;let _0x19ed8c=_0x26b0[_0x93e21e];return _0x19ed8c;};import{ContextPlugin as _0xc7687c}from'ckeditor5/src/core.js';import{Collection as _0x5426a1}from'ckeditor5/src/utils.js';import _0x11e51d from'./commentsrepository.js';import _0x214d52 from'../annotations/annotations.js';export default class p extends _0xc7687c{static get['pluginName'](){return _0x19ed('0xc');}static get['requires'](){return[_0x11e51d,_0x214d52];}constructor(_0x33cd27){super(_0x33cd27),this['archivedThreads']=new _0x5426a1();}[_0x19ed('0xb')](){const _0x1cb958=this[_0x19ed('0x1')],_0x1cbd51=_0x1cb958[_0x19ed('0x5')][_0x19ed('0x4')](_0x11e51d),_0x2f27c8=_0x1cb958['plugins'][_0x19ed('0x4')](_0x214d52);this[_0x19ed('0x12')](_0x1cbd51,_0x19ed('0xa'),(_0x5abf72,{threadId:_0x575843})=>{const _0x39e748=_0x1cbd51['getCommentThread'](_0x575843);_0x39e748[_0x19ed('0xf')]&&this[_0x19ed('0x6')][_0x19ed('0x8')](_0x39e748,this['_calculatePosition'](_0x39e748[_0x19ed('0xf')])),this['listenTo'](_0x39e748,_0x19ed('0x7'),(_0x19fd06,_0x1e6e24,_0xcf9a1d)=>{_0xcf9a1d?this['archivedThreads'][_0x19ed('0x2')](_0x39e748)||this[_0x19ed('0x6')][_0x19ed('0x8')](_0x39e748,this[_0x19ed('0xd')](_0x39e748['archivedAt'])):this['archivedThreads'][_0x19ed('0x2')](_0x39e748)&&this[_0x19ed('0x6')][_0x19ed('0x0')](_0x39e748);});}),this[_0x19ed('0x12')](_0x1cbd51,'removeCommentThread',(_0x5f0491,{threadId:_0x5d899f})=>{const _0x5b48f1=_0x1cbd51['getCommentThread'](_0x5d899f);this[_0x19ed('0x10')](_0x5b48f1),this[_0x19ed('0x6')][_0x19ed('0x2')](_0x5b48f1)&&this[_0x19ed('0x6')][_0x19ed('0x0')](_0x5b48f1);},{'priority':_0x19ed('0x3')}),this[_0x19ed('0x12')](_0x2f27c8[_0x19ed('0xe')],'focus',(_0x1c75e6,_0x3c8644)=>{_0x3c8644['isActive']=!0x0,_0x2f27c8[_0x19ed('0x11')](_0x3c8644);});}[_0x19ed('0xd')](_0x590f84){const _0x3cb67b=[...this['archivedThreads']]['findIndex'](_0x2b9ac=>_0x2b9ac[_0x19ed('0xf')]<_0x590f84);return _0x3cb67b>-0x1?_0x3cb67b:this[_0x19ed('0x6')][_0x19ed('0x9')];}}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
9
|
import '../../theme/commentsarchive.css';
|
|
10
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
11
|
-
import { ViewCollection } from 'ckeditor5/src/ui';
|
|
12
|
-
import CommentsArchiveView from './ui/view/commentsarchiveview';
|
|
13
|
-
import CommentsArchive from './commentsarchive';
|
|
14
|
-
import type AnnotationView from '../annotations/view/annotationview';
|
|
10
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
11
|
+
import { ViewCollection } from 'ckeditor5/src/ui.js';
|
|
12
|
+
import CommentsArchiveView from './ui/view/commentsarchiveview.js';
|
|
13
|
+
import CommentsArchive from './commentsarchive.js';
|
|
14
|
+
import type AnnotationView from '../annotations/view/annotationview.js';
|
|
15
15
|
/**
|
|
16
16
|
* Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
|
|
17
17
|
* archived comment thread annotation views.
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x114d=['add','push','isVisible','Annotations','requires','_createArchiveUIDropdown','buttonView','focusTracker','change:isOpen','find','stopListening','children','_calculatePosition','set','view','channelId','archivedAt','classList','_handleAnnotationFocusableElements','get','getByInnerView','focusableElements','ck-comments-archive-dropdown','config','panelView','annotationViews','locale','length','pluginName','plugins','commentsArchiveView','collection','editor','listenTo','ck-body','innerView','mainView','archivedThreads','remove','contains','componentFactory','CommentsRepository','splice','findIndex','filter','position','COMMENTS_ARCHIVE','_threadToController','_pendingThreads','collaboration.channelId'];(function(_0x4a6c72,_0x114d0f){const _0x278291=function(_0x19d383){while(--_0x19d383){_0x4a6c72['push'](_0x4a6c72['shift']());}};_0x278291(++_0x114d0f);}(_0x114d,0x19c));const _0x2782=function(_0x4a6c72,_0x114d0f){_0x4a6c72=_0x4a6c72-0x0;let _0x278291=_0x114d[_0x4a6c72];return _0x278291;};import'../../theme/commentsarchive.css';import{Plugin as _0xc8786c}from'ckeditor5/src/core.js';import{createDropdown as _0x258d40,ViewCollection as _0x77e079}from'ckeditor5/src/ui.js';import _0xd88bef from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x535696}from'../utils/common-translations.js';import _0x11a6ed from'./ui/view/commentsarchiveview.js';import _0x51109f from'./commentsarchive.js';export default class a extends _0xc8786c{static get[_0x2782('0x10')](){return'CommentsArchiveUI';}static get[_0x2782('0x2a')](){return[_0x51109f];}constructor(_0x10a2ac){super(_0x10a2ac),this['annotationViews']=new _0x77e079(),this[_0x2782('0x24')]=[];}['init'](){this[_0x2782('0x14')]['ui'][_0x2782('0x1c')][_0x2782('0x26')]('commentsArchive',()=>this[_0x2782('0x2b')]());const _0xdac3e7=this[_0x2782('0x14')][_0x2782('0x11')][_0x2782('0x7')](_0x51109f),_0x579cb3=this[_0x2782('0x14')][_0x2782('0x11')][_0x2782('0x7')](_0x2782('0x29')),_0x410097=this[_0x2782('0x14')][_0x2782('0x11')][_0x2782('0x7')](_0x2782('0x1d'));this[_0x2782('0x15')](_0xdac3e7[_0x2782('0x19')],_0x2782('0x26'),(_0x59a2bf,_0x4059f9)=>{const _0x2526da=this[_0x2782('0x14')][_0x2782('0xb')]['get'](_0x2782('0x25'));if(!_0x2526da||_0x4059f9[_0x2782('0x3')]===_0x2526da){const _0x195ce0=this['_calculatePosition'](_0x4059f9['archivedAt']),_0x259443=_0x410097[_0x2782('0x23')][_0x2782('0x7')](_0x4059f9);if(!_0x259443)return void this['_pendingThreads'][_0x2782('0x27')]({'thread':_0x4059f9,'position':_0x195ce0});const _0x55a20f=_0x579cb3[_0x2782('0x8')](_0x259443[_0x2782('0x2')]);_0x55a20f[_0x2782('0x28')]&&_0x579cb3['_visibleAnnotations']['remove'](_0x55a20f),this['annotationViews']['add'](_0x55a20f[_0x2782('0x2')],_0x195ce0);}}),this[_0x2782('0x15')](_0x579cb3[_0x2782('0x13')],_0x2782('0x26'),(_0x50edf5,_0x228584)=>{const _0x54f0ba=this['_pendingThreads'][_0x2782('0x2f')](({thread:_0x572bd7})=>{const _0x376da8=_0x410097[_0x2782('0x23')][_0x2782('0x7')](_0x572bd7);return _0x376da8&&_0x228584[_0x2782('0x17')]===_0x376da8[_0x2782('0x2')];});_0x54f0ba&&(this[_0x2782('0xd')][_0x2782('0x26')](_0x228584[_0x2782('0x2')],_0x54f0ba[_0x2782('0x21')]),this[_0x2782('0x24')][_0x2782('0x1e')](this[_0x2782('0x24')]['indexOf'](_0x54f0ba),0x1));}),this[_0x2782('0x15')](_0xdac3e7[_0x2782('0x19')],'remove',(_0x4a7a80,_0x51c036)=>{const _0x1f9a2d=this['editor'][_0x2782('0xb')]['get']('collaboration.channelId');if(!_0x1f9a2d||_0x51c036[_0x2782('0x3')]===_0x1f9a2d){const _0x29df44=_0x410097[_0x2782('0x23')][_0x2782('0x7')](_0x51c036),_0x49dd00=_0x579cb3[_0x2782('0x8')](_0x29df44[_0x2782('0x2')]);this['annotationViews'][_0x2782('0x1a')](_0x49dd00['view']),this[_0x2782('0x30')](_0x49dd00[_0x2782('0x9')]);}});}['_handleAnnotationFocusableElements'](_0x36bd59,_0x58dc6a){for(const _0x36bbee of _0x58dc6a['focusableElements'])_0x36bbee['classList'][_0x2782('0x1b')](_0x2782('0x16'))&&_0x36bd59[_0x2782('0x2d')][_0x2782('0x26')](_0x36bbee);this[_0x2782('0x15')](_0x58dc6a[_0x2782('0x9')],_0x2782('0x26'),(_0x2b9b9b,_0x1ae2e0)=>{_0x1ae2e0[_0x2782('0x5')][_0x2782('0x1b')]('ck-body')&&_0x36bd59[_0x2782('0x2d')][_0x2782('0x26')](_0x1ae2e0);}),this[_0x2782('0x15')](_0x58dc6a[_0x2782('0x9')],_0x2782('0x1a'),(_0x5d99dc,_0x381fe4)=>{_0x381fe4[_0x2782('0x5')][_0x2782('0x1b')]('ck-body')&&_0x36bd59[_0x2782('0x2d')][_0x2782('0x1a')](_0x381fe4);});}[_0x2782('0x0')](_0x34d404){const _0x1a6140=this[_0x2782('0x14')][_0x2782('0xb')]['get'](_0x2782('0x25')),_0x457ab4=[...this[_0x2782('0x14')][_0x2782('0x11')][_0x2782('0x7')](_0x51109f)[_0x2782('0x19')]][_0x2782('0x20')](_0x3b8a09=>_0x3b8a09['channelId']===_0x1a6140)[_0x2782('0x1f')](_0x4d4d92=>_0x4d4d92[_0x2782('0x4')]<_0x34d404);return _0x457ab4>-0x1?_0x457ab4-0x1:this[_0x2782('0xd')][_0x2782('0xf')];}['_createArchiveUIDropdown'](){const _0x3164cd=this['editor'],_0x4db345=this['editor'][_0x2782('0x11')]['get']('Annotations'),_0x4f55e2=_0x258d40(_0x3164cd[_0x2782('0xe')]);_0x4f55e2[_0x2782('0x2c')][_0x2782('0x1')]({'icon':_0xd88bef,'label':_0x535696(_0x3164cd[_0x2782('0xe')],_0x2782('0x22')),'tooltip':!0x0}),_0x4f55e2[_0x2782('0xc')]['extendTemplate']({'attributes':{'class':_0x2782('0xa')}}),_0x4f55e2['on'](_0x2782('0x2e'),(_0x19f11e,_0x404a7e,_0x460361)=>{this['commentsArchiveView']||(this['commentsArchiveView']=new _0x11a6ed(_0x3164cd[_0x2782('0xe')],this[_0x2782('0xd')])),_0x460361?_0x4f55e2[_0x2782('0xc')][_0x2782('0x31')]['add'](this[_0x2782('0x12')]):_0x4f55e2[_0x2782('0xc')][_0x2782('0x31')][_0x2782('0x1a')](this[_0x2782('0x12')]);});for(const _0x395f2f of this[_0x2782('0xd')]){const _0x495f50=_0x4db345['getByInnerView'](_0x395f2f[_0x2782('0x18')]);this[_0x2782('0x6')](_0x4f55e2,_0x495f50);}return _0x4f55e2[_0x2782('0x15')](this[_0x2782('0xd')],_0x2782('0x26'),(_0x9668de,_0x497a80)=>{const _0x54ddab=_0x4db345[_0x2782('0x8')](_0x497a80[_0x2782('0x18')]);this['_handleAnnotationFocusableElements'](_0x4f55e2,_0x54ddab);}),_0x4f55e2[_0x2782('0x15')](this[_0x2782('0xd')],'remove',(_0x142b57,_0x37c7db)=>{const _0x1ffec4=_0x4db345['getByInnerView'](_0x37c7db['mainView']);for(const _0x45ce0a of _0x1ffec4[_0x2782('0x9')])_0x45ce0a[_0x2782('0x5')][_0x2782('0x1b')]('ck-body')&&_0x4f55e2[_0x2782('0x2d')][_0x2782('0x1a')](_0x45ce0a);}),_0x4f55e2;}}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module comments/comments/commentsediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import type { Marker } from 'ckeditor5/src/engine';
|
|
10
|
-
import CommentsRepository from './commentsrepository';
|
|
11
|
-
import EditorAnnotations from '../annotations/editorannotations';
|
|
12
|
-
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode';
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import type { Marker } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import CommentsRepository from './commentsrepository.js';
|
|
11
|
+
import EditorAnnotations from '../annotations/editorannotations.js';
|
|
12
|
+
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode.js';
|
|
13
13
|
import '../../theme/commentmarker.css';
|
|
14
|
-
import CommentsImportWord from './integrations/importword';
|
|
14
|
+
import CommentsImportWord from './integrations/importword.js';
|
|
15
15
|
/**
|
|
16
16
|
* Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
|
|
17
17
|
* {@link module:engine/model/markercollection~Marker comment markers}.
|