@ckeditor/ckeditor5-comments 40.0.0 → 40.2.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 (197) hide show
  1. package/CHANGELOG.md +19 -19
  2. package/LICENSE.md +3 -3
  3. package/README.md +1 -1
  4. package/build/comments.js +2 -2
  5. package/build/translations/af.js +1 -1
  6. package/build/translations/ar.js +1 -1
  7. package/build/translations/bg.js +1 -1
  8. package/build/translations/bn.js +1 -1
  9. package/build/translations/bs.js +1 -1
  10. package/build/translations/ca.js +1 -1
  11. package/build/translations/cs.js +1 -1
  12. package/build/translations/da.js +1 -1
  13. package/build/translations/de-ch.js +1 -1
  14. package/build/translations/de.js +1 -1
  15. package/build/translations/el.js +1 -1
  16. package/build/translations/en-au.js +1 -1
  17. package/build/translations/es-co.js +1 -1
  18. package/build/translations/es.js +1 -1
  19. package/build/translations/et.js +1 -1
  20. package/build/translations/fa.js +1 -1
  21. package/build/translations/fi.js +1 -1
  22. package/build/translations/fr.js +1 -1
  23. package/build/translations/gl.js +1 -1
  24. package/build/translations/he.js +1 -1
  25. package/build/translations/hi.js +1 -1
  26. package/build/translations/hr.js +1 -1
  27. package/build/translations/hu.js +1 -1
  28. package/build/translations/id.js +1 -1
  29. package/build/translations/it.js +1 -1
  30. package/build/translations/ja.js +1 -1
  31. package/build/translations/jv.js +1 -1
  32. package/build/translations/ko.js +1 -1
  33. package/build/translations/lt.js +1 -1
  34. package/build/translations/lv.js +1 -1
  35. package/build/translations/ms.js +1 -1
  36. package/build/translations/nl.js +1 -1
  37. package/build/translations/no.js +1 -1
  38. package/build/translations/pl.js +1 -1
  39. package/build/translations/pt-br.js +1 -1
  40. package/build/translations/pt.js +1 -1
  41. package/build/translations/ro.js +1 -1
  42. package/build/translations/ru.js +1 -1
  43. package/build/translations/sk.js +1 -1
  44. package/build/translations/sq.js +1 -1
  45. package/build/translations/sr-latn.js +1 -1
  46. package/build/translations/sr.js +1 -1
  47. package/build/translations/sv.js +1 -1
  48. package/build/translations/th.js +1 -1
  49. package/build/translations/tk.js +1 -1
  50. package/build/translations/tr.js +1 -1
  51. package/build/translations/tt.js +1 -1
  52. package/build/translations/ug.js +1 -1
  53. package/build/translations/uk.js +1 -1
  54. package/build/translations/ur.js +1 -1
  55. package/build/translations/vi.js +1 -1
  56. package/build/translations/zh-cn.js +1 -1
  57. package/build/translations/zh.js +1 -1
  58. package/lang/contexts.json +2 -0
  59. package/lang/translations/af.po +8 -0
  60. package/lang/translations/ar.po +8 -0
  61. package/lang/translations/bg.po +8 -0
  62. package/lang/translations/bn.po +8 -0
  63. package/lang/translations/bs.po +8 -0
  64. package/lang/translations/ca.po +8 -0
  65. package/lang/translations/cs.po +8 -0
  66. package/lang/translations/da.po +8 -0
  67. package/lang/translations/de-ch.po +8 -0
  68. package/lang/translations/de.po +8 -0
  69. package/lang/translations/el.po +8 -0
  70. package/lang/translations/en-au.po +8 -0
  71. package/lang/translations/en.po +8 -0
  72. package/lang/translations/es-co.po +8 -0
  73. package/lang/translations/es.po +8 -0
  74. package/lang/translations/et.po +8 -0
  75. package/lang/translations/fa.po +8 -0
  76. package/lang/translations/fi.po +8 -0
  77. package/lang/translations/fr.po +8 -0
  78. package/lang/translations/gl.po +8 -0
  79. package/lang/translations/he.po +8 -0
  80. package/lang/translations/hi.po +8 -0
  81. package/lang/translations/hr.po +8 -0
  82. package/lang/translations/hu.po +8 -0
  83. package/lang/translations/id.po +8 -0
  84. package/lang/translations/it.po +8 -0
  85. package/lang/translations/ja.po +8 -0
  86. package/lang/translations/jv.po +8 -0
  87. package/lang/translations/ko.po +8 -0
  88. package/lang/translations/lt.po +8 -0
  89. package/lang/translations/lv.po +8 -0
  90. package/lang/translations/ms.po +8 -0
  91. package/lang/translations/nl.po +8 -0
  92. package/lang/translations/no.po +8 -0
  93. package/lang/translations/pl.po +8 -0
  94. package/lang/translations/pt-br.po +8 -0
  95. package/lang/translations/pt.po +8 -0
  96. package/lang/translations/ro.po +8 -0
  97. package/lang/translations/ru.po +8 -0
  98. package/lang/translations/sk.po +8 -0
  99. package/lang/translations/sq.po +8 -0
  100. package/lang/translations/sr-latn.po +9 -1
  101. package/lang/translations/sr.po +8 -0
  102. package/lang/translations/sv.po +8 -0
  103. package/lang/translations/th.po +8 -0
  104. package/lang/translations/tk.po +8 -0
  105. package/lang/translations/tr.po +8 -0
  106. package/lang/translations/tt.po +8 -0
  107. package/lang/translations/ug.po +16 -8
  108. package/lang/translations/uk.po +8 -0
  109. package/lang/translations/ur.po +8 -0
  110. package/lang/translations/vi.po +8 -0
  111. package/lang/translations/zh-cn.po +8 -0
  112. package/lang/translations/zh.po +8 -0
  113. package/package.json +3 -3
  114. package/src/annotations/annotation.d.ts +90 -90
  115. package/src/annotations/annotation.js +1 -1
  116. package/src/annotations/annotationcollection.d.ts +98 -98
  117. package/src/annotations/annotationcollection.js +1 -1
  118. package/src/annotations/annotations.d.ts +154 -154
  119. package/src/annotations/annotations.js +1 -1
  120. package/src/annotations/annotationsuis.d.ts +232 -232
  121. package/src/annotations/annotationsuis.js +1 -1
  122. package/src/annotations/editorannotations.d.ts +67 -67
  123. package/src/annotations/editorannotations.js +1 -1
  124. package/src/annotations/inlineannotations.d.ts +90 -90
  125. package/src/annotations/inlineannotations.js +1 -1
  126. package/src/annotations/narrowsidebar.d.ts +85 -85
  127. package/src/annotations/narrowsidebar.js +1 -1
  128. package/src/annotations/sidebar.d.ts +100 -100
  129. package/src/annotations/sidebar.js +1 -1
  130. package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
  131. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  132. package/src/annotations/view/annotationview.d.ts +90 -90
  133. package/src/annotations/view/annotationview.js +1 -1
  134. package/src/annotations/view/sidebaritemview.d.ts +55 -55
  135. package/src/annotations/view/sidebaritemview.js +1 -1
  136. package/src/annotations/view/sidebarview.d.ts +32 -32
  137. package/src/annotations/view/sidebarview.js +1 -1
  138. package/src/annotations/widesidebar.d.ts +77 -77
  139. package/src/annotations/widesidebar.js +1 -1
  140. package/src/augmentation.d.ts +52 -52
  141. package/src/comments/addcommentthreadcommand.d.ts +35 -35
  142. package/src/comments/addcommentthreadcommand.js +1 -1
  143. package/src/comments/commentsarchive.d.ts +31 -31
  144. package/src/comments/commentsarchive.js +1 -1
  145. package/src/comments/commentsarchiveui.d.ts +38 -38
  146. package/src/comments/commentsarchiveui.js +1 -1
  147. package/src/comments/commentsediting.d.ts +79 -79
  148. package/src/comments/commentsediting.js +1 -1
  149. package/src/comments/commentsrepository.d.ts +1130 -1129
  150. package/src/comments/commentsrepository.js +1 -1
  151. package/src/comments/commentsui.d.ts +33 -33
  152. package/src/comments/commentsui.js +1 -1
  153. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
  154. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  155. package/src/comments/integrations/importword.d.ts +21 -21
  156. package/src/comments/integrations/importword.js +1 -1
  157. package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
  158. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  159. package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
  160. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  161. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
  162. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  163. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  164. package/src/comments/ui/commentthreadcontroller.js +1 -1
  165. package/src/comments/ui/view/basecommentthreadview.d.ts +119 -119
  166. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  167. package/src/comments/ui/view/basecommentview.d.ts +112 -112
  168. package/src/comments/ui/view/basecommentview.js +1 -1
  169. package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
  170. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  171. package/src/comments/ui/view/commentcontentview.d.ts +14 -14
  172. package/src/comments/ui/view/commentcontentview.js +1 -1
  173. package/src/comments/ui/view/commentinputview.d.ts +86 -86
  174. package/src/comments/ui/view/commentinputview.js +1 -1
  175. package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
  176. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  177. package/src/comments/ui/view/commentslistview.d.ts +100 -100
  178. package/src/comments/ui/view/commentslistview.js +1 -1
  179. package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
  180. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  181. package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
  182. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  183. package/src/comments/ui/view/commentthreadview.d.ts +118 -118
  184. package/src/comments/ui/view/commentthreadview.js +1 -1
  185. package/src/comments/ui/view/commentview.d.ts +243 -243
  186. package/src/comments/ui/view/commentview.js +1 -1
  187. package/src/comments.d.ts +35 -35
  188. package/src/comments.js +1 -1
  189. package/src/commentsonly.d.ts +33 -33
  190. package/src/commentsonly.js +1 -1
  191. package/src/config.d.ts +176 -176
  192. package/src/index.d.ts +24 -24
  193. package/src/utils/common-translations.d.ts +9 -9
  194. package/src/utils/common-translations.js +1 -1
  195. package/src/utils/createmutationobserver.d.ts +14 -14
  196. package/src/utils/createmutationobserver.js +1 -1
  197. package/theme/comment.css +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5810=['set:container','defaultPositions','detachFromDom','EditorAnnotations','_detachFromContainer','ck-sidebar--narrow','low','off','addAnnotation','ready','_detachListeners','annotations','type','attachToDom','attach','values','cancel','refresh','view','_editorAnnotations','listenTo','stopListening','activeAnnotation','focus','set','create','pluginName','keydown','_refreshPositioning','narrowsidebar-detach-not-attached','remove','refreshPositioning','mousedown','_updateBalloonPosition','plugins','blur','change:height','rearrange','locale','addEventListener','context','element','_attachListeners','stop','balloonPanelView','has','_annotations','length','_hideBalloon','getByView','bind','_selectedAnnotations','high','_refreshPositioningDebounced','stopPropagation','change:container','_destroyEditorAnnotationsIntegration','register','_showBalloon','northArrowSouth','_attachToContainer','keyCode','first','content','getOrderedSelectedAnnotations','pin','southArrowNorth','destroy','bodyCollection','setActiveAnnotation','_integrateWithEditorAnnotations','includes','Esc','contains','isAttached','get','southArrowNorthEast','init','_domEmitter','_manuallyClosedAnnotationViews','target','removeEventListener','clear','add','resize','isVisible','find','focusableElements','preventClosingBalloon','_annotationToNarrowView','from','detach','editors','isDirty','esc','_setSelectedAnnotations','unpin','getSidebarItemView','northArrowSouthEast'];(function(_0x234332,_0x58107b){const _0x4065f5=function(_0x29a4cb){while(--_0x29a4cb){_0x234332['push'](_0x234332['shift']());}};_0x4065f5(++_0x58107b);}(_0x5810,0xf8));const _0x4065=function(_0x234332,_0x58107b){_0x234332=_0x234332-0x0;let _0x4065f5=_0x5810[_0x234332];return _0x4065f5;};import{ContextPlugin as _0x4f06e5,Context as _0x3e23e7}from'ckeditor5/src/core';import _0x45bdb8 from'./annotationsuis';import _0x5a7657 from'./sidebar';import _0x224f7b from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x1857a0,BodyCollection as _0x5c7895}from'ckeditor5/src/ui';import{CKEditorError as _0x3de951,DomEmitterMixin as _0x12982f,keyCodes as _0x12095a,Collection as _0x1895f3}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x41dcaa}from'lodash-es';import _0x223216 from'./editorannotations';export default class s extends _0x4f06e5{static get['requires'](){return[_0x5a7657,_0x45bdb8];}static get[_0x4065('0x4b')](){return'NarrowSidebar';}constructor(_0xce335d){super(_0xce335d),this[_0x4065('0x18')]=!0x1,this[_0x4065('0x1d')]=new Set(),this[_0x4065('0x1c')]=Object[_0x4065('0x4a')](_0x12982f),this['_annotationToNarrowView']=new Map(),this[_0x4065('0x49')]('activeAnnotation',null),this[_0x4065('0x3c')]=null,this[_0x4065('0x1')]=[],this[_0x4065('0x44')]=new _0x1895f3(),this[_0x4065('0x3')]=_0x41dcaa(()=>{this[_0x4065('0x4d')]();},0xfa,{'leading':!0x1});}[_0x4065('0x1b')](){this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x45bdb8)[_0x4065('0x7')]('narrowSidebar',this),this[_0x4065('0x12')]=new _0x5c7895(this['context']['locale']),this[_0x4065('0x5d')]=new _0x1857a0(this[_0x4065('0x59')][_0x4065('0x57')]),this[_0x4065('0x12')][_0x4065('0x3e')](),this[_0x4065('0x12')]['add'](this[_0x4065('0x5d')]);}[_0x4065('0x3f')](_0x55986e){this[_0x4065('0x3c')]=_0x55986e;const _0x2ade75=this[_0x4065('0x59')][_0x4065('0x53')]['get'](_0x5a7657),_0x500d5e=this['balloonPanelView'];if(_0x2ade75[_0x4065('0x5f')]=_0x55986e,this['isAttached'])throw new _0x3de951('narrowsidebar-attach-already-attached',this);this[_0x4065('0x18')]=!0x0,this['listenTo'](_0x2ade75,_0x4065('0x31'),()=>{this[_0x4065('0x29')](),this[_0x4065('0x45')](_0x2ade75,_0x4065('0x5'),_0x31880f=>{_0x31880f[_0x4065('0x38')](),this[_0x4065('0x3f')](_0x55986e);});}),_0x2ade75[_0x4065('0xa')]({'viewClass':_0x4065('0x36'),'spaceBetweenItems':0x5});const _0x20bfde=_0x4ee64e=>{const _0x486ca1=new _0x224f7b(this['context'][_0x4065('0x57')]);_0x2ade75[_0x4065('0x39')](_0x4ee64e,_0x486ca1),this[_0x4065('0x27')]['set'](_0x4ee64e,_0x486ca1),_0x486ca1[_0x4065('0x0')](_0x4065('0x2b'),'annotationType','number')['to'](_0x4ee64e[_0x4065('0x43')],_0x4065('0x2b'),_0x4065('0x3d'),_0x4065('0x60')),_0x486ca1['on']('execute',()=>{this[_0x4065('0x1d')]['clear'](),_0x500d5e['content']['first']!==_0x4ee64e[_0x4065('0x43')]?(this[_0x4065('0x8')](_0x4ee64e),_0x4ee64e[_0x4065('0x43')][_0x4065('0x5a')][_0x4065('0x48')](),this[_0x4065('0x13')](_0x4ee64e)):this[_0x4065('0x13')](null);});};for(const _0x3e6321 of _0x55986e)_0x20bfde(_0x3e6321);this['listenTo'](_0x55986e,'add',(_0x4f52e3,_0x3665c1)=>{_0x20bfde(_0x3665c1);}),this['listenTo'](_0x55986e,_0x4065('0x4f'),(_0x52cb31,_0x513f9f,_0x858bed)=>{this[_0x4065('0x27')][_0x4065('0x19')](_0x513f9f)['destroy'](),this[_0x4065('0x27')]['delete'](_0x513f9f),_0x2ade75[_0x4065('0x56')]({'removedAnnotation':_0x513f9f,'previousAnnotation':_0x55986e[_0x4065('0x19')](_0x858bed-0x1),'nextAnnotation':_0x55986e[_0x4065('0x19')](_0x858bed+0x1)}),_0x513f9f===this[_0x4065('0x47')]&&this['setActiveAnnotation'](null);},{'priority':_0x4065('0x37')}),this[_0x4065('0x45')](_0x55986e,_0x4065('0x48'),(_0x3373c7,_0x124402)=>{this[_0x4065('0x13')](_0x124402);}),this[_0x4065('0x45')](_0x55986e,_0x4065('0x54'),()=>{this[_0x4065('0x13')](null);}),this['_domEmitter'][_0x4065('0x45')](document,_0x4065('0x4c'),(_0x39664d,_0x140460)=>{_0x140460[_0x4065('0xb')]===_0x12095a[_0x4065('0x2c')]&&_0x500d5e[_0x4065('0x23')]&&(this[_0x4065('0x1d')]['add'](_0x500d5e[_0x4065('0xd')][_0x4065('0xc')]),this[_0x4065('0x61')](),_0x140460[_0x4065('0x4')](),_0x140460['preventDefault']());}),this['_domEmitter']['listenTo'](document,_0x4065('0x51'),(_0x3d17a0,_0x4eee4e)=>{const _0x4e26fc=_0x4eee4e[_0x4065('0x1e')];_0x500d5e[_0x4065('0x23')]&&_0x500d5e[_0x4065('0x5a')][_0x4065('0x17')](_0x4e26fc)||_0x2ade75[_0x4065('0x43')][_0x4065('0x5a')][_0x4065('0x17')](_0x4e26fc)||_0x3d17a0[_0x4065('0x26')]||this['activeAnnotation']&&this[_0x4065('0x47')][_0x4065('0x25')][_0x4065('0x24')](_0x1ec7b2=>_0x1ec7b2[_0x4065('0x17')](_0x4e26fc))||(this[_0x4065('0x1d')][_0x4065('0x20')](),this[_0x4065('0x61')](),this['setActiveAnnotation'](null));});const _0x5c7a94=this['context']instanceof _0x3e23e7?this[_0x4065('0x59')]['editors']:new _0x1895f3([this['context']]);for(const _0x107c5f of _0x5c7a94)this[_0x4065('0x14')](_0x107c5f);this[_0x4065('0x45')](_0x5c7a94,_0x4065('0x21'),(_0x1b466e,_0x2c05d2)=>{this[_0x4065('0x45')](_0x2c05d2,_0x4065('0x3a'),()=>{this[_0x4065('0x14')](_0x2c05d2);});}),this['listenTo'](_0x5c7a94,_0x4065('0x4f'),(_0x1643e6,_0x5abbc3)=>{_0x5abbc3[_0x4065('0x53')][_0x4065('0x5e')](_0x4065('0x34'))&&this['_destroyEditorAnnotationsIntegration'](_0x5abbc3[_0x4065('0x53')][_0x4065('0x19')](_0x4065('0x34')));}),window[_0x4065('0x58')](_0x4065('0x22'),this['_refreshPositioningDebounced']),this[_0x4065('0x4d')]();}[_0x4065('0x13')](_0x130086){if(_0x130086===this[_0x4065('0x47')])return;const _0x37fdf9=this[_0x4065('0x59')]['plugins'][_0x4065('0x19')](_0x5a7657);if(_0x37fdf9[_0x4065('0x42')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x130086,'disableAnimationOnActivatedAnnotation':!0x0}),_0x130086)_0x37fdf9[_0x4065('0x2f')](_0x130086)?this['_showBalloon'](_0x130086):this['_hideBalloon']();else this['_hideBalloon']();this[_0x4065('0x47')]=_0x130086;}[_0x4065('0x29')](){if(!this[_0x4065('0x18')])throw new _0x3de951(_0x4065('0x4e'),this);this[_0x4065('0x13')](null);const _0x405115=this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x5a7657);this['_hideBalloon'](),Array[_0x4065('0x28')](this[_0x4065('0x27')][_0x4065('0x40')](),_0x4339d7=>_0x4339d7[_0x4065('0x11')]()),this[_0x4065('0x27')][_0x4065('0x20')](),_0x405115[_0x4065('0x35')](this[_0x4065('0x3c')]),this[_0x4065('0x46')](),this[_0x4065('0x1c')][_0x4065('0x46')](),this['context']instanceof _0x3e23e7&&this[_0x4065('0x46')](this[_0x4065('0x59')][_0x4065('0x2a')]);for(const _0x2ce006 of Array['from'](this[_0x4065('0x44')]))this[_0x4065('0x6')](_0x2ce006);window[_0x4065('0x1f')](_0x4065('0x22'),this['_refreshPositioningDebounced']),this[_0x4065('0x3')][_0x4065('0x41')](),this['_selectedAnnotations']=[],this[_0x4065('0x18')]=!0x1,this[_0x4065('0x3c')]=null;}['destroy'](){this[_0x4065('0x18')]&&this[_0x4065('0x29')](),this[_0x4065('0x12')][_0x4065('0x33')]();}['_integrateWithEditorAnnotations'](_0x5df19e){const _0x244233=_0x5df19e['plugins']['get'](_0x223216),_0xa0d878=this[_0x4065('0x59')][_0x4065('0x53')][_0x4065('0x19')](_0x5a7657),_0x55b2e1=this['annotations'],_0x1c7e84=this[_0x4065('0x5d')],_0x159469=()=>{const _0xed93d2=_0x244233[_0x4065('0xe')]({'annotations':this[_0x4065('0x3c')],'activeAnnotation':this[_0x4065('0x47')]});this[_0x4065('0x2d')](_0xed93d2),this['setActiveAnnotation'](_0xed93d2[0x0]||null);};this['listenTo'](_0x244233,_0x4065('0x42'),_0x159469),this['listenTo'](_0x244233,_0x4065('0x54'),(_0x386bb0,{isAnnotationTracked:_0x3fe743})=>{this[_0x4065('0x47')]&&_0x3fe743(this['activeAnnotation'])&&(this[_0x4065('0x2d')]([]),this['setActiveAnnotation'](null));}),this[_0x4065('0x45')](_0x244233,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x4065('0x45')](_0x55b2e1,_0x4065('0x54'),_0x46a8ae=>{_0x244233['hasDomSelection']()&&_0x46a8ae[_0x4065('0x5c')]();},{'priority':_0x4065('0x2')}),this['listenTo'](this['_domEmitter'],_0x4065('0x51'),(_0x56dd77,_0x4c69c0)=>{const _0x3f29c9=_0x4c69c0['target'];_0x1c7e84['isVisible']&&_0x1c7e84['element']['contains'](_0x3f29c9)||_0xa0d878[_0x4065('0x43')]['element']['contains'](_0x3f29c9)||this[_0x4065('0x47')]&&_0x244233['hasDomSelection']()&&(_0x159469(),_0x56dd77[_0x4065('0x26')]=!0x0);},{'priority':_0x4065('0x2')}),this[_0x4065('0x44')]['add'](_0x244233);}[_0x4065('0x6')](_0x56e601){_0x56e601&&(this[_0x4065('0x46')](_0x56e601),this[_0x4065('0x44')]['remove'](_0x56e601));}['_setSelectedAnnotations'](_0x5cade3){for(const _0x54257e of this[_0x4065('0x1')])_0x5cade3[_0x4065('0x15')](_0x54257e)||this[_0x4065('0x1d')]['delete'](_0x54257e[_0x4065('0x43')]);this[_0x4065('0x1')]=_0x5cade3;}[_0x4065('0x4d')](){const _0x45646d=this[_0x4065('0x5d')];this[_0x4065('0x3c')][_0x4065('0x50')](),_0x45646d[_0x4065('0x23')]&&this[_0x4065('0x52')]();}[_0x4065('0x8')](_0x36bb06){if(this['_manuallyClosedAnnotationViews'][_0x4065('0x5e')](_0x36bb06[_0x4065('0x43')]))return;const _0x4b672a=this[_0x4065('0x5d')][_0x4065('0xd')][_0x4065('0xc')];_0x4b672a!==_0x36bb06[_0x4065('0x43')]?(_0x4b672a&&this[_0x4065('0x3b')](_0x4b672a),this[_0x4065('0x5b')](_0x36bb06[_0x4065('0x43')]),this[_0x4065('0x5d')][_0x4065('0xd')]['clear'](),this[_0x4065('0x5d')][_0x4065('0xd')]['add'](_0x36bb06[_0x4065('0x43')]),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}[_0x4065('0x52')](){const _0x359070=this['balloonPanelView'][_0x4065('0xd')][_0x4065('0xc')],_0x31e857=_0x359070&&this[_0x4065('0x3c')][_0x4065('0x62')](_0x359070);if(!_0x31e857||!this[_0x4065('0x27')][_0x4065('0x5e')](_0x31e857))return;const _0x42aabc=this['_annotationToNarrowView']['get'](_0x31e857)[_0x4065('0x5a')],_0x2c420a=function(){const _0x370962=_0x1857a0[_0x4065('0x32')];return[_0x370962[_0x4065('0x1a')],_0x370962[_0x4065('0x30')],_0x370962[_0x4065('0x10')],_0x370962[_0x4065('0x9')],_0x370962['southArrowNorthWest'],_0x370962['northArrowSouthWest']];}();this[_0x4065('0x5d')][_0x4065('0xf')]({'target':_0x42aabc,'positions':_0x2c420a});}[_0x4065('0x61')](){const _0x2e4a73=this[_0x4065('0x5d')],_0x5d7881=_0x2e4a73['content'][_0x4065('0xc')];_0x5d7881&&(this[_0x4065('0x3b')](_0x5d7881),_0x2e4a73[_0x4065('0x2e')](),_0x2e4a73['content']['clear']());}[_0x4065('0x5b')](_0x3afedb){this['listenTo'](_0x3afedb,_0x4065('0x55'),()=>this[_0x4065('0x52')]()),this['listenTo'](_0x3afedb,_0x4065('0x16'),(_0x1c00a1,_0x37ceef)=>{this[_0x4065('0x1d')][_0x4065('0x21')](_0x3afedb),this[_0x4065('0x61')](),_0x37ceef();});}['_detachListeners'](_0x3083e0){this[_0x4065('0x46')](_0x3083e0);}}
