@ckeditor/ckeditor5-comments 40.0.0 → 40.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -3
- package/build/comments.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +2 -0
- package/lang/translations/af.po +8 -0
- package/lang/translations/ar.po +8 -0
- package/lang/translations/bg.po +8 -0
- package/lang/translations/bn.po +8 -0
- package/lang/translations/bs.po +8 -0
- package/lang/translations/ca.po +8 -0
- package/lang/translations/cs.po +8 -0
- package/lang/translations/da.po +8 -0
- package/lang/translations/de-ch.po +8 -0
- package/lang/translations/de.po +8 -0
- package/lang/translations/el.po +8 -0
- package/lang/translations/en-au.po +8 -0
- package/lang/translations/en.po +8 -0
- package/lang/translations/es-co.po +8 -0
- package/lang/translations/es.po +8 -0
- package/lang/translations/et.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +8 -0
- package/lang/translations/fr.po +8 -0
- package/lang/translations/gl.po +8 -0
- package/lang/translations/he.po +8 -0
- package/lang/translations/hi.po +8 -0
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/id.po +8 -0
- package/lang/translations/it.po +8 -0
- package/lang/translations/ja.po +8 -0
- package/lang/translations/jv.po +8 -0
- package/lang/translations/ko.po +8 -0
- package/lang/translations/lt.po +8 -0
- package/lang/translations/lv.po +8 -0
- package/lang/translations/ms.po +8 -0
- package/lang/translations/nl.po +8 -0
- package/lang/translations/no.po +8 -0
- package/lang/translations/pl.po +8 -0
- package/lang/translations/pt-br.po +8 -0
- package/lang/translations/pt.po +8 -0
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/sk.po +8 -0
- package/lang/translations/sq.po +8 -0
- package/lang/translations/sr-latn.po +8 -0
- package/lang/translations/sr.po +8 -0
- package/lang/translations/sv.po +8 -0
- package/lang/translations/th.po +8 -0
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +8 -0
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +8 -0
- package/lang/translations/uk.po +8 -0
- package/lang/translations/ur.po +8 -0
- package/lang/translations/vi.po +8 -0
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +3 -3
- package/src/annotations/annotation.d.ts +90 -90
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.d.ts +98 -98
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.d.ts +154 -154
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.d.ts +232 -232
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.d.ts +67 -67
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.d.ts +90 -90
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.d.ts +85 -85
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.d.ts +100 -100
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.d.ts +90 -90
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.d.ts +55 -55
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.d.ts +32 -32
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.d.ts +77 -77
- package/src/annotations/widesidebar.js +1 -1
- package/src/augmentation.d.ts +52 -52
- package/src/comments/addcommentthreadcommand.d.ts +35 -35
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.d.ts +31 -31
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.d.ts +38 -38
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.d.ts +79 -79
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1129 -1129
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.d.ts +33 -33
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.d.ts +21 -21
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.d.ts +119 -119
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.d.ts +112 -112
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.d.ts +14 -14
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.d.ts +86 -86
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.d.ts +100 -100
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +118 -118
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.d.ts +243 -243
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.d.ts +35 -35
- package/src/comments.js +1 -1
- package/src/commentsonly.d.ts +33 -33
- package/src/commentsonly.js +1 -1
- package/src/config.d.ts +176 -176
- package/src/index.d.ts +24 -24
- package/src/utils/common-translations.d.ts +9 -9
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.d.ts +14 -14
- package/src/utils/createmutationobserver.js +1 -1
- package/theme/comment.css +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x5810=['set:container','defaultPositions','detachFromDom','EditorAnnotations','_detachFromContainer','ck-sidebar--narrow','low','off','addAnnotation','ready','_detachListeners','annotations','type','attachToDom','attach','values','cancel','refresh','view','_editorAnnotations','listenTo','stopListening','activeAnnotation','focus','set','create','pluginName','keydown','_refreshPositioning','narrowsidebar-detach-not-attached','remove','refreshPositioning','mousedown','_updateBalloonPosition','plugins','blur','change:height','rearrange','locale','addEventListener','context','element','_attachListeners','stop','balloonPanelView','has','_annotations','length','_hideBalloon','getByView','bind','_selectedAnnotations','high','_refreshPositioningDebounced','stopPropagation','change:container','_destroyEditorAnnotationsIntegration','register','_showBalloon','northArrowSouth','_attachToContainer','keyCode','first','content','getOrderedSelectedAnnotations','pin','southArrowNorth','destroy','bodyCollection','setActiveAnnotation','_integrateWithEditorAnnotations','includes','Esc','contains','isAttached','get','southArrowNorthEast','init','_domEmitter','_manuallyClosedAnnotationViews','target','removeEventListener','clear','add','resize','isVisible','find','focusableElements','preventClosingBalloon','_annotationToNarrowView','from','detach','editors','isDirty','esc','_setSelectedAnnotations','unpin','getSidebarItemView','northArrowSouthEast'];(function(_0x234332,_0x58107b){const _0x4065f5=function(_0x29a4cb){while(--_0x29a4cb){_0x234332['push'](_0x234332['shift']());}};_0x4065f5(++_0x58107b);}(_0x5810,0xf8));const _0x4065=function(_0x234332,_0x58107b){_0x234332=_0x234332-0x0;let _0x4065f5=_0x5810[_0x234332];return _0x4065f5;};import{ContextPlugin as _0x4f06e5,Context as _0x3e23e7}from'ckeditor5/src/core';import _0x45bdb8 from'./annotationsuis';import _0x5a7657 from'./sidebar';import _0x224f7b from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x1857a0,BodyCollection as _0x5c7895}from'ckeditor5/src/ui';import{CKEditorError as _0x3de951,DomEmitterMixin as _0x12982f,keyCodes as _0x12095a,Collection as _0x1895f3}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x41dcaa}from'lodash-es';import _0x223216 from'./editorannotations';export default class s extends _0x4f06e5{static get['requires'](){return[_0x5a7657,_0x45bdb8];}static get[_0x4065('0x4b')](){return'NarrowSidebar';}constructor(_0xce335d){super(_0xce335d),this[_0x4065('0x18')]=!0x1,this[_0x4065('0x1d')]=new Set(),this[_0x4065('0x1c')]=Object[_0x4065('0x4a')](_0x12982f),this['_annotationToNarrowView']=new Map(),this[_0x4065('0x49')]('activeAnnotation',null),this[_0x4065('0x3c')]=null,this[_0x4065('0x1')]=[],this[_0x4065('0x44')]=new _0x1895f3(),this[_0x4065('0x3')]=_0x41dcaa(()=>{this[_0x4065('0x4d')]();},0xfa,{'leading':!0x1});}[_0x4065('0x1b')](){this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x45bdb8)[_0x4065('0x7')]('narrowSidebar',this),this[_0x4065('0x12')]=new _0x5c7895(this['context']['locale']),this[_0x4065('0x5d')]=new _0x1857a0(this[_0x4065('0x59')][_0x4065('0x57')]),this[_0x4065('0x12')][_0x4065('0x3e')](),this[_0x4065('0x12')]['add'](this[_0x4065('0x5d')]);}[_0x4065('0x3f')](_0x55986e){this[_0x4065('0x3c')]=_0x55986e;const _0x2ade75=this[_0x4065('0x59')][_0x4065('0x53')]['get'](_0x5a7657),_0x500d5e=this['balloonPanelView'];if(_0x2ade75[_0x4065('0x5f')]=_0x55986e,this['isAttached'])throw new _0x3de951('narrowsidebar-attach-already-attached',this);this[_0x4065('0x18')]=!0x0,this['listenTo'](_0x2ade75,_0x4065('0x31'),()=>{this[_0x4065('0x29')](),this[_0x4065('0x45')](_0x2ade75,_0x4065('0x5'),_0x31880f=>{_0x31880f[_0x4065('0x38')](),this[_0x4065('0x3f')](_0x55986e);});}),_0x2ade75[_0x4065('0xa')]({'viewClass':_0x4065('0x36'),'spaceBetweenItems':0x5});const _0x20bfde=_0x4ee64e=>{const _0x486ca1=new _0x224f7b(this['context'][_0x4065('0x57')]);_0x2ade75[_0x4065('0x39')](_0x4ee64e,_0x486ca1),this[_0x4065('0x27')]['set'](_0x4ee64e,_0x486ca1),_0x486ca1[_0x4065('0x0')](_0x4065('0x2b'),'annotationType','number')['to'](_0x4ee64e[_0x4065('0x43')],_0x4065('0x2b'),_0x4065('0x3d'),_0x4065('0x60')),_0x486ca1['on']('execute',()=>{this[_0x4065('0x1d')]['clear'](),_0x500d5e['content']['first']!==_0x4ee64e[_0x4065('0x43')]?(this[_0x4065('0x8')](_0x4ee64e),_0x4ee64e[_0x4065('0x43')][_0x4065('0x5a')][_0x4065('0x48')](),this[_0x4065('0x13')](_0x4ee64e)):this[_0x4065('0x13')](null);});};for(const _0x3e6321 of _0x55986e)_0x20bfde(_0x3e6321);this['listenTo'](_0x55986e,'add',(_0x4f52e3,_0x3665c1)=>{_0x20bfde(_0x3665c1);}),this['listenTo'](_0x55986e,_0x4065('0x4f'),(_0x52cb31,_0x513f9f,_0x858bed)=>{this[_0x4065('0x27')][_0x4065('0x19')](_0x513f9f)['destroy'](),this[_0x4065('0x27')]['delete'](_0x513f9f),_0x2ade75[_0x4065('0x56')]({'removedAnnotation':_0x513f9f,'previousAnnotation':_0x55986e[_0x4065('0x19')](_0x858bed-0x1),'nextAnnotation':_0x55986e[_0x4065('0x19')](_0x858bed+0x1)}),_0x513f9f===this[_0x4065('0x47')]&&this['setActiveAnnotation'](null);},{'priority':_0x4065('0x37')}),this[_0x4065('0x45')](_0x55986e,_0x4065('0x48'),(_0x3373c7,_0x124402)=>{this[_0x4065('0x13')](_0x124402);}),this[_0x4065('0x45')](_0x55986e,_0x4065('0x54'),()=>{this[_0x4065('0x13')](null);}),this['_domEmitter'][_0x4065('0x45')](document,_0x4065('0x4c'),(_0x39664d,_0x140460)=>{_0x140460[_0x4065('0xb')]===_0x12095a[_0x4065('0x2c')]&&_0x500d5e[_0x4065('0x23')]&&(this[_0x4065('0x1d')]['add'](_0x500d5e[_0x4065('0xd')][_0x4065('0xc')]),this[_0x4065('0x61')](),_0x140460[_0x4065('0x4')](),_0x140460['preventDefault']());}),this['_domEmitter']['listenTo'](document,_0x4065('0x51'),(_0x3d17a0,_0x4eee4e)=>{const _0x4e26fc=_0x4eee4e[_0x4065('0x1e')];_0x500d5e[_0x4065('0x23')]&&_0x500d5e[_0x4065('0x5a')][_0x4065('0x17')](_0x4e26fc)||_0x2ade75[_0x4065('0x43')][_0x4065('0x5a')][_0x4065('0x17')](_0x4e26fc)||_0x3d17a0[_0x4065('0x26')]||this['activeAnnotation']&&this[_0x4065('0x47')][_0x4065('0x25')][_0x4065('0x24')](_0x1ec7b2=>_0x1ec7b2[_0x4065('0x17')](_0x4e26fc))||(this[_0x4065('0x1d')][_0x4065('0x20')](),this[_0x4065('0x61')](),this['setActiveAnnotation'](null));});const _0x5c7a94=this['context']instanceof _0x3e23e7?this[_0x4065('0x59')]['editors']:new _0x1895f3([this['context']]);for(const _0x107c5f of _0x5c7a94)this[_0x4065('0x14')](_0x107c5f);this[_0x4065('0x45')](_0x5c7a94,_0x4065('0x21'),(_0x1b466e,_0x2c05d2)=>{this[_0x4065('0x45')](_0x2c05d2,_0x4065('0x3a'),()=>{this[_0x4065('0x14')](_0x2c05d2);});}),this['listenTo'](_0x5c7a94,_0x4065('0x4f'),(_0x1643e6,_0x5abbc3)=>{_0x5abbc3[_0x4065('0x53')][_0x4065('0x5e')](_0x4065('0x34'))&&this['_destroyEditorAnnotationsIntegration'](_0x5abbc3[_0x4065('0x53')][_0x4065('0x19')](_0x4065('0x34')));}),window[_0x4065('0x58')](_0x4065('0x22'),this['_refreshPositioningDebounced']),this[_0x4065('0x4d')]();}[_0x4065('0x13')](_0x130086){if(_0x130086===this[_0x4065('0x47')])return;const _0x37fdf9=this[_0x4065('0x59')]['plugins'][_0x4065('0x19')](_0x5a7657);if(_0x37fdf9[_0x4065('0x42')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x130086,'disableAnimationOnActivatedAnnotation':!0x0}),_0x130086)_0x37fdf9[_0x4065('0x2f')](_0x130086)?this['_showBalloon'](_0x130086):this['_hideBalloon']();else this['_hideBalloon']();this[_0x4065('0x47')]=_0x130086;}[_0x4065('0x29')](){if(!this[_0x4065('0x18')])throw new _0x3de951(_0x4065('0x4e'),this);this[_0x4065('0x13')](null);const _0x405115=this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x5a7657);this['_hideBalloon'](),Array[_0x4065('0x28')](this[_0x4065('0x27')][_0x4065('0x40')](),_0x4339d7=>_0x4339d7[_0x4065('0x11')]()),this[_0x4065('0x27')][_0x4065('0x20')](),_0x405115[_0x4065('0x35')](this[_0x4065('0x3c')]),this[_0x4065('0x46')](),this[_0x4065('0x1c')][_0x4065('0x46')](),this['context']instanceof _0x3e23e7&&this[_0x4065('0x46')](this[_0x4065('0x59')][_0x4065('0x2a')]);for(const _0x2ce006 of Array['from'](this[_0x4065('0x44')]))this[_0x4065('0x6')](_0x2ce006);window[_0x4065('0x1f')](_0x4065('0x22'),this['_refreshPositioningDebounced']),this[_0x4065('0x3')][_0x4065('0x41')](),this['_selectedAnnotations']=[],this[_0x4065('0x18')]=!0x1,this[_0x4065('0x3c')]=null;}['destroy'](){this[_0x4065('0x18')]&&this[_0x4065('0x29')](),this[_0x4065('0x12')][_0x4065('0x33')]();}['_integrateWithEditorAnnotations'](_0x5df19e){const _0x244233=_0x5df19e['plugins']['get'](_0x223216),_0xa0d878=this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x5a7657),_0x55b2e1=this['annotations'],_0x1c7e84=this[_0x4065('0x5d')],_0x159469=()=>{const _0xed93d2=_0x244233[_0x4065('0xe')]({'annotations':this[_0x4065('0x3c')],'activeAnnotation':this[_0x4065('0x47')]});this[_0x4065('0x2d')](_0xed93d2),this['setActiveAnnotation'](_0xed93d2[0x0]||null);};this['listenTo'](_0x244233,_0x4065('0x42'),_0x159469),this['listenTo'](_0x244233,_0x4065('0x54'),(_0x386bb0,{isAnnotationTracked:_0x3fe743})=>{this[_0x4065('0x47')]&&_0x3fe743(this['activeAnnotation'])&&(this[_0x4065('0x2d')]([]),this['setActiveAnnotation'](null));}),this[_0x4065('0x45')](_0x244233,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x4065('0x45')](_0x55b2e1,_0x4065('0x54'),_0x46a8ae=>{_0x244233['hasDomSelection']()&&_0x46a8ae[_0x4065('0x5c')]();},{'priority':_0x4065('0x2')}),this['listenTo'](this['_domEmitter'],_0x4065('0x51'),(_0x56dd77,_0x4c69c0)=>{const _0x3f29c9=_0x4c69c0['target'];_0x1c7e84['isVisible']&&_0x1c7e84['element']['contains'](_0x3f29c9)||_0xa0d878[_0x4065('0x43')]['element']['contains'](_0x3f29c9)||this[_0x4065('0x47')]&&_0x244233['hasDomSelection']()&&(_0x159469(),_0x56dd77[_0x4065('0x26')]=!0x0);},{'priority':_0x4065('0x2')}),this[_0x4065('0x44')]['add'](_0x244233);}[_0x4065('0x6')](_0x56e601){_0x56e601&&(this[_0x4065('0x46')](_0x56e601),this[_0x4065('0x44')]['remove'](_0x56e601));}['_setSelectedAnnotations'](_0x5cade3){for(const _0x54257e of this[_0x4065('0x1')])_0x5cade3[_0x4065('0x15')](_0x54257e)||this[_0x4065('0x1d')]['delete'](_0x54257e[_0x4065('0x43')]);this[_0x4065('0x1')]=_0x5cade3;}[_0x4065('0x4d')](){const _0x45646d=this[_0x4065('0x5d')];this[_0x4065('0x3c')][_0x4065('0x50')](),_0x45646d[_0x4065('0x23')]&&this[_0x4065('0x52')]();}[_0x4065('0x8')](_0x36bb06){if(this['_manuallyClosedAnnotationViews'][_0x4065('0x5e')](_0x36bb06[_0x4065('0x43')]))return;const _0x4b672a=this[_0x4065('0x5d')][_0x4065('0xd')][_0x4065('0xc')];_0x4b672a!==_0x36bb06[_0x4065('0x43')]?(_0x4b672a&&this[_0x4065('0x3b')](_0x4b672a),this[_0x4065('0x5b')](_0x36bb06[_0x4065('0x43')]),this[_0x4065('0x5d')][_0x4065('0xd')]['clear'](),this[_0x4065('0x5d')][_0x4065('0xd')]['add'](_0x36bb06[_0x4065('0x43')]),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}[_0x4065('0x52')](){const _0x359070=this['balloonPanelView'][_0x4065('0xd')][_0x4065('0xc')],_0x31e857=_0x359070&&this[_0x4065('0x3c')][_0x4065('0x62')](_0x359070);if(!_0x31e857||!this[_0x4065('0x27')][_0x4065('0x5e')](_0x31e857))return;const _0x42aabc=this['_annotationToNarrowView']['get'](_0x31e857)[_0x4065('0x5a')],_0x2c420a=function(){const _0x370962=_0x1857a0[_0x4065('0x32')];return[_0x370962[_0x4065('0x1a')],_0x370962[_0x4065('0x30')],_0x370962[_0x4065('0x10')],_0x370962[_0x4065('0x9')],_0x370962['southArrowNorthWest'],_0x370962['northArrowSouthWest']];}();this[_0x4065('0x5d')][_0x4065('0xf')]({'target':_0x42aabc,'positions':_0x2c420a});}[_0x4065('0x61')](){const _0x2e4a73=this[_0x4065('0x5d')],_0x5d7881=_0x2e4a73['content'][_0x4065('0xc')];_0x5d7881&&(this[_0x4065('0x3b')](_0x5d7881),_0x2e4a73[_0x4065('0x2e')](),_0x2e4a73['content']['clear']());}[_0x4065('0x5b')](_0x3afedb){this['listenTo'](_0x3afedb,_0x4065('0x55'),()=>this[_0x4065('0x52')]()),this['listenTo'](_0x3afedb,_0x4065('0x16'),(_0x1c00a1,_0x37ceef)=>{this[_0x4065('0x1d')][_0x4065('0x21')](_0x3afedb),this[_0x4065('0x61')](),_0x37ceef();});}['_detachListeners'](_0x3083e0){this[_0x4065('0x46')](_0x3083e0);}}
|
|
23
|
+
const _0x4872=['NarrowSidebar','mousedown','set:container','contains','content','pin','EditorAnnotations','_refreshPositioning','setActiveAnnotation','detach','narrowSidebar','off','_detachListeners','resize','activeAnnotation','clear','attachToDom','northArrowSouthEast','uiUpdate','listenTo','number','defaultPositions','keydown','northArrowSouthWest','bodyCollection','focusableElements','_destroyEditorAnnotationsIntegration','rearrange','has','blur','context','attach','stop','set','change:height','focus','_domEmitter','balloonPanelView','target','_annotations','ready','includes','element','_manuallyClosedAnnotationViews','_updateBalloonPosition','delete','annotationType','stopPropagation','from','find','annotations','preventClosingBalloon','removeEventListener','execute','editors','destroy','unpin','high','_refreshPositioningDebounced','requires','stopListening','_attachToContainer','southArrowNorthEast','isDirty','_selectedAnnotations','view','_showBalloon','register','_annotationToNarrowView','_setSelectedAnnotations','_integrateWithEditorAnnotations','length','_hideBalloon','add','plugins','hasDomSelection','southArrowNorth','northArrowSouth','remove','get','_editorAnnotations','_attachListeners','addAnnotation','getSidebarItemView','_detachFromContainer','isAttached','isVisible','getByView','first','narrowsidebar-detach-not-attached','detachFromDom','cancel','init','locale','values','esc'];(function(_0x5969d9,_0x48727f){const _0x268b58=function(_0x1034e2){while(--_0x1034e2){_0x5969d9['push'](_0x5969d9['shift']());}};_0x268b58(++_0x48727f);}(_0x4872,0x1db));const _0x268b=function(_0x5969d9,_0x48727f){_0x5969d9=_0x5969d9-0x0;let _0x268b58=_0x4872[_0x5969d9];return _0x268b58;};import{ContextPlugin as _0x440824,Context as _0x43570c}from'ckeditor5/src/core';import _0x253d9a from'./annotationsuis';import _0x4599fa from'./sidebar';import _0x54b65b from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x475006,BodyCollection as _0x380e66}from'ckeditor5/src/ui';import{CKEditorError as _0x524c4e,DomEmitterMixin as _0x5245dc,keyCodes as _0xbf2b63,Collection as _0x94d74}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x21e045}from'lodash-es';import _0x2677dc from'./editorannotations';export default class s extends _0x440824{static get[_0x268b('0x40')](){return[_0x4599fa,_0x253d9a];}static get['pluginName'](){return _0x268b('0x5');}constructor(_0x4158eb){super(_0x4158eb),this[_0x268b('0x5a')]=!0x1,this[_0x268b('0x30')]=new Set(),this[_0x268b('0x29')]=Object['create'](_0x5245dc),this[_0x268b('0x49')]=new Map(),this[_0x268b('0x26')](_0x268b('0x13'),null),this['annotations']=null,this[_0x268b('0x45')]=[],this['_editorAnnotations']=new _0x94d74(),this[_0x268b('0x3f')]=_0x21e045(()=>{this[_0x268b('0xc')]();},0xfa,{'leading':!0x1});}[_0x268b('0x1')](){this['context'][_0x268b('0x4f')][_0x268b('0x54')](_0x253d9a)[_0x268b('0x48')](_0x268b('0xf'),this),this[_0x268b('0x1d')]=new _0x380e66(this[_0x268b('0x23')]['locale']),this[_0x268b('0x2a')]=new _0x475006(this[_0x268b('0x23')][_0x268b('0x2')]),this[_0x268b('0x1d')][_0x268b('0x15')](),this[_0x268b('0x1d')][_0x268b('0x4e')](this[_0x268b('0x2a')]);}[_0x268b('0x24')](_0x32dcc7){this['annotations']=_0x32dcc7;const _0x1cad2a=this[_0x268b('0x23')][_0x268b('0x4f')][_0x268b('0x54')](_0x4599fa),_0x1b7915=this[_0x268b('0x2a')];if(_0x1cad2a[_0x268b('0x2c')]=_0x32dcc7,this[_0x268b('0x5a')])throw new _0x524c4e('narrowsidebar-attach-already-attached',this);this[_0x268b('0x5a')]=!0x0,this['listenTo'](_0x1cad2a,_0x268b('0x7'),()=>{this['detach'](),this[_0x268b('0x18')](_0x1cad2a,'change:container',_0xae3196=>{_0xae3196[_0x268b('0x10')](),this['attach'](_0x32dcc7);});}),_0x1cad2a[_0x268b('0x42')]({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x914f76=_0x444da2=>{const _0x10f787=new _0x54b65b(this[_0x268b('0x23')][_0x268b('0x2')]);_0x1cad2a[_0x268b('0x57')](_0x444da2,_0x10f787),this[_0x268b('0x49')][_0x268b('0x26')](_0x444da2,_0x10f787),_0x10f787['bind']('isDirty',_0x268b('0x33'),_0x268b('0x19'))['to'](_0x444da2[_0x268b('0x46')],_0x268b('0x44'),'type',_0x268b('0x4c')),_0x10f787['on'](_0x268b('0x3a'),()=>{this[_0x268b('0x30')]['clear'](),_0x1b7915[_0x268b('0x9')][_0x268b('0x5d')]!==_0x444da2[_0x268b('0x46')]?(this[_0x268b('0x47')](_0x444da2),_0x444da2[_0x268b('0x46')]['element']['focus'](),this[_0x268b('0xd')](_0x444da2)):this[_0x268b('0xd')](null);});};for(const _0x3c31a4 of _0x32dcc7)_0x914f76(_0x3c31a4);this[_0x268b('0x18')](_0x32dcc7,'add',(_0x1c7145,_0x27423a)=>{_0x914f76(_0x27423a);}),this[_0x268b('0x18')](_0x32dcc7,'remove',(_0x112ae0,_0x41ca59,_0x1ba6c9)=>{this[_0x268b('0x49')][_0x268b('0x54')](_0x41ca59)[_0x268b('0x3c')](),this[_0x268b('0x49')][_0x268b('0x32')](_0x41ca59),_0x1cad2a[_0x268b('0x20')]({'removedAnnotation':_0x41ca59,'previousAnnotation':_0x32dcc7[_0x268b('0x54')](_0x1ba6c9-0x1),'nextAnnotation':_0x32dcc7[_0x268b('0x54')](_0x1ba6c9+0x1)}),_0x41ca59===this[_0x268b('0x13')]&&this[_0x268b('0xd')](null);},{'priority':'low'}),this[_0x268b('0x18')](_0x32dcc7,_0x268b('0x28'),(_0x2d21ac,_0x129c0e)=>{this['setActiveAnnotation'](_0x129c0e);}),this[_0x268b('0x18')](_0x32dcc7,'blur',()=>{this['setActiveAnnotation'](null);}),this[_0x268b('0x29')]['listenTo'](document,_0x268b('0x1b'),(_0x63ebd9,_0x5b3ec4)=>{_0x5b3ec4['keyCode']===_0xbf2b63[_0x268b('0x4')]&&_0x1b7915[_0x268b('0x5b')]&&(this['_manuallyClosedAnnotationViews']['add'](_0x1b7915[_0x268b('0x9')]['first']),this[_0x268b('0x4d')](),_0x5b3ec4[_0x268b('0x34')](),_0x5b3ec4['preventDefault']());}),this['_domEmitter']['listenTo'](document,_0x268b('0x6'),(_0x40ace2,_0x1dc60a)=>{const _0x3b12c7=_0x1dc60a[_0x268b('0x2b')];_0x1b7915['isVisible']&&_0x1b7915[_0x268b('0x2f')][_0x268b('0x8')](_0x3b12c7)||_0x1cad2a[_0x268b('0x46')][_0x268b('0x2f')][_0x268b('0x8')](_0x3b12c7)||_0x40ace2[_0x268b('0x38')]||this[_0x268b('0x13')]&&this[_0x268b('0x13')][_0x268b('0x1e')][_0x268b('0x36')](_0x25915f=>_0x25915f['contains'](_0x3b12c7))||(this['_manuallyClosedAnnotationViews'][_0x268b('0x14')](),this['_hideBalloon'](),this[_0x268b('0xd')](null));});const _0x3a0ae2=this[_0x268b('0x23')]instanceof _0x43570c?this[_0x268b('0x23')][_0x268b('0x3b')]:new _0x94d74([this['context']]);for(const _0x2490f4 of _0x3a0ae2)this[_0x268b('0x4b')](_0x2490f4);this[_0x268b('0x18')](_0x3a0ae2,_0x268b('0x4e'),(_0x1067f7,_0x1649d1)=>{this[_0x268b('0x18')](_0x1649d1,_0x268b('0x2d'),()=>{this[_0x268b('0x4b')](_0x1649d1);});}),this[_0x268b('0x18')](_0x3a0ae2,_0x268b('0x53'),(_0x4fa879,_0x470fef)=>{_0x470fef[_0x268b('0x4f')][_0x268b('0x21')](_0x268b('0xb'))&&this[_0x268b('0x1f')](_0x470fef[_0x268b('0x4f')][_0x268b('0x54')](_0x268b('0xb')));}),window['addEventListener'](_0x268b('0x12'),this['_refreshPositioningDebounced']),this[_0x268b('0xc')]();}[_0x268b('0xd')](_0x44872b){if(_0x44872b===this[_0x268b('0x13')])return;const _0xe94ffe=this[_0x268b('0x23')][_0x268b('0x4f')][_0x268b('0x54')](_0x4599fa);if(_0xe94ffe['refresh']({'blurredAnnotation':this[_0x268b('0x13')],'activatedAnnotation':_0x44872b,'disableAnimationOnActivatedAnnotation':!0x0}),_0x44872b)_0xe94ffe[_0x268b('0x58')](_0x44872b)?this[_0x268b('0x47')](_0x44872b):this[_0x268b('0x4d')]();else this['_hideBalloon']();this[_0x268b('0x13')]=_0x44872b;}['detach'](){if(!this[_0x268b('0x5a')])throw new _0x524c4e(_0x268b('0x5e'),this);this[_0x268b('0xd')](null);const _0x359b93=this[_0x268b('0x23')][_0x268b('0x4f')][_0x268b('0x54')](_0x4599fa);this[_0x268b('0x4d')](),Array[_0x268b('0x35')](this[_0x268b('0x49')][_0x268b('0x3')](),_0x52080b=>_0x52080b[_0x268b('0x3c')]()),this['_annotationToNarrowView'][_0x268b('0x14')](),_0x359b93[_0x268b('0x59')](this[_0x268b('0x37')]),this[_0x268b('0x41')](),this[_0x268b('0x29')][_0x268b('0x41')](),this[_0x268b('0x23')]instanceof _0x43570c&&this[_0x268b('0x41')](this['context'][_0x268b('0x3b')]);for(const _0x4626b3 of Array[_0x268b('0x35')](this[_0x268b('0x55')]))this[_0x268b('0x1f')](_0x4626b3);window[_0x268b('0x39')]('resize',this[_0x268b('0x3f')]),this[_0x268b('0x3f')][_0x268b('0x0')](),this['_selectedAnnotations']=[],this[_0x268b('0x5a')]=!0x1,this[_0x268b('0x37')]=null;}[_0x268b('0x3c')](){this['isAttached']&&this[_0x268b('0xe')](),this[_0x268b('0x1d')][_0x268b('0x5f')]();}[_0x268b('0x4b')](_0xa6814){const _0x4b654b=_0xa6814[_0x268b('0x4f')]['get'](_0x2677dc),_0x51a59b=this[_0x268b('0x23')][_0x268b('0x4f')][_0x268b('0x54')](_0x4599fa),_0x39b91f=this['annotations'],_0x139b26=this['balloonPanelView'],_0x57b99a=()=>{const _0x1d1953=_0x4b654b['getOrderedSelectedAnnotations']({'annotations':this[_0x268b('0x37')],'activeAnnotation':this['activeAnnotation']});this[_0x268b('0x4a')](_0x1d1953),this[_0x268b('0xd')](_0x1d1953[0x0]||null);};this['listenTo'](_0x4b654b,'refresh',_0x57b99a),this[_0x268b('0x18')](_0x4b654b,_0x268b('0x22'),(_0x43bc4d,{isAnnotationTracked:_0x2d378c})=>{this['activeAnnotation']&&_0x2d378c(this['activeAnnotation'])&&(this[_0x268b('0x4a')]([]),this[_0x268b('0xd')](null));}),this['listenTo'](_0x4b654b,_0x268b('0x17'),()=>{this['_refreshPositioningDebounced']();}),this[_0x268b('0x18')](_0x39b91f,_0x268b('0x22'),_0xdac207=>{_0x4b654b[_0x268b('0x50')]()&&_0xdac207[_0x268b('0x25')]();},{'priority':_0x268b('0x3e')}),this[_0x268b('0x18')](this[_0x268b('0x29')],_0x268b('0x6'),(_0x25928e,_0x13d16a)=>{const _0x28dee5=_0x13d16a[_0x268b('0x2b')];_0x139b26['isVisible']&&_0x139b26[_0x268b('0x2f')][_0x268b('0x8')](_0x28dee5)||_0x51a59b[_0x268b('0x46')]['element'][_0x268b('0x8')](_0x28dee5)||this[_0x268b('0x13')]&&_0x4b654b[_0x268b('0x50')]()&&(_0x57b99a(),_0x25928e[_0x268b('0x38')]=!0x0);},{'priority':'high'}),this['_editorAnnotations'][_0x268b('0x4e')](_0x4b654b);}[_0x268b('0x1f')](_0x33efa3){_0x33efa3&&(this[_0x268b('0x41')](_0x33efa3),this[_0x268b('0x55')][_0x268b('0x53')](_0x33efa3));}[_0x268b('0x4a')](_0x22944d){for(const _0x38eecb of this[_0x268b('0x45')])_0x22944d[_0x268b('0x2e')](_0x38eecb)||this[_0x268b('0x30')][_0x268b('0x32')](_0x38eecb[_0x268b('0x46')]);this[_0x268b('0x45')]=_0x22944d;}['_refreshPositioning'](){const _0x1efc07=this['balloonPanelView'];this[_0x268b('0x37')]['refreshPositioning'](),_0x1efc07['isVisible']&&this[_0x268b('0x31')]();}[_0x268b('0x47')](_0x58eae0){if(this['_manuallyClosedAnnotationViews'][_0x268b('0x21')](_0x58eae0['view']))return;const _0x7579d6=this[_0x268b('0x2a')][_0x268b('0x9')][_0x268b('0x5d')];_0x7579d6!==_0x58eae0[_0x268b('0x46')]?(_0x7579d6&&this[_0x268b('0x11')](_0x7579d6),this[_0x268b('0x56')](_0x58eae0[_0x268b('0x46')]),this[_0x268b('0x2a')][_0x268b('0x9')]['clear'](),this[_0x268b('0x2a')][_0x268b('0x9')]['add'](_0x58eae0[_0x268b('0x46')]),this['_updateBalloonPosition']()):this[_0x268b('0x31')]();}[_0x268b('0x31')](){const _0x3dd3c7=this[_0x268b('0x2a')][_0x268b('0x9')]['first'],_0x51dbf6=_0x3dd3c7&&this[_0x268b('0x37')][_0x268b('0x5c')](_0x3dd3c7);if(!_0x51dbf6||!this[_0x268b('0x49')][_0x268b('0x21')](_0x51dbf6))return;const _0x694af7=this[_0x268b('0x49')][_0x268b('0x54')](_0x51dbf6)['element'],_0x50887c=function(){const _0x2c4460=_0x475006[_0x268b('0x1a')];return[_0x2c4460[_0x268b('0x43')],_0x2c4460[_0x268b('0x16')],_0x2c4460[_0x268b('0x51')],_0x2c4460[_0x268b('0x52')],_0x2c4460['southArrowNorthWest'],_0x2c4460[_0x268b('0x1c')]];}();this[_0x268b('0x2a')][_0x268b('0xa')]({'target':_0x694af7,'positions':_0x50887c});}[_0x268b('0x4d')](){const _0x80b541=this['balloonPanelView'],_0x26c3c7=_0x80b541[_0x268b('0x9')][_0x268b('0x5d')];_0x26c3c7&&(this[_0x268b('0x11')](_0x26c3c7),_0x80b541[_0x268b('0x3d')](),_0x80b541[_0x268b('0x9')][_0x268b('0x14')]());}['_attachListeners'](_0x679b84){this[_0x268b('0x18')](_0x679b84,_0x268b('0x27'),()=>this[_0x268b('0x31')]()),this['listenTo'](_0x679b84,'Esc',(_0x38fcdc,_0x52e44c)=>{this['_manuallyClosedAnnotationViews'][_0x268b('0x4e')](_0x679b84),this['_hideBalloon'](),_0x52e44c();});}[_0x268b('0x11')](_0x2d1cb1){this[_0x268b('0x41')](_0x2d1cb1);}}
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/annotations/sidebar
|
|
7
|
-
* @publicApi
|
|
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';
|
|
14
|
-
/**
|
|
15
|
-
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
|
-
*
|
|
17
|
-
* `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~SidebarView} which can be injected at any place on a website.
|
|
18
|
-
*
|
|
19
|
-
* It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
|
|
20
|
-
* or `Rect`s.
|
|
21
|
-
*
|
|
22
|
-
* The following plugins use `Sidebar` to provide annotations UI:
|
|
23
|
-
*
|
|
24
|
-
* * {@link module:comments/annotations/widesidebar~WideSidebar}
|
|
25
|
-
* * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
|
|
26
|
-
*
|
|
27
|
-
* The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} which is a wrapper view for
|
|
28
|
-
* {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
|
|
29
|
-
* the sidebar.
|
|
30
|
-
*
|
|
31
|
-
* Structure of items:
|
|
32
|
-
*
|
|
33
|
-
* |-> SidebarItemView -> AnnotationView -> added View
|
|
34
|
-
* Sidebar#view#list -|-> SidebarItemView -> AnnotationView -> added View
|
|
35
|
-
* |-> ...
|
|
36
|
-
*/
|
|
37
|
-
export default class Sidebar extends ContextPlugin {
|
|
38
|
-
/**
|
|
39
|
-
* Container element into which sidebar is injected (in the DOM).
|
|
40
|
-
*
|
|
41
|
-
* @observable
|
|
42
|
-
*/
|
|
43
|
-
container: HTMLElement | null;
|
|
44
|
-
/**
|
|
45
|
-
* Sidebar view.
|
|
46
|
-
*/
|
|
47
|
-
view: SidebarView;
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
static get pluginName(): "Sidebar";
|
|
52
|
-
/**
|
|
53
|
-
* @inheritDoc
|
|
54
|
-
*/
|
|
55
|
-
constructor(context: Context | Editor);
|
|
56
|
-
/**
|
|
57
|
-
* @inheritDoc
|
|
58
|
-
*/
|
|
59
|
-
init(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Sets a new sidebar container.
|
|
62
|
-
*/
|
|
63
|
-
setContainer(container: HTMLElement): void;
|
|
64
|
-
/**
|
|
65
|
-
* Rearranges annotations when the annotation is removed.
|
|
66
|
-
*/
|
|
67
|
-
rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
|
|
68
|
-
removedAnnotation: Annotation;
|
|
69
|
-
previousAnnotation: Annotation | null;
|
|
70
|
-
nextAnnotation: Annotation | null;
|
|
71
|
-
}): void;
|
|
72
|
-
/**
|
|
73
|
-
* Refreshes sidebar items when one of the annotations is activated.
|
|
74
|
-
*
|
|
75
|
-
* @param options.activatedAnnotation The activated annotation.
|
|
76
|
-
* @param options.blurredAnnotation The previously active annotation.
|
|
77
|
-
* @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
|
|
78
|
-
*/
|
|
79
|
-
refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
|
|
80
|
-
blurredAnnotation: Annotation | null;
|
|
81
|
-
activatedAnnotation: Annotation | null;
|
|
82
|
-
disableAnimationOnActivatedAnnotation?: boolean;
|
|
83
|
-
}): void;
|
|
84
|
-
/**
|
|
85
|
-
* Creates new {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} and binds its
|
|
86
|
-
* position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
|
|
87
|
-
*
|
|
88
|
-
* By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
|
|
89
|
-
* to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
|
|
90
|
-
*/
|
|
91
|
-
addAnnotation(annotation: Annotation, viewToDisplay?: View): SidebarItemView;
|
|
92
|
-
/**
|
|
93
|
-
* Returns sidebar item view that wraps given annotation view.
|
|
94
|
-
*/
|
|
95
|
-
getSidebarItemView(annotation: Annotation): SidebarItemView | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* @inheritDoc
|
|
98
|
-
*/
|
|
99
|
-
destroy(): void;
|
|
100
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/annotations/sidebar
|
|
7
|
+
* @publicApi
|
|
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';
|
|
14
|
+
/**
|
|
15
|
+
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
|
+
*
|
|
17
|
+
* `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~SidebarView} which can be injected at any place on a website.
|
|
18
|
+
*
|
|
19
|
+
* It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
|
|
20
|
+
* or `Rect`s.
|
|
21
|
+
*
|
|
22
|
+
* The following plugins use `Sidebar` to provide annotations UI:
|
|
23
|
+
*
|
|
24
|
+
* * {@link module:comments/annotations/widesidebar~WideSidebar}
|
|
25
|
+
* * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
|
|
26
|
+
*
|
|
27
|
+
* The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} which is a wrapper view for
|
|
28
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
|
|
29
|
+
* the sidebar.
|
|
30
|
+
*
|
|
31
|
+
* Structure of items:
|
|
32
|
+
*
|
|
33
|
+
* |-> SidebarItemView -> AnnotationView -> added View
|
|
34
|
+
* Sidebar#view#list -|-> SidebarItemView -> AnnotationView -> added View
|
|
35
|
+
* |-> ...
|
|
36
|
+
*/
|
|
37
|
+
export default class Sidebar extends ContextPlugin {
|
|
38
|
+
/**
|
|
39
|
+
* Container element into which sidebar is injected (in the DOM).
|
|
40
|
+
*
|
|
41
|
+
* @observable
|
|
42
|
+
*/
|
|
43
|
+
container: HTMLElement | null;
|
|
44
|
+
/**
|
|
45
|
+
* Sidebar view.
|
|
46
|
+
*/
|
|
47
|
+
view: SidebarView;
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
static get pluginName(): "Sidebar";
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
constructor(context: Context | Editor);
|
|
56
|
+
/**
|
|
57
|
+
* @inheritDoc
|
|
58
|
+
*/
|
|
59
|
+
init(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Sets a new sidebar container.
|
|
62
|
+
*/
|
|
63
|
+
setContainer(container: HTMLElement): void;
|
|
64
|
+
/**
|
|
65
|
+
* Rearranges annotations when the annotation is removed.
|
|
66
|
+
*/
|
|
67
|
+
rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
|
|
68
|
+
removedAnnotation: Annotation;
|
|
69
|
+
previousAnnotation: Annotation | null;
|
|
70
|
+
nextAnnotation: Annotation | null;
|
|
71
|
+
}): void;
|
|
72
|
+
/**
|
|
73
|
+
* Refreshes sidebar items when one of the annotations is activated.
|
|
74
|
+
*
|
|
75
|
+
* @param options.activatedAnnotation The activated annotation.
|
|
76
|
+
* @param options.blurredAnnotation The previously active annotation.
|
|
77
|
+
* @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
|
|
78
|
+
*/
|
|
79
|
+
refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
|
|
80
|
+
blurredAnnotation: Annotation | null;
|
|
81
|
+
activatedAnnotation: Annotation | null;
|
|
82
|
+
disableAnimationOnActivatedAnnotation?: boolean;
|
|
83
|
+
}): void;
|
|
84
|
+
/**
|
|
85
|
+
* Creates new {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} and binds its
|
|
86
|
+
* position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
|
|
87
|
+
*
|
|
88
|
+
* By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
|
|
89
|
+
* to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
|
|
90
|
+
*/
|
|
91
|
+
addAnnotation(annotation: Annotation, viewToDisplay?: View): SidebarItemView;
|
|
92
|
+
/**
|
|
93
|
+
* Returns sidebar item view that wraps given annotation view.
|
|
94
|
+
*/
|
|
95
|
+
getSidebarItemView(annotation: Annotation): SidebarItemView | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* @inheritDoc
|
|
98
|
+
*/
|
|
99
|
+
destroy(): void;
|
|
100
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2eda=['clear','getIndex','sidebar-setcontainer-invalid-element','length','unbind','define','change:top','push','nodeType','context','get','minHeight','max','_getItemBefore','_getMaxAvailableTop','appendChild','destroy','_lastItem','targetRect','_annotationToSidebarItemView','updateHeight','last','pluginName','bottom','_getItemAfter','class','getSidebarItemView','_alignAfterItem','delete','content','object','isAnimationDisabled','set','refresh','_alignForBottomChange','addAnnotation','target','_getTargetTop','_sidebarItemViewToAnnotation','container','listenTo','setContainer','_recalculate','_alignForTopChange','_recalculateBuffer','_targetTop','element','view','remove','height','config','list','add','render','init','_attachToContainer','_activeAnnotation','_spaceBetweenItems','_createSidebarView','sidebar.preventScrollOutOfView','_annotations','top','_detachFromContainer','_alignBeforeItem','stopListening','locale','Sidebar','sidebar-attachtocontainer-missing-container','_setItemTop','_destroySidebarItemView','change:_lastItem','_updateLastItem','_alignToTargetRect'];(function(_0x426544,_0x2edaec){const _0x2f4f4f=function(_0x424612){while(--_0x424612){_0x426544['push'](_0x426544['shift']());}};_0x2f4f4f(++_0x2edaec);}(_0x2eda,0x17b));const _0x2f4f=function(_0x426544,_0x2edaec){_0x426544=_0x426544-0x0;let _0x2f4f4f=_0x2eda[_0x426544];return _0x2f4f4f;};import{ContextPlugin as _0xe5f52b}from'ckeditor5/src/core';import{Rect as _0x1ea5c1,CKEditorError as _0x24bc6d}from'ckeditor5/src/utils';import _0x14f71 from'./view/sidebarview';import _0xf1f8e3 from'./view/sidebaritemview';export default class z extends _0xe5f52b{static get[_0x2f4f('0x8')](){return _0x2f4f('0x34');}constructor(_0x4b51b2){super(_0x4b51b2),this[_0x2f4f('0x12')]('_lastItem',void 0x0),this[_0x2f4f('0x21')]=this[_0x2f4f('0x2c')](),this[_0x2f4f('0x12')](_0x2f4f('0x19'),null),this[_0x2f4f('0x2b')]=0x19,this[_0x2f4f('0x18')]=new Map(),this[_0x2f4f('0x5')]=new Map(),this[_0x2f4f('0x44')]['config'][_0x2f4f('0x40')](_0x2f4f('0x2d'),!0x1),this[_0x2f4f('0x2e')]=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}[_0x2f4f('0x28')](){const _0x5acf5c=this['context'][_0x2f4f('0x24')]['get']('sidebar.container');_0x5acf5c&&this['setContainer'](_0x5acf5c);}[_0x2f4f('0x1b')](_0x32e4c0){if(!y(_0x32e4c0))throw new _0x24bc6d(_0x2f4f('0x3d'));this['container']=_0x32e4c0;}[_0x2f4f('0x29')]({viewClass:_0x202d10='',spaceBetweenItems:_0x21d74b=0x19}={}){if(!y(this[_0x2f4f('0x19')]))throw new _0x24bc6d(_0x2f4f('0x35'),this);this[_0x2f4f('0x19')][_0x2f4f('0x1')](this[_0x2f4f('0x21')][_0x2f4f('0x20')]),this[_0x2f4f('0x21')][_0x2f4f('0xb')]=_0x202d10,this[_0x2f4f('0x2b')]=_0x21d74b;}['rearrange']({removedAnnotation:_0x3baf2f,previousAnnotation:_0x5748ec,nextAnnotation:_0x194736}){const _0x4e67f3=this[_0x2f4f('0xc')](_0x3baf2f);this[_0x2f4f('0x21')][_0x2f4f('0x25')][_0x2f4f('0x22')](_0x4e67f3),this[_0x2f4f('0x37')](_0x3baf2f),_0x5748ec&&this[_0x2f4f('0x3a')](this[_0x2f4f('0xc')](_0x5748ec)),_0x194736&&this[_0x2f4f('0x3a')](this[_0x2f4f('0xc')](_0x194736)),this['_updateLastItem']();}[_0x2f4f('0x13')]({blurredAnnotation:_0x5d28ea,activatedAnnotation:_0x3e1de1,disableAnimationOnActivatedAnnotation:_0x4fb372}){if(this['_activeAnnotation']=_0x3e1de1,_0x5d28ea){_0x5d28ea['isActive']=!0x1;const _0x12f359=this[_0x2f4f('0xc')](_0x5d28ea);_0x12f359&&_0x4fb372&&(_0x12f359[_0x2f4f('0x11')]=!0x1);}if(_0x3e1de1){const _0x5dcc70=this[_0x2f4f('0xc')](_0x3e1de1);_0x5dcc70&&(_0x3e1de1['isActive']=!0x0,_0x4fb372&&(_0x5dcc70['isAnimationDisabled']=!0x0,_0x5dcc70[_0x2f4f('0x2f')]+=0x1),this['_alignToTargetRect'](_0x5dcc70));}}[_0x2f4f('0x30')](_0x487976){if(this[_0x2f4f('0x21')][_0x2f4f('0x20')][_0x2f4f('0x22')](),_0x487976)for(const _0x11bb39 of _0x487976)this['_destroySidebarItemView'](_0x11bb39);this[_0x2f4f('0x21')][_0x2f4f('0x25')][_0x2f4f('0x3b')](),this[_0x2f4f('0x21')][_0x2f4f('0xb')]='',this[_0x2f4f('0x3')]=null;}[_0x2f4f('0x15')](_0x19d215,_0x65b19c){_0x65b19c||(_0x65b19c=_0x19d215[_0x2f4f('0x21')]);const _0x193816=new _0xf1f8e3(this['context'][_0x2f4f('0x33')]);this['_sidebarItemViewToAnnotation']['set'](_0x193816,_0x19d215),this[_0x2f4f('0x5')][_0x2f4f('0x12')](_0x19d215,_0x193816),_0x193816[_0x2f4f('0xf')][_0x2f4f('0x26')](_0x65b19c),this[_0x2f4f('0x1a')](_0x19d215[_0x2f4f('0x21')],'change:targetRect',(_0x60533d,_0x11bd38,_0x502c49)=>{const _0x445aeb=this[_0x2f4f('0x17')](_0x19d215,_0x502c49);_0x193816['_targetTop']!=_0x445aeb&&(_0x193816[_0x2f4f('0x1f')]=_0x445aeb,this[_0x2f4f('0x36')](_0x193816,_0x445aeb));}),this[_0x2f4f('0x1a')](_0x193816,_0x2f4f('0x41'),()=>{this[_0x2f4f('0x1c')](_0x193816,_0x2f4f('0x2f'));}),this['listenTo'](_0x193816,'change:bottom',()=>{this['_recalculate'](_0x193816,_0x2f4f('0x9'));}),this[_0x2f4f('0x3a')](_0x193816);const _0x37bc83=this[_0x2f4f('0x48')](_0x193816);if(_0x37bc83)this[_0x2f4f('0xd')](_0x37bc83,_0x193816)||this[_0x2f4f('0x3a')](_0x193816);else this['_alignToTargetRect'](_0x193816);return this[_0x2f4f('0x39')](),this[_0x2f4f('0x21')][_0x2f4f('0x25')][_0x2f4f('0x26')](_0x193816),_0x193816;}[_0x2f4f('0x1d')](_0x785ed8){if(!_0x785ed8[_0x2f4f('0xf')][_0x2f4f('0x3e')])return;const _0x5cd91d=this[_0x2f4f('0x48')](_0x785ed8);if(!_0x5cd91d)return;const _0x3d1db6=this[_0x2f4f('0x18')]['get'](_0x5cd91d),_0x1c3dac=this[_0x2f4f('0x2a')];_0x1c3dac&&_0x1c3dac===_0x3d1db6?this['_alignAfterItem'](_0x5cd91d,_0x785ed8):this[_0x2f4f('0x31')](_0x785ed8,_0x5cd91d);}[_0x2f4f('0x14')](_0x44cae9){if(!_0x44cae9['content'][_0x2f4f('0x3e')])return;const _0x2e9c98=this[_0x2f4f('0xa')](_0x44cae9);if(!_0x2e9c98)return;const _0x1d16a2=this[_0x2f4f('0x18')][_0x2f4f('0x45')](_0x2e9c98),_0x4157ef=this[_0x2f4f('0x44')][_0x2f4f('0x24')][_0x2f4f('0x45')]('sidebar.preventScrollOutOfView'),_0x394f30=this[_0x2f4f('0x2a')];_0x394f30&&_0x394f30===_0x1d16a2&&_0x4157ef?(this[_0x2f4f('0x31')](_0x2e9c98,_0x44cae9),this[_0x2f4f('0xd')](_0x44cae9,_0x2e9c98)):_0x394f30&&_0x394f30===_0x1d16a2?this[_0x2f4f('0x31')](_0x2e9c98,_0x44cae9):this[_0x2f4f('0xd')](_0x44cae9,_0x2e9c98);}[_0x2f4f('0x1c')](_0x4a785b,_0xc78235){0x0===this[_0x2f4f('0x1e')][_0x2f4f('0x3e')]&&setTimeout(()=>{for(const {sidebarItemView:_0x4d895c,changedProp:_0xb80da7}of this[_0x2f4f('0x1e')])_0x2f4f('0x2f')===_0xb80da7?this['_alignForTopChange'](_0x4d895c):this[_0x2f4f('0x14')](_0x4d895c);this[_0x2f4f('0x1e')]=[];},0xa),this[_0x2f4f('0x1e')][_0x2f4f('0x42')]({'sidebarItemView':_0x4a785b,'changedProp':_0xc78235});}[_0x2f4f('0xc')](_0x2567c3){return this[_0x2f4f('0x5')][_0x2f4f('0x45')](_0x2567c3);}['destroy'](){this[_0x2f4f('0x32')](),this[_0x2f4f('0x21')][_0x2f4f('0x2')]();}[_0x2f4f('0x37')](_0x31227c){const _0x2acda7=this[_0x2f4f('0xc')](_0x31227c);this[_0x2f4f('0x32')](_0x2acda7),this[_0x2f4f('0x32')](_0x31227c[_0x2f4f('0x21')]),_0x2acda7[_0x2f4f('0x2')](),this[_0x2f4f('0x5')]['delete'](_0x31227c),this[_0x2f4f('0x18')][_0x2f4f('0xe')](_0x2acda7);}[_0x2f4f('0x2c')](){const _0x521a4f=new _0x14f71(this['context'][_0x2f4f('0x33')]);return _0x521a4f[_0x2f4f('0x27')](),this['on'](_0x2f4f('0x38'),(_0xf42670,_0x20d654,_0x39eccc,_0x114eef)=>{_0x114eef&&_0x521a4f[_0x2f4f('0x3f')](_0x2f4f('0x46')),_0x39eccc?_0x521a4f['bind'](_0x2f4f('0x46'))['to'](_0x39eccc,_0x2f4f('0x9')):_0x521a4f[_0x2f4f('0x46')]=null;}),_0x521a4f;}[_0x2f4f('0x39')](){var _0x5850d8;this[_0x2f4f('0x3')]=(null===(_0x5850d8=this['_annotations'])||void 0x0===_0x5850d8?void 0x0:_0x5850d8['last'])?this[_0x2f4f('0xc')](this['_annotations'][_0x2f4f('0x7')]):null;}[_0x2f4f('0x48')](_0x47d118){var _0x5d07e4;const _0x2b064a=this[_0x2f4f('0x18')]['get'](_0x47d118),_0x5bd1d0=_0x2b064a&&(null===(_0x5d07e4=this[_0x2f4f('0x2e')])||void 0x0===_0x5d07e4?void 0x0:_0x5d07e4[_0x2f4f('0x45')](this[_0x2f4f('0x2e')][_0x2f4f('0x3c')](_0x2b064a)-0x1));return _0x5bd1d0&&this[_0x2f4f('0xc')](_0x5bd1d0)||null;}[_0x2f4f('0xa')](_0x491186){var _0x18b0dc;const _0x449427=this['_sidebarItemViewToAnnotation'][_0x2f4f('0x45')](_0x491186),_0x28f760=_0x449427&&(null===(_0x18b0dc=this['_annotations'])||void 0x0===_0x18b0dc?void 0x0:_0x18b0dc[_0x2f4f('0x45')](this['_annotations'][_0x2f4f('0x3c')](_0x449427)+0x1));return _0x28f760&&this[_0x2f4f('0xc')](_0x28f760)||null;}['_alignBeforeItem'](_0x5ab0bc,_0x4a540a){_0x5ab0bc[_0x2f4f('0x6')]();const _0x52d234=H(_0x4a540a[_0x2f4f('0x9')]+this[_0x2f4f('0x2b')],_0x5ab0bc[_0x2f4f('0x2f')]);return!!_0x52d234&&(this[_0x2f4f('0x36')](_0x4a540a,_0x4a540a['top']-_0x52d234),!0x0);}[_0x2f4f('0xd')](_0x469198,_0x13cb48){_0x469198[_0x2f4f('0x6')]();const _0x2c7e97=H(_0x469198[_0x2f4f('0x9')]+this[_0x2f4f('0x2b')],_0x13cb48[_0x2f4f('0x2f')]);return!!_0x2c7e97&&(this[_0x2f4f('0x36')](_0x13cb48,_0x13cb48[_0x2f4f('0x2f')]+_0x2c7e97,!0x1),!0x0);}[_0x2f4f('0x3a')](_0x5d0a46){const _0xd8919e=this['_sidebarItemViewToAnnotation'][_0x2f4f('0x45')](_0x5d0a46);if(!_0xd8919e||!_0xd8919e[_0x2f4f('0x16')]||!_0xd8919e[_0x2f4f('0x4')])return;const _0x79cdb9=this['_getTargetTop'](_0xd8919e,_0xd8919e['targetRect']);this[_0x2f4f('0x36')](_0x5d0a46,_0x79cdb9);}[_0x2f4f('0x17')](_0x52520a,_0x4fb27e){if(null===_0x4fb27e)return 0x0;if(_0x52520a[_0x2f4f('0x16')]instanceof _0x1ea5c1)return _0x4fb27e[_0x2f4f('0x2f')];{const _0xc71f05=new _0x1ea5c1(this[_0x2f4f('0x21')][_0x2f4f('0x20')])[_0x2f4f('0x2f')];return _0x4fb27e[_0x2f4f('0x2f')]-_0xc71f05;}}[_0x2f4f('0x36')](_0x25b0e0,_0x1cd00c,_0x17db7b=this['context'][_0x2f4f('0x24')]['get'](_0x2f4f('0x2d'))){_0x17db7b&&(_0x1cd00c=Math[_0x2f4f('0x47')](_0x1cd00c,this['_getMaxAvailableTop'](_0x25b0e0))),_0x25b0e0['top']=_0x1cd00c;}[_0x2f4f('0x0')](_0x2f4ea8){let _0x5ac425=this[_0x2f4f('0x48')](_0x2f4ea8),_0x2c29ca=0x0;for(;_0x5ac425;)_0x5ac425[_0x2f4f('0x6')](),_0x2c29ca+=this['_spaceBetweenItems']+_0x5ac425[_0x2f4f('0x23')],_0x5ac425=this[_0x2f4f('0x48')](_0x5ac425);return _0x2c29ca;}}function H(_0x471edb,_0x20d877){return Math[_0x2f4f('0x47')](_0x471edb-_0x20d877,0x0);}function y(_0x2a6bf4){return null!==_0x2a6bf4&&_0x2f4f('0x10')==typeof _0x2a6bf4&&0x1===_0x2a6bf4[_0x2f4f('0x43')];}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module comments/annotations/view/annotationcounterbuttonview
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { ButtonView, View } from 'ckeditor5/src/ui';
|
|
10
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
11
|
-
/**
|
|
12
|
-
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
13
|
-
*/
|
|
14
|
-
export default class AnnotationCounterButtonView extends ButtonView {
|
|
15
|
-
/**
|
|
16
|
-
* @observable
|
|
17
|
-
*/
|
|
18
|
-
isDirty: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @observable
|
|
21
|
-
*/
|
|
22
|
-
number: number;
|
|
23
|
-
/**
|
|
24
|
-
* @observable
|
|
25
|
-
*/
|
|
26
|
-
annotationType: string;
|
|
27
|
-
counterView: View;
|
|
28
|
-
constructor(locale: Locale);
|
|
29
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module comments/annotations/view/annotationcounterbuttonview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ButtonView, View } from 'ckeditor5/src/ui';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
11
|
+
/**
|
|
12
|
+
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
13
|
+
*/
|
|
14
|
+
export default class AnnotationCounterButtonView extends ButtonView {
|
|
15
|
+
/**
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
isDirty: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
number: number;
|
|
23
|
+
/**
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
annotationType: string;
|
|
27
|
+
counterView: View;
|
|
28
|
+
constructor(locale: Locale);
|
|
29
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x513d=['_badge','bindTemplate','bind','toString','isDirty','ck-annotation-counter__badge--edit-mode','counterView','span','number','icon','ck-annotation-counter__badge','set','extendTemplate','ck-annotation-counter__badge--','...','annotationType'];(function(_0x1915ae,_0x513d5b){const _0x16bcd2=function(_0x33e515){while(--_0x33e515){_0x1915ae['push'](_0x1915ae['shift']());}};_0x16bcd2(++_0x513d5b);}(_0x513d,0xcd));const _0x16bc=function(_0x1915ae,_0x513d5b){_0x1915ae=_0x1915ae-0x0;let _0x16bcd2=_0x513d[_0x1915ae];return _0x16bcd2;};import{ButtonView as _0x1c9bd9,View as _0x583c6c}from'ckeditor5/src/ui';import _0x586ec2 from'../../../theme/icons/add-comment.svg';export default class D extends _0x1c9bd9{constructor(_0x1e2f31){super(_0x1e2f31);const _0x44d7da=this[_0x16bc('0x4')];this[_0x16bc('0xe')](_0x16bc('0x7'),!0x1),this[_0x16bc('0xe')](_0x16bc('0xb'),0x0),this[_0x16bc('0x5')]('_badge')['to'](this,_0x16bc('0x7'),this,_0x16bc('0xb'),(_0x180a5e,_0x5d7669)=>_0x180a5e?_0x16bc('0x1'):_0x5d7669[_0x16bc('0x6')]()),this[_0x16bc('0xe')](_0x16bc('0x2'),''),this[_0x16bc('0xc')]=_0x586ec2,this[_0x16bc('0xf')]({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x583c6c(),this[_0x16bc('0x9')]['setTemplate']({'tag':_0x16bc('0xa'),'attributes':{'class':[_0x16bc('0xd'),_0x44d7da['to'](_0x16bc('0x2'),_0x27750a=>_0x16bc('0x0')+_0x27750a),_0x44d7da['if'](_0x16bc('0x7'),_0x16bc('0x8'))]},'children':[{'text':_0x44d7da['to'](_0x16bc('0x3'))}]}),this['children']['add'](this['counterView']);}}
|