@ckeditor/ckeditor5-comments 38.1.1 → 38.2.0-alpha.1

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 (86) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +4 -3
  3. package/src/annotations/annotation.d.ts +86 -86
  4. package/src/annotations/annotation.js +1 -1
  5. package/src/annotations/annotationcollection.d.ts +94 -94
  6. package/src/annotations/annotationcollection.js +1 -1
  7. package/src/annotations/annotations.d.ts +150 -150
  8. package/src/annotations/annotations.js +1 -1
  9. package/src/annotations/annotationsuis.d.ts +228 -228
  10. package/src/annotations/annotationsuis.js +1 -1
  11. package/src/annotations/editorannotations.d.ts +63 -63
  12. package/src/annotations/editorannotations.js +1 -1
  13. package/src/annotations/inlineannotations.d.ts +86 -86
  14. package/src/annotations/inlineannotations.js +1 -1
  15. package/src/annotations/narrowsidebar.d.ts +81 -81
  16. package/src/annotations/narrowsidebar.js +1 -1
  17. package/src/annotations/sidebar.d.ts +96 -96
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
  20. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  21. package/src/annotations/view/annotationview.d.ts +86 -86
  22. package/src/annotations/view/annotationview.js +1 -1
  23. package/src/annotations/view/sidebaritemview.d.ts +51 -51
  24. package/src/annotations/view/sidebaritemview.js +1 -1
  25. package/src/annotations/view/sidebarview.d.ts +28 -28
  26. package/src/annotations/view/sidebarview.js +1 -1
  27. package/src/annotations/widesidebar.d.ts +73 -73
  28. package/src/annotations/widesidebar.js +1 -1
  29. package/src/augmentation.d.ts +48 -48
  30. package/src/comments/addcommentthreadcommand.d.ts +31 -31
  31. package/src/comments/addcommentthreadcommand.js +1 -1
  32. package/src/comments/commentsarchive.d.ts +27 -27
  33. package/src/comments/commentsarchive.js +1 -1
  34. package/src/comments/commentsarchiveui.d.ts +34 -34
  35. package/src/comments/commentsarchiveui.js +1 -1
  36. package/src/comments/commentsediting.d.ts +75 -75
  37. package/src/comments/commentsediting.js +1 -1
  38. package/src/comments/commentsrepository.d.ts +1088 -1088
  39. package/src/comments/commentsrepository.js +1 -1
  40. package/src/comments/commentsui.d.ts +29 -29
  41. package/src/comments/commentsui.js +1 -1
  42. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
  43. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  44. package/src/comments/integrations/importword.d.ts +17 -17
  45. package/src/comments/integrations/importword.js +1 -1
  46. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
  47. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  48. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
  49. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
  51. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  52. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  53. package/src/comments/ui/commentthreadcontroller.js +1 -1
  54. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -108
  55. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  56. package/src/comments/ui/view/basecommentview.d.ts +108 -108
  57. package/src/comments/ui/view/basecommentview.js +1 -1
  58. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
  59. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  60. package/src/comments/ui/view/commentcontentview.d.ts +10 -10
  61. package/src/comments/ui/view/commentcontentview.js +1 -1
  62. package/src/comments/ui/view/commentinputview.d.ts +82 -82
  63. package/src/comments/ui/view/commentinputview.js +1 -1
  64. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
  65. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  66. package/src/comments/ui/view/commentslistview.d.ts +96 -96
  67. package/src/comments/ui/view/commentslistview.js +1 -1
  68. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
  69. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  70. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
  71. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  72. package/src/comments/ui/view/commentthreadview.d.ts +113 -113
  73. package/src/comments/ui/view/commentthreadview.js +1 -1
  74. package/src/comments/ui/view/commentview.d.ts +239 -239
  75. package/src/comments/ui/view/commentview.js +1 -1
  76. package/src/comments.d.ts +31 -31
  77. package/src/comments.js +1 -1
  78. package/src/commentsonly.d.ts +29 -29
  79. package/src/commentsonly.js +1 -1
  80. package/src/config.d.ts +172 -172
  81. package/src/index.d.ts +21 -21
  82. package/src/index.js +1 -1
  83. package/src/utils/common-translations.d.ts +5 -5
  84. package/src/utils/common-translations.js +1 -1
  85. package/src/utils/createmutationobserver.d.ts +13 -13
  86. package/src/utils/createmutationobserver.js +1 -1