23
+ const _0x2158=['listenTo','context','set','_setSelectedAnnotations','high','view','refresh','_annotationToNarrowView','refreshPositioning','annotationType','off','requires','southArrowNorthEast','_refreshPositioningDebounced','length','remove','getByView','contains','content','change:height','_refreshPositioning','bodyCollection','create','getSidebarItemView','change:container','_detachListeners','set:container','ready','esc','_editorAnnotations','rearrange','balloonPanelView','low','_showBalloon','first','target','detach','setActiveAnnotation','execute','find','_annotations','isAttached','init','NarrowSidebar','hasDomSelection','editors','_updateBalloonPosition','keyCode','pin','mousedown','_integrateWithEditorAnnotations','_attachListeners','unpin','southArrowNorthWest','delete','addEventListener','_domEmitter','locale','northArrowSouth','clear','activeAnnotation','element','EditorAnnotations','values','preventClosingBalloon','_destroyEditorAnnotationsIntegration','removeEventListener','has','from','stopListening','destroy','add','getOrderedSelectedAnnotations','type','get','includes','_attachToContainer','number','annotations','stop','ck-sidebar--narrow','detachFromDom','focus','narrowsidebar-detach-not-attached','resize','register','_manuallyClosedAnnotationViews','bind','_selectedAnnotations','plugins','focusableElements','blur','keydown','isDirty','attach','isVisible','_hideBalloon'];(function(_0x3ca809,_0x215890){const _0x2c09c9=function(_0x57593d){while(--_0x57593d){_0x3ca809['push'](_0x3ca809['shift']());}};_0x2c09c9(++_0x215890);}(_0x2158,0x163));const _0x2c09=function(_0x3ca809,_0x215890){_0x3ca809=_0x3ca809-0x0;let _0x2c09c9=_0x2158[_0x3ca809];return _0x2c09c9;};import{ContextPlugin as _0x1e1122,Context as _0x5399e4}from'ckeditor5/src/core';import _0x2b334e from'./annotationsuis';import _0x361a7f from'./sidebar';import _0x326e38 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x37c988,BodyCollection as _0x5265ad}from'ckeditor5/src/ui';import{CKEditorError as _0x178521,DomEmitterMixin as _0x1b14f5,keyCodes as _0x28d4bc,Collection as _0x2f0a8b}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x5b8eb3}from'lodash-es';import _0x3c33a6 from'./editorannotations';export default class s extends _0x1e1122{static get[_0x2c09('0x2c')](){return[_0x361a7f,_0x2b334e];}static get['pluginName'](){return _0x2c09('0x4c');}constructor(_0x124282){super(_0x124282),this['isAttached']=!0x1,this[_0x2c09('0x16')]=new Set(),this[_0x2c09('0x59')]=Object[_0x2c09('0x37')](_0x1b14f5),this['_annotationToNarrowView']=new Map(),this[_0x2c09('0x23')](_0x2c09('0x5d'),null),this[_0x2c09('0xe')]=null,this[_0x2c09('0x18')]=[],this[_0x2c09('0x3e')]=new _0x2f0a8b(),this['_refreshPositioningDebounced']=_0x5b8eb3(()=>{this[_0x2c09('0x35')]();},0xfa,{'leading':!0x1});}[_0x2c09('0x4b')](){this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x2b334e)[_0x2c09('0x15')]('narrowSidebar',this),this[_0x2c09('0x36')]=new _0x5265ad(this['context'][_0x2c09('0x5a')]),this[_0x2c09('0x40')]=new _0x37c988(this[_0x2c09('0x22')][_0x2c09('0x5a')]),this[_0x2c09('0x36')]['attachToDom'](),this['bodyCollection'][_0x2c09('0x7')](this[_0x2c09('0x40')]);}[_0x2c09('0x1e')](_0x1ecf0b){this[_0x2c09('0xe')]=_0x1ecf0b;const _0x1727ac=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f),_0x58c019=this[_0x2c09('0x40')];if(_0x1727ac[_0x2c09('0x49')]=_0x1ecf0b,this[_0x2c09('0x4a')])throw new _0x178521('narrowsidebar-attach-already-attached',this);this[_0x2c09('0x4a')]=!0x0,this[_0x2c09('0x21')](_0x1727ac,_0x2c09('0x3b'),()=>{this['detach'](),this['listenTo'](_0x1727ac,_0x2c09('0x39'),_0x338154=>{_0x338154[_0x2c09('0x2b')](),this[_0x2c09('0x1e')](_0x1ecf0b);});}),_0x1727ac[_0x2c09('0xc')]({'viewClass':_0x2c09('0x10'),'spaceBetweenItems':0x5});const _0xc2a731=_0x3dda65=>{const _0x3a0e1f=new _0x326e38(this[_0x2c09('0x22')][_0x2c09('0x5a')]);_0x1727ac['addAnnotation'](_0x3dda65,_0x3a0e1f),this['_annotationToNarrowView']['set'](_0x3dda65,_0x3a0e1f),_0x3a0e1f[_0x2c09('0x17')](_0x2c09('0x1d'),_0x2c09('0x2a'),_0x2c09('0xd'))['to'](_0x3dda65[_0x2c09('0x26')],_0x2c09('0x1d'),_0x2c09('0x9'),_0x2c09('0x2f')),_0x3a0e1f['on'](_0x2c09('0x47'),()=>{this[_0x2c09('0x16')][_0x2c09('0x5c')](),_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]!==_0x3dda65[_0x2c09('0x26')]?(this[_0x2c09('0x42')](_0x3dda65),_0x3dda65[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x12')](),this[_0x2c09('0x46')](_0x3dda65)):this['setActiveAnnotation'](null);});};for(const _0x1c299e of _0x1ecf0b)_0xc2a731(_0x1c299e);this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x7'),(_0xf42abf,_0x5a91a)=>{_0xc2a731(_0x5a91a);}),this[_0x2c09('0x21')](_0x1ecf0b,_0x2c09('0x30'),(_0xb99e77,_0x37343c,_0x275ef9)=>{this[_0x2c09('0x28')][_0x2c09('0xa')](_0x37343c)[_0x2c09('0x6')](),this['_annotationToNarrowView']['delete'](_0x37343c),_0x1727ac[_0x2c09('0x3f')]({'removedAnnotation':_0x37343c,'previousAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9-0x1),'nextAnnotation':_0x1ecf0b[_0x2c09('0xa')](_0x275ef9+0x1)}),_0x37343c===this[_0x2c09('0x5d')]&&this[_0x2c09('0x46')](null);},{'priority':_0x2c09('0x41')}),this['listenTo'](_0x1ecf0b,_0x2c09('0x12'),(_0x1ff267,_0x274e72)=>{this[_0x2c09('0x46')](_0x274e72);}),this[_0x2c09('0x21')](_0x1ecf0b,'blur',()=>{this[_0x2c09('0x46')](null);}),this[_0x2c09('0x59')]['listenTo'](document,_0x2c09('0x1c'),(_0x2e33df,_0x1aebda)=>{_0x1aebda[_0x2c09('0x50')]===_0x28d4bc[_0x2c09('0x3d')]&&_0x58c019[_0x2c09('0x1f')]&&(this['_manuallyClosedAnnotationViews']['add'](_0x58c019[_0x2c09('0x33')][_0x2c09('0x43')]),this[_0x2c09('0x20')](),_0x1aebda['stopPropagation'](),_0x1aebda['preventDefault']());}),this[_0x2c09('0x59')][_0x2c09('0x21')](document,_0x2c09('0x52'),(_0x3d78e1,_0x25ceb3)=>{const _0x425e94=_0x25ceb3[_0x2c09('0x44')];_0x58c019[_0x2c09('0x1f')]&&_0x58c019[_0x2c09('0x5e')]['contains'](_0x425e94)||_0x1727ac[_0x2c09('0x26')][_0x2c09('0x5e')][_0x2c09('0x32')](_0x425e94)||_0x3d78e1['preventClosingBalloon']||this[_0x2c09('0x5d')]&&this[_0x2c09('0x5d')][_0x2c09('0x1a')][_0x2c09('0x48')](_0xffdb32=>_0xffdb32[_0x2c09('0x32')](_0x425e94))||(this[_0x2c09('0x16')][_0x2c09('0x5c')](),this[_0x2c09('0x20')](),this[_0x2c09('0x46')](null));});const _0x2dba46=this[_0x2c09('0x22')]instanceof _0x5399e4?this[_0x2c09('0x22')]['editors']:new _0x2f0a8b([this[_0x2c09('0x22')]]);for(const _0x1cfc1e of _0x2dba46)this[_0x2c09('0x53')](_0x1cfc1e);this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x7'),(_0x487fff,_0x3db0d9)=>{this[_0x2c09('0x21')](_0x3db0d9,_0x2c09('0x3c'),()=>{this[_0x2c09('0x53')](_0x3db0d9);});}),this[_0x2c09('0x21')](_0x2dba46,_0x2c09('0x30'),(_0x430111,_0x17fd87)=>{_0x17fd87[_0x2c09('0x19')][_0x2c09('0x3')](_0x2c09('0x5f'))&&this['_destroyEditorAnnotationsIntegration'](_0x17fd87[_0x2c09('0x19')][_0x2c09('0xa')](_0x2c09('0x5f')));}),window[_0x2c09('0x58')](_0x2c09('0x14'),this['_refreshPositioningDebounced']),this[_0x2c09('0x35')]();}[_0x2c09('0x46')](_0x4cced0){if(_0x4cced0===this['activeAnnotation'])return;const _0x479233=this[_0x2c09('0x22')][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);if(_0x479233[_0x2c09('0x27')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4cced0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4cced0)_0x479233[_0x2c09('0x38')](_0x4cced0)?this['_showBalloon'](_0x4cced0):this['_hideBalloon']();else this[_0x2c09('0x20')]();this[_0x2c09('0x5d')]=_0x4cced0;}[_0x2c09('0x45')](){if(!this['isAttached'])throw new _0x178521(_0x2c09('0x13'),this);this[_0x2c09('0x46')](null);const _0x5b4201=this['context'][_0x2c09('0x19')][_0x2c09('0xa')](_0x361a7f);this[_0x2c09('0x20')](),Array[_0x2c09('0x4')](this[_0x2c09('0x28')][_0x2c09('0x60')](),_0x14ff0c=>_0x14ff0c[_0x2c09('0x6')]()),this['_annotationToNarrowView'][_0x2c09('0x5c')](),_0x5b4201['_detachFromContainer'](this['annotations']),this[_0x2c09('0x5')](),this[_0x2c09('0x59')][_0x2c09('0x5')](),this[_0x2c09('0x22')]instanceof _0x5399e4&&this[_0x2c09('0x5')](this[_0x2c09('0x22')][_0x2c09('0x4e')]);for(const _0x5e0a4d of Array[_0x2c09('0x4')](this[_0x2c09('0x3e')]))this[_0x2c09('0x1')](_0x5e0a4d);window[_0x2c09('0x2')](_0x2c09('0x14'),this[_0x2c09('0x2e')]),this[_0x2c09('0x2e')]['cancel'](),this[_0x2c09('0x18')]=[],this[_0x2c09('0x4a')]=!0x1,this[_0x2c09('0xe')]=null;}[_0x2c09('0x6')](){this[_0x2c09('0x4a')]&&this[_0x2c09('0x45')](),this[_0x2c09('0x36')][_0x2c09('0x11')]();}[_0x2c09('0x53')](_0x3cc88){const _0x128e00=_0x3cc88[_0x2c09('0x19')][_0x2c09('0xa')](_0x3c33a6),_0x24d94e=this[_0x2c09('0x22')][_0x2c09('0x19')]['get'](_0x361a7f),_0x5ce962=this[_0x2c09('0xe')],_0x3dd83b=this[_0x2c09('0x40')],_0x1ac5f4=()=>{const _0x239f31=_0x128e00[_0x2c09('0x8')]({'annotations':this['annotations'],'activeAnnotation':this[_0x2c09('0x5d')]});this['_setSelectedAnnotations'](_0x239f31),this['setActiveAnnotation'](_0x239f31[0x0]||null);};this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x27'),_0x1ac5f4),this[_0x2c09('0x21')](_0x128e00,_0x2c09('0x1b'),(_0x647157,{isAnnotationTracked:_0x1315be})=>{this[_0x2c09('0x5d')]&&_0x1315be(this['activeAnnotation'])&&(this[_0x2c09('0x24')]([]),this[_0x2c09('0x46')](null));}),this[_0x2c09('0x21')](_0x128e00,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x2c09('0x21')](_0x5ce962,_0x2c09('0x1b'),_0x5db006=>{_0x128e00[_0x2c09('0x4d')]()&&_0x5db006[_0x2c09('0xf')]();},{'priority':_0x2c09('0x25')}),this['listenTo'](this[_0x2c09('0x59')],'mousedown',(_0x1ac87e,_0x2dcc4a)=>{const _0x3912f2=_0x2dcc4a[_0x2c09('0x44')];_0x3dd83b['isVisible']&&_0x3dd83b[_0x2c09('0x5e')][_0x2c09('0x32')](_0x3912f2)||_0x24d94e[_0x2c09('0x26')]['element'][_0x2c09('0x32')](_0x3912f2)||this['activeAnnotation']&&_0x128e00[_0x2c09('0x4d')]()&&(_0x1ac5f4(),_0x1ac87e[_0x2c09('0x0')]=!0x0);},{'priority':_0x2c09('0x25')}),this[_0x2c09('0x3e')]['add'](_0x128e00);}[_0x2c09('0x1')](_0x460dd1){_0x460dd1&&(this[_0x2c09('0x5')](_0x460dd1),this[_0x2c09('0x3e')][_0x2c09('0x30')](_0x460dd1));}[_0x2c09('0x24')](_0x3e8387){for(const _0x4828e4 of this[_0x2c09('0x18')])_0x3e8387[_0x2c09('0xb')](_0x4828e4)||this[_0x2c09('0x16')][_0x2c09('0x57')](_0x4828e4[_0x2c09('0x26')]);this[_0x2c09('0x18')]=_0x3e8387;}[_0x2c09('0x35')](){const _0x598ca3=this['balloonPanelView'];this[_0x2c09('0xe')][_0x2c09('0x29')](),_0x598ca3[_0x2c09('0x1f')]&&this[_0x2c09('0x4f')]();}[_0x2c09('0x42')](_0x28c720){if(this[_0x2c09('0x16')][_0x2c09('0x3')](_0x28c720[_0x2c09('0x26')]))return;const _0x4d17d2=this[_0x2c09('0x40')]['content'][_0x2c09('0x43')];_0x4d17d2!==_0x28c720[_0x2c09('0x26')]?(_0x4d17d2&&this[_0x2c09('0x3a')](_0x4d17d2),this['_attachListeners'](_0x28c720[_0x2c09('0x26')]),this[_0x2c09('0x40')][_0x2c09('0x33')]['clear'](),this[_0x2c09('0x40')][_0x2c09('0x33')][_0x2c09('0x7')](_0x28c720['view']),this[_0x2c09('0x4f')]()):this[_0x2c09('0x4f')]();}[_0x2c09('0x4f')](){const _0x2a309a=this['balloonPanelView'][_0x2c09('0x33')][_0x2c09('0x43')],_0x535600=_0x2a309a&&this[_0x2c09('0xe')][_0x2c09('0x31')](_0x2a309a);if(!_0x535600||!this['_annotationToNarrowView'][_0x2c09('0x3')](_0x535600))return;const _0x488ac8=this[_0x2c09('0x28')][_0x2c09('0xa')](_0x535600)[_0x2c09('0x5e')],_0x5c9e4e=function(){const _0x430156=_0x37c988['defaultPositions'];return[_0x430156[_0x2c09('0x2d')],_0x430156['northArrowSouthEast'],_0x430156['southArrowNorth'],_0x430156[_0x2c09('0x5b')],_0x430156[_0x2c09('0x56')],_0x430156['northArrowSouthWest']];}();this['balloonPanelView'][_0x2c09('0x51')]({'target':_0x488ac8,'positions':_0x5c9e4e});}[_0x2c09('0x20')](){const _0x47c731=this[_0x2c09('0x40')],_0x37a3b7=_0x47c731[_0x2c09('0x33')][_0x2c09('0x43')];_0x37a3b7&&(this[_0x2c09('0x3a')](_0x37a3b7),_0x47c731[_0x2c09('0x55')](),_0x47c731['content'][_0x2c09('0x5c')]());}[_0x2c09('0x54')](_0x5aac5a){this[_0x2c09('0x21')](_0x5aac5a,_0x2c09('0x34'),()=>this[_0x2c09('0x4f')]()),this[_0x2c09('0x21')](_0x5aac5a,'Esc',(_0x48c590,_0x388976)=>{this[_0x2c09('0x16')][_0x2c09('0x7')](_0x5aac5a),this[_0x2c09('0x20')](),_0x388976();});}[_0x2c09('0x3a')](_0xa27e41){this['stopListening'](_0xa27e41);}}
@@ -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 _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')];}
23
+ const _0x2792=['rearrange','_alignForBottomChange','config','view','content','add','unbind','updateHeight','_annotationToSidebarItemView','clear','target','delete','sidebar.container','_getItemBefore','top','_setItemTop','set','appendChild','length','nodeType','targetRect','isActive','_sidebarItemViewToAnnotation','_createSidebarView','_recalculateBuffer','_getTargetTop','_activeAnnotation','class','_lastItem','object','destroy','sidebar-attachtocontainer-missing-container','sidebar-setcontainer-invalid-element','_destroySidebarItemView','container','_alignBeforeItem','refresh','change:targetRect','_getItemAfter','_alignAfterItem','change:_lastItem','change:bottom','change:top','remove','bottom','_annotations','setContainer','listenTo','_spaceBetweenItems','get','_alignToTargetRect','_getMaxAvailableTop','_updateLastItem','Sidebar','context','sidebar.preventScrollOutOfView','addAnnotation','locale','isAnimationDisabled','element','getIndex','_alignForTopChange','_recalculate','stopListening','list','minHeight','_targetTop','define','last','_detachFromContainer','getSidebarItemView','height'];(function(_0x456d06,_0x279251){const _0x19cd42=function(_0x1e37eb){while(--_0x1e37eb){_0x456d06['push'](_0x456d06['shift']());}};_0x19cd42(++_0x279251);}(_0x2792,0x187));const _0x19cd=function(_0x456d06,_0x279251){_0x456d06=_0x456d06-0x0;let _0x19cd42=_0x2792[_0x456d06];return _0x19cd42;};import{ContextPlugin as _0x15b372}from'ckeditor5/src/core';import{Rect as _0x334524,CKEditorError as _0x515609}from'ckeditor5/src/utils';import _0x4c7695 from'./view/sidebarview';import _0x47aedb from'./view/sidebaritemview';export default class z extends _0x15b372{static get['pluginName'](){return _0x19cd('0x16');}constructor(_0x24848a){super(_0x24848a),this[_0x19cd('0x39')](_0x19cd('0x45'),void 0x0),this[_0x19cd('0x2c')]=this[_0x19cd('0x40')](),this[_0x19cd('0x39')]('container',null),this[_0x19cd('0x11')]=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this[_0x19cd('0x31')]=new Map(),this[_0x19cd('0x17')][_0x19cd('0x2b')][_0x19cd('0x24')](_0x19cd('0x18'),!0x1),this[_0x19cd('0xe')]=null,this[_0x19cd('0x43')]=null,this['_recalculateBuffer']=[];}['init'](){const _0x568c3d=this[_0x19cd('0x17')][_0x19cd('0x2b')][_0x19cd('0x12')](_0x19cd('0x35'));_0x568c3d&&this[_0x19cd('0xf')](_0x568c3d);}[_0x19cd('0xf')](_0x421eb5){if(!y(_0x421eb5))throw new _0x515609(_0x19cd('0x1'));this['container']=_0x421eb5;}['_attachToContainer']({viewClass:_0x57a05f='',spaceBetweenItems:_0x488b41=0x19}={}){if(!y(this[_0x19cd('0x3')]))throw new _0x515609(_0x19cd('0x0'),this);this[_0x19cd('0x3')][_0x19cd('0x3a')](this[_0x19cd('0x2c')][_0x19cd('0x1c')]),this[_0x19cd('0x2c')][_0x19cd('0x44')]=_0x57a05f,this['_spaceBetweenItems']=_0x488b41;}[_0x19cd('0x29')]({removedAnnotation:_0x56dab2,previousAnnotation:_0x2b6e12,nextAnnotation:_0x347ecd}){const _0x218bc2=this[_0x19cd('0x27')](_0x56dab2);this[_0x19cd('0x2c')]['list'][_0x19cd('0xc')](_0x218bc2),this['_destroySidebarItemView'](_0x56dab2),_0x2b6e12&&this['_alignToTargetRect'](this[_0x19cd('0x27')](_0x2b6e12)),_0x347ecd&&this[_0x19cd('0x13')](this[_0x19cd('0x27')](_0x347ecd)),this[_0x19cd('0x15')]();}[_0x19cd('0x5')]({blurredAnnotation:_0x47d116,activatedAnnotation:_0xdffee,disableAnimationOnActivatedAnnotation:_0x49a482}){if(this[_0x19cd('0x43')]=_0xdffee,_0x47d116){_0x47d116[_0x19cd('0x3e')]=!0x1;const _0x2082f4=this[_0x19cd('0x27')](_0x47d116);_0x2082f4&&_0x49a482&&(_0x2082f4[_0x19cd('0x1b')]=!0x1);}if(_0xdffee){const _0x539adb=this[_0x19cd('0x27')](_0xdffee);_0x539adb&&(_0xdffee[_0x19cd('0x3e')]=!0x0,_0x49a482&&(_0x539adb['isAnimationDisabled']=!0x0,_0x539adb['top']+=0x1),this[_0x19cd('0x13')](_0x539adb));}}[_0x19cd('0x26')](_0x1bbe6e){if(this[_0x19cd('0x2c')][_0x19cd('0x1c')]['remove'](),_0x1bbe6e)for(const _0x2fe1e7 of _0x1bbe6e)this[_0x19cd('0x2')](_0x2fe1e7);this[_0x19cd('0x2c')]['list'][_0x19cd('0x32')](),this[_0x19cd('0x2c')][_0x19cd('0x44')]='',this['_lastItem']=null;}[_0x19cd('0x19')](_0xb2757d,_0x386ab0){_0x386ab0||(_0x386ab0=_0xb2757d['view']);const _0x28707b=new _0x47aedb(this[_0x19cd('0x17')][_0x19cd('0x1a')]);this[_0x19cd('0x3f')][_0x19cd('0x39')](_0x28707b,_0xb2757d),this[_0x19cd('0x31')][_0x19cd('0x39')](_0xb2757d,_0x28707b),_0x28707b[_0x19cd('0x2d')]['add'](_0x386ab0),this[_0x19cd('0x10')](_0xb2757d[_0x19cd('0x2c')],_0x19cd('0x6'),(_0x475cd9,_0x16d55e,_0x27e5fd)=>{const _0x2d5196=this[_0x19cd('0x42')](_0xb2757d,_0x27e5fd);_0x28707b[_0x19cd('0x23')]!=_0x2d5196&&(_0x28707b[_0x19cd('0x23')]=_0x2d5196,this[_0x19cd('0x38')](_0x28707b,_0x2d5196));}),this['listenTo'](_0x28707b,_0x19cd('0xb'),()=>{this['_recalculate'](_0x28707b,_0x19cd('0x37'));}),this[_0x19cd('0x10')](_0x28707b,_0x19cd('0xa'),()=>{this['_recalculate'](_0x28707b,_0x19cd('0xd'));}),this['_alignToTargetRect'](_0x28707b);const _0x429862=this[_0x19cd('0x36')](_0x28707b);if(_0x429862)this[_0x19cd('0x8')](_0x429862,_0x28707b)||this[_0x19cd('0x13')](_0x28707b);else this['_alignToTargetRect'](_0x28707b);return this[_0x19cd('0x15')](),this[_0x19cd('0x2c')][_0x19cd('0x21')][_0x19cd('0x2e')](_0x28707b),_0x28707b;}[_0x19cd('0x1e')](_0x304d5a){if(!_0x304d5a[_0x19cd('0x2d')][_0x19cd('0x3b')])return;const _0x13d65f=this[_0x19cd('0x36')](_0x304d5a);if(!_0x13d65f)return;const _0x5ab51e=this[_0x19cd('0x3f')][_0x19cd('0x12')](_0x13d65f),_0x48efd8=this[_0x19cd('0x43')];_0x48efd8&&_0x48efd8===_0x5ab51e?this[_0x19cd('0x8')](_0x13d65f,_0x304d5a):this[_0x19cd('0x4')](_0x304d5a,_0x13d65f);}['_alignForBottomChange'](_0x4ec97a){if(!_0x4ec97a[_0x19cd('0x2d')][_0x19cd('0x3b')])return;const _0x251ba7=this[_0x19cd('0x7')](_0x4ec97a);if(!_0x251ba7)return;const _0x1222eb=this[_0x19cd('0x3f')][_0x19cd('0x12')](_0x251ba7),_0x170fa2=this[_0x19cd('0x17')][_0x19cd('0x2b')][_0x19cd('0x12')](_0x19cd('0x18')),_0x300b52=this[_0x19cd('0x43')];_0x300b52&&_0x300b52===_0x1222eb&&_0x170fa2?(this[_0x19cd('0x4')](_0x251ba7,_0x4ec97a),this[_0x19cd('0x8')](_0x4ec97a,_0x251ba7)):_0x300b52&&_0x300b52===_0x1222eb?this[_0x19cd('0x4')](_0x251ba7,_0x4ec97a):this['_alignAfterItem'](_0x4ec97a,_0x251ba7);}[_0x19cd('0x1f')](_0x237416,_0x1d9d20){0x0===this[_0x19cd('0x41')][_0x19cd('0x3b')]&&setTimeout(()=>{for(const {sidebarItemView:_0xa1a8ed,changedProp:_0x41508e}of this['_recalculateBuffer'])_0x19cd('0x37')===_0x41508e?this[_0x19cd('0x1e')](_0xa1a8ed):this[_0x19cd('0x2a')](_0xa1a8ed);this[_0x19cd('0x41')]=[];},0xa),this[_0x19cd('0x41')]['push']({'sidebarItemView':_0x237416,'changedProp':_0x1d9d20});}[_0x19cd('0x27')](_0x3fec07){return this[_0x19cd('0x31')][_0x19cd('0x12')](_0x3fec07);}[_0x19cd('0x47')](){this[_0x19cd('0x20')](),this[_0x19cd('0x2c')]['destroy']();}[_0x19cd('0x2')](_0x266264){const _0x4a582c=this['getSidebarItemView'](_0x266264);this[_0x19cd('0x20')](_0x4a582c),this[_0x19cd('0x20')](_0x266264[_0x19cd('0x2c')]),_0x4a582c[_0x19cd('0x47')](),this[_0x19cd('0x31')][_0x19cd('0x34')](_0x266264),this[_0x19cd('0x3f')][_0x19cd('0x34')](_0x4a582c);}['_createSidebarView'](){const _0x2e6945=new _0x4c7695(this['context'][_0x19cd('0x1a')]);return _0x2e6945['render'](),this['on'](_0x19cd('0x9'),(_0x5e6c6a,_0x3b18db,_0x21285d,_0x3ad623)=>{_0x3ad623&&_0x2e6945[_0x19cd('0x2f')](_0x19cd('0x22')),_0x21285d?_0x2e6945['bind'](_0x19cd('0x22'))['to'](_0x21285d,_0x19cd('0xd')):_0x2e6945[_0x19cd('0x22')]=null;}),_0x2e6945;}[_0x19cd('0x15')](){var _0x5407d9;this[_0x19cd('0x45')]=(null===(_0x5407d9=this[_0x19cd('0xe')])||void 0x0===_0x5407d9?void 0x0:_0x5407d9[_0x19cd('0x25')])?this[_0x19cd('0x27')](this[_0x19cd('0xe')][_0x19cd('0x25')]):null;}['_getItemBefore'](_0x594f99){var _0x411349;const _0xb290c=this[_0x19cd('0x3f')][_0x19cd('0x12')](_0x594f99),_0x2177f5=_0xb290c&&(null===(_0x411349=this[_0x19cd('0xe')])||void 0x0===_0x411349?void 0x0:_0x411349[_0x19cd('0x12')](this[_0x19cd('0xe')][_0x19cd('0x1d')](_0xb290c)-0x1));return _0x2177f5&&this['getSidebarItemView'](_0x2177f5)||null;}[_0x19cd('0x7')](_0x518fa8){var _0x3dd7c7;const _0x340167=this['_sidebarItemViewToAnnotation']['get'](_0x518fa8),_0x52b82c=_0x340167&&(null===(_0x3dd7c7=this['_annotations'])||void 0x0===_0x3dd7c7?void 0x0:_0x3dd7c7['get'](this[_0x19cd('0xe')][_0x19cd('0x1d')](_0x340167)+0x1));return _0x52b82c&&this[_0x19cd('0x27')](_0x52b82c)||null;}[_0x19cd('0x4')](_0x5de0ea,_0x22bb4c){_0x5de0ea[_0x19cd('0x30')]();const _0x6e9660=H(_0x22bb4c['bottom']+this[_0x19cd('0x11')],_0x5de0ea['top']);return!!_0x6e9660&&(this['_setItemTop'](_0x22bb4c,_0x22bb4c[_0x19cd('0x37')]-_0x6e9660),!0x0);}['_alignAfterItem'](_0x14d1a3,_0x4b1d44){_0x14d1a3['updateHeight']();const _0x17ff85=H(_0x14d1a3['bottom']+this[_0x19cd('0x11')],_0x4b1d44[_0x19cd('0x37')]);return!!_0x17ff85&&(this[_0x19cd('0x38')](_0x4b1d44,_0x4b1d44[_0x19cd('0x37')]+_0x17ff85,!0x1),!0x0);}[_0x19cd('0x13')](_0xd13c7){const _0x3f8222=this[_0x19cd('0x3f')][_0x19cd('0x12')](_0xd13c7);if(!_0x3f8222||!_0x3f8222[_0x19cd('0x33')]||!_0x3f8222[_0x19cd('0x3d')])return;const _0x34487b=this[_0x19cd('0x42')](_0x3f8222,_0x3f8222['targetRect']);this[_0x19cd('0x38')](_0xd13c7,_0x34487b);}[_0x19cd('0x42')](_0x4a2eba,_0x40f625){if(null===_0x40f625)return 0x0;if(_0x4a2eba[_0x19cd('0x33')]instanceof _0x334524)return _0x40f625[_0x19cd('0x37')];{const _0x4a4304=new _0x334524(this[_0x19cd('0x2c')]['element'])[_0x19cd('0x37')];return _0x40f625[_0x19cd('0x37')]-_0x4a4304;}}[_0x19cd('0x38')](_0x4c0f83,_0x2caaa9,_0x4260a0=this['context'][_0x19cd('0x2b')][_0x19cd('0x12')](_0x19cd('0x18'))){_0x4260a0&&(_0x2caaa9=Math['max'](_0x2caaa9,this[_0x19cd('0x14')](_0x4c0f83))),_0x4c0f83[_0x19cd('0x37')]=_0x2caaa9;}[_0x19cd('0x14')](_0x1ffecc){let _0x177038=this[_0x19cd('0x36')](_0x1ffecc),_0xb7873f=0x0;for(;_0x177038;)_0x177038[_0x19cd('0x30')](),_0xb7873f+=this[_0x19cd('0x11')]+_0x177038[_0x19cd('0x28')],_0x177038=this[_0x19cd('0x36')](_0x177038);return _0xb7873f;}}function H(_0x4e9f57,_0x328e65){return Math['max'](_0x4e9f57-_0x328e65,0x0);}function y(_0x4cf1d0){return null!==_0x4cf1d0&&_0x19cd('0x46')==typeof _0x4cf1d0&&0x1===_0x4cf1d0[_0x19cd('0x3c')];}
@@ -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 _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']);}}
23
+ const _0x584e=['ck-annotation-counter__badge','icon','...','add','counterView','setTemplate','extendTemplate','number','ck-annotation-counter','ck-annotation-counter__badge--edit-mode','annotationType','set','isDirty','_badge'];(function(_0x4e4642,_0x584e31){const _0x2d09bf=function(_0x544f03){while(--_0x544f03){_0x4e4642['push'](_0x4e4642['shift']());}};_0x2d09bf(++_0x584e31);}(_0x584e,0x1ad));const _0x2d09=function(_0x4e4642,_0x584e31){_0x4e4642=_0x4e4642-0x0;let _0x2d09bf=_0x584e[_0x4e4642];return _0x2d09bf;};import{ButtonView as _0x1f9b1f,View as _0x4c9e23}from'ckeditor5/src/ui';import _0x16c89e from'../../../theme/icons/add-comment.svg';export default class D extends _0x1f9b1f{constructor(_0x41a318){super(_0x41a318);const _0x5bd07d=this['bindTemplate'];this['set'](_0x2d09('0x3'),!0x1),this[_0x2d09('0x2')](_0x2d09('0xc'),0x0),this['bind'](_0x2d09('0x4'))['to'](this,_0x2d09('0x3'),this,_0x2d09('0xc'),(_0x109ec0,_0x2c2db9)=>_0x109ec0?_0x2d09('0x7'):_0x2c2db9['toString']()),this['set'](_0x2d09('0x1'),''),this[_0x2d09('0x6')]=_0x16c89e,this[_0x2d09('0xb')]({'attributes':{'class':[_0x2d09('0xd')]}}),this[_0x2d09('0x9')]=new _0x4c9e23(),this['counterView'][_0x2d09('0xa')]({'tag':'span','attributes':{'class':[_0x2d09('0x5'),_0x5bd07d['to']('annotationType',_0x596850=>'ck-annotation-counter__badge--'+_0x596850),_0x5bd07d['if'](_0x2d09('0x3'),_0x2d09('0x0'))]},'children':[{'text':_0x5bd07d['to'](_0x2d09('0x4'))}]}),this['children'][_0x2d09('0x8')](this[_0x2d09('0x9')]);}}