@ckeditor/ckeditor5-comments 39.0.2 → 40.0.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.
Files changed (102) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/comments.js +1 -1
  4. package/build/translations/pt-br.js +1 -1
  5. package/lang/translations/pt-br.po +3 -3
  6. package/package.json +3 -3
  7. package/src/annotations/annotation.d.ts +90 -90
  8. package/src/annotations/annotation.js +1 -1
  9. package/src/annotations/annotationcollection.d.ts +98 -98
  10. package/src/annotations/annotationcollection.js +1 -1
  11. package/src/annotations/annotations.d.ts +154 -154
  12. package/src/annotations/annotations.js +1 -1
  13. package/src/annotations/annotationsuis.d.ts +232 -232
  14. package/src/annotations/annotationsuis.js +1 -1
  15. package/src/annotations/editorannotations.d.ts +67 -67
  16. package/src/annotations/editorannotations.js +1 -1
  17. package/src/annotations/inlineannotations.d.ts +90 -90
  18. package/src/annotations/inlineannotations.js +1 -1
  19. package/src/annotations/narrowsidebar.d.ts +85 -85
  20. package/src/annotations/narrowsidebar.js +1 -1
  21. package/src/annotations/sidebar.d.ts +100 -100
  22. package/src/annotations/sidebar.js +1 -1
  23. package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
  24. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  25. package/src/annotations/view/annotationview.d.ts +90 -90
  26. package/src/annotations/view/annotationview.js +1 -1
  27. package/src/annotations/view/sidebaritemview.d.ts +55 -55
  28. package/src/annotations/view/sidebaritemview.js +1 -1
  29. package/src/annotations/view/sidebarview.d.ts +32 -32
  30. package/src/annotations/view/sidebarview.js +1 -1
  31. package/src/annotations/widesidebar.d.ts +77 -77
  32. package/src/annotations/widesidebar.js +1 -1
  33. package/src/augmentation.d.ts +52 -52
  34. package/src/comments/addcommentthreadcommand.d.ts +35 -35
  35. package/src/comments/addcommentthreadcommand.js +1 -1
  36. package/src/comments/commentsarchive.d.ts +31 -31
  37. package/src/comments/commentsarchive.js +1 -1
  38. package/src/comments/commentsarchiveui.d.ts +38 -38
  39. package/src/comments/commentsarchiveui.js +1 -1
  40. package/src/comments/commentsediting.d.ts +79 -79
  41. package/src/comments/commentsediting.js +1 -1
  42. package/src/comments/commentsrepository.d.ts +1129 -1105
  43. package/src/comments/commentsrepository.js +1 -1
  44. package/src/comments/commentsui.d.ts +33 -33
  45. package/src/comments/commentsui.js +1 -1
  46. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
  47. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  48. package/src/comments/integrations/importword.d.ts +21 -21
  49. package/src/comments/integrations/importword.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
  51. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  52. package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
  53. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  54. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
  55. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  56. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  57. package/src/comments/ui/commentthreadcontroller.js +1 -1
  58. package/src/comments/ui/view/basecommentthreadview.d.ts +119 -112
  59. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  60. package/src/comments/ui/view/basecommentview.d.ts +112 -112
  61. package/src/comments/ui/view/basecommentview.js +1 -1
  62. package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
  63. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  64. package/src/comments/ui/view/commentcontentview.d.ts +14 -14
  65. package/src/comments/ui/view/commentcontentview.js +1 -1
  66. package/src/comments/ui/view/commentinputview.d.ts +86 -86
  67. package/src/comments/ui/view/commentinputview.js +1 -1
  68. package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
  69. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  70. package/src/comments/ui/view/commentslistview.d.ts +100 -100
  71. package/src/comments/ui/view/commentslistview.js +1 -1
  72. package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
  73. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  74. package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
  75. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  76. package/src/comments/ui/view/commentthreadview.d.ts +118 -117
  77. package/src/comments/ui/view/commentthreadview.js +1 -1
  78. package/src/comments/ui/view/commentview.d.ts +243 -243
  79. package/src/comments/ui/view/commentview.js +1 -1
  80. package/src/comments.d.ts +35 -35
  81. package/src/comments.js +1 -1
  82. package/src/commentsonly.d.ts +33 -33
  83. package/src/commentsonly.js +1 -1
  84. package/src/config.d.ts +176 -176
  85. package/src/index.d.ts +24 -24
  86. package/src/utils/common-translations.d.ts +9 -9
  87. package/src/utils/common-translations.js +1 -1
  88. package/src/utils/createmutationobserver.d.ts +14 -14
  89. package/src/utils/createmutationobserver.js +1 -1
  90. package/theme/annotation-inline.css +2 -1
  91. package/theme/annotation.css +2 -1
  92. package/theme/comment.css +2 -1
  93. package/theme/commentinput.css +2 -1
  94. package/theme/commentmarker.css +2 -1
  95. package/theme/commentsarchive.css +2 -1
  96. package/theme/commentthread.css +12 -1
  97. package/theme/icons/add-comment.svg +1 -1
  98. package/theme/icons/comments-archive.svg +1 -1
  99. package/theme/icons/edit-comment.svg +1 -1
  100. package/theme/icons/remove-comment.svg +1 -1
  101. package/theme/sidebar-narrow.css +2 -1
  102. package/theme/sidebar.css +2 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xdbb6=['plugins','stopListening','clear','annotations','listenTo','stop','southArrowNorthWest','_selectedAnnotations','_showBalloon','create','find','element','isAttached','keydown','view','destroy','off','_attachToContainer','narrowsidebar-attach-already-attached','requires','narrowSidebar','_manuallyClosedAnnotationViews','northArrowSouthEast','refreshPositioning','_hideBalloon','_annotations','has','values','stopPropagation','EditorAnnotations','activeAnnotation','_refreshPositioning','init','hasDomSelection','_refreshPositioningDebounced','focus','change:height','delete','Esc','content','_editorAnnotations','narrowsidebar-detach-not-attached','detachFromDom','balloonPanelView','addAnnotation','mousedown','get','blur','add','set','isVisible','NarrowSidebar','defaultPositions','bind','preventDefault','contains','focusableElements','_updateBalloonPosition','_setSelectedAnnotations','register','resize','high','_attachListeners','setActiveAnnotation','from','target','detach','preventClosingBalloon','uiUpdate','low','locale','_annotationToNarrowView','refresh','southArrowNorth','_integrateWithEditorAnnotations','isDirty','_domEmitter','number','remove','esc','southArrowNorthEast','attach','_detachListeners','annotationType','cancel','context','_destroyEditorAnnotationsIntegration','length','change:container','first','bodyCollection','keyCode'];(function(_0x31adaa,_0xdbb601){const _0x4e1197=function(_0x4916ca){while(--_0x4916ca){_0x31adaa['push'](_0x31adaa['shift']());}};_0x4e1197(++_0xdbb601);}(_0xdbb6,0x134));const _0x4e11=function(_0x31adaa,_0xdbb601){_0x31adaa=_0x31adaa-0x0;let _0x4e1197=_0xdbb6[_0x31adaa];return _0x4e1197;};import{ContextPlugin as _0x4383e1,Context as _0x360811}from'ckeditor5/src/core';import _0x1d0aab from'./annotationsuis';import _0x525883 from'./sidebar';import _0x847a64 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x35ae86,BodyCollection as _0x170d9e}from'ckeditor5/src/ui';import{CKEditorError as _0x46865d,DomEmitterMixin as _0x58cf32,keyCodes as _0x362211,Collection as _0x21be6e}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x1a3432}from'lodash-es';import _0xe0d9e5 from'./editorannotations';export default class s extends _0x4383e1{static get[_0x4e11('0x4f')](){return[_0x525883,_0x1d0aab];}static get['pluginName'](){return _0x4e11('0x13');}constructor(_0xe94f49){super(_0xe94f49),this[_0x4e11('0x48')]=!0x1,this[_0x4e11('0x51')]=new Set(),this[_0x4e11('0x2c')]=Object[_0x4e11('0x45')](_0x58cf32),this[_0x4e11('0x27')]=new Map(),this['set']('activeAnnotation',null),this[_0x4e11('0x3f')]=null,this[_0x4e11('0x43')]=[],this[_0x4e11('0x8')]=new _0x21be6e(),this[_0x4e11('0x2')]=_0x1a3432(()=>{this[_0x4e11('0x5b')]();},0xfa,{'leading':!0x1});}[_0x4e11('0x0')](){this[_0x4e11('0x35')][_0x4e11('0x3c')][_0x4e11('0xe')](_0x1d0aab)[_0x4e11('0x1b')](_0x4e11('0x50'),this),this['bodyCollection']=new _0x170d9e(this[_0x4e11('0x35')][_0x4e11('0x26')]),this[_0x4e11('0xb')]=new _0x35ae86(this[_0x4e11('0x35')][_0x4e11('0x26')]),this['bodyCollection']['attachToDom'](),this[_0x4e11('0x3a')][_0x4e11('0x10')](this[_0x4e11('0xb')]);}[_0x4e11('0x31')](_0x44be61){this[_0x4e11('0x3f')]=_0x44be61;const _0x3e3b7e=this[_0x4e11('0x35')][_0x4e11('0x3c')]['get'](_0x525883),_0x2fc2fc=this[_0x4e11('0xb')];if(_0x3e3b7e[_0x4e11('0x55')]=_0x44be61,this[_0x4e11('0x48')])throw new _0x46865d(_0x4e11('0x4e'),this);this['isAttached']=!0x0,this[_0x4e11('0x40')](_0x3e3b7e,'set:container',()=>{this[_0x4e11('0x22')](),this[_0x4e11('0x40')](_0x3e3b7e,_0x4e11('0x38'),_0x11994f=>{_0x11994f[_0x4e11('0x4c')](),this[_0x4e11('0x31')](_0x44be61);});}),_0x3e3b7e[_0x4e11('0x4d')]({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x41b600=_0x2a5262=>{const _0x76610d=new _0x847a64(this[_0x4e11('0x35')]['locale']);_0x3e3b7e[_0x4e11('0xc')](_0x2a5262,_0x76610d),this['_annotationToNarrowView'][_0x4e11('0x11')](_0x2a5262,_0x76610d),_0x76610d[_0x4e11('0x15')](_0x4e11('0x2b'),_0x4e11('0x33'),_0x4e11('0x2d'))['to'](_0x2a5262[_0x4e11('0x4a')],_0x4e11('0x2b'),'type',_0x4e11('0x37')),_0x76610d['on']('execute',()=>{this[_0x4e11('0x51')][_0x4e11('0x3e')](),_0x2fc2fc[_0x4e11('0x7')]['first']!==_0x2a5262[_0x4e11('0x4a')]?(this[_0x4e11('0x44')](_0x2a5262),_0x2a5262[_0x4e11('0x4a')][_0x4e11('0x47')]['focus'](),this[_0x4e11('0x1f')](_0x2a5262)):this[_0x4e11('0x1f')](null);});};for(const _0x54d1d1 of _0x44be61)_0x41b600(_0x54d1d1);this[_0x4e11('0x40')](_0x44be61,_0x4e11('0x10'),(_0x343598,_0x41d012)=>{_0x41b600(_0x41d012);}),this['listenTo'](_0x44be61,_0x4e11('0x2e'),(_0x48ec88,_0x3d873f,_0x76abf7)=>{this[_0x4e11('0x27')][_0x4e11('0xe')](_0x3d873f)[_0x4e11('0x4b')](),this['_annotationToNarrowView'][_0x4e11('0x5')](_0x3d873f),_0x3e3b7e['rearrange']({'removedAnnotation':_0x3d873f,'previousAnnotation':_0x44be61[_0x4e11('0xe')](_0x76abf7-0x1),'nextAnnotation':_0x44be61['get'](_0x76abf7+0x1)}),_0x3d873f===this[_0x4e11('0x5a')]&&this[_0x4e11('0x1f')](null);},{'priority':_0x4e11('0x25')}),this['listenTo'](_0x44be61,_0x4e11('0x3'),(_0x12583c,_0x56e3de)=>{this[_0x4e11('0x1f')](_0x56e3de);}),this['listenTo'](_0x44be61,_0x4e11('0xf'),()=>{this[_0x4e11('0x1f')](null);}),this['_domEmitter'][_0x4e11('0x40')](document,_0x4e11('0x49'),(_0x574d4a,_0x184c5d)=>{_0x184c5d[_0x4e11('0x3b')]===_0x362211[_0x4e11('0x2f')]&&_0x2fc2fc[_0x4e11('0x12')]&&(this[_0x4e11('0x51')][_0x4e11('0x10')](_0x2fc2fc[_0x4e11('0x7')]['first']),this[_0x4e11('0x54')](),_0x184c5d[_0x4e11('0x58')](),_0x184c5d[_0x4e11('0x16')]());}),this['_domEmitter'][_0x4e11('0x40')](document,'mousedown',(_0x45cfba,_0x28bc51)=>{const _0x5580cd=_0x28bc51['target'];_0x2fc2fc[_0x4e11('0x12')]&&_0x2fc2fc['element'][_0x4e11('0x17')](_0x5580cd)||_0x3e3b7e['view'][_0x4e11('0x47')][_0x4e11('0x17')](_0x5580cd)||_0x45cfba[_0x4e11('0x23')]||this[_0x4e11('0x5a')]&&this['activeAnnotation'][_0x4e11('0x18')][_0x4e11('0x46')](_0x3b393a=>_0x3b393a['contains'](_0x5580cd))||(this['_manuallyClosedAnnotationViews'][_0x4e11('0x3e')](),this[_0x4e11('0x54')](),this[_0x4e11('0x1f')](null));});const _0x45b12a=this['context']instanceof _0x360811?this[_0x4e11('0x35')]['editors']:new _0x21be6e([this[_0x4e11('0x35')]]);for(const _0x3d75a9 of _0x45b12a)this[_0x4e11('0x2a')](_0x3d75a9);this[_0x4e11('0x40')](_0x45b12a,_0x4e11('0x10'),(_0x523c65,_0x853599)=>{this[_0x4e11('0x40')](_0x853599,'ready',()=>{this[_0x4e11('0x2a')](_0x853599);});}),this[_0x4e11('0x40')](_0x45b12a,'remove',(_0x17804f,_0x2d8c28)=>{_0x2d8c28[_0x4e11('0x3c')][_0x4e11('0x56')](_0x4e11('0x59'))&&this['_destroyEditorAnnotationsIntegration'](_0x2d8c28['plugins'][_0x4e11('0xe')](_0x4e11('0x59')));}),window['addEventListener'](_0x4e11('0x1c'),this[_0x4e11('0x2')]),this[_0x4e11('0x5b')]();}[_0x4e11('0x1f')](_0x5131c6){if(_0x5131c6===this[_0x4e11('0x5a')])return;const _0x3907e1=this['context']['plugins']['get'](_0x525883);if(_0x3907e1[_0x4e11('0x28')]({'blurredAnnotation':this[_0x4e11('0x5a')],'activatedAnnotation':_0x5131c6,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5131c6)_0x3907e1['getSidebarItemView'](_0x5131c6)?this[_0x4e11('0x44')](_0x5131c6):this[_0x4e11('0x54')]();else this[_0x4e11('0x54')]();this[_0x4e11('0x5a')]=_0x5131c6;}[_0x4e11('0x22')](){if(!this[_0x4e11('0x48')])throw new _0x46865d(_0x4e11('0x9'),this);this['setActiveAnnotation'](null);const _0x1791e7=this['context']['plugins'][_0x4e11('0xe')](_0x525883);this['_hideBalloon'](),Array[_0x4e11('0x20')](this['_annotationToNarrowView'][_0x4e11('0x57')](),_0xb8c9c3=>_0xb8c9c3[_0x4e11('0x4b')]()),this['_annotationToNarrowView'][_0x4e11('0x3e')](),_0x1791e7['_detachFromContainer'](this[_0x4e11('0x3f')]),this['stopListening'](),this[_0x4e11('0x2c')][_0x4e11('0x3d')](),this[_0x4e11('0x35')]instanceof _0x360811&&this[_0x4e11('0x3d')](this[_0x4e11('0x35')]['editors']);for(const _0x4b1920 of Array[_0x4e11('0x20')](this[_0x4e11('0x8')]))this['_destroyEditorAnnotationsIntegration'](_0x4b1920);window['removeEventListener'](_0x4e11('0x1c'),this[_0x4e11('0x2')]),this['_refreshPositioningDebounced'][_0x4e11('0x34')](),this[_0x4e11('0x43')]=[],this['isAttached']=!0x1,this['annotations']=null;}[_0x4e11('0x4b')](){this[_0x4e11('0x48')]&&this[_0x4e11('0x22')](),this[_0x4e11('0x3a')][_0x4e11('0xa')]();}['_integrateWithEditorAnnotations'](_0xe1be85){const _0x50d279=_0xe1be85[_0x4e11('0x3c')][_0x4e11('0xe')](_0xe0d9e5),_0x1ab4af=this[_0x4e11('0x35')][_0x4e11('0x3c')][_0x4e11('0xe')](_0x525883),_0x20b889=this[_0x4e11('0x3f')],_0x1e8d05=this[_0x4e11('0xb')],_0x175c91=()=>{const _0x3e1572=_0x50d279['getOrderedSelectedAnnotations']({'annotations':this[_0x4e11('0x3f')],'activeAnnotation':this['activeAnnotation']});this[_0x4e11('0x1a')](_0x3e1572),this['setActiveAnnotation'](_0x3e1572[0x0]||null);};this[_0x4e11('0x40')](_0x50d279,_0x4e11('0x28'),_0x175c91),this[_0x4e11('0x40')](_0x50d279,_0x4e11('0xf'),(_0x29faab,{isAnnotationTracked:_0x37a90c})=>{this[_0x4e11('0x5a')]&&_0x37a90c(this['activeAnnotation'])&&(this[_0x4e11('0x1a')]([]),this[_0x4e11('0x1f')](null));}),this[_0x4e11('0x40')](_0x50d279,_0x4e11('0x24'),()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x20b889,_0x4e11('0xf'),_0xe0d005=>{_0x50d279[_0x4e11('0x1')]()&&_0xe0d005[_0x4e11('0x41')]();},{'priority':_0x4e11('0x1d')}),this[_0x4e11('0x40')](this['_domEmitter'],_0x4e11('0xd'),(_0x336488,_0x5b280a)=>{const _0x59829f=_0x5b280a[_0x4e11('0x21')];_0x1e8d05['isVisible']&&_0x1e8d05[_0x4e11('0x47')][_0x4e11('0x17')](_0x59829f)||_0x1ab4af[_0x4e11('0x4a')][_0x4e11('0x47')][_0x4e11('0x17')](_0x59829f)||this[_0x4e11('0x5a')]&&_0x50d279[_0x4e11('0x1')]()&&(_0x175c91(),_0x336488['preventClosingBalloon']=!0x0);},{'priority':_0x4e11('0x1d')}),this[_0x4e11('0x8')][_0x4e11('0x10')](_0x50d279);}[_0x4e11('0x36')](_0x58a322){_0x58a322&&(this[_0x4e11('0x3d')](_0x58a322),this[_0x4e11('0x8')][_0x4e11('0x2e')](_0x58a322));}[_0x4e11('0x1a')](_0x4b0ed1){for(const _0x36362c of this[_0x4e11('0x43')])_0x4b0ed1['includes'](_0x36362c)||this['_manuallyClosedAnnotationViews'][_0x4e11('0x5')](_0x36362c[_0x4e11('0x4a')]);this[_0x4e11('0x43')]=_0x4b0ed1;}[_0x4e11('0x5b')](){const _0x2299bb=this[_0x4e11('0xb')];this[_0x4e11('0x3f')][_0x4e11('0x53')](),_0x2299bb[_0x4e11('0x12')]&&this[_0x4e11('0x19')]();}['_showBalloon'](_0x523982){if(this['_manuallyClosedAnnotationViews'][_0x4e11('0x56')](_0x523982[_0x4e11('0x4a')]))return;const _0x5eb3e6=this['balloonPanelView'][_0x4e11('0x7')][_0x4e11('0x39')];_0x5eb3e6!==_0x523982[_0x4e11('0x4a')]?(_0x5eb3e6&&this[_0x4e11('0x32')](_0x5eb3e6),this[_0x4e11('0x1e')](_0x523982[_0x4e11('0x4a')]),this[_0x4e11('0xb')][_0x4e11('0x7')][_0x4e11('0x3e')](),this[_0x4e11('0xb')][_0x4e11('0x7')][_0x4e11('0x10')](_0x523982[_0x4e11('0x4a')]),this[_0x4e11('0x19')]()):this[_0x4e11('0x19')]();}['_updateBalloonPosition'](){const _0x12cd67=this['balloonPanelView'][_0x4e11('0x7')][_0x4e11('0x39')],_0x5a51bb=_0x12cd67&&this[_0x4e11('0x3f')]['getByView'](_0x12cd67);if(!_0x5a51bb||!this[_0x4e11('0x27')][_0x4e11('0x56')](_0x5a51bb))return;const _0x4aaa93=this[_0x4e11('0x27')]['get'](_0x5a51bb)[_0x4e11('0x47')],_0x5b6f68=function(){const _0x196fe2=_0x35ae86[_0x4e11('0x14')];return[_0x196fe2[_0x4e11('0x30')],_0x196fe2[_0x4e11('0x52')],_0x196fe2[_0x4e11('0x29')],_0x196fe2['northArrowSouth'],_0x196fe2[_0x4e11('0x42')],_0x196fe2['northArrowSouthWest']];}();this['balloonPanelView']['pin']({'target':_0x4aaa93,'positions':_0x5b6f68});}['_hideBalloon'](){const _0x38116a=this[_0x4e11('0xb')],_0x7f9772=_0x38116a[_0x4e11('0x7')][_0x4e11('0x39')];_0x7f9772&&(this[_0x4e11('0x32')](_0x7f9772),_0x38116a['unpin'](),_0x38116a[_0x4e11('0x7')][_0x4e11('0x3e')]());}[_0x4e11('0x1e')](_0x50e122){this['listenTo'](_0x50e122,_0x4e11('0x4'),()=>this[_0x4e11('0x19')]()),this[_0x4e11('0x40')](_0x50e122,_0x4e11('0x6'),(_0x4c10cf,_0x5c9bc9)=>{this[_0x4e11('0x51')]['add'](_0x50e122),this[_0x4e11('0x54')](),_0x5c9bc9();});}[_0x4e11('0x32')](_0x2e38fe){this[_0x4e11('0x3d')](_0x2e38fe);}}
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);}}
@@ -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 _0xc8fc=['listenTo','_alignBeforeItem','view','class','locale','_alignForBottomChange','updateHeight','get','context','length','destroy','Sidebar','content','_annotationToSidebarItemView','delete','set','_sidebarItemViewToAnnotation','pluginName','bind','nodeType','_recalculate','_getMaxAvailableTop','rearrange','isAnimationDisabled','_alignForTopChange','_getItemBefore','_recalculateBuffer','_activeAnnotation','change:top','refresh','targetRect','sidebar.container','config','bottom','change:bottom','add','_lastItem','remove','_alignAfterItem','target','_spaceBetweenItems','list','render','_alignToTargetRect','_updateLastItem','_getTargetTop','_annotations','define','max','stopListening','_destroySidebarItemView','push','sidebar-setcontainer-invalid-element','getSidebarItemView','minHeight','element','setContainer','sidebar-attachtocontainer-missing-container','_createSidebarView','last','appendChild','_attachToContainer','_targetTop','_getItemAfter','_setItemTop','init','container','change:targetRect','sidebar.preventScrollOutOfView','top'];(function(_0x1cfca1,_0xc8fc8b){const _0x5855f1=function(_0x3c2d76){while(--_0x3c2d76){_0x1cfca1['push'](_0x1cfca1['shift']());}};_0x5855f1(++_0xc8fc8b);}(_0xc8fc,0xdd));const _0x5855=function(_0x1cfca1,_0xc8fc8b){_0x1cfca1=_0x1cfca1-0x0;let _0x5855f1=_0xc8fc[_0x1cfca1];return _0x5855f1;};import{ContextPlugin as _0x545a91}from'ckeditor5/src/core';import{Rect as _0x55276f,CKEditorError as _0x35b55a}from'ckeditor5/src/utils';import _0x5c9c97 from'./view/sidebarview';import _0x3a0225 from'./view/sidebaritemview';export default class z extends _0x545a91{static get[_0x5855('0x6')](){return _0x5855('0x0');}constructor(_0x4abea0){super(_0x4abea0),this[_0x5855('0x4')]('_lastItem',void 0x0),this[_0x5855('0x3d')]=this[_0x5855('0x2f')](),this[_0x5855('0x4')]('container',null),this[_0x5855('0x1d')]=0x19,this[_0x5855('0x5')]=new Map(),this[_0x5855('0x2')]=new Map(),this['context'][_0x5855('0x15')][_0x5855('0x24')](_0x5855('0x39'),!0x1),this[_0x5855('0x23')]=null,this[_0x5855('0x10')]=null,this[_0x5855('0xf')]=[];}[_0x5855('0x36')](){const _0x2df2d9=this[_0x5855('0x43')]['config'][_0x5855('0x42')](_0x5855('0x14'));_0x2df2d9&&this[_0x5855('0x2d')](_0x2df2d9);}[_0x5855('0x2d')](_0x26f670){if(!y(_0x26f670))throw new _0x35b55a(_0x5855('0x29'));this[_0x5855('0x37')]=_0x26f670;}[_0x5855('0x32')]({viewClass:_0x19e34b='',spaceBetweenItems:_0x15865f=0x19}={}){if(!y(this['container']))throw new _0x35b55a(_0x5855('0x2e'),this);this[_0x5855('0x37')][_0x5855('0x31')](this[_0x5855('0x3d')][_0x5855('0x2c')]),this[_0x5855('0x3d')][_0x5855('0x3e')]=_0x19e34b,this[_0x5855('0x1d')]=_0x15865f;}[_0x5855('0xb')]({removedAnnotation:_0x531f68,previousAnnotation:_0x34d7f8,nextAnnotation:_0x1a7560}){const _0x547289=this[_0x5855('0x2a')](_0x531f68);this[_0x5855('0x3d')][_0x5855('0x1e')][_0x5855('0x1a')](_0x547289),this[_0x5855('0x27')](_0x531f68),_0x34d7f8&&this[_0x5855('0x20')](this[_0x5855('0x2a')](_0x34d7f8)),_0x1a7560&&this[_0x5855('0x20')](this[_0x5855('0x2a')](_0x1a7560)),this[_0x5855('0x21')]();}[_0x5855('0x12')]({blurredAnnotation:_0x10f2c2,activatedAnnotation:_0x27c6ee,disableAnimationOnActivatedAnnotation:_0x5e1d0e}){if(this[_0x5855('0x10')]=_0x27c6ee,_0x10f2c2){_0x10f2c2['isActive']=!0x1;const _0x48056a=this[_0x5855('0x2a')](_0x10f2c2);_0x48056a&&_0x5e1d0e&&(_0x48056a[_0x5855('0xc')]=!0x1);}if(_0x27c6ee){const _0x597fd9=this['getSidebarItemView'](_0x27c6ee);_0x597fd9&&(_0x27c6ee['isActive']=!0x0,_0x5e1d0e&&(_0x597fd9[_0x5855('0xc')]=!0x0,_0x597fd9[_0x5855('0x3a')]+=0x1),this[_0x5855('0x20')](_0x597fd9));}}['_detachFromContainer'](_0x4e5c30){if(this[_0x5855('0x3d')][_0x5855('0x2c')][_0x5855('0x1a')](),_0x4e5c30)for(const _0x3ebc16 of _0x4e5c30)this[_0x5855('0x27')](_0x3ebc16);this[_0x5855('0x3d')][_0x5855('0x1e')]['clear'](),this[_0x5855('0x3d')]['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3be7f2,_0x1e51b6){_0x1e51b6||(_0x1e51b6=_0x3be7f2[_0x5855('0x3d')]);const _0x431815=new _0x3a0225(this[_0x5855('0x43')][_0x5855('0x3f')]);this[_0x5855('0x5')][_0x5855('0x4')](_0x431815,_0x3be7f2),this[_0x5855('0x2')][_0x5855('0x4')](_0x3be7f2,_0x431815),_0x431815[_0x5855('0x1')][_0x5855('0x18')](_0x1e51b6),this['listenTo'](_0x3be7f2[_0x5855('0x3d')],_0x5855('0x38'),(_0x56112a,_0x153d7b,_0x54a848)=>{const _0x28514b=this[_0x5855('0x22')](_0x3be7f2,_0x54a848);_0x431815[_0x5855('0x33')]!=_0x28514b&&(_0x431815[_0x5855('0x33')]=_0x28514b,this[_0x5855('0x35')](_0x431815,_0x28514b));}),this[_0x5855('0x3b')](_0x431815,_0x5855('0x11'),()=>{this[_0x5855('0x9')](_0x431815,_0x5855('0x3a'));}),this[_0x5855('0x3b')](_0x431815,_0x5855('0x17'),()=>{this[_0x5855('0x9')](_0x431815,'bottom');}),this[_0x5855('0x20')](_0x431815);const _0x43ab26=this[_0x5855('0xe')](_0x431815);if(_0x43ab26)this[_0x5855('0x1b')](_0x43ab26,_0x431815)||this[_0x5855('0x20')](_0x431815);else this[_0x5855('0x20')](_0x431815);return this[_0x5855('0x21')](),this[_0x5855('0x3d')][_0x5855('0x1e')][_0x5855('0x18')](_0x431815),_0x431815;}[_0x5855('0xd')](_0x1e9e7d){if(!_0x1e9e7d[_0x5855('0x1')]['length'])return;const _0x4f4e46=this[_0x5855('0xe')](_0x1e9e7d);if(!_0x4f4e46)return;const _0x5dcfb5=this[_0x5855('0x5')][_0x5855('0x42')](_0x4f4e46),_0x75f3ab=this[_0x5855('0x10')];_0x75f3ab&&_0x75f3ab===_0x5dcfb5?this[_0x5855('0x1b')](_0x4f4e46,_0x1e9e7d):this[_0x5855('0x3c')](_0x1e9e7d,_0x4f4e46);}[_0x5855('0x40')](_0x277c43){if(!_0x277c43[_0x5855('0x1')][_0x5855('0x44')])return;const _0x47df08=this[_0x5855('0x34')](_0x277c43);if(!_0x47df08)return;const _0x5dc44f=this[_0x5855('0x5')][_0x5855('0x42')](_0x47df08),_0x10b6ec=this[_0x5855('0x43')][_0x5855('0x15')]['get'](_0x5855('0x39')),_0x12ea9b=this[_0x5855('0x10')];_0x12ea9b&&_0x12ea9b===_0x5dc44f&&_0x10b6ec?(this['_alignBeforeItem'](_0x47df08,_0x277c43),this['_alignAfterItem'](_0x277c43,_0x47df08)):_0x12ea9b&&_0x12ea9b===_0x5dc44f?this[_0x5855('0x3c')](_0x47df08,_0x277c43):this['_alignAfterItem'](_0x277c43,_0x47df08);}[_0x5855('0x9')](_0x4ea377,_0x2f577e){0x0===this[_0x5855('0xf')][_0x5855('0x44')]&&setTimeout(()=>{for(const {sidebarItemView:_0x32b907,changedProp:_0x2572d0}of this[_0x5855('0xf')])_0x5855('0x3a')===_0x2572d0?this[_0x5855('0xd')](_0x32b907):this[_0x5855('0x40')](_0x32b907);this['_recalculateBuffer']=[];},0xa),this[_0x5855('0xf')][_0x5855('0x28')]({'sidebarItemView':_0x4ea377,'changedProp':_0x2f577e});}[_0x5855('0x2a')](_0x4e3825){return this[_0x5855('0x2')][_0x5855('0x42')](_0x4e3825);}[_0x5855('0x45')](){this[_0x5855('0x26')](),this['view'][_0x5855('0x45')]();}[_0x5855('0x27')](_0x494dcd){const _0x1d904c=this[_0x5855('0x2a')](_0x494dcd);this[_0x5855('0x26')](_0x1d904c),this['stopListening'](_0x494dcd[_0x5855('0x3d')]),_0x1d904c[_0x5855('0x45')](),this[_0x5855('0x2')][_0x5855('0x3')](_0x494dcd),this[_0x5855('0x5')][_0x5855('0x3')](_0x1d904c);}[_0x5855('0x2f')](){const _0x3641bb=new _0x5c9c97(this[_0x5855('0x43')][_0x5855('0x3f')]);return _0x3641bb[_0x5855('0x1f')](),this['on']('change:_lastItem',(_0x5d5fb7,_0x187432,_0x43430f,_0x1ea4ec)=>{_0x1ea4ec&&_0x3641bb['unbind']('minHeight'),_0x43430f?_0x3641bb[_0x5855('0x7')](_0x5855('0x2b'))['to'](_0x43430f,_0x5855('0x16')):_0x3641bb[_0x5855('0x2b')]=null;}),_0x3641bb;}['_updateLastItem'](){var _0x46c0cf;this[_0x5855('0x19')]=(null===(_0x46c0cf=this['_annotations'])||void 0x0===_0x46c0cf?void 0x0:_0x46c0cf[_0x5855('0x30')])?this['getSidebarItemView'](this[_0x5855('0x23')]['last']):null;}['_getItemBefore'](_0x693c0d){var _0x15850d;const _0x68c1c2=this[_0x5855('0x5')]['get'](_0x693c0d),_0x15eca6=_0x68c1c2&&(null===(_0x15850d=this[_0x5855('0x23')])||void 0x0===_0x15850d?void 0x0:_0x15850d[_0x5855('0x42')](this[_0x5855('0x23')]['getIndex'](_0x68c1c2)-0x1));return _0x15eca6&&this[_0x5855('0x2a')](_0x15eca6)||null;}['_getItemAfter'](_0x1ff5f3){var _0x24badc;const _0x3fa9d8=this['_sidebarItemViewToAnnotation'][_0x5855('0x42')](_0x1ff5f3),_0x253fbc=_0x3fa9d8&&(null===(_0x24badc=this[_0x5855('0x23')])||void 0x0===_0x24badc?void 0x0:_0x24badc[_0x5855('0x42')](this[_0x5855('0x23')]['getIndex'](_0x3fa9d8)+0x1));return _0x253fbc&&this[_0x5855('0x2a')](_0x253fbc)||null;}[_0x5855('0x3c')](_0x2fc442,_0x51ece5){_0x2fc442[_0x5855('0x41')]();const _0x58c22c=H(_0x51ece5[_0x5855('0x16')]+this[_0x5855('0x1d')],_0x2fc442[_0x5855('0x3a')]);return!!_0x58c22c&&(this['_setItemTop'](_0x51ece5,_0x51ece5['top']-_0x58c22c),!0x0);}[_0x5855('0x1b')](_0x59ad37,_0x2a68c7){_0x59ad37['updateHeight']();const _0x38c5ac=H(_0x59ad37[_0x5855('0x16')]+this[_0x5855('0x1d')],_0x2a68c7[_0x5855('0x3a')]);return!!_0x38c5ac&&(this[_0x5855('0x35')](_0x2a68c7,_0x2a68c7[_0x5855('0x3a')]+_0x38c5ac,!0x1),!0x0);}[_0x5855('0x20')](_0xf5963f){const _0x121069=this[_0x5855('0x5')][_0x5855('0x42')](_0xf5963f);if(!_0x121069||!_0x121069[_0x5855('0x1c')]||!_0x121069['targetRect'])return;const _0x378db5=this[_0x5855('0x22')](_0x121069,_0x121069[_0x5855('0x13')]);this['_setItemTop'](_0xf5963f,_0x378db5);}['_getTargetTop'](_0x2692bc,_0x534102){if(null===_0x534102)return 0x0;if(_0x2692bc[_0x5855('0x1c')]instanceof _0x55276f)return _0x534102[_0x5855('0x3a')];{const _0x4d095c=new _0x55276f(this[_0x5855('0x3d')][_0x5855('0x2c')])['top'];return _0x534102['top']-_0x4d095c;}}[_0x5855('0x35')](_0x32f724,_0x5f5180,_0x55c552=this['context'][_0x5855('0x15')]['get'](_0x5855('0x39'))){_0x55c552&&(_0x5f5180=Math[_0x5855('0x25')](_0x5f5180,this[_0x5855('0xa')](_0x32f724))),_0x32f724[_0x5855('0x3a')]=_0x5f5180;}[_0x5855('0xa')](_0x34d4f6){let _0x9205b=this[_0x5855('0xe')](_0x34d4f6),_0x40a55e=0x0;for(;_0x9205b;)_0x9205b[_0x5855('0x41')](),_0x40a55e+=this[_0x5855('0x1d')]+_0x9205b['height'],_0x9205b=this[_0x5855('0xe')](_0x9205b);return _0x40a55e;}}function H(_0x14d1ad,_0x3e13e1){return Math['max'](_0x14d1ad-_0x3e13e1,0x0);}function y(_0x328c9a){return null!==_0x328c9a&&'object'==typeof _0x328c9a&&0x1===_0x328c9a[_0x5855('0x8')];}
23
+ const _0x61e3=['_detachFromContainer','_getTargetTop','view','_alignAfterItem','clear','_attachToContainer','sidebar.preventScrollOutOfView','container','define','class','_alignBeforeItem','destroy','init','_targetTop','addAnnotation','_annotationToSidebarItemView','remove','rearrange','targetRect','_getItemAfter','unbind','refresh','_destroySidebarItemView','push','content','updateHeight','max','_spaceBetweenItems','sidebar-attachtocontainer-missing-container','_alignForBottomChange','top','listenTo','add','change:top','_lastItem','bind','last','sidebar.container','_setItemTop','_getItemBefore','getSidebarItemView','_alignToTargetRect','object','minHeight','isActive','_recalculateBuffer','Sidebar','target','stopListening','_sidebarItemViewToAnnotation','list','_getMaxAvailableTop','_activeAnnotation','locale','change:targetRect','_annotations','delete','change:_lastItem','element','render','_alignForTopChange','isAnimationDisabled','context','length','getIndex','setContainer','_recalculate','height','nodeType','get','config','bottom','set'];(function(_0x3ba738,_0x61e3ae){const _0x1ac253=function(_0x5e5263){while(--_0x5e5263){_0x3ba738['push'](_0x3ba738['shift']());}};_0x1ac253(++_0x61e3ae);}(_0x61e3,0x15e));const _0x1ac2=function(_0x3ba738,_0x61e3ae){_0x3ba738=_0x3ba738-0x0;let _0x1ac253=_0x61e3[_0x3ba738];return _0x1ac253;};import{ContextPlugin as _0x9dd49a}from'ckeditor5/src/core';import{Rect as _0x7d5fc2,CKEditorError as _0x328776}from'ckeditor5/src/utils';import _0x279edf from'./view/sidebarview';import _0x3059d1 from'./view/sidebaritemview';export default class z extends _0x9dd49a{static get['pluginName'](){return _0x1ac2('0x3d');}constructor(_0xe05963){super(_0xe05963),this[_0x1ac2('0xe')](_0x1ac2('0x31'),void 0x0),this[_0x1ac2('0x11')]=this['_createSidebarView'](),this['set'](_0x1ac2('0x16'),null),this[_0x1ac2('0x2a')]=0x19,this[_0x1ac2('0x40')]=new Map(),this['_annotationToSidebarItemView']=new Map(),this[_0x1ac2('0x4')][_0x1ac2('0xc')][_0x1ac2('0x17')]('sidebar.preventScrollOutOfView',!0x1),this[_0x1ac2('0x46')]=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}[_0x1ac2('0x1b')](){const _0xf6ba1e=this[_0x1ac2('0x4')][_0x1ac2('0xc')]['get'](_0x1ac2('0x34'));_0xf6ba1e&&this['setContainer'](_0xf6ba1e);}[_0x1ac2('0x7')](_0x2e9f1f){if(!y(_0x2e9f1f))throw new _0x328776('sidebar-setcontainer-invalid-element');this[_0x1ac2('0x16')]=_0x2e9f1f;}[_0x1ac2('0x14')]({viewClass:_0x59a388='',spaceBetweenItems:_0x59d3e5=0x19}={}){if(!y(this[_0x1ac2('0x16')]))throw new _0x328776(_0x1ac2('0x2b'),this);this[_0x1ac2('0x16')]['appendChild'](this[_0x1ac2('0x11')][_0x1ac2('0x0')]),this['view'][_0x1ac2('0x18')]=_0x59a388,this['_spaceBetweenItems']=_0x59d3e5;}[_0x1ac2('0x20')]({removedAnnotation:_0x416ed7,previousAnnotation:_0x20551a,nextAnnotation:_0x20d702}){const _0x44868b=this[_0x1ac2('0x37')](_0x416ed7);this[_0x1ac2('0x11')][_0x1ac2('0x41')][_0x1ac2('0x1f')](_0x44868b),this['_destroySidebarItemView'](_0x416ed7),_0x20551a&&this['_alignToTargetRect'](this[_0x1ac2('0x37')](_0x20551a)),_0x20d702&&this[_0x1ac2('0x38')](this['getSidebarItemView'](_0x20d702)),this['_updateLastItem']();}[_0x1ac2('0x24')]({blurredAnnotation:_0xa65fb6,activatedAnnotation:_0x23f4ca,disableAnimationOnActivatedAnnotation:_0x31de5c}){if(this[_0x1ac2('0x43')]=_0x23f4ca,_0xa65fb6){_0xa65fb6[_0x1ac2('0x3b')]=!0x1;const _0x1dc418=this[_0x1ac2('0x37')](_0xa65fb6);_0x1dc418&&_0x31de5c&&(_0x1dc418[_0x1ac2('0x3')]=!0x1);}if(_0x23f4ca){const _0x5d47b2=this[_0x1ac2('0x37')](_0x23f4ca);_0x5d47b2&&(_0x23f4ca[_0x1ac2('0x3b')]=!0x0,_0x31de5c&&(_0x5d47b2[_0x1ac2('0x3')]=!0x0,_0x5d47b2[_0x1ac2('0x2d')]+=0x1),this[_0x1ac2('0x38')](_0x5d47b2));}}[_0x1ac2('0xf')](_0x34dc4c){if(this['view'][_0x1ac2('0x0')]['remove'](),_0x34dc4c)for(const _0x43176b of _0x34dc4c)this[_0x1ac2('0x25')](_0x43176b);this[_0x1ac2('0x11')][_0x1ac2('0x41')][_0x1ac2('0x13')](),this[_0x1ac2('0x11')]['class']='',this['_lastItem']=null;}[_0x1ac2('0x1d')](_0x46bd19,_0x38b9ef){_0x38b9ef||(_0x38b9ef=_0x46bd19['view']);const _0x5f2ec9=new _0x3059d1(this[_0x1ac2('0x4')]['locale']);this['_sidebarItemViewToAnnotation'][_0x1ac2('0xe')](_0x5f2ec9,_0x46bd19),this['_annotationToSidebarItemView'][_0x1ac2('0xe')](_0x46bd19,_0x5f2ec9),_0x5f2ec9[_0x1ac2('0x27')][_0x1ac2('0x2f')](_0x38b9ef),this[_0x1ac2('0x2e')](_0x46bd19[_0x1ac2('0x11')],_0x1ac2('0x45'),(_0x4c8a6c,_0x21ea7b,_0x1f2cfc)=>{const _0x25dc68=this['_getTargetTop'](_0x46bd19,_0x1f2cfc);_0x5f2ec9[_0x1ac2('0x1c')]!=_0x25dc68&&(_0x5f2ec9[_0x1ac2('0x1c')]=_0x25dc68,this[_0x1ac2('0x35')](_0x5f2ec9,_0x25dc68));}),this[_0x1ac2('0x2e')](_0x5f2ec9,_0x1ac2('0x30'),()=>{this[_0x1ac2('0x8')](_0x5f2ec9,'top');}),this['listenTo'](_0x5f2ec9,'change:bottom',()=>{this['_recalculate'](_0x5f2ec9,_0x1ac2('0xd'));}),this[_0x1ac2('0x38')](_0x5f2ec9);const _0x101c74=this[_0x1ac2('0x36')](_0x5f2ec9);if(_0x101c74)this['_alignAfterItem'](_0x101c74,_0x5f2ec9)||this[_0x1ac2('0x38')](_0x5f2ec9);else this[_0x1ac2('0x38')](_0x5f2ec9);return this['_updateLastItem'](),this[_0x1ac2('0x11')][_0x1ac2('0x41')][_0x1ac2('0x2f')](_0x5f2ec9),_0x5f2ec9;}[_0x1ac2('0x2')](_0x31bce0){if(!_0x31bce0[_0x1ac2('0x27')][_0x1ac2('0x5')])return;const _0x311064=this['_getItemBefore'](_0x31bce0);if(!_0x311064)return;const _0x663ef6=this[_0x1ac2('0x40')][_0x1ac2('0xb')](_0x311064),_0x3a7441=this[_0x1ac2('0x43')];_0x3a7441&&_0x3a7441===_0x663ef6?this[_0x1ac2('0x12')](_0x311064,_0x31bce0):this['_alignBeforeItem'](_0x31bce0,_0x311064);}[_0x1ac2('0x2c')](_0x5a0332){if(!_0x5a0332['content'][_0x1ac2('0x5')])return;const _0x13aadc=this[_0x1ac2('0x22')](_0x5a0332);if(!_0x13aadc)return;const _0x171284=this[_0x1ac2('0x40')][_0x1ac2('0xb')](_0x13aadc),_0x546d21=this[_0x1ac2('0x4')]['config'][_0x1ac2('0xb')](_0x1ac2('0x15')),_0x2b192a=this[_0x1ac2('0x43')];_0x2b192a&&_0x2b192a===_0x171284&&_0x546d21?(this['_alignBeforeItem'](_0x13aadc,_0x5a0332),this[_0x1ac2('0x12')](_0x5a0332,_0x13aadc)):_0x2b192a&&_0x2b192a===_0x171284?this[_0x1ac2('0x19')](_0x13aadc,_0x5a0332):this[_0x1ac2('0x12')](_0x5a0332,_0x13aadc);}[_0x1ac2('0x8')](_0x37ad05,_0x518dbb){0x0===this['_recalculateBuffer'][_0x1ac2('0x5')]&&setTimeout(()=>{for(const {sidebarItemView:_0x256bec,changedProp:_0x5ed6b7}of this['_recalculateBuffer'])_0x1ac2('0x2d')===_0x5ed6b7?this[_0x1ac2('0x2')](_0x256bec):this[_0x1ac2('0x2c')](_0x256bec);this[_0x1ac2('0x3c')]=[];},0xa),this[_0x1ac2('0x3c')][_0x1ac2('0x26')]({'sidebarItemView':_0x37ad05,'changedProp':_0x518dbb});}[_0x1ac2('0x37')](_0xbdfed4){return this[_0x1ac2('0x1e')][_0x1ac2('0xb')](_0xbdfed4);}[_0x1ac2('0x1a')](){this[_0x1ac2('0x3f')](),this[_0x1ac2('0x11')][_0x1ac2('0x1a')]();}[_0x1ac2('0x25')](_0x3b7a1c){const _0x1120aa=this[_0x1ac2('0x37')](_0x3b7a1c);this[_0x1ac2('0x3f')](_0x1120aa),this['stopListening'](_0x3b7a1c['view']),_0x1120aa[_0x1ac2('0x1a')](),this[_0x1ac2('0x1e')]['delete'](_0x3b7a1c),this[_0x1ac2('0x40')][_0x1ac2('0x47')](_0x1120aa);}['_createSidebarView'](){const _0x2058fa=new _0x279edf(this[_0x1ac2('0x4')][_0x1ac2('0x44')]);return _0x2058fa[_0x1ac2('0x1')](),this['on'](_0x1ac2('0x48'),(_0x20d437,_0x5bdfd8,_0x25caa0,_0x33a431)=>{_0x33a431&&_0x2058fa[_0x1ac2('0x23')](_0x1ac2('0x3a')),_0x25caa0?_0x2058fa[_0x1ac2('0x32')](_0x1ac2('0x3a'))['to'](_0x25caa0,'bottom'):_0x2058fa[_0x1ac2('0x3a')]=null;}),_0x2058fa;}['_updateLastItem'](){var _0x4905de;this[_0x1ac2('0x31')]=(null===(_0x4905de=this[_0x1ac2('0x46')])||void 0x0===_0x4905de?void 0x0:_0x4905de[_0x1ac2('0x33')])?this[_0x1ac2('0x37')](this['_annotations'][_0x1ac2('0x33')]):null;}['_getItemBefore'](_0x44c1c6){var _0x2d4b45;const _0xd1711d=this[_0x1ac2('0x40')][_0x1ac2('0xb')](_0x44c1c6),_0x2ed473=_0xd1711d&&(null===(_0x2d4b45=this[_0x1ac2('0x46')])||void 0x0===_0x2d4b45?void 0x0:_0x2d4b45['get'](this[_0x1ac2('0x46')][_0x1ac2('0x6')](_0xd1711d)-0x1));return _0x2ed473&&this['getSidebarItemView'](_0x2ed473)||null;}[_0x1ac2('0x22')](_0x2dcc4c){var _0x1584de;const _0x124255=this[_0x1ac2('0x40')]['get'](_0x2dcc4c),_0x4abfca=_0x124255&&(null===(_0x1584de=this[_0x1ac2('0x46')])||void 0x0===_0x1584de?void 0x0:_0x1584de['get'](this['_annotations'][_0x1ac2('0x6')](_0x124255)+0x1));return _0x4abfca&&this[_0x1ac2('0x37')](_0x4abfca)||null;}[_0x1ac2('0x19')](_0x24e797,_0x47d72c){_0x24e797['updateHeight']();const _0x4c6353=H(_0x47d72c[_0x1ac2('0xd')]+this[_0x1ac2('0x2a')],_0x24e797[_0x1ac2('0x2d')]);return!!_0x4c6353&&(this[_0x1ac2('0x35')](_0x47d72c,_0x47d72c['top']-_0x4c6353),!0x0);}[_0x1ac2('0x12')](_0x3958cb,_0xa09670){_0x3958cb[_0x1ac2('0x28')]();const _0x49579b=H(_0x3958cb[_0x1ac2('0xd')]+this[_0x1ac2('0x2a')],_0xa09670['top']);return!!_0x49579b&&(this['_setItemTop'](_0xa09670,_0xa09670[_0x1ac2('0x2d')]+_0x49579b,!0x1),!0x0);}[_0x1ac2('0x38')](_0x22e27e){const _0x563058=this[_0x1ac2('0x40')]['get'](_0x22e27e);if(!_0x563058||!_0x563058[_0x1ac2('0x3e')]||!_0x563058[_0x1ac2('0x21')])return;const _0x217310=this[_0x1ac2('0x10')](_0x563058,_0x563058['targetRect']);this[_0x1ac2('0x35')](_0x22e27e,_0x217310);}[_0x1ac2('0x10')](_0x132881,_0x2db3b1){if(null===_0x2db3b1)return 0x0;if(_0x132881[_0x1ac2('0x3e')]instanceof _0x7d5fc2)return _0x2db3b1['top'];{const _0x4d4b8d=new _0x7d5fc2(this[_0x1ac2('0x11')][_0x1ac2('0x0')])[_0x1ac2('0x2d')];return _0x2db3b1[_0x1ac2('0x2d')]-_0x4d4b8d;}}[_0x1ac2('0x35')](_0x5d80e9,_0x1c34a9,_0x5bc6b6=this[_0x1ac2('0x4')][_0x1ac2('0xc')][_0x1ac2('0xb')](_0x1ac2('0x15'))){_0x5bc6b6&&(_0x1c34a9=Math[_0x1ac2('0x29')](_0x1c34a9,this[_0x1ac2('0x42')](_0x5d80e9))),_0x5d80e9['top']=_0x1c34a9;}[_0x1ac2('0x42')](_0x538faf){let _0x1bb974=this[_0x1ac2('0x36')](_0x538faf),_0x5f4212=0x0;for(;_0x1bb974;)_0x1bb974['updateHeight'](),_0x5f4212+=this[_0x1ac2('0x2a')]+_0x1bb974[_0x1ac2('0x9')],_0x1bb974=this[_0x1ac2('0x36')](_0x1bb974);return _0x5f4212;}}function H(_0x3f8903,_0x18ff59){return Math[_0x1ac2('0x29')](_0x3f8903-_0x18ff59,0x0);}function y(_0x3d3024){return null!==_0x3d3024&&_0x1ac2('0x39')==typeof _0x3d3024&&0x1===_0x3d3024[_0x1ac2('0xa')];}
@@ -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 _0x2d1a=['children','set','_badge','ck-annotation-counter__badge--','ck-annotation-counter__badge--edit-mode','add','bind','ck-annotation-counter','annotationType','toString','number','isDirty','counterView','ck-annotation-counter__badge','setTemplate'];(function(_0x17aa43,_0x2d1a0f){const _0x1e8755=function(_0x4a740d){while(--_0x4a740d){_0x17aa43['push'](_0x17aa43['shift']());}};_0x1e8755(++_0x2d1a0f);}(_0x2d1a,0xc7));const _0x1e87=function(_0x17aa43,_0x2d1a0f){_0x17aa43=_0x17aa43-0x0;let _0x1e8755=_0x2d1a[_0x17aa43];return _0x1e8755;};import{ButtonView as _0x2498f3,View as _0x22d871}from'ckeditor5/src/ui';import _0x1c27bb from'../../../theme/icons/add-comment.svg';export default class D extends _0x2498f3{constructor(_0xa2c9cc){super(_0xa2c9cc);const _0xc3d8e0=this['bindTemplate'];this['set'](_0x1e87('0x7'),!0x1),this[_0x1e87('0xc')](_0x1e87('0x6'),0x0),this[_0x1e87('0x2')](_0x1e87('0xd'))['to'](this,'isDirty',this,'number',(_0xf94919,_0x52ce97)=>_0xf94919?'...':_0x52ce97[_0x1e87('0x5')]()),this[_0x1e87('0xc')](_0x1e87('0x4'),''),this['icon']=_0x1c27bb,this['extendTemplate']({'attributes':{'class':[_0x1e87('0x3')]}}),this['counterView']=new _0x22d871(),this[_0x1e87('0x8')][_0x1e87('0xa')]({'tag':'span','attributes':{'class':[_0x1e87('0x9'),_0xc3d8e0['to'](_0x1e87('0x4'),_0x502d28=>_0x1e87('0xe')+_0x502d28),_0xc3d8e0['if'](_0x1e87('0x7'),_0x1e87('0x0'))]},'children':[{'text':_0xc3d8e0['to'](_0x1e87('0xd'))}]}),this[_0x1e87('0xb')][_0x1e87('0x1')](this[_0x1e87('0x8')]);}}
23
+ const _0x2780=['toString','ck-annotation-counter__badge--','bind','add','ck-annotation-counter','icon','children','annotationType','counterView','number','span','isDirty','extendTemplate','set','setTemplate'];(function(_0x17d0b2,_0x278032){const _0xb8a283=function(_0x820e97){while(--_0x820e97){_0x17d0b2['push'](_0x17d0b2['shift']());}};_0xb8a283(++_0x278032);}(_0x2780,0xc8));const _0xb8a2=function(_0x17d0b2,_0x278032){_0x17d0b2=_0x17d0b2-0x0;let _0xb8a283=_0x2780[_0x17d0b2];return _0xb8a283;};import{ButtonView as _0x3cc62e,View as _0x4d1d34}from'ckeditor5/src/ui';import _0x368277 from'../../../theme/icons/add-comment.svg';export default class D extends _0x3cc62e{constructor(_0x1213b3){super(_0x1213b3);const _0x5b44c5=this['bindTemplate'];this['set']('isDirty',!0x1),this[_0xb8a2('0x8')](_0xb8a2('0x4'),0x0),this[_0xb8a2('0xc')]('_badge')['to'](this,_0xb8a2('0x6'),this,'number',(_0x3589a5,_0x17982d)=>_0x3589a5?'...':_0x17982d[_0xb8a2('0xa')]()),this['set']('annotationType',''),this[_0xb8a2('0x0')]=_0x368277,this[_0xb8a2('0x7')]({'attributes':{'class':[_0xb8a2('0xe')]}}),this[_0xb8a2('0x3')]=new _0x4d1d34(),this[_0xb8a2('0x3')][_0xb8a2('0x9')]({'tag':_0xb8a2('0x5'),'attributes':{'class':['ck-annotation-counter__badge',_0x5b44c5['to'](_0xb8a2('0x2'),_0x27f2f2=>_0xb8a2('0xb')+_0x27f2f2),_0x5b44c5['if'](_0xb8a2('0x6'),'ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b44c5['to']('_badge')}]}),this[_0xb8a2('0x1')][_0xb8a2('0xd')](this['counterView']);}}