@@ -1,96 +1,96 @@
1
- /**
2
- * @module comments/annotations/sidebar
3
- * @publicApi
4
- */
5
- import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
6
- import type { View } from 'ckeditor5/src/ui';
7
- import SidebarView from './view/sidebarview';
8
- import SidebarItemView from './view/sidebaritemview';
9
- import type Annotation from './annotation';
10
- /**
11
- * Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
12
- *
13
- * `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~SidebarView} which can be injected at any place on a website.
14
- *
15
- * It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
16
- * or `Rect`s.
17
- *
18
- * The following plugins use `Sidebar` to provide annotations UI:
19
- *
20
- * * {@link module:comments/annotations/widesidebar~WideSidebar}
21
- * * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
22
- *
23
- * The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} which is a wrapper view for
24
- * {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
25
- * the sidebar.
26
- *
27
- * Structure of items:
28
- *
29
- * |-> SidebarItemView -> AnnotationView -> added View
30
- * Sidebar#view#list -|-> SidebarItemView -> AnnotationView -> added View
31
- * |-> ...
32
- */
33
- export default class Sidebar extends ContextPlugin {
34
- /**
35
- * Container element into which sidebar is injected (in the DOM).
36
- *
37
- * @observable
38
- */
39
- container: HTMLElement | null;
40
- /**
41
- * Sidebar view.
42
- */
43
- view: SidebarView;
44
- /**
45
- * @inheritDoc
46
- */
47
- static get pluginName(): "Sidebar";
48
- /**
49
- * @inheritDoc
50
- */
51
- constructor(context: Context | Editor);
52
- /**
53
- * @inheritDoc
54
- */
55
- init(): void;
56
- /**
57
- * Sets a new sidebar container.
58
- */
59
- setContainer(container: HTMLElement): void;
60
- /**
61
- * Rearranges annotations when the annotation is removed.
62
- */
63
- rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
64
- removedAnnotation: Annotation;
65
- previousAnnotation: Annotation | null;
66
- nextAnnotation: Annotation | null;
67
- }): void;
68
- /**
69
- * Refreshes sidebar items when one of the annotations is activated.
70
- *
71
- * @param options.activatedAnnotation The activated annotation.
72
- * @param options.blurredAnnotation The previously active annotation.
73
- * @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
74
- */
75
- refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
76
- blurredAnnotation: Annotation | null;
77
- activatedAnnotation: Annotation | null;
78
- disableAnimationOnActivatedAnnotation?: boolean;
79
- }): void;
80
- /**
81
- * Creates new {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} and binds its
82
- * position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
83
- *
84
- * By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
85
- * to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
86
- */
87
- addAnnotation(annotation: Annotation, viewToDisplay?: View): SidebarItemView;
88
- /**
89
- * Returns sidebar item view that wraps given annotation view.
90
- */
91
- getSidebarItemView(annotation: Annotation): SidebarItemView | undefined;
92
- /**
93
- * @inheritDoc
94
- */
95
- destroy(): void;
96
- }
1
+ /**
2
+ * @module comments/annotations/sidebar
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
6
+ import type { View } from 'ckeditor5/src/ui.js';
7
+ import SidebarView from './view/sidebarview.js';
8
+ import SidebarItemView from './view/sidebaritemview.js';
9
+ import type Annotation from './annotation.js';
10
+ /**
11
+ * Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
12
+ *
13
+ * `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~SidebarView} which can be injected at any place on a website.
14
+ *
15
+ * It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
16
+ * or `Rect`s.
17
+ *
18
+ * The following plugins use `Sidebar` to provide annotations UI:
19
+ *
20
+ * * {@link module:comments/annotations/widesidebar~WideSidebar}
21
+ * * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
22
+ *
23
+ * The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} which is a wrapper view for
24
+ * {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
25
+ * the sidebar.
26
+ *
27
+ * Structure of items:
28
+ *
29
+ * |-> SidebarItemView -> AnnotationView -> added View
30
+ * Sidebar#view#list -|-> SidebarItemView -> AnnotationView -> added View
31
+ * |-> ...
32
+ */
33
+ export default class Sidebar extends ContextPlugin {
34
+ /**
35
+ * Container element into which sidebar is injected (in the DOM).
36
+ *
37
+ * @observable
38
+ */
39
+ container: HTMLElement | null;
40
+ /**
41
+ * Sidebar view.
42
+ */
43
+ view: SidebarView;
44
+ /**
45
+ * @inheritDoc
46
+ */
47
+ static get pluginName(): "Sidebar";
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ constructor(context: Context | Editor);
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ init(): void;
56
+ /**
57
+ * Sets a new sidebar container.
58
+ */
59
+ setContainer(container: HTMLElement): void;
60
+ /**
61
+ * Rearranges annotations when the annotation is removed.
62
+ */
63
+ rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
64
+ removedAnnotation: Annotation;
65
+ previousAnnotation: Annotation | null;
66
+ nextAnnotation: Annotation | null;
67
+ }): void;
68
+ /**
69
+ * Refreshes sidebar items when one of the annotations is activated.
70
+ *
71
+ * @param options.activatedAnnotation The activated annotation.
72
+ * @param options.blurredAnnotation The previously active annotation.
73
+ * @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
74
+ */
75
+ refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
76
+ blurredAnnotation: Annotation | null;
77
+ activatedAnnotation: Annotation | null;
78
+ disableAnimationOnActivatedAnnotation?: boolean;
79
+ }): void;
80
+ /**
81
+ * Creates new {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} and binds its
82
+ * position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
83
+ *
84
+ * By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
85
+ * to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
86
+ */
87
+ addAnnotation(annotation: Annotation, viewToDisplay?: View): SidebarItemView;
88
+ /**
89
+ * Returns sidebar item view that wraps given annotation view.
90
+ */
91
+ getSidebarItemView(annotation: Annotation): SidebarItemView | undefined;
92
+ /**
93
+ * @inheritDoc
94
+ */
95
+ destroy(): void;
96
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3bab=['bind','getSidebarItemView','view','_recalculate','_attachToContainer','minHeight','_recalculateBuffer','content','add','stopListening','Sidebar','change:_lastItem','_createSidebarView','_destroySidebarItemView','define','bottom','set','_alignForTopChange','_annotations','length','element','_sidebarItemViewToAnnotation','isActive','unbind','listenTo','_lastItem','sidebar.container','_targetTop','_setItemTop','_alignAfterItem','targetRect','getIndex','_alignForBottomChange','top','push','_getTargetTop','_getItemBefore','_annotationToSidebarItemView','_alignBeforeItem','isAnimationDisabled','_getItemAfter','_spaceBetweenItems','context','setContainer','remove','last','get','container','change:targetRect','nodeType','target','list','locale','config','_alignToTargetRect','class','refresh','pluginName','object','sidebar.preventScrollOutOfView','height','destroy','_getMaxAvailableTop','_activeAnnotation','delete','addAnnotation','max','_updateLastItem','updateHeight','appendChild'];(function(_0x14b031,_0x3bab67){const _0x4f9b2d=function(_0x185d62){while(--_0x185d62){_0x14b031['push'](_0x14b031['shift']());}};_0x4f9b2d(++_0x3bab67);}(_0x3bab,0xba));const _0x4f9b=function(_0x14b031,_0x3bab67){_0x14b031=_0x14b031-0x0;let _0x4f9b2d=_0x3bab[_0x14b031];return _0x4f9b2d;};import{ContextPlugin as _0xf8adb8}from'ckeditor5/src/core';import{Rect as _0x1e0c47,CKEditorError as _0x3bc4dc}from'ckeditor5/src/utils';import _0x81af48 from'./view/sidebarview';import _0x20ba33 from'./view/sidebaritemview';export default class z extends _0xf8adb8{static get[_0x4f9b('0xb')](){return _0x4f9b('0x22');}constructor(_0x3d17b5){super(_0x3d17b5),this[_0x4f9b('0x28')](_0x4f9b('0x31'),void 0x0),this[_0x4f9b('0x1a')]=this[_0x4f9b('0x24')](),this['set'](_0x4f9b('0x1'),null),this['_spaceBetweenItems']=0x19,this[_0x4f9b('0x2d')]=new Map(),this[_0x4f9b('0x3d')]=new Map(),this[_0x4f9b('0x42')][_0x4f9b('0x7')][_0x4f9b('0x26')](_0x4f9b('0xd'),!0x1),this[_0x4f9b('0x2a')]=null,this[_0x4f9b('0x11')]=null,this[_0x4f9b('0x1e')]=[];}['init'](){const _0x2643fb=this[_0x4f9b('0x42')][_0x4f9b('0x7')][_0x4f9b('0x0')](_0x4f9b('0x32'));_0x2643fb&&this[_0x4f9b('0x43')](_0x2643fb);}[_0x4f9b('0x43')](_0xbaa845){if(!y(_0xbaa845))throw new _0x3bc4dc('sidebar-setcontainer-invalid-element');this[_0x4f9b('0x1')]=_0xbaa845;}[_0x4f9b('0x1c')]({viewClass:_0x569449='',spaceBetweenItems:_0x436bd4=0x19}={}){if(!y(this['container']))throw new _0x3bc4dc('sidebar-attachtocontainer-missing-container',this);this[_0x4f9b('0x1')][_0x4f9b('0x17')](this[_0x4f9b('0x1a')][_0x4f9b('0x2c')]),this[_0x4f9b('0x1a')][_0x4f9b('0x9')]=_0x569449,this[_0x4f9b('0x41')]=_0x436bd4;}['rearrange']({removedAnnotation:_0x3fab40,previousAnnotation:_0x3cf8b6,nextAnnotation:_0x4a7a40}){const _0x131904=this['getSidebarItemView'](_0x3fab40);this[_0x4f9b('0x1a')][_0x4f9b('0x5')][_0x4f9b('0x44')](_0x131904),this['_destroySidebarItemView'](_0x3fab40),_0x3cf8b6&&this[_0x4f9b('0x8')](this[_0x4f9b('0x19')](_0x3cf8b6)),_0x4a7a40&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a7a40)),this['_updateLastItem']();}[_0x4f9b('0xa')]({blurredAnnotation:_0x5148fe,activatedAnnotation:_0x4f1367,disableAnimationOnActivatedAnnotation:_0x315a0d}){if(this[_0x4f9b('0x11')]=_0x4f1367,_0x5148fe){_0x5148fe[_0x4f9b('0x2e')]=!0x1;const _0x2a58f8=this[_0x4f9b('0x19')](_0x5148fe);_0x2a58f8&&_0x315a0d&&(_0x2a58f8['isAnimationDisabled']=!0x1);}if(_0x4f1367){const _0x988d7e=this['getSidebarItemView'](_0x4f1367);_0x988d7e&&(_0x4f1367[_0x4f9b('0x2e')]=!0x0,_0x315a0d&&(_0x988d7e[_0x4f9b('0x3f')]=!0x0,_0x988d7e[_0x4f9b('0x39')]+=0x1),this[_0x4f9b('0x8')](_0x988d7e));}}['_detachFromContainer'](_0xd727db){if(this['stopListening'](),this[_0x4f9b('0x1a')]['element'][_0x4f9b('0x44')](),_0xd727db)for(const _0x362938 of _0xd727db)this['_destroySidebarItemView'](_0x362938);this[_0x4f9b('0x1a')][_0x4f9b('0x5')]['clear'](),this[_0x4f9b('0x1a')][_0x4f9b('0x9')]='',this['_lastItem']=null;}[_0x4f9b('0x13')](_0x1b1943,_0xe4f9f3){_0xe4f9f3||(_0xe4f9f3=_0x1b1943[_0x4f9b('0x1a')]);const _0x43dcf5=new _0x20ba33(this[_0x4f9b('0x42')][_0x4f9b('0x6')]);this['_sidebarItemViewToAnnotation'][_0x4f9b('0x28')](_0x43dcf5,_0x1b1943),this[_0x4f9b('0x3d')][_0x4f9b('0x28')](_0x1b1943,_0x43dcf5),_0x43dcf5[_0x4f9b('0x1f')][_0x4f9b('0x20')](_0xe4f9f3),this['listenTo'](_0x1b1943[_0x4f9b('0x1a')],_0x4f9b('0x2'),(_0xe4ecf4,_0x30b392,_0xe3f31d)=>{const _0x1a5180=this[_0x4f9b('0x3b')](_0x1b1943,_0xe3f31d);_0x43dcf5[_0x4f9b('0x33')]!=_0x1a5180&&(_0x43dcf5[_0x4f9b('0x33')]=_0x1a5180,this[_0x4f9b('0x34')](_0x43dcf5,_0x1a5180));}),this[_0x4f9b('0x30')](_0x43dcf5,'change:top',()=>{this['_recalculate'](_0x43dcf5,'top');}),this[_0x4f9b('0x30')](_0x43dcf5,'change:bottom',()=>{this[_0x4f9b('0x1b')](_0x43dcf5,_0x4f9b('0x27'));}),this[_0x4f9b('0x8')](_0x43dcf5);const _0x21a962=this['_getItemBefore'](_0x43dcf5);if(_0x21a962)this[_0x4f9b('0x35')](_0x21a962,_0x43dcf5)||this[_0x4f9b('0x8')](_0x43dcf5);else this['_alignToTargetRect'](_0x43dcf5);return this[_0x4f9b('0x15')](),this['view'][_0x4f9b('0x5')]['add'](_0x43dcf5),_0x43dcf5;}[_0x4f9b('0x29')](_0x45981e){if(!_0x45981e[_0x4f9b('0x1f')][_0x4f9b('0x2b')])return;const _0x4e4875=this['_getItemBefore'](_0x45981e);if(!_0x4e4875)return;const _0x4dc6eb=this[_0x4f9b('0x2d')]['get'](_0x4e4875),_0x185ada=this[_0x4f9b('0x11')];_0x185ada&&_0x185ada===_0x4dc6eb?this[_0x4f9b('0x35')](_0x4e4875,_0x45981e):this[_0x4f9b('0x3e')](_0x45981e,_0x4e4875);}['_alignForBottomChange'](_0x476b19){if(!_0x476b19[_0x4f9b('0x1f')][_0x4f9b('0x2b')])return;const _0xba35d5=this[_0x4f9b('0x40')](_0x476b19);if(!_0xba35d5)return;const _0x4ec154=this[_0x4f9b('0x2d')][_0x4f9b('0x0')](_0xba35d5),_0x3d0768=this['context'][_0x4f9b('0x7')][_0x4f9b('0x0')](_0x4f9b('0xd')),_0x3595ca=this[_0x4f9b('0x11')];_0x3595ca&&_0x3595ca===_0x4ec154&&_0x3d0768?(this[_0x4f9b('0x3e')](_0xba35d5,_0x476b19),this[_0x4f9b('0x35')](_0x476b19,_0xba35d5)):_0x3595ca&&_0x3595ca===_0x4ec154?this['_alignBeforeItem'](_0xba35d5,_0x476b19):this[_0x4f9b('0x35')](_0x476b19,_0xba35d5);}[_0x4f9b('0x1b')](_0x5d5537,_0x3354d2){0x0===this[_0x4f9b('0x1e')]['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xc5741b,changedProp:_0x5156d1}of this['_recalculateBuffer'])_0x4f9b('0x39')===_0x5156d1?this[_0x4f9b('0x29')](_0xc5741b):this[_0x4f9b('0x38')](_0xc5741b);this[_0x4f9b('0x1e')]=[];},0xa),this['_recalculateBuffer'][_0x4f9b('0x3a')]({'sidebarItemView':_0x5d5537,'changedProp':_0x3354d2});}[_0x4f9b('0x19')](_0x3bc564){return this[_0x4f9b('0x3d')][_0x4f9b('0x0')](_0x3bc564);}[_0x4f9b('0xf')](){this[_0x4f9b('0x1a')]['destroy']();}[_0x4f9b('0x25')](_0x50a8da){const _0x4b67a8=this[_0x4f9b('0x19')](_0x50a8da);this[_0x4f9b('0x21')](_0x4b67a8),this[_0x4f9b('0x21')](_0x50a8da[_0x4f9b('0x1a')]),_0x4b67a8[_0x4f9b('0xf')](),this[_0x4f9b('0x3d')][_0x4f9b('0x12')](_0x50a8da),this['_sidebarItemViewToAnnotation'][_0x4f9b('0x12')](_0x4b67a8);}['_createSidebarView'](){const _0x3f1134=new _0x81af48(this[_0x4f9b('0x42')][_0x4f9b('0x6')]);return _0x3f1134['render'](),this['on'](_0x4f9b('0x23'),(_0x32bc99,_0x3ac888,_0x3f7755,_0x40458c)=>{_0x40458c&&_0x3f1134[_0x4f9b('0x2f')](_0x4f9b('0x1d')),_0x3f7755?_0x3f1134[_0x4f9b('0x18')](_0x4f9b('0x1d'))['to'](_0x3f7755,'bottom'):_0x3f1134[_0x4f9b('0x1d')]=null;}),_0x3f1134;}[_0x4f9b('0x15')](){var _0x762803;this[_0x4f9b('0x31')]=(null===(_0x762803=this['_annotations'])||void 0x0===_0x762803?void 0x0:_0x762803[_0x4f9b('0x45')])?this[_0x4f9b('0x19')](this[_0x4f9b('0x2a')][_0x4f9b('0x45')]):null;}[_0x4f9b('0x3c')](_0x7c7af6){var _0x4d8ad9;const _0x6ccdda=this[_0x4f9b('0x2d')][_0x4f9b('0x0')](_0x7c7af6),_0x21ede9=_0x6ccdda&&(null===(_0x4d8ad9=this['_annotations'])||void 0x0===_0x4d8ad9?void 0x0:_0x4d8ad9['get'](this[_0x4f9b('0x2a')]['getIndex'](_0x6ccdda)-0x1));return _0x21ede9&&this['getSidebarItemView'](_0x21ede9)||null;}[_0x4f9b('0x40')](_0x3dabcf){var _0x1a5937;const _0x1fbf48=this[_0x4f9b('0x2d')][_0x4f9b('0x0')](_0x3dabcf),_0x3b4312=_0x1fbf48&&(null===(_0x1a5937=this['_annotations'])||void 0x0===_0x1a5937?void 0x0:_0x1a5937[_0x4f9b('0x0')](this[_0x4f9b('0x2a')][_0x4f9b('0x37')](_0x1fbf48)+0x1));return _0x3b4312&&this[_0x4f9b('0x19')](_0x3b4312)||null;}['_alignBeforeItem'](_0x1e03c8,_0xadc272){_0x1e03c8['updateHeight']();const _0x142354=H(_0xadc272[_0x4f9b('0x27')]+this[_0x4f9b('0x41')],_0x1e03c8['top']);return!!_0x142354&&(this[_0x4f9b('0x34')](_0xadc272,_0xadc272['top']-_0x142354),!0x0);}[_0x4f9b('0x35')](_0x559f5e,_0x38b176){_0x559f5e[_0x4f9b('0x16')]();const _0x19b3a4=H(_0x559f5e[_0x4f9b('0x27')]+this[_0x4f9b('0x41')],_0x38b176['top']);return!!_0x19b3a4&&(this[_0x4f9b('0x34')](_0x38b176,_0x38b176[_0x4f9b('0x39')]+_0x19b3a4,!0x1),!0x0);}[_0x4f9b('0x8')](_0x7a6feb){const _0x3ec344=this['_sidebarItemViewToAnnotation'][_0x4f9b('0x0')](_0x7a6feb);if(!_0x3ec344||!_0x3ec344[_0x4f9b('0x4')]||!_0x3ec344[_0x4f9b('0x36')])return;const _0x5e5ffe=this['_getTargetTop'](_0x3ec344,_0x3ec344[_0x4f9b('0x36')]);this['_setItemTop'](_0x7a6feb,_0x5e5ffe);}['_getTargetTop'](_0x5d2a34,_0x58b338){if(null===_0x58b338)return 0x0;if(_0x5d2a34[_0x4f9b('0x4')]instanceof _0x1e0c47)return _0x58b338['top'];{const _0x5c4ea6=new _0x1e0c47(this[_0x4f9b('0x1a')][_0x4f9b('0x2c')])[_0x4f9b('0x39')];return _0x58b338[_0x4f9b('0x39')]-_0x5c4ea6;}}[_0x4f9b('0x34')](_0x3a69b0,_0xcb0f71,_0x3f3a31=this[_0x4f9b('0x42')][_0x4f9b('0x7')][_0x4f9b('0x0')]('sidebar.preventScrollOutOfView')){_0x3f3a31&&(_0xcb0f71=Math[_0x4f9b('0x14')](_0xcb0f71,this[_0x4f9b('0x10')](_0x3a69b0))),_0x3a69b0[_0x4f9b('0x39')]=_0xcb0f71;}['_getMaxAvailableTop'](_0x37c800){let _0x5ccb58=this['_getItemBefore'](_0x37c800),_0x1fb74c=0x0;for(;_0x5ccb58;)_0x5ccb58[_0x4f9b('0x16')](),_0x1fb74c+=this[_0x4f9b('0x41')]+_0x5ccb58[_0x4f9b('0xe')],_0x5ccb58=this[_0x4f9b('0x3c')](_0x5ccb58);return _0x1fb74c;}}function H(_0x2ed72c,_0x52fe30){return Math[_0x4f9b('0x14')](_0x2ed72c-_0x52fe30,0x0);}function y(_0x5c29a8){return null!==_0x5c29a8&&_0x4f9b('0xc')==typeof _0x5c29a8&&0x1===_0x5c29a8[_0x4f9b('0x3')];}
23
+ const _0x6c28=['getIndex','remove','context','minHeight','_setItemTop','_alignAfterItem','targetRect','sidebar.preventScrollOutOfView','bind','class','change:bottom','change:top','_spaceBetweenItems','list','_lastItem','_alignToTargetRect','object','_createSidebarView','render','_alignForBottomChange','set','_getItemAfter','length','locale','Sidebar','_getItemBefore','_annotations','_activeAnnotation','_alignBeforeItem','last','delete','content','get','listenTo','refresh','nodeType','_sidebarItemViewToAnnotation','_destroySidebarItemView','init','height','_getTargetTop','change:targetRect','_annotationToSidebarItemView','max','sidebar-attachtocontainer-missing-container','config','bottom','sidebar.container','view','target','clear','isAnimationDisabled','_updateLastItem','_recalculate','_attachToContainer','stopListening','getSidebarItemView','addAnnotation','_alignForTopChange','top','_recalculateBuffer','change:_lastItem','container','_targetTop','element','define','updateHeight','_getMaxAvailableTop','destroy','isActive'];(function(_0x1bef2f,_0x6c2880){const _0x5c34ec=function(_0x47cd6f){while(--_0x47cd6f){_0x1bef2f['push'](_0x1bef2f['shift']());}};_0x5c34ec(++_0x6c2880);}(_0x6c28,0xd9));const _0x5c34=function(_0x1bef2f,_0x6c2880){_0x1bef2f=_0x1bef2f-0x0;let _0x5c34ec=_0x6c28[_0x1bef2f];return _0x5c34ec;};import{ContextPlugin as _0x11dba3}from'ckeditor5/src/core.js';import{Rect as _0x6b676f,CKEditorError as _0x95ebce}from'ckeditor5/src/utils.js';import _0x2cbdf4 from'./view/sidebarview.js';import _0x4fa075 from'./view/sidebaritemview.js';export default class z extends _0x11dba3{static get['pluginName'](){return _0x5c34('0x11');}constructor(_0x460082){super(_0x460082),this[_0x5c34('0xd')](_0x5c34('0x7'),void 0x0),this['view']=this[_0x5c34('0xa')](),this[_0x5c34('0xd')]('container',null),this[_0x5c34('0x5')]=0x19,this[_0x5c34('0x1d')]=new Map(),this[_0x5c34('0x23')]=new Map(),this[_0x5c34('0x41')]['config'][_0x5c34('0x3a')]('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this[_0x5c34('0x35')]=[];}[_0x5c34('0x1f')](){const _0x9ddfb9=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x28'));_0x9ddfb9&&this['setContainer'](_0x9ddfb9);}['setContainer'](_0x567c5a){if(!y(_0x567c5a))throw new _0x95ebce('sidebar-setcontainer-invalid-element');this[_0x5c34('0x37')]=_0x567c5a;}[_0x5c34('0x2f')]({viewClass:_0x10415b='',spaceBetweenItems:_0x2339f3=0x19}={}){if(!y(this[_0x5c34('0x37')]))throw new _0x95ebce(_0x5c34('0x25'),this);this[_0x5c34('0x37')]['appendChild'](this[_0x5c34('0x29')][_0x5c34('0x39')]),this[_0x5c34('0x29')][_0x5c34('0x2')]=_0x10415b,this[_0x5c34('0x5')]=_0x2339f3;}['rearrange']({removedAnnotation:_0x2e4bd9,previousAnnotation:_0x5c8e05,nextAnnotation:_0x552391}){const _0x2b8e8d=this[_0x5c34('0x31')](_0x2e4bd9);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x40')](_0x2b8e8d),this[_0x5c34('0x1e')](_0x2e4bd9),_0x5c8e05&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x5c8e05)),_0x552391&&this[_0x5c34('0x8')](this[_0x5c34('0x31')](_0x552391)),this[_0x5c34('0x2d')]();}[_0x5c34('0x1b')]({blurredAnnotation:_0x51046d,activatedAnnotation:_0x133719,disableAnimationOnActivatedAnnotation:_0x3c20a5}){if(this['_activeAnnotation']=_0x133719,_0x51046d){_0x51046d[_0x5c34('0x3e')]=!0x1;const _0x489845=this[_0x5c34('0x31')](_0x51046d);_0x489845&&_0x3c20a5&&(_0x489845[_0x5c34('0x2c')]=!0x1);}if(_0x133719){const _0x421bf6=this[_0x5c34('0x31')](_0x133719);_0x421bf6&&(_0x133719[_0x5c34('0x3e')]=!0x0,_0x3c20a5&&(_0x421bf6[_0x5c34('0x2c')]=!0x0,_0x421bf6[_0x5c34('0x34')]+=0x1),this[_0x5c34('0x8')](_0x421bf6));}}['_detachFromContainer'](_0x535684){if(this[_0x5c34('0x29')]['element'][_0x5c34('0x40')](),_0x535684)for(const _0x7cecb1 of _0x535684)this['_destroySidebarItemView'](_0x7cecb1);this[_0x5c34('0x29')][_0x5c34('0x6')][_0x5c34('0x2b')](),this[_0x5c34('0x29')][_0x5c34('0x2')]='',this[_0x5c34('0x7')]=null;}[_0x5c34('0x32')](_0x45f56f,_0x2c59e7){_0x2c59e7||(_0x2c59e7=_0x45f56f['view']);const _0x6808bc=new _0x4fa075(this['context'][_0x5c34('0x10')]);this[_0x5c34('0x1d')]['set'](_0x6808bc,_0x45f56f),this[_0x5c34('0x23')][_0x5c34('0xd')](_0x45f56f,_0x6808bc),_0x6808bc[_0x5c34('0x18')]['add'](_0x2c59e7),this['listenTo'](_0x45f56f[_0x5c34('0x29')],_0x5c34('0x22'),(_0x2eac6,_0x559715,_0x504ef7)=>{const _0x18ab1=this[_0x5c34('0x21')](_0x45f56f,_0x504ef7);_0x6808bc[_0x5c34('0x38')]!=_0x18ab1&&(_0x6808bc[_0x5c34('0x38')]=_0x18ab1,this[_0x5c34('0x43')](_0x6808bc,_0x18ab1));}),this['listenTo'](_0x6808bc,_0x5c34('0x4'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x34'));}),this[_0x5c34('0x1a')](_0x6808bc,_0x5c34('0x3'),()=>{this[_0x5c34('0x2e')](_0x6808bc,_0x5c34('0x27'));}),this['_alignToTargetRect'](_0x6808bc);const _0x5bbc6d=this['_getItemBefore'](_0x6808bc);if(_0x5bbc6d)this['_alignAfterItem'](_0x5bbc6d,_0x6808bc)||this['_alignToTargetRect'](_0x6808bc);else this[_0x5c34('0x8')](_0x6808bc);return this['_updateLastItem'](),this[_0x5c34('0x29')][_0x5c34('0x6')]['add'](_0x6808bc),_0x6808bc;}['_alignForTopChange'](_0x2e1626){if(!_0x2e1626['content']['length'])return;const _0xff19b9=this[_0x5c34('0x12')](_0x2e1626);if(!_0xff19b9)return;const _0x57b9cd=this['_sidebarItemViewToAnnotation'][_0x5c34('0x19')](_0xff19b9),_0x2f57bf=this[_0x5c34('0x14')];_0x2f57bf&&_0x2f57bf===_0x57b9cd?this[_0x5c34('0x44')](_0xff19b9,_0x2e1626):this['_alignBeforeItem'](_0x2e1626,_0xff19b9);}[_0x5c34('0xc')](_0x4a471e){if(!_0x4a471e[_0x5c34('0x18')]['length'])return;const _0x369c8d=this[_0x5c34('0xe')](_0x4a471e);if(!_0x369c8d)return;const _0x21b3a3=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x369c8d),_0x484fe6=this[_0x5c34('0x41')][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0')),_0x1a948c=this[_0x5c34('0x14')];_0x1a948c&&_0x1a948c===_0x21b3a3&&_0x484fe6?(this[_0x5c34('0x15')](_0x369c8d,_0x4a471e),this['_alignAfterItem'](_0x4a471e,_0x369c8d)):_0x1a948c&&_0x1a948c===_0x21b3a3?this[_0x5c34('0x15')](_0x369c8d,_0x4a471e):this[_0x5c34('0x44')](_0x4a471e,_0x369c8d);}[_0x5c34('0x2e')](_0xcf966d,_0xde88f1){0x0===this['_recalculateBuffer'][_0x5c34('0xf')]&&setTimeout(()=>{for(const {sidebarItemView:_0x9061f8,changedProp:_0x1f6d4c}of this[_0x5c34('0x35')])_0x5c34('0x34')===_0x1f6d4c?this[_0x5c34('0x33')](_0x9061f8):this[_0x5c34('0xc')](_0x9061f8);this['_recalculateBuffer']=[];},0xa),this[_0x5c34('0x35')]['push']({'sidebarItemView':_0xcf966d,'changedProp':_0xde88f1});}['getSidebarItemView'](_0x5ed5cf){return this['_annotationToSidebarItemView'][_0x5c34('0x19')](_0x5ed5cf);}[_0x5c34('0x3d')](){this[_0x5c34('0x30')](),this[_0x5c34('0x29')][_0x5c34('0x3d')]();}['_destroySidebarItemView'](_0x26bb88){const _0x155e34=this[_0x5c34('0x31')](_0x26bb88);this['stopListening'](_0x155e34),this[_0x5c34('0x30')](_0x26bb88[_0x5c34('0x29')]),_0x155e34[_0x5c34('0x3d')](),this[_0x5c34('0x23')][_0x5c34('0x17')](_0x26bb88),this[_0x5c34('0x1d')][_0x5c34('0x17')](_0x155e34);}[_0x5c34('0xa')](){const _0x13dc63=new _0x2cbdf4(this[_0x5c34('0x41')][_0x5c34('0x10')]);return _0x13dc63[_0x5c34('0xb')](),this['on'](_0x5c34('0x36'),(_0x58ff4f,_0x168047,_0x55ef8b,_0x34667c)=>{_0x34667c&&_0x13dc63['unbind'](_0x5c34('0x42')),_0x55ef8b?_0x13dc63[_0x5c34('0x1')](_0x5c34('0x42'))['to'](_0x55ef8b,_0x5c34('0x27')):_0x13dc63[_0x5c34('0x42')]=null;}),_0x13dc63;}[_0x5c34('0x2d')](){var _0x324a58;this[_0x5c34('0x7')]=(null===(_0x324a58=this[_0x5c34('0x13')])||void 0x0===_0x324a58?void 0x0:_0x324a58[_0x5c34('0x16')])?this[_0x5c34('0x31')](this[_0x5c34('0x13')][_0x5c34('0x16')]):null;}['_getItemBefore'](_0x99439a){var _0x34b021;const _0x419ca5=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x99439a),_0x63811f=_0x419ca5&&(null===(_0x34b021=this['_annotations'])||void 0x0===_0x34b021?void 0x0:_0x34b021[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x419ca5)-0x1));return _0x63811f&&this[_0x5c34('0x31')](_0x63811f)||null;}[_0x5c34('0xe')](_0x3ac7fe){var _0x324e17;const _0x157060=this[_0x5c34('0x1d')][_0x5c34('0x19')](_0x3ac7fe),_0x3aff75=_0x157060&&(null===(_0x324e17=this[_0x5c34('0x13')])||void 0x0===_0x324e17?void 0x0:_0x324e17[_0x5c34('0x19')](this[_0x5c34('0x13')][_0x5c34('0x3f')](_0x157060)+0x1));return _0x3aff75&&this[_0x5c34('0x31')](_0x3aff75)||null;}[_0x5c34('0x15')](_0x2d9c39,_0x1c84d3){_0x2d9c39[_0x5c34('0x3b')]();const _0x2e1ab4=M(_0x1c84d3['bottom']+this[_0x5c34('0x5')],_0x2d9c39[_0x5c34('0x34')]);return!!_0x2e1ab4&&(this['_setItemTop'](_0x1c84d3,_0x1c84d3['top']-_0x2e1ab4),!0x0);}[_0x5c34('0x44')](_0x49a022,_0x3f0bde){_0x49a022[_0x5c34('0x3b')]();const _0x27c3ae=M(_0x49a022['bottom']+this['_spaceBetweenItems'],_0x3f0bde['top']);return!!_0x27c3ae&&(this[_0x5c34('0x43')](_0x3f0bde,_0x3f0bde[_0x5c34('0x34')]+_0x27c3ae,!0x1),!0x0);}['_alignToTargetRect'](_0x2f7750){const _0x325063=this[_0x5c34('0x1d')]['get'](_0x2f7750);if(!_0x325063||!_0x325063[_0x5c34('0x2a')]||!_0x325063['targetRect'])return;const _0x351e54=this[_0x5c34('0x21')](_0x325063,_0x325063[_0x5c34('0x45')]);this[_0x5c34('0x43')](_0x2f7750,_0x351e54);}['_getTargetTop'](_0x39c090,_0x1b1d68){if(null===_0x1b1d68)return 0x0;if(_0x39c090[_0x5c34('0x2a')]instanceof _0x6b676f)return _0x1b1d68[_0x5c34('0x34')];{const _0x209fec=new _0x6b676f(this[_0x5c34('0x29')][_0x5c34('0x39')])[_0x5c34('0x34')];return _0x1b1d68[_0x5c34('0x34')]-_0x209fec;}}['_setItemTop'](_0x373311,_0x1465a0,_0x16bd11=this['context'][_0x5c34('0x26')][_0x5c34('0x19')](_0x5c34('0x0'))){_0x16bd11&&(_0x1465a0=Math[_0x5c34('0x24')](_0x1465a0,this[_0x5c34('0x3c')](_0x373311))),_0x373311[_0x5c34('0x34')]=_0x1465a0;}[_0x5c34('0x3c')](_0x3f696e){let _0x147cdc=this['_getItemBefore'](_0x3f696e),_0x255e4e=0x0;for(;_0x147cdc;)_0x147cdc['updateHeight'](),_0x255e4e+=this['_spaceBetweenItems']+_0x147cdc[_0x5c34('0x20')],_0x147cdc=this[_0x5c34('0x12')](_0x147cdc);return _0x255e4e;}}function M(_0x49b237,_0x4f9b5f){return Math['max'](_0x49b237-_0x4f9b5f,0x0);}function y(_0x3be8fd){return null!==_0x3be8fd&&_0x5c34('0x9')==typeof _0x3be8fd&&0x1===_0x3be8fd[_0x5c34('0x1c')];}
@@ -1,25 +1,25 @@
1
- /**
2
- * @module comments/annotations/view/annotationcounterbuttonview
3
- * @publicApi
4
- */
5
- import { ButtonView, View } from 'ckeditor5/src/ui';
6
- import type { Locale } from 'ckeditor5/src/utils';
7
- /**
8
- * A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
9
- */
10
- export default class AnnotationCounterButtonView extends ButtonView {
11
- /**
12
- * @observable
13
- */
14
- isDirty: boolean;
15
- /**
16
- * @observable
17
- */
18
- number: number;
19
- /**
20
- * @observable
21
- */
22
- annotationType: string;
23
- counterView: View;
24
- constructor(locale: Locale);
25
- }
1
+ /**
2
+ * @module comments/annotations/view/annotationcounterbuttonview
3
+ * @publicApi
4
+ */
5
+ import { ButtonView, View } from 'ckeditor5/src/ui.js';
6
+ import type { Locale } from 'ckeditor5/src/utils.js';
7
+ /**
8
+ * A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
9
+ */
10
+ export default class AnnotationCounterButtonView extends ButtonView {
11
+ /**
12
+ * @observable
13
+ */
14
+ isDirty: boolean;
15
+ /**
16
+ * @observable
17
+ */
18
+ number: number;
19
+ /**
20
+ * @observable
21
+ */
22
+ annotationType: string;
23
+ counterView: View;
24
+ constructor(locale: Locale);
25
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x25bf=['children','ck-annotation-counter','ck-annotation-counter__badge','add','toString','annotationType','...','number','counterView','bindTemplate','bind','_badge','icon','extendTemplate','isDirty','set','setTemplate'];(function(_0xb67ce5,_0x25bf2f){const _0x559d1f=function(_0x5038d4){while(--_0x5038d4){_0xb67ce5['push'](_0xb67ce5['shift']());}};_0x559d1f(++_0x25bf2f);}(_0x25bf,0x93));const _0x559d=function(_0xb67ce5,_0x25bf2f){_0xb67ce5=_0xb67ce5-0x0;let _0x559d1f=_0x25bf[_0xb67ce5];return _0x559d1f;};import{ButtonView as _0x2367d3,View as _0x40fcf5}from'ckeditor5/src/ui';import _0x4f02d5 from'../../../theme/icons/add-comment.svg';export default class D extends _0x2367d3{constructor(_0x41741e){super(_0x41741e);const _0x349384=this[_0x559d('0xf')];this[_0x559d('0x4')](_0x559d('0x3'),!0x1),this[_0x559d('0x4')](_0x559d('0xd'),0x0),this[_0x559d('0x10')](_0x559d('0x0'))['to'](this,'isDirty',this,_0x559d('0xd'),(_0x553606,_0x49ac8c)=>_0x553606?_0x559d('0xc'):_0x49ac8c[_0x559d('0xa')]()),this[_0x559d('0x4')](_0x559d('0xb'),''),this[_0x559d('0x1')]=_0x4f02d5,this[_0x559d('0x2')]({'attributes':{'class':[_0x559d('0x7')]}}),this['counterView']=new _0x40fcf5(),this[_0x559d('0xe')][_0x559d('0x5')]({'tag':'span','attributes':{'class':[_0x559d('0x8'),_0x349384['to'](_0x559d('0xb'),_0x31b8c8=>'ck-annotation-counter__badge--'+_0x31b8c8),_0x349384['if'](_0x559d('0x3'),'ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x349384['to'](_0x559d('0x0'))}]}),this[_0x559d('0x6')][_0x559d('0x9')](this[_0x559d('0xe')]);}}
23
+ const _0x100c=['bind','children','isDirty','_badge','span','annotationType','counterView','toString','set','ck-annotation-counter__badge','ck-annotation-counter__badge--','...','number','add','ck-annotation-counter','icon'];(function(_0x508987,_0x100cf4){const _0x554a46=function(_0x167d09){while(--_0x167d09){_0x508987['push'](_0x508987['shift']());}};_0x554a46(++_0x100cf4);}(_0x100c,0x1b6));const _0x554a=function(_0x508987,_0x100cf4){_0x508987=_0x508987-0x0;let _0x554a46=_0x100c[_0x508987];return _0x554a46;};import{ButtonView as _0x2ac189,View as _0x50cfb4}from'ckeditor5/src/ui.js';import _0x3b6bac from'../../../theme/icons/add-comment.svg';export default class D extends _0x2ac189{constructor(_0x51956e){super(_0x51956e);const _0x20bc60=this['bindTemplate'];this[_0x554a('0x2')](_0x554a('0xc'),!0x1),this[_0x554a('0x2')](_0x554a('0x6'),0x0),this[_0x554a('0xa')](_0x554a('0xd'))['to'](this,_0x554a('0xc'),this,_0x554a('0x6'),(_0x23d2a2,_0x22d9a4)=>_0x23d2a2?_0x554a('0x5'):_0x22d9a4[_0x554a('0x1')]()),this[_0x554a('0x2')](_0x554a('0xf'),''),this[_0x554a('0x9')]=_0x3b6bac,this['extendTemplate']({'attributes':{'class':[_0x554a('0x8')]}}),this[_0x554a('0x0')]=new _0x50cfb4(),this['counterView']['setTemplate']({'tag':_0x554a('0xe'),'attributes':{'class':[_0x554a('0x3'),_0x20bc60['to'](_0x554a('0xf'),_0x57c89c=>_0x554a('0x4')+_0x57c89c),_0x20bc60['if'](_0x554a('0xc'),'ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x20bc60['to']('_badge')}]}),this[_0x554a('0xb')][_0x554a('0x7')](this['counterView']);}}
@@ -1,86 +1,86 @@
1
- /**
2
- * @module comments/annotations/view/annotationview
3
- * @publicApi
4
- */
5
- import { View, type ViewCollection } from 'ckeditor5/src/ui';
6
- import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils';
7
- import '../../../theme/annotation.css';
8
- /**
9
- * A wrapping view for any view added to the `Annotations` plugin.
10
- *
11
- * It introduces functionalities that make the given view ready to be used as an annotation, such as focus tracking, height resizing,
12
- * and other observable properties that help share current annotation state across different UIs.
13
- */
14
- export default class AnnotationView extends View {
15
- /**
16
- * Tracks focus on the annotation view.
17
- *
18
- * Add a DOM element to this focus tracker to prevent blurring annotation view
19
- * when the DOM element is focused.
20
- */
21
- readonly focusTracker: FocusTracker;
22
- readonly id: string;
23
- readonly keystrokes: KeystrokeHandler;
24
- /**
25
- * Target rectangle to which the annotation should be attached.
26
- *
27
- * @observable
28
- */
29
- targetRect: Rect | null;
30
- /**
31
- * Annotation view height.
32
- *
33
- * @observable
34
- */
35
- height: number;
36
- /**
37
- * Informs if an annotation is active.
38
- *
39
- * @observable
40
- */
41
- isActive: boolean;
42
- /**
43
- * Informs if there are unsaved changes in the annotation.
44
- *
45
- * @observable
46
- */
47
- isDirty: boolean;
48
- /**
49
- * The number of items in the annotation.
50
- *
51
- * @observable
52
- */
53
- length: number;
54
- /**
55
- * @observable
56
- */
57
- type: string;
58
- element: HTMLElement;
59
- /**
60
- * Collection for content views.
61
- */
62
- content: ViewCollection;
63
- /**
64
- * The inner annotation view.
65
- */
66
- mainView: AnnotationMainView;
67
- /**
68
- * @inheritDoc
69
- */
70
- constructor(locale: Locale, mainView: AnnotationMainView);
71
- /**
72
- * @inheritDoc
73
- */
74
- render(): void;
75
- /**
76
- * @inheritDoc
77
- */
78
- destroy(): void;
79
- /**
80
- * Focuses the annotation view.
81
- */
82
- focus(): void;
83
- }
84
- export interface AnnotationMainView extends View {
85
- isActive: boolean;
86
- }
1
+ /**
2
+ * @module comments/annotations/view/annotationview
3
+ * @publicApi
4
+ */
5
+ import { View, type ViewCollection } from 'ckeditor5/src/ui.js';
6
+ import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils.js';
7
+ import '../../../theme/annotation.css';
8
+ /**
9
+ * A wrapping view for any view added to the `Annotations` plugin.
10
+ *
11
+ * It introduces functionalities that make the given view ready to be used as an annotation, such as focus tracking, height resizing,
12
+ * and other observable properties that help share current annotation state across different UIs.
13
+ */
14
+ export default class AnnotationView extends View {
15
+ /**
16
+ * Tracks focus on the annotation view.
17
+ *
18
+ * Add a DOM element to this focus tracker to prevent blurring annotation view
19
+ * when the DOM element is focused.
20
+ */
21
+ readonly focusTracker: FocusTracker;
22
+ readonly id: string;
23
+ readonly keystrokes: KeystrokeHandler;
24
+ /**
25
+ * Target rectangle to which the annotation should be attached.
26
+ *
27
+ * @observable
28
+ */
29
+ targetRect: Rect | null;
30
+ /**
31
+ * Annotation view height.
32
+ *
33
+ * @observable
34
+ */
35
+ height: number;
36
+ /**
37
+ * Informs if an annotation is active.
38
+ *
39
+ * @observable
40
+ */
41
+ isActive: boolean;
42
+ /**
43
+ * Informs if there are unsaved changes in the annotation.
44
+ *
45
+ * @observable
46
+ */
47
+ isDirty: boolean;
48
+ /**
49
+ * The number of items in the annotation.
50
+ *
51
+ * @observable
52
+ */
53
+ length: number;
54
+ /**
55
+ * @observable
56
+ */
57
+ type: string;
58
+ element: HTMLElement;
59
+ /**
60
+ * Collection for content views.
61
+ */
62
+ content: ViewCollection;
63
+ /**
64
+ * The inner annotation view.
65
+ */
66
+ mainView: AnnotationMainView;
67
+ /**
68
+ * @inheritDoc
69
+ */
70
+ constructor(locale: Locale, mainView: AnnotationMainView);
71
+ /**
72
+ * @inheritDoc
73
+ */
74
+ render(): void;
75
+ /**
76
+ * @inheritDoc
77
+ */
78
+ destroy(): void;
79
+ /**
80
+ * Focuses the annotation view.
81
+ */
82
+ focus(): void;
83
+ }
84
+ export interface AnnotationMainView extends View {
85
+ isActive: boolean;
86
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4cfc=['targetRect','_mutationObserver','isActive','detach','element','listenTo','_updateHeight','ck-annotation-wrapper','keystrokes','ck-annotation-wrapper--active','clear','type','focusTracker','div','content','clientHeight','height','length','render','focus','set','mainView','isDirty','bindTemplate','destroy','ck-rounded-corners','add','Esc'];(function(_0x539484,_0x4cfcfa){const _0x2c4e5d=function(_0x3330a2){while(--_0x3330a2){_0x539484['push'](_0x539484['shift']());}};_0x2c4e5d(++_0x4cfcfa);}(_0x4cfc,0x1c3));const _0x2c4e=function(_0x539484,_0x4cfcfa){_0x539484=_0x539484-0x0;let _0x2c4e5d=_0x4cfc[_0x539484];return _0x2c4e5d;};import{View as _0x646bcc}from'ckeditor5/src/ui';import{FocusTracker as _0x40adf4,KeystrokeHandler as _0x3229c5,uid as _0x127ea5}from'ckeditor5/src/utils';import _0x390461 from'../../utils/createmutationobserver';import'../../../theme/annotation.css';export default class V extends _0x646bcc{constructor(_0x4cd026,_0x6f0b65){super(_0x4cd026),this['id']=_0x127ea5(),this['focusTracker']=new _0x40adf4(),this[_0x2c4e('0x5')]=new _0x3229c5(),this['keystrokes'][_0x2c4e('0x11')](_0x2c4e('0x18'),(_0x43aeee,_0x10a1ee)=>this['fire']('Esc',_0x10a1ee)),this['set'](_0x2c4e('0x19'),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set'](_0x2c4e('0xd'),0x0),this[_0x2c4e('0x11')](_0x2c4e('0x1b'),!0x1),this['set'](_0x2c4e('0x13'),!0x1),this[_0x2c4e('0x11')](_0x2c4e('0xe'),0x0),this[_0x2c4e('0x11')](_0x2c4e('0x8'),''),this[_0x2c4e('0x1a')]=_0x390461(()=>this[_0x2c4e('0x3')]()),this[_0x2c4e('0xb')]=this['createCollection'](),this[_0x2c4e('0xb')][_0x2c4e('0x17')](_0x6f0b65),this[_0x2c4e('0x12')]=_0x6f0b65;const _0x34dbeb=this[_0x2c4e('0x14')];this['setTemplate']({'tag':_0x2c4e('0xa'),'attributes':{'class':['ck',_0x2c4e('0x4'),_0x2c4e('0x16'),_0x34dbeb['if'](_0x2c4e('0x1b'),_0x2c4e('0x6'))],'tabindex':-0x1},'children':this[_0x2c4e('0xb')]});}['render'](){super[_0x2c4e('0xf')](),this['focusTracker'][_0x2c4e('0x17')](this[_0x2c4e('0x1')]),this['keystrokes'][_0x2c4e('0x2')](this[_0x2c4e('0x1')]),this[_0x2c4e('0x1a')]['attach'](this[_0x2c4e('0x1')]);}['destroy'](){this[_0x2c4e('0xb')][_0x2c4e('0x7')](),this[_0x2c4e('0x5')][_0x2c4e('0x15')](),this[_0x2c4e('0x9')]['destroy'](),this[_0x2c4e('0x1a')][_0x2c4e('0x0')](),super[_0x2c4e('0x15')]();}[_0x2c4e('0x10')](){this[_0x2c4e('0x1')]['focus']();}[_0x2c4e('0x3')](){const _0x19df2e=this[_0x2c4e('0x1')][_0x2c4e('0xc')];_0x19df2e&&(this[_0x2c4e('0xd')]=_0x19df2e);}}
23
+ const _0x23bf=['length','element','height','setTemplate','attach','isDirty','content','focus','mainView','_mutationObserver','clear','isActive','set','detach','targetRect','Esc','keystrokes','type','_updateHeight','destroy','ck-annotation-wrapper--active','clientHeight','add','render','focusTracker','createCollection','ck-annotation-wrapper','ck-rounded-corners'];(function(_0x42a0d0,_0x23bf09){const _0x36ca5d=function(_0x421dc8){while(--_0x421dc8){_0x42a0d0['push'](_0x42a0d0['shift']());}};_0x36ca5d(++_0x23bf09);}(_0x23bf,0x17c));const _0x36ca=function(_0x42a0d0,_0x23bf09){_0x42a0d0=_0x42a0d0-0x0;let _0x36ca5d=_0x23bf[_0x42a0d0];return _0x36ca5d;};import{View as _0x7a994}from'ckeditor5/src/ui.js';import{FocusTracker as _0x449993,KeystrokeHandler as _0x453a94,uid as _0x19961b}from'ckeditor5/src/utils.js';import _0x5e3c78 from'../../utils/createmutationobserver.js';import'../../../theme/annotation.css';export default class V extends _0x7a994{constructor(_0x1be4d8,_0x472f11){super(_0x1be4d8),this['id']=_0x19961b(),this[_0x36ca('0x8')]=new _0x449993(),this['keystrokes']=new _0x453a94(),this['keystrokes'][_0x36ca('0x18')](_0x36ca('0x1b'),(_0x2c11c9,_0x4719f3)=>this['fire'](_0x36ca('0x1b'),_0x4719f3)),this[_0x36ca('0x18')](_0x36ca('0x1a'),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this[_0x36ca('0x18')](_0x36ca('0xe'),0x0),this['set']('isActive',!0x1),this['set'](_0x36ca('0x11'),!0x1),this[_0x36ca('0x18')](_0x36ca('0xc'),0x0),this[_0x36ca('0x18')](_0x36ca('0x1'),''),this[_0x36ca('0x15')]=_0x5e3c78(()=>this[_0x36ca('0x2')]()),this[_0x36ca('0x12')]=this[_0x36ca('0x9')](),this[_0x36ca('0x12')]['add'](_0x472f11),this[_0x36ca('0x14')]=_0x472f11;const _0x1cf353=this['bindTemplate'];this[_0x36ca('0xf')]({'tag':'div','attributes':{'class':['ck',_0x36ca('0xa'),_0x36ca('0xb'),_0x1cf353['if'](_0x36ca('0x17'),_0x36ca('0x4'))],'tabindex':-0x1},'children':this[_0x36ca('0x12')]});}['render'](){super[_0x36ca('0x7')](),this[_0x36ca('0x8')][_0x36ca('0x6')](this[_0x36ca('0xd')]),this[_0x36ca('0x0')]['listenTo'](this[_0x36ca('0xd')]),this[_0x36ca('0x15')][_0x36ca('0x10')](this['element']);}['destroy'](){this[_0x36ca('0x12')][_0x36ca('0x16')](),this[_0x36ca('0x0')][_0x36ca('0x3')](),this[_0x36ca('0x8')][_0x36ca('0x3')](),this['_mutationObserver'][_0x36ca('0x19')](),super['destroy']();}[_0x36ca('0x13')](){this[_0x36ca('0xd')][_0x36ca('0x13')]();}['_updateHeight'](){const _0x527b91=this[_0x36ca('0xd')][_0x36ca('0x5')];_0x527b91&&(this[_0x36ca('0xe')]=_0x527b91);}}