@ckeditor/ckeditor5-comments 39.0.1 → 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 (157) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE.md +6 -6
  3. package/README.md +14 -14
  4. package/build/comments.js +1 -1
  5. package/build/translations/fa.js +1 -1
  6. package/build/translations/pt-br.js +1 -1
  7. package/lang/translations/af.po +1 -0
  8. package/lang/translations/ar.po +1 -0
  9. package/lang/translations/bg.po +1 -0
  10. package/lang/translations/bn.po +1 -0
  11. package/lang/translations/bs.po +1 -0
  12. package/lang/translations/ca.po +1 -0
  13. package/lang/translations/cs.po +1 -0
  14. package/lang/translations/da.po +1 -0
  15. package/lang/translations/de-ch.po +1 -0
  16. package/lang/translations/de.po +1 -0
  17. package/lang/translations/el.po +1 -0
  18. package/lang/translations/en-au.po +1 -0
  19. package/lang/translations/en.po +1 -0
  20. package/lang/translations/es-co.po +1 -0
  21. package/lang/translations/es.po +1 -0
  22. package/lang/translations/et.po +1 -0
  23. package/lang/translations/fa.po +10 -9
  24. package/lang/translations/fi.po +1 -0
  25. package/lang/translations/fr.po +1 -0
  26. package/lang/translations/gl.po +1 -0
  27. package/lang/translations/he.po +1 -0
  28. package/lang/translations/hi.po +1 -0
  29. package/lang/translations/hr.po +1 -0
  30. package/lang/translations/hu.po +1 -0
  31. package/lang/translations/id.po +1 -0
  32. package/lang/translations/it.po +1 -0
  33. package/lang/translations/ja.po +1 -0
  34. package/lang/translations/jv.po +1 -0
  35. package/lang/translations/ko.po +1 -0
  36. package/lang/translations/lt.po +1 -0
  37. package/lang/translations/lv.po +1 -0
  38. package/lang/translations/ms.po +1 -0
  39. package/lang/translations/nl.po +1 -0
  40. package/lang/translations/no.po +1 -0
  41. package/lang/translations/pl.po +1 -0
  42. package/lang/translations/pt-br.po +4 -3
  43. package/lang/translations/pt.po +1 -0
  44. package/lang/translations/ro.po +1 -0
  45. package/lang/translations/ru.po +1 -0
  46. package/lang/translations/sk.po +1 -0
  47. package/lang/translations/sq.po +1 -0
  48. package/lang/translations/sr-latn.po +1 -0
  49. package/lang/translations/sr.po +1 -0
  50. package/lang/translations/sv.po +1 -0
  51. package/lang/translations/th.po +1 -0
  52. package/lang/translations/tk.po +1 -0
  53. package/lang/translations/tr.po +1 -0
  54. package/lang/translations/tt.po +1 -0
  55. package/lang/translations/ug.po +1 -0
  56. package/lang/translations/uk.po +1 -0
  57. package/lang/translations/ur.po +1 -0
  58. package/lang/translations/vi.po +1 -0
  59. package/lang/translations/zh-cn.po +1 -0
  60. package/lang/translations/zh.po +1 -0
  61. package/package.json +3 -7
  62. package/src/annotations/annotation.d.ts +90 -90
  63. package/src/annotations/annotation.js +1 -1
  64. package/src/annotations/annotationcollection.d.ts +98 -98
  65. package/src/annotations/annotationcollection.js +1 -1
  66. package/src/annotations/annotations.d.ts +154 -154
  67. package/src/annotations/annotations.js +1 -1
  68. package/src/annotations/annotationsuis.d.ts +232 -232
  69. package/src/annotations/annotationsuis.js +1 -1
  70. package/src/annotations/editorannotations.d.ts +67 -67
  71. package/src/annotations/editorannotations.js +1 -1
  72. package/src/annotations/inlineannotations.d.ts +90 -90
  73. package/src/annotations/inlineannotations.js +1 -1
  74. package/src/annotations/narrowsidebar.d.ts +85 -85
  75. package/src/annotations/narrowsidebar.js +1 -1
  76. package/src/annotations/sidebar.d.ts +100 -100
  77. package/src/annotations/sidebar.js +1 -1
  78. package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
  79. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  80. package/src/annotations/view/annotationview.d.ts +90 -90
  81. package/src/annotations/view/annotationview.js +1 -1
  82. package/src/annotations/view/sidebaritemview.d.ts +55 -55
  83. package/src/annotations/view/sidebaritemview.js +1 -1
  84. package/src/annotations/view/sidebarview.d.ts +32 -32
  85. package/src/annotations/view/sidebarview.js +1 -1
  86. package/src/annotations/widesidebar.d.ts +77 -77
  87. package/src/annotations/widesidebar.js +1 -1
  88. package/src/augmentation.d.ts +52 -52
  89. package/src/comments/addcommentthreadcommand.d.ts +35 -35
  90. package/src/comments/addcommentthreadcommand.js +1 -1
  91. package/src/comments/commentsarchive.d.ts +31 -31
  92. package/src/comments/commentsarchive.js +1 -1
  93. package/src/comments/commentsarchiveui.d.ts +38 -38
  94. package/src/comments/commentsarchiveui.js +1 -1
  95. package/src/comments/commentsediting.d.ts +79 -79
  96. package/src/comments/commentsediting.js +1 -1
  97. package/src/comments/commentsrepository.d.ts +1129 -1105
  98. package/src/comments/commentsrepository.js +1 -1
  99. package/src/comments/commentsui.d.ts +33 -33
  100. package/src/comments/commentsui.js +1 -1
  101. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
  102. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  103. package/src/comments/integrations/importword.d.ts +21 -21
  104. package/src/comments/integrations/importword.js +1 -1
  105. package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
  106. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  107. package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
  108. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  109. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
  110. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  111. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  112. package/src/comments/ui/commentthreadcontroller.js +1 -1
  113. package/src/comments/ui/view/basecommentthreadview.d.ts +119 -112
  114. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  115. package/src/comments/ui/view/basecommentview.d.ts +112 -112
  116. package/src/comments/ui/view/basecommentview.js +1 -1
  117. package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
  118. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  119. package/src/comments/ui/view/commentcontentview.d.ts +14 -14
  120. package/src/comments/ui/view/commentcontentview.js +1 -1
  121. package/src/comments/ui/view/commentinputview.d.ts +86 -86
  122. package/src/comments/ui/view/commentinputview.js +1 -1
  123. package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
  124. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  125. package/src/comments/ui/view/commentslistview.d.ts +100 -100
  126. package/src/comments/ui/view/commentslistview.js +1 -1
  127. package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
  128. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  129. package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
  130. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  131. package/src/comments/ui/view/commentthreadview.d.ts +118 -117
  132. package/src/comments/ui/view/commentthreadview.js +1 -1
  133. package/src/comments/ui/view/commentview.d.ts +243 -243
  134. package/src/comments/ui/view/commentview.js +1 -1
  135. package/src/comments.d.ts +35 -35
  136. package/src/comments.js +1 -1
  137. package/src/commentsonly.d.ts +33 -33
  138. package/src/commentsonly.js +1 -1
  139. package/src/config.d.ts +176 -176
  140. package/src/index.d.ts +24 -24
  141. package/src/utils/common-translations.d.ts +9 -9
  142. package/src/utils/common-translations.js +1 -1
  143. package/src/utils/createmutationobserver.d.ts +14 -14
  144. package/src/utils/createmutationobserver.js +1 -1
  145. package/theme/annotation-inline.css +2 -1
  146. package/theme/annotation.css +2 -3
  147. package/theme/comment.css +39 -38
  148. package/theme/commentinput.css +2 -1
  149. package/theme/commentmarker.css +7 -6
  150. package/theme/commentsarchive.css +2 -1
  151. package/theme/commentthread.css +68 -57
  152. package/theme/icons/add-comment.svg +1 -1
  153. package/theme/icons/comments-archive.svg +1 -1
  154. package/theme/icons/edit-comment.svg +1 -1
  155. package/theme/icons/remove-comment.svg +1 -1
  156. package/theme/sidebar-narrow.css +4 -3
  157. package/theme/sidebar.css +13 -12
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x44aa=['set:container','mousedown','remove','element','pluginName','keyCode','register','uiUpdate','northArrowSouth','_selectedAnnotations','keydown','_detachListeners','isAttached','has','focus','balloonPanelView','context','attachToDom','create','_attachListeners','annotations','resize','removeEventListener','_domEmitter','listenTo','low','ck-sidebar--narrow','refresh','values','_refreshPositioningDebounced','get','_refreshPositioning','stopListening','includes','find','clear','getByView','destroy','_showBalloon','southArrowNorth','_setSelectedAnnotations','blur','contains','delete','add','hasDomSelection','execute','getOrderedSelectedAnnotations','content','southArrowNorthWest','rearrange','esc','editors','EditorAnnotations','isDirty','_hideBalloon','detach','plugins','preventClosingBalloon','addEventListener','getSidebarItemView','requires','_annotationToNarrowView','isVisible','pin','_annotations','high','view','_editorAnnotations','activeAnnotation','_integrateWithEditorAnnotations','from','_destroyEditorAnnotationsIntegration','attach','cancel','_attachToContainer','Esc','length','_manuallyClosedAnnotationViews','type','addAnnotation','_updateBalloonPosition','focusableElements','first','bodyCollection','stopPropagation','narrowSidebar','set','defaultPositions','target','setActiveAnnotation'];(function(_0x42790c,_0x44aa37){const _0x48998b=function(_0x153ad7){while(--_0x153ad7){_0x42790c['push'](_0x42790c['shift']());}};_0x48998b(++_0x44aa37);}(_0x44aa,0x17b));const _0x4899=function(_0x42790c,_0x44aa37){_0x42790c=_0x42790c-0x0;let _0x48998b=_0x44aa[_0x42790c];return _0x48998b;};import{ContextPlugin as _0x21606a,Context as _0x5d04b1}from'ckeditor5/src/core';import _0x1c5bad from'./annotationsuis';import _0x1c84a2 from'./sidebar';import _0xd25026 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x39ced8,BodyCollection as _0x569cb6}from'ckeditor5/src/ui';import{CKEditorError as _0x4bb7b8,DomEmitterMixin as _0x404662,keyCodes as _0x297d0d,Collection as _0x14b5f8}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x4b3394}from'lodash-es';import _0x2aa2f4 from'./editorannotations';export default class s extends _0x21606a{static get[_0x4899('0x2e')](){return[_0x1c84a2,_0x1c5bad];}static get[_0x4899('0x50')](){return'NarrowSidebar';}constructor(_0xeb7cd4){super(_0xeb7cd4),this['isAttached']=!0x1,this[_0x4899('0x3f')]=new Set(),this['_domEmitter']=Object[_0x4899('0x3')](_0x404662),this[_0x4899('0x2f')]=new Map(),this[_0x4899('0x48')](_0x4899('0x36'),null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x14b5f8(),this[_0x4899('0xe')]=_0x4b3394(()=>{this[_0x4899('0x10')]();},0xfa,{'leading':!0x1});}['init'](){this[_0x4899('0x1')][_0x4899('0x2a')][_0x4899('0xf')](_0x1c5bad)[_0x4899('0x52')](_0x4899('0x47'),this),this[_0x4899('0x45')]=new _0x569cb6(this[_0x4899('0x1')]['locale']),this['balloonPanelView']=new _0x39ced8(this[_0x4899('0x1')]['locale']),this[_0x4899('0x45')][_0x4899('0x2')](),this[_0x4899('0x45')][_0x4899('0x1d')](this[_0x4899('0x0')]);}[_0x4899('0x3a')](_0x1959aa){this[_0x4899('0x5')]=_0x1959aa;const _0x27e765=this[_0x4899('0x1')][_0x4899('0x2a')]['get'](_0x1c84a2),_0x46a492=this[_0x4899('0x0')];if(_0x27e765[_0x4899('0x32')]=_0x1959aa,this['isAttached'])throw new _0x4bb7b8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this[_0x4899('0x9')](_0x27e765,_0x4899('0x4c'),()=>{this[_0x4899('0x29')](),this['listenTo'](_0x27e765,'change:container',_0x4a6f12=>{_0x4a6f12['off'](),this[_0x4899('0x3a')](_0x1959aa);});}),_0x27e765[_0x4899('0x3c')]({'viewClass':_0x4899('0xb'),'spaceBetweenItems':0x5});const _0x24f6e7=_0x45b814=>{const _0x4037c9=new _0xd25026(this[_0x4899('0x1')]['locale']);_0x27e765[_0x4899('0x41')](_0x45b814,_0x4037c9),this['_annotationToNarrowView']['set'](_0x45b814,_0x4037c9),_0x4037c9['bind'](_0x4899('0x27'),'annotationType','number')['to'](_0x45b814['view'],_0x4899('0x27'),_0x4899('0x40'),_0x4899('0x3e')),_0x4037c9['on'](_0x4899('0x1f'),()=>{this[_0x4899('0x3f')][_0x4899('0x14')](),_0x46a492['content'][_0x4899('0x44')]!==_0x45b814[_0x4899('0x34')]?(this[_0x4899('0x17')](_0x45b814),_0x45b814[_0x4899('0x34')][_0x4899('0x4f')][_0x4899('0x5a')](),this[_0x4899('0x4b')](_0x45b814)):this[_0x4899('0x4b')](null);});};for(const _0x5a50e8 of _0x1959aa)_0x24f6e7(_0x5a50e8);this[_0x4899('0x9')](_0x1959aa,_0x4899('0x1d'),(_0x191a30,_0xdeeaf8)=>{_0x24f6e7(_0xdeeaf8);}),this[_0x4899('0x9')](_0x1959aa,'remove',(_0x44fe64,_0x5ffe0c,_0x562239)=>{this[_0x4899('0x2f')][_0x4899('0xf')](_0x5ffe0c)[_0x4899('0x16')](),this[_0x4899('0x2f')][_0x4899('0x1c')](_0x5ffe0c),_0x27e765[_0x4899('0x23')]({'removedAnnotation':_0x5ffe0c,'previousAnnotation':_0x1959aa['get'](_0x562239-0x1),'nextAnnotation':_0x1959aa[_0x4899('0xf')](_0x562239+0x1)}),_0x5ffe0c===this[_0x4899('0x36')]&&this[_0x4899('0x4b')](null);},{'priority':_0x4899('0xa')}),this[_0x4899('0x9')](_0x1959aa,'focus',(_0xbd8e31,_0x77239f)=>{this[_0x4899('0x4b')](_0x77239f);}),this[_0x4899('0x9')](_0x1959aa,_0x4899('0x1a'),()=>{this['setActiveAnnotation'](null);}),this['_domEmitter'][_0x4899('0x9')](document,_0x4899('0x56'),(_0x1ce23a,_0x17c15d)=>{_0x17c15d[_0x4899('0x51')]===_0x297d0d[_0x4899('0x24')]&&_0x46a492[_0x4899('0x30')]&&(this[_0x4899('0x3f')][_0x4899('0x1d')](_0x46a492['content'][_0x4899('0x44')]),this[_0x4899('0x28')](),_0x17c15d[_0x4899('0x46')](),_0x17c15d['preventDefault']());}),this[_0x4899('0x8')][_0x4899('0x9')](document,_0x4899('0x4d'),(_0x1e3666,_0x10707d)=>{const _0x49e8e1=_0x10707d[_0x4899('0x4a')];_0x46a492[_0x4899('0x30')]&&_0x46a492[_0x4899('0x4f')][_0x4899('0x1b')](_0x49e8e1)||_0x27e765[_0x4899('0x34')]['element'][_0x4899('0x1b')](_0x49e8e1)||_0x1e3666[_0x4899('0x2b')]||this['activeAnnotation']&&this[_0x4899('0x36')][_0x4899('0x43')][_0x4899('0x13')](_0x8a9f24=>_0x8a9f24[_0x4899('0x1b')](_0x49e8e1))||(this[_0x4899('0x3f')]['clear'](),this[_0x4899('0x28')](),this[_0x4899('0x4b')](null));});const _0x2a7acb=this[_0x4899('0x1')]instanceof _0x5d04b1?this[_0x4899('0x1')][_0x4899('0x25')]:new _0x14b5f8([this[_0x4899('0x1')]]);for(const _0x266fae of _0x2a7acb)this[_0x4899('0x37')](_0x266fae);this['listenTo'](_0x2a7acb,_0x4899('0x1d'),(_0x4e88a5,_0x33a62f)=>{this[_0x4899('0x9')](_0x33a62f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x33a62f);});}),this['listenTo'](_0x2a7acb,_0x4899('0x4e'),(_0x3e310a,_0x43b36d)=>{_0x43b36d[_0x4899('0x2a')][_0x4899('0x59')](_0x4899('0x26'))&&this[_0x4899('0x39')](_0x43b36d[_0x4899('0x2a')][_0x4899('0xf')](_0x4899('0x26')));}),window[_0x4899('0x2c')](_0x4899('0x6'),this[_0x4899('0xe')]),this[_0x4899('0x10')]();}[_0x4899('0x4b')](_0x49dffb){if(_0x49dffb===this[_0x4899('0x36')])return;const _0x28e567=this[_0x4899('0x1')]['plugins']['get'](_0x1c84a2);if(_0x28e567[_0x4899('0xc')]({'blurredAnnotation':this[_0x4899('0x36')],'activatedAnnotation':_0x49dffb,'disableAnimationOnActivatedAnnotation':!0x0}),_0x49dffb)_0x28e567[_0x4899('0x2d')](_0x49dffb)?this[_0x4899('0x17')](_0x49dffb):this[_0x4899('0x28')]();else this['_hideBalloon']();this[_0x4899('0x36')]=_0x49dffb;}[_0x4899('0x29')](){if(!this[_0x4899('0x58')])throw new _0x4bb7b8('narrowsidebar-detach-not-attached',this);this[_0x4899('0x4b')](null);const _0x55c40b=this[_0x4899('0x1')][_0x4899('0x2a')][_0x4899('0xf')](_0x1c84a2);this[_0x4899('0x28')](),Array[_0x4899('0x38')](this[_0x4899('0x2f')][_0x4899('0xd')](),_0x551521=>_0x551521['destroy']()),this[_0x4899('0x2f')][_0x4899('0x14')](),_0x55c40b['_detachFromContainer'](this[_0x4899('0x5')]),this[_0x4899('0x11')](),this[_0x4899('0x8')][_0x4899('0x11')](),this[_0x4899('0x1')]instanceof _0x5d04b1&&this[_0x4899('0x11')](this[_0x4899('0x1')][_0x4899('0x25')]);for(const _0x299702 of Array[_0x4899('0x38')](this[_0x4899('0x35')]))this[_0x4899('0x39')](_0x299702);window[_0x4899('0x7')](_0x4899('0x6'),this[_0x4899('0xe')]),this[_0x4899('0xe')][_0x4899('0x3b')](),this[_0x4899('0x55')]=[],this[_0x4899('0x58')]=!0x1,this[_0x4899('0x5')]=null;}['destroy'](){this[_0x4899('0x58')]&&this[_0x4899('0x29')](),this[_0x4899('0x45')]['detachFromDom']();}[_0x4899('0x37')](_0x2ce05f){const _0x3a8538=_0x2ce05f[_0x4899('0x2a')][_0x4899('0xf')](_0x2aa2f4),_0x224358=this['context'][_0x4899('0x2a')][_0x4899('0xf')](_0x1c84a2),_0x1b46b9=this[_0x4899('0x5')],_0x29e9b4=this['balloonPanelView'],_0x25b8f1=()=>{const _0x344086=_0x3a8538[_0x4899('0x20')]({'annotations':this['annotations'],'activeAnnotation':this[_0x4899('0x36')]});this['_setSelectedAnnotations'](_0x344086),this[_0x4899('0x4b')](_0x344086[0x0]||null);};this['listenTo'](_0x3a8538,_0x4899('0xc'),_0x25b8f1),this[_0x4899('0x9')](_0x3a8538,'blur',(_0x58e6df,{isAnnotationTracked:_0x3ff0d8})=>{this[_0x4899('0x36')]&&_0x3ff0d8(this[_0x4899('0x36')])&&(this[_0x4899('0x19')]([]),this['setActiveAnnotation'](null));}),this[_0x4899('0x9')](_0x3a8538,_0x4899('0x53'),()=>{this[_0x4899('0xe')]();}),this[_0x4899('0x9')](_0x1b46b9,_0x4899('0x1a'),_0x4728a1=>{_0x3a8538[_0x4899('0x1e')]()&&_0x4728a1['stop']();},{'priority':_0x4899('0x33')}),this[_0x4899('0x9')](this['_domEmitter'],_0x4899('0x4d'),(_0x38a3e5,_0xabed04)=>{const _0x3aa528=_0xabed04[_0x4899('0x4a')];_0x29e9b4['isVisible']&&_0x29e9b4[_0x4899('0x4f')][_0x4899('0x1b')](_0x3aa528)||_0x224358['view'][_0x4899('0x4f')][_0x4899('0x1b')](_0x3aa528)||this[_0x4899('0x36')]&&_0x3a8538[_0x4899('0x1e')]()&&(_0x25b8f1(),_0x38a3e5[_0x4899('0x2b')]=!0x0);},{'priority':_0x4899('0x33')}),this[_0x4899('0x35')][_0x4899('0x1d')](_0x3a8538);}[_0x4899('0x39')](_0x22e7cc){_0x22e7cc&&(this[_0x4899('0x11')](_0x22e7cc),this['_editorAnnotations']['remove'](_0x22e7cc));}[_0x4899('0x19')](_0x525d8d){for(const _0x3b1fa8 of this[_0x4899('0x55')])_0x525d8d[_0x4899('0x12')](_0x3b1fa8)||this['_manuallyClosedAnnotationViews'][_0x4899('0x1c')](_0x3b1fa8[_0x4899('0x34')]);this[_0x4899('0x55')]=_0x525d8d;}['_refreshPositioning'](){const _0x2ee624=this['balloonPanelView'];this[_0x4899('0x5')]['refreshPositioning'](),_0x2ee624['isVisible']&&this[_0x4899('0x42')]();}[_0x4899('0x17')](_0x30ecad){if(this[_0x4899('0x3f')][_0x4899('0x59')](_0x30ecad[_0x4899('0x34')]))return;const _0x546c1b=this[_0x4899('0x0')][_0x4899('0x21')][_0x4899('0x44')];_0x546c1b!==_0x30ecad[_0x4899('0x34')]?(_0x546c1b&&this[_0x4899('0x57')](_0x546c1b),this[_0x4899('0x4')](_0x30ecad[_0x4899('0x34')]),this[_0x4899('0x0')][_0x4899('0x21')][_0x4899('0x14')](),this['balloonPanelView'][_0x4899('0x21')]['add'](_0x30ecad['view']),this[_0x4899('0x42')]()):this['_updateBalloonPosition']();}[_0x4899('0x42')](){const _0x585dd3=this[_0x4899('0x0')]['content'][_0x4899('0x44')],_0x5d628a=_0x585dd3&&this[_0x4899('0x5')][_0x4899('0x15')](_0x585dd3);if(!_0x5d628a||!this[_0x4899('0x2f')][_0x4899('0x59')](_0x5d628a))return;const _0x135eb7=this[_0x4899('0x2f')][_0x4899('0xf')](_0x5d628a)[_0x4899('0x4f')],_0x1ba0a7=function(){const _0xd359ab=_0x39ced8[_0x4899('0x49')];return[_0xd359ab['southArrowNorthEast'],_0xd359ab['northArrowSouthEast'],_0xd359ab[_0x4899('0x18')],_0xd359ab[_0x4899('0x54')],_0xd359ab[_0x4899('0x22')],_0xd359ab['northArrowSouthWest']];}();this['balloonPanelView'][_0x4899('0x31')]({'target':_0x135eb7,'positions':_0x1ba0a7});}['_hideBalloon'](){const _0x124343=this[_0x4899('0x0')],_0x17e501=_0x124343[_0x4899('0x21')][_0x4899('0x44')];_0x17e501&&(this[_0x4899('0x57')](_0x17e501),_0x124343['unpin'](),_0x124343[_0x4899('0x21')]['clear']());}['_attachListeners'](_0x2aaa68){this[_0x4899('0x9')](_0x2aaa68,'change:height',()=>this[_0x4899('0x42')]()),this[_0x4899('0x9')](_0x2aaa68,_0x4899('0x3d'),(_0x10869a,_0x1a507b)=>{this[_0x4899('0x3f')][_0x4899('0x1d')](_0x2aaa68),this[_0x4899('0x28')](),_0x1a507b();});}[_0x4899('0x57')](_0x141ab0){this['stopListening'](_0x141ab0);}}
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 _0x579b=['change:targetRect','_alignForTopChange','bottom','target','push','_sidebarItemViewToAnnotation','change:top','view','refresh','minHeight','last','_activeAnnotation','class','listenTo','getIndex','content','destroy','context','_setItemTop','container','_detachFromContainer','sidebar-setcontainer-invalid-element','locale','element','_updateLastItem','add','rearrange','set','stopListening','sidebar.preventScrollOutOfView','delete','setContainer','define','get','_alignAfterItem','_getTargetTop','_attachToContainer','sidebar.container','top','change:_lastItem','updateHeight','_recalculateBuffer','remove','_annotations','config','change:bottom','clear','_alignBeforeItem','targetRect','_annotationToSidebarItemView','_recalculate','_getItemBefore','max','bind','_alignForBottomChange','isAnimationDisabled','object','pluginName','list','_getItemAfter','_getMaxAvailableTop','nodeType','appendChild','_spaceBetweenItems','getSidebarItemView','_lastItem','_destroySidebarItemView','render','length','_createSidebarView','Sidebar','isActive','_alignToTargetRect'];(function(_0x18c2ac,_0x579b06){const _0x1bb21c=function(_0x4972ae){while(--_0x4972ae){_0x18c2ac['push'](_0x18c2ac['shift']());}};_0x1bb21c(++_0x579b06);}(_0x579b,0xcc));const _0x1bb2=function(_0x18c2ac,_0x579b06){_0x18c2ac=_0x18c2ac-0x0;let _0x1bb21c=_0x579b[_0x18c2ac];return _0x1bb21c;};import{ContextPlugin as _0x3ce82f}from'ckeditor5/src/core';import{Rect as _0x3d03cc,CKEditorError as _0x36b5e}from'ckeditor5/src/utils';import _0x16d3f8 from'./view/sidebarview';import _0x124176 from'./view/sidebaritemview';export default class z extends _0x3ce82f{static get[_0x1bb2('0x48')](){return _0x1bb2('0xc');}constructor(_0x385da3){super(_0x385da3),this[_0x1bb2('0x2a')](_0x1bb2('0x7'),void 0x0),this[_0x1bb2('0x16')]=this[_0x1bb2('0xb')](),this['set']('container',null),this[_0x1bb2('0x5')]=0x19,this[_0x1bb2('0x14')]=new Map(),this[_0x1bb2('0x40')]=new Map(),this[_0x1bb2('0x20')]['config'][_0x1bb2('0x2f')](_0x1bb2('0x2c'),!0x1),this[_0x1bb2('0x3a')]=null,this[_0x1bb2('0x1a')]=null,this['_recalculateBuffer']=[];}['init'](){const _0x509c10=this[_0x1bb2('0x20')][_0x1bb2('0x3b')][_0x1bb2('0x30')](_0x1bb2('0x34'));_0x509c10&&this[_0x1bb2('0x2e')](_0x509c10);}[_0x1bb2('0x2e')](_0x418023){if(!y(_0x418023))throw new _0x36b5e(_0x1bb2('0x24'));this[_0x1bb2('0x22')]=_0x418023;}[_0x1bb2('0x33')]({viewClass:_0x1e0b1d='',spaceBetweenItems:_0x377e6e=0x19}={}){if(!y(this[_0x1bb2('0x22')]))throw new _0x36b5e('sidebar-attachtocontainer-missing-container',this);this['container'][_0x1bb2('0x4')](this[_0x1bb2('0x16')][_0x1bb2('0x26')]),this[_0x1bb2('0x16')][_0x1bb2('0x1b')]=_0x1e0b1d,this[_0x1bb2('0x5')]=_0x377e6e;}[_0x1bb2('0x29')]({removedAnnotation:_0x4cbecf,previousAnnotation:_0x551bea,nextAnnotation:_0xe9283c}){const _0x8e50d9=this['getSidebarItemView'](_0x4cbecf);this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x39')](_0x8e50d9),this[_0x1bb2('0x8')](_0x4cbecf),_0x551bea&&this[_0x1bb2('0xe')](this[_0x1bb2('0x6')](_0x551bea)),_0xe9283c&&this[_0x1bb2('0xe')](this['getSidebarItemView'](_0xe9283c)),this[_0x1bb2('0x27')]();}[_0x1bb2('0x17')]({blurredAnnotation:_0x1e2a25,activatedAnnotation:_0x5264f6,disableAnimationOnActivatedAnnotation:_0x576573}){if(this[_0x1bb2('0x1a')]=_0x5264f6,_0x1e2a25){_0x1e2a25[_0x1bb2('0xd')]=!0x1;const _0x10fee6=this[_0x1bb2('0x6')](_0x1e2a25);_0x10fee6&&_0x576573&&(_0x10fee6[_0x1bb2('0x46')]=!0x1);}if(_0x5264f6){const _0x9de0a0=this[_0x1bb2('0x6')](_0x5264f6);_0x9de0a0&&(_0x5264f6['isActive']=!0x0,_0x576573&&(_0x9de0a0[_0x1bb2('0x46')]=!0x0,_0x9de0a0[_0x1bb2('0x35')]+=0x1),this[_0x1bb2('0xe')](_0x9de0a0));}}[_0x1bb2('0x23')](_0x5a6d0c){if(this['view'][_0x1bb2('0x26')][_0x1bb2('0x39')](),_0x5a6d0c)for(const _0x2cd77c of _0x5a6d0c)this[_0x1bb2('0x8')](_0x2cd77c);this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x3d')](),this[_0x1bb2('0x16')][_0x1bb2('0x1b')]='',this[_0x1bb2('0x7')]=null;}['addAnnotation'](_0x5bf5e0,_0x683a04){_0x683a04||(_0x683a04=_0x5bf5e0[_0x1bb2('0x16')]);const _0x512e19=new _0x124176(this[_0x1bb2('0x20')]['locale']);this[_0x1bb2('0x14')][_0x1bb2('0x2a')](_0x512e19,_0x5bf5e0),this[_0x1bb2('0x40')]['set'](_0x5bf5e0,_0x512e19),_0x512e19[_0x1bb2('0x1e')][_0x1bb2('0x28')](_0x683a04),this[_0x1bb2('0x1c')](_0x5bf5e0[_0x1bb2('0x16')],_0x1bb2('0xf'),(_0x1613ee,_0x44949a,_0x593f85)=>{const _0x53affb=this[_0x1bb2('0x32')](_0x5bf5e0,_0x593f85);_0x512e19['_targetTop']!=_0x53affb&&(_0x512e19['_targetTop']=_0x53affb,this[_0x1bb2('0x21')](_0x512e19,_0x53affb));}),this[_0x1bb2('0x1c')](_0x512e19,_0x1bb2('0x15'),()=>{this[_0x1bb2('0x41')](_0x512e19,_0x1bb2('0x35'));}),this[_0x1bb2('0x1c')](_0x512e19,_0x1bb2('0x3c'),()=>{this[_0x1bb2('0x41')](_0x512e19,_0x1bb2('0x11'));}),this[_0x1bb2('0xe')](_0x512e19);const _0xcbdcc7=this[_0x1bb2('0x42')](_0x512e19);if(_0xcbdcc7)this['_alignAfterItem'](_0xcbdcc7,_0x512e19)||this[_0x1bb2('0xe')](_0x512e19);else this[_0x1bb2('0xe')](_0x512e19);return this[_0x1bb2('0x27')](),this[_0x1bb2('0x16')][_0x1bb2('0x0')][_0x1bb2('0x28')](_0x512e19),_0x512e19;}[_0x1bb2('0x10')](_0x217e16){if(!_0x217e16[_0x1bb2('0x1e')][_0x1bb2('0xa')])return;const _0x36da67=this['_getItemBefore'](_0x217e16);if(!_0x36da67)return;const _0x4a24b0=this['_sidebarItemViewToAnnotation'][_0x1bb2('0x30')](_0x36da67),_0xdb8fff=this[_0x1bb2('0x1a')];_0xdb8fff&&_0xdb8fff===_0x4a24b0?this[_0x1bb2('0x31')](_0x36da67,_0x217e16):this[_0x1bb2('0x3e')](_0x217e16,_0x36da67);}[_0x1bb2('0x45')](_0x4a049d){if(!_0x4a049d[_0x1bb2('0x1e')]['length'])return;const _0x2bc4e6=this[_0x1bb2('0x1')](_0x4a049d);if(!_0x2bc4e6)return;const _0x5e502f=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x2bc4e6),_0x5347f6=this[_0x1bb2('0x20')][_0x1bb2('0x3b')][_0x1bb2('0x30')]('sidebar.preventScrollOutOfView'),_0x46661d=this[_0x1bb2('0x1a')];_0x46661d&&_0x46661d===_0x5e502f&&_0x5347f6?(this[_0x1bb2('0x3e')](_0x2bc4e6,_0x4a049d),this[_0x1bb2('0x31')](_0x4a049d,_0x2bc4e6)):_0x46661d&&_0x46661d===_0x5e502f?this['_alignBeforeItem'](_0x2bc4e6,_0x4a049d):this[_0x1bb2('0x31')](_0x4a049d,_0x2bc4e6);}[_0x1bb2('0x41')](_0x2df1b3,_0x2a9fa5){0x0===this[_0x1bb2('0x38')][_0x1bb2('0xa')]&&setTimeout(()=>{for(const {sidebarItemView:_0x1046ba,changedProp:_0x1236f0}of this[_0x1bb2('0x38')])_0x1bb2('0x35')===_0x1236f0?this[_0x1bb2('0x10')](_0x1046ba):this['_alignForBottomChange'](_0x1046ba);this[_0x1bb2('0x38')]=[];},0xa),this[_0x1bb2('0x38')][_0x1bb2('0x13')]({'sidebarItemView':_0x2df1b3,'changedProp':_0x2a9fa5});}['getSidebarItemView'](_0x59a2f5){return this[_0x1bb2('0x40')]['get'](_0x59a2f5);}[_0x1bb2('0x1f')](){this[_0x1bb2('0x2b')](),this['view'][_0x1bb2('0x1f')]();}[_0x1bb2('0x8')](_0x30751f){const _0x149cb5=this[_0x1bb2('0x6')](_0x30751f);this[_0x1bb2('0x2b')](_0x149cb5),this['stopListening'](_0x30751f[_0x1bb2('0x16')]),_0x149cb5['destroy'](),this[_0x1bb2('0x40')]['delete'](_0x30751f),this[_0x1bb2('0x14')][_0x1bb2('0x2d')](_0x149cb5);}[_0x1bb2('0xb')](){const _0x109872=new _0x16d3f8(this['context'][_0x1bb2('0x25')]);return _0x109872[_0x1bb2('0x9')](),this['on'](_0x1bb2('0x36'),(_0x499230,_0x3c319d,_0x2eee4f,_0x51b3d9)=>{_0x51b3d9&&_0x109872['unbind']('minHeight'),_0x2eee4f?_0x109872[_0x1bb2('0x44')](_0x1bb2('0x18'))['to'](_0x2eee4f,_0x1bb2('0x11')):_0x109872[_0x1bb2('0x18')]=null;}),_0x109872;}[_0x1bb2('0x27')](){var _0x332dd4;this['_lastItem']=(null===(_0x332dd4=this[_0x1bb2('0x3a')])||void 0x0===_0x332dd4?void 0x0:_0x332dd4[_0x1bb2('0x19')])?this['getSidebarItemView'](this[_0x1bb2('0x3a')][_0x1bb2('0x19')]):null;}[_0x1bb2('0x42')](_0x24453){var _0x2b7893;const _0x1422b6=this['_sidebarItemViewToAnnotation']['get'](_0x24453),_0x4cba01=_0x1422b6&&(null===(_0x2b7893=this[_0x1bb2('0x3a')])||void 0x0===_0x2b7893?void 0x0:_0x2b7893[_0x1bb2('0x30')](this['_annotations']['getIndex'](_0x1422b6)-0x1));return _0x4cba01&&this[_0x1bb2('0x6')](_0x4cba01)||null;}[_0x1bb2('0x1')](_0x5c7b16){var _0x3db662;const _0x5c24af=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x5c7b16),_0x1dec87=_0x5c24af&&(null===(_0x3db662=this['_annotations'])||void 0x0===_0x3db662?void 0x0:_0x3db662['get'](this[_0x1bb2('0x3a')][_0x1bb2('0x1d')](_0x5c24af)+0x1));return _0x1dec87&&this[_0x1bb2('0x6')](_0x1dec87)||null;}[_0x1bb2('0x3e')](_0x1e3ce8,_0x3a17a6){_0x1e3ce8[_0x1bb2('0x37')]();const _0x4971da=H(_0x3a17a6[_0x1bb2('0x11')]+this[_0x1bb2('0x5')],_0x1e3ce8[_0x1bb2('0x35')]);return!!_0x4971da&&(this['_setItemTop'](_0x3a17a6,_0x3a17a6[_0x1bb2('0x35')]-_0x4971da),!0x0);}['_alignAfterItem'](_0x4c5bc7,_0x216f3a){_0x4c5bc7[_0x1bb2('0x37')]();const _0x5f27b9=H(_0x4c5bc7[_0x1bb2('0x11')]+this[_0x1bb2('0x5')],_0x216f3a[_0x1bb2('0x35')]);return!!_0x5f27b9&&(this[_0x1bb2('0x21')](_0x216f3a,_0x216f3a[_0x1bb2('0x35')]+_0x5f27b9,!0x1),!0x0);}[_0x1bb2('0xe')](_0x2cc28f){const _0x2710dc=this[_0x1bb2('0x14')][_0x1bb2('0x30')](_0x2cc28f);if(!_0x2710dc||!_0x2710dc[_0x1bb2('0x12')]||!_0x2710dc['targetRect'])return;const _0x32e881=this[_0x1bb2('0x32')](_0x2710dc,_0x2710dc[_0x1bb2('0x3f')]);this[_0x1bb2('0x21')](_0x2cc28f,_0x32e881);}[_0x1bb2('0x32')](_0x2890a6,_0x2bb563){if(null===_0x2bb563)return 0x0;if(_0x2890a6[_0x1bb2('0x12')]instanceof _0x3d03cc)return _0x2bb563[_0x1bb2('0x35')];{const _0x413f31=new _0x3d03cc(this['view'][_0x1bb2('0x26')])[_0x1bb2('0x35')];return _0x2bb563[_0x1bb2('0x35')]-_0x413f31;}}[_0x1bb2('0x21')](_0x3cafa5,_0x2a47c0,_0x8d81b3=this['context'][_0x1bb2('0x3b')][_0x1bb2('0x30')](_0x1bb2('0x2c'))){_0x8d81b3&&(_0x2a47c0=Math[_0x1bb2('0x43')](_0x2a47c0,this[_0x1bb2('0x2')](_0x3cafa5))),_0x3cafa5[_0x1bb2('0x35')]=_0x2a47c0;}[_0x1bb2('0x2')](_0x326568){let _0x360a2e=this[_0x1bb2('0x42')](_0x326568),_0x838563=0x0;for(;_0x360a2e;)_0x360a2e[_0x1bb2('0x37')](),_0x838563+=this[_0x1bb2('0x5')]+_0x360a2e['height'],_0x360a2e=this[_0x1bb2('0x42')](_0x360a2e);return _0x838563;}}function H(_0x2bb70d,_0x280d0e){return Math[_0x1bb2('0x43')](_0x2bb70d-_0x280d0e,0x0);}function y(_0x1869e0){return null!==_0x1869e0&&_0x1bb2('0x47')==typeof _0x1869e0&&0x1===_0x1869e0[_0x1bb2('0x3')];}
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 _0x2adc=['...','toString','span','ck-annotation-counter','setTemplate','number','set','icon','annotationType','extendTemplate','ck-annotation-counter__badge--edit-mode','children','add','ck-annotation-counter__badge','_badge','counterView','isDirty'];(function(_0x598520,_0x2adc33){const _0xf38186=function(_0x5333f3){while(--_0x5333f3){_0x598520['push'](_0x598520['shift']());}};_0xf38186(++_0x2adc33);}(_0x2adc,0x1dc));const _0xf381=function(_0x598520,_0x2adc33){_0x598520=_0x598520-0x0;let _0xf38186=_0x2adc[_0x598520];return _0xf38186;};import{ButtonView as _0x1c75f6,View as _0x11f0b6}from'ckeditor5/src/ui';import _0x46e691 from'../../../theme/icons/add-comment.svg';export default class D extends _0x1c75f6{constructor(_0x4896c5){super(_0x4896c5);const _0x539a66=this['bindTemplate'];this['set'](_0xf381('0x10'),!0x1),this[_0xf381('0x6')](_0xf381('0x5'),0x0),this['bind'](_0xf381('0xe'))['to'](this,_0xf381('0x10'),this,_0xf381('0x5'),(_0xecab9d,_0x1af177)=>_0xecab9d?_0xf381('0x0'):_0x1af177[_0xf381('0x1')]()),this[_0xf381('0x6')](_0xf381('0x8'),''),this[_0xf381('0x7')]=_0x46e691,this[_0xf381('0x9')]({'attributes':{'class':[_0xf381('0x3')]}}),this[_0xf381('0xf')]=new _0x11f0b6(),this[_0xf381('0xf')][_0xf381('0x4')]({'tag':_0xf381('0x2'),'attributes':{'class':[_0xf381('0xd'),_0x539a66['to'](_0xf381('0x8'),_0x551dc4=>'ck-annotation-counter__badge--'+_0x551dc4),_0x539a66['if'](_0xf381('0x10'),_0xf381('0xa'))]},'children':[{'text':_0x539a66['to'](_0xf381('0xe'))}]}),this[_0xf381('0xb')][_0xf381('0xc')](this['counterView']);}}
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']);}}