@ckeditor/ckeditor5-comments 36.0.1 → 37.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/build/comments.js +2 -2
  2. package/build/translations/af.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/bs.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de-ch.js +1 -1
  11. package/build/translations/de.js +1 -1
  12. package/build/translations/el.js +1 -1
  13. package/build/translations/en-au.js +1 -1
  14. package/build/translations/es-co.js +1 -1
  15. package/build/translations/es.js +1 -1
  16. package/build/translations/et.js +1 -1
  17. package/build/translations/fa.js +1 -1
  18. package/build/translations/fi.js +1 -1
  19. package/build/translations/fr.js +1 -1
  20. package/build/translations/gl.js +1 -1
  21. package/build/translations/he.js +1 -1
  22. package/build/translations/hi.js +1 -1
  23. package/build/translations/hr.js +1 -1
  24. package/build/translations/hu.js +1 -1
  25. package/build/translations/id.js +1 -1
  26. package/build/translations/it.js +1 -1
  27. package/build/translations/ja.js +1 -1
  28. package/build/translations/jv.js +1 -1
  29. package/build/translations/ko.js +1 -1
  30. package/build/translations/lt.js +1 -1
  31. package/build/translations/lv.js +1 -1
  32. package/build/translations/ms.js +1 -1
  33. package/build/translations/nl.js +1 -1
  34. package/build/translations/no.js +1 -1
  35. package/build/translations/pl.js +1 -1
  36. package/build/translations/pt-br.js +1 -1
  37. package/build/translations/pt.js +1 -1
  38. package/build/translations/ro.js +1 -1
  39. package/build/translations/ru.js +1 -1
  40. package/build/translations/sk.js +1 -1
  41. package/build/translations/sr-latn.js +1 -1
  42. package/build/translations/sr.js +1 -1
  43. package/build/translations/sv.js +1 -1
  44. package/build/translations/th.js +1 -1
  45. package/build/translations/tk.js +1 -1
  46. package/build/translations/tr.js +1 -1
  47. package/build/translations/tt.js +1 -1
  48. package/build/translations/ug.js +1 -1
  49. package/build/translations/uk.js +1 -1
  50. package/build/translations/ur.js +1 -1
  51. package/build/translations/vi.js +1 -1
  52. package/build/translations/zh-cn.js +1 -1
  53. package/build/translations/zh.js +1 -1
  54. package/lang/contexts.json +8 -1
  55. package/lang/translations/af.po +28 -0
  56. package/lang/translations/ar.po +28 -0
  57. package/lang/translations/bg.po +28 -0
  58. package/lang/translations/bn.po +28 -0
  59. package/lang/translations/bs.po +28 -0
  60. package/lang/translations/ca.po +28 -0
  61. package/lang/translations/cs.po +28 -0
  62. package/lang/translations/da.po +28 -0
  63. package/lang/translations/de-ch.po +28 -0
  64. package/lang/translations/de.po +28 -0
  65. package/lang/translations/el.po +28 -0
  66. package/lang/translations/en-au.po +28 -0
  67. package/lang/translations/en.po +28 -0
  68. package/lang/translations/es-co.po +28 -0
  69. package/lang/translations/es.po +28 -0
  70. package/lang/translations/et.po +28 -0
  71. package/lang/translations/fa.po +28 -0
  72. package/lang/translations/fi.po +28 -0
  73. package/lang/translations/fr.po +28 -0
  74. package/lang/translations/gl.po +28 -0
  75. package/lang/translations/he.po +28 -0
  76. package/lang/translations/hi.po +28 -0
  77. package/lang/translations/hr.po +28 -0
  78. package/lang/translations/hu.po +28 -0
  79. package/lang/translations/id.po +28 -0
  80. package/lang/translations/it.po +28 -0
  81. package/lang/translations/ja.po +28 -0
  82. package/lang/translations/jv.po +28 -0
  83. package/lang/translations/ko.po +28 -0
  84. package/lang/translations/lt.po +28 -0
  85. package/lang/translations/lv.po +28 -0
  86. package/lang/translations/ms.po +28 -0
  87. package/lang/translations/nl.po +28 -0
  88. package/lang/translations/no.po +28 -0
  89. package/lang/translations/pl.po +28 -0
  90. package/lang/translations/pt-br.po +28 -0
  91. package/lang/translations/pt.po +28 -0
  92. package/lang/translations/ro.po +28 -0
  93. package/lang/translations/ru.po +28 -0
  94. package/lang/translations/sk.po +28 -0
  95. package/lang/translations/sr-latn.po +28 -0
  96. package/lang/translations/sr.po +29 -1
  97. package/lang/translations/sv.po +28 -0
  98. package/lang/translations/th.po +28 -0
  99. package/lang/translations/tk.po +28 -0
  100. package/lang/translations/tr.po +28 -0
  101. package/lang/translations/tt.po +28 -0
  102. package/lang/translations/ug.po +28 -0
  103. package/lang/translations/uk.po +28 -0
  104. package/lang/translations/ur.po +28 -0
  105. package/lang/translations/vi.po +28 -0
  106. package/lang/translations/zh-cn.po +28 -0
  107. package/lang/translations/zh.po +28 -0
  108. package/package.json +19 -3
  109. package/src/annotations/annotation.d.ts +86 -0
  110. package/src/annotations/annotation.js +1 -1
  111. package/src/annotations/annotationcollection.d.ts +94 -0
  112. package/src/annotations/annotationcollection.js +1 -1
  113. package/src/annotations/annotations.d.ts +150 -0
  114. package/src/annotations/annotations.js +1 -1
  115. package/src/annotations/annotationsuis.d.ts +227 -0
  116. package/src/annotations/annotationsuis.js +1 -1
  117. package/src/annotations/editorannotations.d.ts +62 -0
  118. package/src/annotations/editorannotations.js +1 -1
  119. package/src/annotations/inlineannotations.d.ts +84 -0
  120. package/src/annotations/inlineannotations.js +1 -1
  121. package/src/annotations/narrowsidebar.d.ts +80 -0
  122. package/src/annotations/narrowsidebar.js +1 -1
  123. package/src/annotations/sidebar.d.ts +96 -0
  124. package/src/annotations/sidebar.js +1 -1
  125. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -0
  126. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  127. package/src/annotations/view/annotationview.d.ts +86 -0
  128. package/src/annotations/view/annotationview.js +1 -1
  129. package/src/annotations/view/sidebaritemview.d.ts +51 -0
  130. package/src/annotations/view/sidebaritemview.js +1 -1
  131. package/src/annotations/view/sidebarview.d.ts +28 -0
  132. package/src/annotations/view/sidebarview.js +1 -1
  133. package/src/annotations/widesidebar.d.ts +72 -0
  134. package/src/annotations/widesidebar.js +1 -1
  135. package/src/augmentation.d.ts +54 -0
  136. package/src/augmentation.js +23 -0
  137. package/src/comments/addcommentthreadcommand.d.ts +31 -0
  138. package/src/comments/addcommentthreadcommand.js +1 -1
  139. package/src/comments/commentsarchive.d.ts +25 -0
  140. package/src/comments/commentsarchive.js +23 -0
  141. package/src/comments/commentsarchiveui.d.ts +32 -0
  142. package/src/comments/commentsarchiveui.js +23 -0
  143. package/src/comments/commentsediting.d.ts +71 -0
  144. package/src/comments/commentsediting.js +1 -1
  145. package/src/comments/commentsrepository.d.ts +1009 -0
  146. package/src/comments/commentsrepository.js +1 -1
  147. package/src/comments/commentsui.d.ts +25 -0
  148. package/src/comments/commentsui.js +1 -1
  149. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -0
  150. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  151. package/src/comments/integrations/importword.d.ts +17 -0
  152. package/src/comments/integrations/importword.js +1 -1
  153. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -0
  154. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  155. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -0
  156. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  157. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -0
  158. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  159. package/src/comments/ui/commentthreadcontroller.d.ts +64 -0
  160. package/src/comments/ui/commentthreadcontroller.js +1 -1
  161. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -0
  162. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  163. package/src/comments/ui/view/basecommentview.d.ts +108 -0
  164. package/src/comments/ui/view/basecommentview.js +1 -1
  165. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -0
  166. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  167. package/src/comments/ui/view/commentcontentview.d.ts +10 -0
  168. package/src/comments/ui/view/commentcontentview.js +1 -1
  169. package/src/comments/ui/view/commentinputview.d.ts +76 -0
  170. package/src/comments/ui/view/commentinputview.js +1 -1
  171. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -0
  172. package/src/comments/ui/view/commentsarchiveview.js +23 -0
  173. package/src/comments/ui/view/commentslistview.d.ts +96 -0
  174. package/src/comments/ui/view/commentslistview.js +1 -1
  175. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -0
  176. package/src/comments/ui/view/commentthreadheaderview.js +23 -0
  177. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -0
  178. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  179. package/src/comments/ui/view/commentthreadview.d.ts +108 -0
  180. package/src/comments/ui/view/commentthreadview.js +1 -1
  181. package/src/comments/ui/view/commentview.d.ts +231 -0
  182. package/src/comments/ui/view/commentview.js +1 -1
  183. package/src/comments.d.ts +22 -0
  184. package/src/comments.js +1 -1
  185. package/src/commentsonly.d.ts +28 -0
  186. package/src/commentsonly.js +1 -1
  187. package/src/config.d.ts +172 -0
  188. package/src/config.js +23 -0
  189. package/src/index.d.ts +19 -0
  190. package/src/index.js +1 -1
  191. package/src/utils/common-translations.d.ts +5 -0
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/createmutationobserver.d.ts +13 -0
  194. package/src/utils/createmutationobserver.js +1 -1
  195. package/theme/annotation.css +1 -0
  196. package/theme/comment.css +31 -0
  197. package/theme/commentsarchive.css +40 -0
  198. package/theme/commentthread.css +68 -1
  199. package/theme/icons/add-comment.svg +1 -1
  200. package/theme/icons/comments-archive.svg +11 -0
  201. package/theme/icons/undo.svg +1 -0
  202. package/theme/sidebar.css +4 -0
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentinputview
3
+ */
4
+ import { View, ButtonView } from 'ckeditor5/src/ui';
5
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
6
+ import { type EditorConfig, type DataApi } from 'ckeditor5/src/core';
7
+ import CommentEditor from '../commenteditor/commenteditor';
8
+ /**
9
+ * A view for the comment input section that includes a comment editor.
10
+ */
11
+ export default class CommentInputView extends View {
12
+ /**
13
+ * Comment editor.
14
+ */
15
+ editor: CommentEditor & DataApi | null;
16
+ /**
17
+ * The input value (comment editor content).
18
+ *
19
+ * @observable
20
+ */
21
+ value: string;
22
+ /**
23
+ * When set to `true` it is not possible to submit the commit.
24
+ *
25
+ * @observable
26
+ */
27
+ disabledSubmit: boolean;
28
+ /**
29
+ * Specifies whether the buttons should be visible (`true`) or hidden (`false`).
30
+ *
31
+ * @observable
32
+ */
33
+ showButtons: boolean;
34
+ /**
35
+ * The comment editor placeholder.
36
+ *
37
+ * @observable
38
+ */
39
+ placeholder: string;
40
+ element: HTMLElement;
41
+ /**
42
+ * Keystroke handler for the view.
43
+ */
44
+ keystrokes: KeystrokeHandler;
45
+ /**
46
+ * Focus tracker for the view.
47
+ */
48
+ focusTracker: FocusTracker;
49
+ /**
50
+ * Button view for the button which submits the comment.
51
+ */
52
+ submitButtonView: ButtonView;
53
+ /**
54
+ * Button view for the button which cancels comment input.
55
+ */
56
+ cancelButtonView: ButtonView;
57
+ constructor(locale: Locale, editorConfig?: EditorConfig);
58
+ /**
59
+ * @inheritDoc
60
+ */
61
+ render(): void;
62
+ /**
63
+ * Creates the comment editor instance.
64
+ *
65
+ * @returns Promise resolved after the editor instance is initialized.
66
+ */
67
+ createEditor(): Promise<CommentEditor | undefined>;
68
+ /**
69
+ * Focuses the view.
70
+ */
71
+ focus(): void;
72
+ /**
73
+ * @inheritDoc
74
+ */
75
+ destroy(): Promise<void>;
76
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x24c2=['Esc','insertBefore','focusTracker','cancel','set','getData','model','_initializeFocusCycling','execute','length','_createCancelButton','low','_isDestroyed','render','keystrokes','disabledSubmit','editorReady','ck-comment__input-wrapper','tab','firstChild','initialData','bindTemplate','createEditor','label','change','focus','_createSubmitButton','Reply...','ck-comment__input-actions--cancel','ck-comment__input-actions--active','stop','element','document','destroy','cancelButtonView','forEach','ck-comment__input-actions','submitButtonView','editor','_editorConfig','focusPrevious','bind','high','submit','fire','_editorCreationPromise','isEnabled','extendTemplate','setData','placeholder','then','setTemplate','showButtons','icon','value','add','div','trim'];(function(_0x419b0c,_0x24c279){const _0x12091b=function(_0x42765c){while(--_0x42765c){_0x419b0c['push'](_0x419b0c['shift']());}};_0x12091b(++_0x24c279);}(_0x24c2,0x177));const _0x1209=function(_0x419b0c,_0x24c279){_0x419b0c=_0x419b0c-0x0;let _0x12091b=_0x24c2[_0x419b0c];return _0x12091b;};import{View as _0x20a802,ViewCollection as _0x350831,FocusCycler as _0x45eb3d,ButtonView as _0x163772}from'ckeditor5/src/ui';import{FocusTracker as _0x2a806d,KeystrokeHandler as _0x5d06e5}from'ckeditor5/src/utils';import{icons as _0x1dca17}from'ckeditor5/src/core';import _0x564f95 from'../commenteditor/commenteditor';import{getTranslation as _0x4700ae}from'../../../utils/common-translations';export default class St extends _0x20a802{constructor(_0x3ad983,_0xcb4d28={}){super(_0x3ad983),this[_0x1209('0xb')]=null,this[_0x1209('0xc')]=_0xcb4d28,this[_0x1209('0x2d')]=new _0x5d06e5(),this['focusTracker']=new _0x2a806d(),this[_0x1209('0x23')](_0x1209('0x1b'),_0xcb4d28[_0x1209('0x33')]||''),this['set'](_0x1209('0x2e'),!0x1),this[_0x1209('0x23')]('showButtons',!0x0),this['set'](_0x1209('0x16'),_0x4700ae(_0x3ad983,_0x1209('0x0'))),this[_0x1209('0xa')]=this[_0x1209('0x39')](),this[_0x1209('0x7')]=this[_0x1209('0x29')](),this[_0x1209('0x18')]({'tag':_0x1209('0x1d'),'attributes':{'class':[_0x1209('0x30')]},'children':[{'tag':_0x1209('0x1d'),'attributes':{'class':[_0x1209('0x9'),this[_0x1209('0x34')]['if'](_0x1209('0x19'),_0x1209('0x2'))]},'children':[this[_0x1209('0xa')],this[_0x1209('0x7')]]}]}),this['keystrokes'][_0x1209('0x23')](_0x1209('0x1f'),(_0x1b7b8c,_0x56ed5a)=>{this[_0x1209('0x7')][_0x1209('0x11')](_0x1209('0x27')),_0x56ed5a();}),this['on'](_0x1209('0x10'),(_0x3697fb,_0x28ccac)=>{_0x28ccac[_0x1209('0x28')]>0xfde8?(alert(_0x4700ae(_0x3ad983,'TOO_LONG_COMMENT_ALERT',[_0x28ccac['length'],0xfde8])),_0x3697fb[_0x1209('0x3')]()):this[_0x1209('0xb')][_0x1209('0x15')]('');},{'priority':_0x1209('0xf')});}[_0x1209('0x2c')](){super[_0x1209('0x2c')](),this[_0x1209('0x2d')]['listenTo'](this['element']),this[_0x1209('0x21')][_0x1209('0x1c')](this[_0x1209('0x4')]);}[_0x1209('0x35')](){return this['editor']||(this[_0x1209('0xb')]=new _0x564f95(this['_editorConfig']),this[_0x1209('0x12')]=this[_0x1209('0xb')]['create']()[_0x1209('0x17')](()=>{this[_0x1209('0x2b')]||(this['element'][_0x1209('0x20')](this[_0x1209('0xb')]['ui']['element'],this[_0x1209('0x4')][_0x1209('0x32')]),this[_0x1209('0xb')][_0x1209('0x25')][_0x1209('0x5')]['on'](_0x1209('0x37'),()=>this[_0x1209('0x1b')]=this[_0x1209('0xb')][_0x1209('0x24')]()),this[_0x1209('0xb')][_0x1209('0xe')]('placeholder')['to'](this),this[_0x1209('0x26')](this['editor']),this[_0x1209('0x11')](_0x1209('0x2f')));})),this[_0x1209('0x12')];}['focus'](){this[_0x1209('0xb')]&&this['editor'][_0x1209('0x38')]();}async['destroy'](){this[_0x1209('0x2b')]||(this['_isDestroyed']=!0x0,this[_0x1209('0xb')]&&(await this[_0x1209('0x12')],await this[_0x1209('0xb')][_0x1209('0x6')]()),await super['destroy']());}[_0x1209('0x39')](){const {locale:_0xf03bdc}=this,_0x2d4c80=new _0x163772(_0xf03bdc);return _0x2d4c80[_0x1209('0x14')]({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2d4c80['label']=_0x4700ae(_0xf03bdc,'Submit'),_0x2d4c80[_0x1209('0x1a')]=_0x1dca17['check'],_0x2d4c80['on']('execute',()=>{this['fire']('submit',this[_0x1209('0x1b')]);}),_0x2d4c80['bind'](_0x1209('0x13'))['to'](this,_0x1209('0x1b'),this,_0x1209('0x2e'),(_0x4fd535,_0x4253de)=>!_0x4253de&&!!_0x4fd535[_0x1209('0x1e')]()),_0x2d4c80;}['_createCancelButton'](){const {locale:_0x1fa418}=this,_0x57bbea=new _0x163772(_0x1fa418);return _0x57bbea[_0x1209('0x14')]({'attributes':{'class':[_0x1209('0x1')]}}),_0x57bbea[_0x1209('0x36')]=_0x4700ae(_0x1fa418,'Cancel'),_0x57bbea[_0x1209('0x1a')]=_0x1dca17[_0x1209('0x22')],_0x57bbea['on'](_0x1209('0x27'),()=>{this[_0x1209('0xb')]['setData'](''),this[_0x1209('0x11')](_0x1209('0x22'));}),_0x57bbea;}['_initializeFocusCycling'](_0x67e616){const _0x4b80cb=this['focusTracker'],_0x5f0587=new _0x350831();[_0x67e616['ui']['view'],this[_0x1209('0xa')],this[_0x1209('0x7')]][_0x1209('0x8')](_0x46cfdd=>{_0x5f0587[_0x1209('0x1c')](_0x46cfdd),_0x4b80cb['add'](_0x46cfdd[_0x1209('0x4')]);});const _0x3908b1=new _0x45eb3d({'focusables':_0x5f0587,'focusTracker':_0x4b80cb});this[_0x1209('0x2d')][_0x1209('0x23')](_0x1209('0x31'),(_0x37408d,_0x35838f)=>{_0x3908b1['focusNext'](),_0x35838f();},{'priority':_0x1209('0x2a')}),this[_0x1209('0x2d')][_0x1209('0x23')]('shift\x20+\x20tab',(_0x110756,_0x497877)=>{_0x3908b1[_0x1209('0xd')](),_0x497877();},{'priority':_0x1209('0x2a')});}}
23
+ const _0x1fff=['element','extendTemplate','editorReady','_editorConfig','ck-comment__input-actions','setTemplate','model','destroy','view','disabledSubmit','trim','submitButtonView','ck-comment__input-actions--submit','document','Reply...','value','submit','focusNext','change','initialData','Esc','div','render','keystrokes','setData','focusTracker','cancelButtonView','focusPrevious','check','length','set','fire','placeholder','_initializeFocusCycling','getData','execute','_createSubmitButton','low','TOO_LONG_COMMENT_ALERT','icon','showButtons','editor','forEach','ck-comment__input-actions--cancel','bindTemplate','_isDestroyed','tab','create','Submit','ck-comment__input-wrapper','high','bind','cancel','label','add','firstChild','Cancel','ck-comment__input-actions--active','_editorCreationPromise'];(function(_0x18129d,_0x1fffeb){const _0xeebf72=function(_0x52c066){while(--_0x52c066){_0x18129d['push'](_0x18129d['shift']());}};_0xeebf72(++_0x1fffeb);}(_0x1fff,0xc9));const _0xeebf=function(_0x18129d,_0x1fffeb){_0x18129d=_0x18129d-0x0;let _0xeebf72=_0x1fff[_0x18129d];return _0xeebf72;};import{View as _0x539c71,ViewCollection as _0x2d457b,FocusCycler as _0x275f4b,ButtonView as _0x1fbbf8}from'ckeditor5/src/ui';import{FocusTracker as _0x245544,KeystrokeHandler as _0x2a7f1a}from'ckeditor5/src/utils';import{icons as _0x173133}from'ckeditor5/src/core';import _0x1d435d from'../commenteditor/commenteditor';import{getTranslation as _0x36a6a1}from'../../../utils/common-translations';export default class Wt extends _0x539c71{constructor(_0x26bd63,_0x30d499={}){super(_0x26bd63),this[_0xeebf('0x11')]=null,this['_editorConfig']=_0x30d499,this[_0xeebf('0x3a')]=new _0x2a7f1a(),this[_0xeebf('0x1')]=new _0x245544(),this[_0xeebf('0x6')](_0xeebf('0x32'),_0x30d499[_0xeebf('0x36')]||''),this['set'](_0xeebf('0x2c'),!0x1),this['set'](_0xeebf('0x10'),!0x0),this[_0xeebf('0x6')](_0xeebf('0x8'),_0x36a6a1(_0x26bd63,_0xeebf('0x31'))),this[_0xeebf('0x2e')]=this[_0xeebf('0xc')](),this[_0xeebf('0x2')]=this['_createCancelButton'](),this[_0xeebf('0x28')]({'tag':_0xeebf('0x38'),'attributes':{'class':[_0xeebf('0x19')]},'children':[{'tag':_0xeebf('0x38'),'attributes':{'class':[_0xeebf('0x27'),this[_0xeebf('0x14')]['if']('showButtons',_0xeebf('0x21'))]},'children':[this[_0xeebf('0x2e')],this[_0xeebf('0x2')]]}]}),this[_0xeebf('0x3a')][_0xeebf('0x6')](_0xeebf('0x37'),(_0x33981f,_0x1153e6)=>{this[_0xeebf('0x2')][_0xeebf('0x7')](_0xeebf('0xb')),_0x1153e6();}),this['on'](_0xeebf('0x33'),(_0x5b91ea,_0x10e63c)=>{_0x10e63c[_0xeebf('0x5')]>0xfde8?(alert(_0x36a6a1(_0x26bd63,_0xeebf('0xe'),[_0x10e63c['length'],0xfde8])),_0x5b91ea['stop']()):this[_0xeebf('0x11')]['setData']('');},{'priority':_0xeebf('0x1a')});}[_0xeebf('0x39')](){super['render'](),this['keystrokes']['listenTo'](this[_0xeebf('0x23')]),this[_0xeebf('0x1')][_0xeebf('0x1e')](this['element']);}['createEditor'](){return this[_0xeebf('0x11')]||(this['editor']=new _0x1d435d(this[_0xeebf('0x26')]),this[_0xeebf('0x22')]=this[_0xeebf('0x11')][_0xeebf('0x17')]()['then'](()=>{if(this['_isDestroyed'])return;const _0x2cbf13=this[_0xeebf('0x11')];this[_0xeebf('0x23')]['insertBefore'](_0x2cbf13['ui'][_0xeebf('0x23')],this[_0xeebf('0x23')][_0xeebf('0x1f')]),_0x2cbf13[_0xeebf('0x29')][_0xeebf('0x30')]['on'](_0xeebf('0x35'),()=>this[_0xeebf('0x32')]=_0x2cbf13[_0xeebf('0xa')]()),_0x2cbf13[_0xeebf('0x1b')](_0xeebf('0x8'))['to'](this),this[_0xeebf('0x9')](this[_0xeebf('0x11')]),this[_0xeebf('0x7')](_0xeebf('0x25'));})),this[_0xeebf('0x22')];}['focus'](){this[_0xeebf('0x11')]&&this['editor']['focus']();}async[_0xeebf('0x2a')](){this[_0xeebf('0x15')]||(this['_isDestroyed']=!0x0,this['editor']&&(await this[_0xeebf('0x22')],await this[_0xeebf('0x11')][_0xeebf('0x2a')]()),await super[_0xeebf('0x2a')]());}[_0xeebf('0xc')](){const {locale:_0x527d90}=this,_0x183f6b=new _0x1fbbf8(_0x527d90);return _0x183f6b[_0xeebf('0x24')]({'attributes':{'class':[_0xeebf('0x2f')]}}),_0x183f6b[_0xeebf('0x1d')]=_0x36a6a1(_0x527d90,_0xeebf('0x18')),_0x183f6b[_0xeebf('0xf')]=_0x173133[_0xeebf('0x4')],_0x183f6b['on'](_0xeebf('0xb'),()=>{this[_0xeebf('0x7')](_0xeebf('0x33'),this['value']);}),_0x183f6b[_0xeebf('0x1b')]('isEnabled')['to'](this,_0xeebf('0x32'),this,_0xeebf('0x2c'),(_0x724ad3,_0x27a9e5)=>!_0x27a9e5&&!!_0x724ad3[_0xeebf('0x2d')]()),_0x183f6b;}['_createCancelButton'](){const {locale:_0x541fef}=this,_0x381d56=new _0x1fbbf8(_0x541fef);return _0x381d56[_0xeebf('0x24')]({'attributes':{'class':[_0xeebf('0x13')]}}),_0x381d56['label']=_0x36a6a1(_0x541fef,_0xeebf('0x20')),_0x381d56[_0xeebf('0xf')]=_0x173133[_0xeebf('0x1c')],_0x381d56['on'](_0xeebf('0xb'),()=>{this['editor'][_0xeebf('0x0')](''),this[_0xeebf('0x7')]('cancel');}),_0x381d56;}[_0xeebf('0x9')](_0x3dd99e){const _0x3684ab=this[_0xeebf('0x1')],_0x55deb5=new _0x2d457b();[_0x3dd99e['ui'][_0xeebf('0x2b')],this[_0xeebf('0x2e')],this[_0xeebf('0x2')]][_0xeebf('0x12')](_0x43ba0e=>{_0x55deb5[_0xeebf('0x1e')](_0x43ba0e),_0x3684ab[_0xeebf('0x1e')](_0x43ba0e[_0xeebf('0x23')]);});const _0xd9ccff=new _0x275f4b({'focusables':_0x55deb5,'focusTracker':_0x3684ab});this[_0xeebf('0x3a')][_0xeebf('0x6')](_0xeebf('0x16'),(_0x1ca423,_0x4be506)=>{_0xd9ccff[_0xeebf('0x34')](),_0x4be506();},{'priority':_0xeebf('0xd')}),this[_0xeebf('0x3a')][_0xeebf('0x6')]('shift\x20+\x20tab',(_0x44ac9d,_0x115372)=>{_0xd9ccff[_0xeebf('0x3')](),_0x115372();},{'priority':_0xeebf('0xd')});}}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentslistview
3
+ */
4
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
5
+ import { type Locale } from 'ckeditor5/src/utils';
6
+ import type AnnotationView from '../../../annotations/view/annotationview';
7
+ /**
8
+ * A view representing the content of comments archive.
9
+ */
10
+ export default class CommentsArchiveView extends View {
11
+ /**
12
+ * The flag indicating whether there are items to display in the comments archive.
13
+ *
14
+ * @observable
15
+ */
16
+ isEmpty: boolean;
17
+ /**
18
+ * @param locale The localization service instance.
19
+ * @param annotationViews Resolved comment thread annotation views to render inside the comments archive.
20
+ */
21
+ constructor(locale: Locale, annotationViews: ViewCollection<AnnotationView>);
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ render(): void;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ destroy(): void;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ focus(): void;
34
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x1ece=['ck-comments-archive','element','focus','setTemplate','bindTemplate','ck-comments-archive__info','shift\x20+\x20tab','stopPropagation','isActive','length','arrowup','_focusCycler','selectstart','_keystrokes','set','destroy','div','high','ck-comments-archive__header\x20','arrowleft','ck-comments-archive__content','isEmpty','_focusTracker','tab','listenTo'];(function(_0x3b446a,_0x1ece34){const _0x4668ce=function(_0x149453){while(--_0x149453){_0x3b446a['push'](_0x3b446a['shift']());}};_0x4668ce(++_0x1ece34);}(_0x1ece,0x15d));const _0x4668=function(_0x3b446a,_0x1ece34){_0x3b446a=_0x3b446a-0x0;let _0x4668ce=_0x1ece[_0x3b446a];return _0x4668ce;};import{View as _0x30aad9,FocusCycler as _0x3a31ab}from'ckeditor5/src/ui';import{FocusTracker as _0x48ef28,KeystrokeHandler as _0x9aee7b}from'ckeditor5/src/utils';import{getTranslation as _0x547f45}from'../../../utils/common-translations';export default class K extends _0x30aad9{constructor(_0x4e25f1,_0x300c8c){super(_0x4e25f1),this[_0x4668('0xf')](_0x4668('0x16'),!_0x300c8c['length']),this[_0x4668('0x17')]=new _0x48ef28(),this[_0x4668('0xe')]=new _0x9aee7b(),this['_focusables']=_0x300c8c,this[_0x4668('0xc')]=new _0x3a31ab({'focusables':this['_focusables'],'focusTracker':this[_0x4668('0x17')],'keystrokeHandler':this[_0x4668('0xe')],'actions':{'focusPrevious':_0x4668('0x7'),'focusNext':_0x4668('0x18')}}),this['listenTo'](_0x300c8c,'add',()=>{this[_0x4668('0x16')]=!0x1;}),this[_0x4668('0x0')](_0x300c8c,'remove',(_0x454c6d,_0x2cae2f)=>{_0x2cae2f[_0x4668('0x9')]&&this[_0x4668('0x3')](),_0x300c8c[_0x4668('0xa')]||(this['isEmpty']=!0x0);});const _0x1999e2=this[_0x4668('0x5')];this[_0x4668('0x4')]({'tag':_0x4668('0x11'),'attributes':{'dir':'auto','class':['ck',_0x4668('0x1')],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x4668('0x13')]},'children':[{'text':_0x547f45(_0x4e25f1,'COMMENTS_ARCHIVE')}]},{'tag':_0x4668('0x11'),'attributes':{'class':[_0x4668('0x15')]},'children':[{'tag':_0x4668('0x11'),'children':_0x300c8c},{'tag':'p','attributes':{'class':[_0x4668('0x6'),_0x1999e2['if'](_0x4668('0x16'),'ck-hidden',_0x1f6377=>!_0x1f6377)]},'children':[{'text':_0x547f45(_0x4e25f1,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this[_0x4668('0xe')]['listenTo'](this[_0x4668('0x2')]);const _0x28d25e=_0xeb1594=>_0xeb1594['stopPropagation']();this[_0x4668('0xe')][_0x4668('0xf')]('arrowright',_0x28d25e),this[_0x4668('0xe')]['set'](_0x4668('0x14'),_0x28d25e),this[_0x4668('0xe')][_0x4668('0xf')](_0x4668('0xb'),_0x28d25e),this[_0x4668('0xe')][_0x4668('0xf')]('arrowdown',_0x28d25e),this[_0x4668('0x0')](this[_0x4668('0x2')],_0x4668('0xd'),(_0x1e5832,_0x1de7e8)=>{_0x1de7e8[_0x4668('0x8')]();},{'priority':_0x4668('0x12')});}[_0x4668('0x10')](){super[_0x4668('0x10')](),this['_focusTracker'][_0x4668('0x10')](),this[_0x4668('0xe')][_0x4668('0x10')]();}['focus'](){this[_0x4668('0x2')][_0x4668('0x3')]();}}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentslistview
3
+ */
4
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
5
+ import { type Locale } from 'ckeditor5/src/utils';
6
+ import type { CommentThread } from '../../commentsrepository';
7
+ import type CommentView from './commentview';
8
+ import type { CommentThreadConfig } from '../../../config';
9
+ /**
10
+ * A view representing the list of comments. It should be used as a part of the comment thread view.
11
+ */
12
+ export default class CommentsListView extends View {
13
+ locale: Locale;
14
+ /**
15
+ * Informs whether the list contains any comment view that is in the editing mode.
16
+ *
17
+ * @observable
18
+ */
19
+ hasDirtyComment: boolean;
20
+ /**
21
+ * Number of comments in the list.
22
+ *
23
+ * @observable
24
+ */
25
+ length: number;
26
+ /**
27
+ * Informs whether the comments list view is in the active state ("highlighted").
28
+ * Comment list view is in that state when it is focused or it was activated by the user in any different way.
29
+ *
30
+ * @observable
31
+ */
32
+ isActive: boolean;
33
+ /**
34
+ * View collection which holds all comment views to be displayed.
35
+ * It may also contain collapsed count view if the comments list view is collapsed and some comment views are hidden.
36
+ *
37
+ * @readonly
38
+ */
39
+ readonly visibleViews: ViewCollection;
40
+ /**
41
+ * View collection which holds all comment views created for given comment thread.
42
+ *
43
+ * @readonly
44
+ */
45
+ readonly commentViews: ViewCollection;
46
+ /**
47
+ * Comment view used to display information that comment has been resolved.
48
+ *
49
+ * @readonly
50
+ */
51
+ resolvedCommentView: CommentView | null;
52
+ /**
53
+ * @param locale The localization service instance.
54
+ * @param model The model on which the view will base.
55
+ * @param config Additional view configuration.
56
+ */
57
+ constructor(locale: Locale, model: CommentThread, config: CommentThreadConfig);
58
+ /**
59
+ * @inheritDoc
60
+ */
61
+ render(): void;
62
+ /**
63
+ * Focuses the view.
64
+ */
65
+ focus(): void;
66
+ /**
67
+ * @inheritDoc
68
+ */
69
+ destroy(): void;
70
+ /**
71
+ * Refreshes the list of the visible views.
72
+ *
73
+ * When doing so, it performs a minimal amount of changes, so that views are not re-added, which might cause undesirable effects
74
+ * like focus loss or glitches due to CSS animations.
75
+ *
76
+ * The comments list may be collapsed or expanded:
77
+ *
78
+ * * it is expanded, if it {@link ~#isActive is active},
79
+ * * it is expanded, if {@link module:comments/comments/commentsrepository~CommentThread#weight comment thread weight}
80
+ * is lower than allowed (`config.comments.maxThreadTotalWeight`),
81
+ * * it is expanded, if it {@link ~#hasDirtyComment has any comments in edit mode},
82
+ * * it is collapsed, if neither of above is true.
83
+ *
84
+ * When comments list is in collapsed state, it displays at most `config.comments.maxCommentsWhenCollapsed` comment views:
85
+ *
86
+ * * first comment view,
87
+ * * {@link ~#_collapsedCommentsView collapsed comments counter} (if there are any hidden views),
88
+ * * appropriate number of the comments from the bottom of the thread.
89
+ *
90
+ * All the comments are also {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#collapse set to collapsed state}.
91
+ *
92
+ * When comments list in in expanded state, it displays all comment views for all comments. All the comments are also
93
+ * {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#expand set to expanded state}.
94
+ */
95
+ refreshVisibleViews(): void;
96
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xaa3a=['set','createCollection','_shouldCollapse','equal','setTemplate','length','delete','_handleNewCommentModel','listenTo','_model','add','render','refreshVisibleViews','change:isActive','isActive','maxThreadTotalWeight','some','change:isEditMode','maxCommentCharsWhenCollapsed','_collapsedCommentsView','commentViews','ck-thread__comments','CommentView','_updateHasDirtyComment','insert','_config','editorConfig','remove','delegate','from','hasDirtyComment','element','_handleRemoveCommentModel','stopListening','change:hasDirtyComment','destroy','formatDateTime','comments','visibleViews','removeComment','commentUpdated','_rearrangeCollapse','maxCommentsWhenCollapsed','isEditMode','count','weight'];(function(_0x4f86ae,_0xaa3a82){const _0x5e6264=function(_0x36a5c4){while(--_0x36a5c4){_0x4f86ae['push'](_0x4f86ae['shift']());}};_0x5e6264(++_0xaa3a82);}(_0xaa3a,0x1b2));const _0x5e62=function(_0x4f86ae,_0xaa3a82){_0x4f86ae=_0x4f86ae-0x0;let _0x5e6264=_0xaa3a[_0x4f86ae];return _0x5e6264;};import{View as _0x2d1e02}from'ckeditor5/src/ui';import{diff as _0x22e5b6,Collection as _0x375906}from'ckeditor5/src/utils';import _0x2f5189 from'./collapsedcommentsview';export default class dt extends _0x2d1e02{constructor(_0x2faff5,_0x301182,_0x47f377){super(_0x2faff5),this['set'](_0x5e62('0xa'),!0x1),this[_0x5e62('0x1a')](_0x5e62('0x1f'),_0x301182[_0x5e62('0x11')]['length']),this[_0x5e62('0x1a')]('isActive',!0x1),this[_0x5e62('0x23')]=_0x301182,this[_0x5e62('0x5')]=_0x47f377,this[_0x5e62('0x0')]=this[_0x5e62('0x1b')](),this[_0x5e62('0x12')]=this[_0x5e62('0x1b')](),this[_0x5e62('0x2d')]=new _0x2f5189(_0x2faff5),this[_0x5e62('0x2d')]['bind'](_0x5e62('0x18'))['to'](this,_0x5e62('0x1f'),_0x884420=>_0x884420-this['_config'][_0x5e62('0x16')]);for(const _0x1494f4 of _0x301182[_0x5e62('0x11')])this[_0x5e62('0x21')](_0x1494f4);this[_0x5e62('0x22')](_0x301182['comments'],'add',(_0x497aee,_0x6b15eb)=>{this[_0x5e62('0x1f')]++,this[_0x5e62('0x21')](_0x6b15eb),this[_0x5e62('0x26')]();}),this[_0x5e62('0x22')](_0x301182[_0x5e62('0x11')],_0x5e62('0x7'),(_0x299031,_0x1ca232)=>{this[_0x5e62('0x1f')]--,this[_0x5e62('0xc')](_0x1ca232),this[_0x5e62('0x26')]();}),this['listenTo'](_0x301182,_0x5e62('0x14'),()=>this[_0x5e62('0x26')]()),this['on'](_0x5e62('0x27'),()=>this['refreshVisibleViews']()),this['on'](_0x5e62('0xe'),()=>this[_0x5e62('0x26')]()),this[_0x5e62('0x1e')]({'tag':'ul','attributes':{'class':[_0x5e62('0x1')]},'children':this[_0x5e62('0x12')]});}get[_0x5e62('0x1c')](){return this[_0x5e62('0x23')][_0x5e62('0x19')]>this[_0x5e62('0x5')][_0x5e62('0x29')]&&!this[_0x5e62('0x28')]&&!this[_0x5e62('0xa')];}[_0x5e62('0x25')](){super['render'](),this[_0x5e62('0x26')]();}['focus'](){this[_0x5e62('0xb')]['focus']();}[_0x5e62('0xf')](){this[_0x5e62('0x2d')]['destroy']();for(const _0x2cf0d6 of this[_0x5e62('0x0')])_0x2cf0d6['destroy']();super[_0x5e62('0xf')]();}[_0x5e62('0x26')](){this[_0x5e62('0x1c')]?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x160c7e){const _0x29a7db=new this[(_0x5e62('0x5'))][(_0x5e62('0x2'))](this['locale'],_0x160c7e,{'maxCommentCharsWhenCollapsed':this['_config'][_0x5e62('0x2c')],'formatDateTime':this[_0x5e62('0x5')][_0x5e62('0x10')],'editorConfig':this[_0x5e62('0x5')][_0x5e62('0x6')]});_0x29a7db['viewUid']=_0x160c7e['id'],_0x29a7db[_0x5e62('0x8')](_0x5e62('0x13'))['to'](this),_0x29a7db[_0x5e62('0x8')]('updateComment')['to'](this),this[_0x5e62('0x22')](_0x29a7db,_0x5e62('0x2b'),()=>this[_0x5e62('0x3')]()),this[_0x5e62('0x0')][_0x5e62('0x24')](_0x29a7db);}[_0x5e62('0xc')](_0x4557d2){const _0x38fa1f=this[_0x5e62('0x0')][_0x5e62('0x7')](_0x4557d2['id']);this[_0x5e62('0xd')](_0x38fa1f),_0x38fa1f['isEditMode']&&this[_0x5e62('0x3')](),_0x38fa1f[_0x5e62('0xf')]();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array[_0x5e62('0x9')](this[_0x5e62('0x0')])[_0x5e62('0x2a')](_0x3e6df1=>_0x3e6df1[_0x5e62('0x17')]);}[_0x5e62('0x15')](){const _0x4d2846=function(_0x298d25){const _0x427fdb=new _0x375906();for(const _0x4d7408 of _0x298d25)_0x427fdb[_0x5e62('0x24')](_0x4d7408);return _0x427fdb;}(this[_0x5e62('0x0')]),_0x418aa7=this['_collapsedCommentsView'][_0x5e62('0x18')];for(let _0x34faa2=0x1;_0x34faa2<=_0x418aa7;_0x34faa2++)_0x4d2846[_0x5e62('0x7')](0x1);for(const _0x46aad0 of _0x4d2846)_0x46aad0['collapse']();_0x418aa7>0x0&&_0x4d2846['add'](this['_collapsedCommentsView'],0x1),Wt(_0x22e5b6(Array['from'](this[_0x5e62('0x12')]),Array[_0x5e62('0x9')](_0x4d2846)),this['visibleViews'],_0x4d2846);}['_rearrangeExpand'](){Wt(_0x22e5b6(Array['from'](this[_0x5e62('0x12')]),Array[_0x5e62('0x9')](this['commentViews'])),this[_0x5e62('0x12')],this[_0x5e62('0x0')]);for(const _0x4495e3 of this[_0x5e62('0x12')])_0x4495e3['expand']();}}function Wt(_0x4287ef,_0x496983,_0x3323a5){let _0x4937ce=0x0;for(const _0x3c892a of _0x4287ef)switch(_0x3c892a){case _0x5e62('0x4'):_0x496983[_0x5e62('0x24')](_0x3323a5['get'](_0x4937ce),_0x4937ce),_0x4937ce++;break;case _0x5e62('0x20'):_0x496983[_0x5e62('0x7')](_0x4937ce);break;case _0x5e62('0x1d'):_0x4937ce++;}}
23
+ const _0x1161=['authoredAt','formatDateTime','_config','isEditMode','isResolved','from','CommentView','add','change:isResolved','_collapsedCommentsView','change:hasDirtyComment','resolveCommentThread','set','_updateHasDirtyComment','maxCommentCharsWhenCollapsed','visibleViews','resolved','length','element','removeComment','remove','locale','collapse','count','delete','render','resolvedAt','_findOptimalIndex','_rearrangeExpand','resolvedBy','focus','stopListening','change:isActive','equal','maxCommentsWhenCollapsed','expand','refreshVisibleViews','_calculatePosition','commentViews','updateComment','destroy','isActive','_model','Marked\x20as\x20resolved','editorConfig','_handleRemoveCommentModel','hasDirtyComment','_rearrangeCollapse','setTemplate','comments','_handleNewCommentModel','commentUpdated','delegate','listenTo','viewUid','ck-thread__comments','resolvedCommentView','_handleInfoComment','get'];(function(_0x23c387,_0x11617e){const _0x3dedb1=function(_0x108296){while(--_0x108296){_0x23c387['push'](_0x23c387['shift']());}};_0x3dedb1(++_0x11617e);}(_0x1161,0xfa));const _0x3ded=function(_0x23c387,_0x11617e){_0x23c387=_0x23c387-0x0;let _0x3dedb1=_0x1161[_0x23c387];return _0x3dedb1;};import{View as _0x57c969}from'ckeditor5/src/ui';import{diff as _0x1699c3,Collection as _0x317462}from'ckeditor5/src/utils';import{getTranslation as _0x1e0c53}from'../../../utils/common-translations';import _0x20ff99 from'./collapsedcommentsview';export default class vt extends _0x57c969{constructor(_0x4df269,_0x25ddda,_0x257ad7){super(_0x4df269),this[_0x3ded('0x39')](_0x3ded('0x20'),!0x1),this[_0x3ded('0x39')]('length',_0x25ddda[_0x3ded('0x23')]['length']),this[_0x3ded('0x39')]('isActive',!0x1),this['_model']=_0x25ddda,this[_0x3ded('0x2f')]=_0x257ad7,this['commentViews']=this['createCollection'](),this[_0x3ded('0x1')]=this['createCollection'](),this['resolvedCommentView']=null,this[_0x3ded('0x36')]=new _0x20ff99(_0x4df269),this['_collapsedCommentsView']['bind'](_0x3ded('0x9'))['to'](this,_0x3ded('0x3'),_0x546cc8=>_0x546cc8-this[_0x3ded('0x2f')][_0x3ded('0x14')]);for(const _0xe5d768 of _0x25ddda[_0x3ded('0x23')])this['_handleNewCommentModel'](_0xe5d768);this['_handleInfoComment'](),this['listenTo'](_0x25ddda['comments'],_0x3ded('0x34'),(_0x80aa7a,_0x213083)=>{const _0x367f1f=this[_0x3ded('0x17')](_0x213083);this[_0x3ded('0x3')]++,this[_0x3ded('0x24')](_0x213083,_0x367f1f),this[_0x3ded('0x16')]();}),this[_0x3ded('0x27')](_0x25ddda[_0x3ded('0x23')],'remove',(_0x3f1736,_0x454d21)=>{this[_0x3ded('0x3')]--,this[_0x3ded('0x1f')](_0x454d21),this['refreshVisibleViews']();}),this['listenTo'](_0x25ddda,_0x3ded('0x25'),()=>this[_0x3ded('0x16')]()),this[_0x3ded('0x27')](_0x25ddda,_0x3ded('0x35'),()=>this['_handleInfoComment']()),this['on'](_0x3ded('0x12'),()=>this[_0x3ded('0x16')]()),this['on'](_0x3ded('0x37'),()=>this[_0x3ded('0x16')]()),this[_0x3ded('0x22')]({'tag':'ul','attributes':{'class':[_0x3ded('0x29')]},'children':this['visibleViews']});}get['_shouldCollapse'](){return this[_0x3ded('0x1c')]['weight']>this[_0x3ded('0x2f')]['maxThreadTotalWeight']&&!this[_0x3ded('0x1b')]&&!this['hasDirtyComment'];}['render'](){super[_0x3ded('0xb')](),this[_0x3ded('0x16')]();}[_0x3ded('0x10')](){this[_0x3ded('0x4')]['focus']();}[_0x3ded('0x1a')](){this[_0x3ded('0x36')][_0x3ded('0x1a')]();for(const _0x1976fc of this['commentViews'])_0x1976fc[_0x3ded('0x1a')]();super[_0x3ded('0x1a')]();}[_0x3ded('0x16')](){this['_shouldCollapse']?this['_rearrangeCollapse']():this[_0x3ded('0xe')]();}[_0x3ded('0x24')](_0x5870cd,_0x3fdd9a){const _0x4f89b6=new this['_config'][(_0x3ded('0x33'))](this['locale'],_0x5870cd,{'maxCommentCharsWhenCollapsed':this[_0x3ded('0x2f')][_0x3ded('0x0')],'formatDateTime':this['_config'][_0x3ded('0x2e')],'editorConfig':this[_0x3ded('0x2f')]['editorConfig']});_0x4f89b6[_0x3ded('0x28')]=_0x5870cd['id'],_0x4f89b6[_0x3ded('0x26')](_0x3ded('0x5'))['to'](this),_0x4f89b6[_0x3ded('0x26')](_0x3ded('0x19'))['to'](this),_0x4f89b6[_0x3ded('0x26')](_0x3ded('0x38'))['to'](this),this['listenTo'](_0x4f89b6,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this[_0x3ded('0x18')][_0x3ded('0x34')](_0x4f89b6,_0x3fdd9a);}[_0x3ded('0x17')](_0x1a4f4a){const _0x287bcb=this['_model'][_0x3ded('0xd')](_0x1a4f4a);return this[_0x3ded('0x2a')]?this['resolvedCommentView'][_0x3ded('0x2d')]>_0x1a4f4a[_0x3ded('0x2d')]?_0x287bcb-0x1:_0x287bcb:_0x287bcb-0x1;}[_0x3ded('0x2b')](){if(this[_0x3ded('0x1c')][_0x3ded('0x31')]){const _0x499725={'id':_0x3ded('0x2'),'author':this[_0x3ded('0x1c')][_0x3ded('0xf')],'authoredAt':this['_model'][_0x3ded('0xc')],'content':_0x1e0c53(this['locale'],_0x3ded('0x1d')),'attributes':{}};this[_0x3ded('0x2a')]=new this['_config'][(_0x3ded('0x33'))](this[_0x3ded('0x7')],_0x499725,{'maxCommentCharsWhenCollapsed':this[_0x3ded('0x2f')]['maxCommentCharsWhenCollapsed'],'formatDateTime':this[_0x3ded('0x2f')]['formatDateTime'],'editorConfig':this[_0x3ded('0x2f')][_0x3ded('0x1e')],'isSystemComment':!0x0}),this[_0x3ded('0x18')][_0x3ded('0x34')](this[_0x3ded('0x2a')],this[_0x3ded('0x1c')][_0x3ded('0xd')](_0x499725));}else this[_0x3ded('0x2a')]&&(this[_0x3ded('0x18')][_0x3ded('0x6')](this[_0x3ded('0x2a')]),this[_0x3ded('0x2a')]['destroy'](),this[_0x3ded('0x2a')]=null);this['refreshVisibleViews']();}[_0x3ded('0x1f')](_0x5187f2){const _0x52e7cb=this[_0x3ded('0x18')][_0x3ded('0x6')](_0x5187f2['id']);this[_0x3ded('0x11')](_0x52e7cb),_0x52e7cb[_0x3ded('0x30')]&&this[_0x3ded('0x3a')](),_0x52e7cb['destroy']();}[_0x3ded('0x3a')](){this[_0x3ded('0x20')]=Array['from'](this[_0x3ded('0x18')])['some'](_0x262344=>_0x262344[_0x3ded('0x30')]);}[_0x3ded('0x21')](){const _0x1b2307=function(_0x5f23e0){const _0x330483=new _0x317462();for(const _0x21122d of _0x5f23e0)_0x330483[_0x3ded('0x34')](_0x21122d);return _0x330483;}(this['commentViews']),_0x15194f=this[_0x3ded('0x36')]['count'];for(let _0x147a52=0x1;_0x147a52<=_0x15194f;_0x147a52++)_0x1b2307[_0x3ded('0x6')](0x1);for(const _0x3a0b2d of _0x1b2307)_0x3a0b2d[_0x3ded('0x8')]();_0x15194f>0x0&&_0x1b2307[_0x3ded('0x34')](this['_collapsedCommentsView'],0x1),ss(_0x1699c3(Array[_0x3ded('0x32')](this['visibleViews']),Array[_0x3ded('0x32')](_0x1b2307)),this[_0x3ded('0x1')],_0x1b2307);}[_0x3ded('0xe')](){ss(_0x1699c3(Array['from'](this[_0x3ded('0x1')]),Array['from'](this[_0x3ded('0x18')])),this[_0x3ded('0x1')],this['commentViews']);for(const _0x2b2b83 of this[_0x3ded('0x1')])_0x2b2b83[_0x3ded('0x15')]();}}function ss(_0x228db1,_0x4e1d39,_0x34dcb7){let _0x1ba1a8=0x0;for(const _0x4c4cfe of _0x228db1)switch(_0x4c4cfe){case'insert':_0x4e1d39[_0x3ded('0x34')](_0x34dcb7[_0x3ded('0x2c')](_0x1ba1a8),_0x1ba1a8),_0x1ba1a8++;break;case _0x3ded('0xa'):_0x4e1d39['remove'](_0x1ba1a8);break;case _0x3ded('0x13'):_0x1ba1a8++;}}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadheaderview
3
+ */
4
+ import { View, ButtonView } from 'ckeditor5/src/ui';
5
+ import type { Locale } from 'ckeditor5/src/utils';
6
+ import type { CommentThread } from '../../commentsrepository';
7
+ export declare const MAX_CONTENT_LENGTH = 150;
8
+ /**
9
+ * A view for the comment thread header.
10
+ */
11
+ export default class CommentThreadHeaderView extends View {
12
+ locale: Locale;
13
+ /**
14
+ * Defines whether the context value exists.
15
+ *
16
+ * @observable
17
+ */
18
+ hasContext: boolean;
19
+ /**
20
+ * Context value to display in the header.
21
+ *
22
+ * @observable
23
+ */
24
+ contextValue: string;
25
+ /**
26
+ * Button view for the button which reopen the comment thread.
27
+ */
28
+ reopenButtonView: ButtonView;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ constructor(locale: Locale, model: CommentThread);
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ render(): void;
37
+ }
38
+ /**
39
+ * Fired when a user performed an action that should lead to reopen the resolved comment thread.
40
+ *
41
+ * @eventName ~CommentThreadHeaderView#reopenCommentThread
42
+ */
43
+ export type UIReopenCommentThreadEvent = {
44
+ name: 'reopenCommentThread';
45
+ args: [id: string];
46
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x2b35=['length','value','render','tooltip','overlay','locale','remove','.ck-context','reopenCommentThread','isVisible','querySelector','setTemplate','bindTemplate','mouseleave','label','add','ck-context','contextValue','_createReopenButton','_trimContextValue','lastIndexOf','mouseenter','isResolvable','.ck-context__value','substring','listenTo','_model','context','ck-context-wrapper','hasContext','reopenButtonView','ck-thread__header','offsetWidth','ck-context--quotes','ck-annotation__actions','div','_attachContextActions','Reopen','classList','bind'];(function(_0x34bf3a,_0x2b3574){const _0x10bf0f=function(_0x4b85cb){while(--_0x4b85cb){_0x34bf3a['push'](_0x34bf3a['shift']());}};_0x10bf0f(++_0x2b3574);}(_0x2b35,0x141));const _0x10bf=function(_0x34bf3a,_0x2b3574){_0x34bf3a=_0x34bf3a-0x0;let _0x10bf0f=_0x2b35[_0x34bf3a];return _0x10bf0f;};import{View as _0x2e645a,ButtonView as _0x5842ad}from'ckeditor5/src/ui';import{getTranslation as _0x34c580}from'../../../utils/common-translations';import _0x10288a from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x2e645a{constructor(_0x4a4cf4,_0x386186){super(_0x4a4cf4);const _0xac9a5a=this[_0x10bf('0xb')];this[_0x10bf('0x19')]=_0x386186,this[_0x10bf('0x1d')]=this[_0x10bf('0x11')](),this['bind']('hasContext')['to'](this[_0x10bf('0x19')],_0x10bf('0x1a'),_0x21f381=>!!_0x21f381),this[_0x10bf('0x26')](_0x10bf('0x10'))['to'](this['_model'],_0x10bf('0x1a'),_0x3b0e16=>_0x3b0e16&&_0x3b0e16[_0x10bf('0x0')]?this['_trimContextValue'](_0x3b0e16[_0x10bf('0x0')]):_0x34c580(this[_0x10bf('0x4')],'Comment\x20was\x20made\x20on\x20an\x20element')),this[_0x10bf('0xa')]({'tag':_0x10bf('0x22'),'attributes':{'class':[_0x10bf('0x1e')]},'children':[{'tag':_0x10bf('0x22'),'attributes':{'class':[_0x10bf('0x1b')]},'children':[{'tag':'div','attributes':{'class':[_0x10bf('0xf'),_0xac9a5a['if'](_0x10bf('0x1c'),_0x10bf('0x20'))]},'children':[{'tag':'span','attributes':{'class':['ck-context__value']},'children':[{'text':_0xac9a5a['to']('contextValue')}]}]}]},{'tag':_0x10bf('0x22'),'attributes':{'class':[_0x10bf('0x21')]},'children':[this['reopenButtonView']]}]});}[_0x10bf('0x1')](){super['render'](),this[_0x10bf('0x23')]();}['_createReopenButton'](){const _0x555f3e=new _0x5842ad(this[_0x10bf('0x4')]);return _0x555f3e[_0x10bf('0xd')]=_0x34c580(this[_0x10bf('0x4')],'Reopen'),_0x555f3e[_0x10bf('0x2')]=_0x34c580(this['locale'],_0x10bf('0x24')),_0x555f3e['icon']=_0x10288a,_0x555f3e[_0x10bf('0x26')](_0x10bf('0x8'))['to'](this[_0x10bf('0x19')],_0x10bf('0x15')),_0x555f3e['on']('execute',()=>{this['fire'](_0x10bf('0x7'),this[_0x10bf('0x19')]['id']);}),_0x555f3e;}[_0x10bf('0x12')](_0x3dd266){if(_0x3dd266[_0x10bf('0x27')]<0x96)return _0x3dd266;const _0x556732=_0x3dd266[_0x10bf('0x13')]('\x20',0x93);return _0x3dd266[_0x10bf('0x17')](0x0,_0x556732>-0x1?_0x556732:0x93)+'...';}[_0x10bf('0x23')](){const _0xfd08e1=this['element'][_0x10bf('0x9')](_0x10bf('0x6')),_0x2bab84=_0xfd08e1['querySelector'](_0x10bf('0x16'));this[_0x10bf('0x18')](_0xfd08e1,_0x10bf('0x14'),()=>{_0x2bab84[_0x10bf('0x1f')]<_0x2bab84['scrollWidth']&&_0xfd08e1[_0x10bf('0x25')][_0x10bf('0xe')](_0x10bf('0x3'));}),this[_0x10bf('0x18')](_0xfd08e1,_0x10bf('0xc'),()=>{_0xfd08e1['classList'][_0x10bf('0x5')](_0x10bf('0x3'));});}}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadinputview
3
+ */
4
+ import { View } from 'ckeditor5/src/ui';
5
+ import CommentInputView from './commentinputview';
6
+ import type { Locale } from 'ckeditor5/src/utils';
7
+ import type { EditorConfig } from 'ckeditor5/src/core';
8
+ import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
9
+ /**
10
+ * View that represents comment input area for a comment thread. Includes editor, user view and buttons.
11
+ */
12
+ export default class CommentThreadInputView extends View {
13
+ /**
14
+ * Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
15
+ *
16
+ * @observable
17
+ */
18
+ showInput: boolean;
19
+ /**
20
+ * Comment input view.
21
+ */
22
+ commentInputView: CommentInputView;
23
+ /**
24
+ * User view for the input area. Presents the local user.
25
+ */
26
+ userView: UserView;
27
+ /**
28
+ * @param locale The localization service instance.
29
+ * @param localUser Current local user.
30
+ * @param editorConfig
31
+ */
32
+ constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ destroy(): Promise<void>;
37
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3052=['destroy','ck-thread__input','div','bind','then','value','userView','editor','ck-comment__input-container--active','set','commentInputView','createEditor','ck-thread__user','showInput'];(function(_0x38b1d3,_0x3052f1){var _0x5448cd=function(_0x11be1b){while(--_0x11be1b){_0x38b1d3['push'](_0x38b1d3['shift']());}};_0x5448cd(++_0x3052f1);}(_0x3052,0x152));var _0x5448=function(_0x38b1d3,_0x3052f1){_0x38b1d3=_0x38b1d3-0x0;var _0x5448cd=_0x3052[_0x38b1d3];return _0x5448cd;};import{View as _0x1dad78}from'ckeditor5/src/ui';import _0x25e027 from'./commentinputview';import{UserView as _0xd2f6ed}from'ckeditor5-collaboration/src/collaboration-core';export default class ut extends _0x1dad78{constructor(_0x40b0d4,_0x48884e,_0x4cc47d){super(_0x40b0d4),this[_0x5448('0x8')]=new _0x25e027(_0x40b0d4,_0x4cc47d),this[_0x5448('0x8')][_0x5448('0x1')]('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],_0x5448('0x3'),(_0x94c53d,_0x2369cd)=>_0x94c53d||!!_0x2369cd),this[_0x5448('0x7')](_0x5448('0xb'),!0x1),this['on']('change:showInput',()=>{this[_0x5448('0xb')]&&!this[_0x5448('0x8')][_0x5448('0x5')]&&this[_0x5448('0x8')][_0x5448('0x9')]();}),this[_0x5448('0x4')]=new _0xd2f6ed(_0x40b0d4,_0x48884e),this[_0x5448('0x4')]['extendTemplate']({'attributes':{'class':_0x5448('0xa')}}),this[_0x5448('0x8')]['extendTemplate']({'attributes':{'class':_0x5448('0xd')}}),this['setTemplate']({'tag':_0x5448('0x0'),'attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput',_0x5448('0x6'))]},'children':[this['userView'],this[_0x5448('0x8')]]});}[_0x5448('0xc')](){return this[_0x5448('0x8')][_0x5448('0xc')]()[_0x5448('0x2')](()=>super[_0x5448('0xc')]());}}
23
+ var _0x4105=['bindTemplate','userView','destroy','isFocused','change:showInput','then','showInput','setTemplate','ck-thread__user','commentInputView','extendTemplate','editor','ck-comment__input-container--active','focusTracker','bind'];(function(_0x3bee46,_0x410576){var _0x26eb45=function(_0x3aa8b5){while(--_0x3aa8b5){_0x3bee46['push'](_0x3bee46['shift']());}};_0x26eb45(++_0x410576);}(_0x4105,0x15f));var _0x26eb=function(_0x3bee46,_0x410576){_0x3bee46=_0x3bee46-0x0;var _0x26eb45=_0x4105[_0x3bee46];return _0x26eb45;};import{View as _0x5d2f1c}from'ckeditor5/src/ui';import _0x340cc1 from'./commentinputview';import{UserView as _0x51abf4}from'ckeditor5-collaboration/src/collaboration-core';export default class wt extends _0x5d2f1c{constructor(_0x3a082b,_0x10052b,_0x556b77){super(_0x3a082b),this[_0x26eb('0x3')]=new _0x340cc1(_0x3a082b,_0x556b77),this[_0x26eb('0x3')][_0x26eb('0x8')]('showButtons')['to'](this[_0x26eb('0x3')][_0x26eb('0x7')],_0x26eb('0xc'),this[_0x26eb('0x3')],'value',(_0x460b4f,_0x454942)=>_0x460b4f||!!_0x454942),this['set'](_0x26eb('0x0'),!0x1),this['on'](_0x26eb('0xd'),()=>{this[_0x26eb('0x0')]&&!this['commentInputView'][_0x26eb('0x5')]&&this[_0x26eb('0x3')]['createEditor']();}),this[_0x26eb('0xa')]=new _0x51abf4(_0x3a082b,_0x10052b),this[_0x26eb('0xa')][_0x26eb('0x4')]({'attributes':{'class':_0x26eb('0x2')}}),this[_0x26eb('0x3')][_0x26eb('0x4')]({'attributes':{'class':'ck-thread__input'}}),this[_0x26eb('0x1')]({'tag':'div','attributes':{'class':['ck-comment__input-container',this[_0x26eb('0x9')]['if'](_0x26eb('0x0'),_0x26eb('0x6'))]},'children':[this[_0x26eb('0xa')],this[_0x26eb('0x3')]]});}[_0x26eb('0xb')](){return this[_0x26eb('0x3')][_0x26eb('0xb')]()[_0x26eb('0xe')](()=>super[_0x26eb('0xb')]());}}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadview
3
+ * @publicApi
4
+ */
5
+ import { type Locale } from 'ckeditor5/src/utils';
6
+ import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
7
+ import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
8
+ import BaseCommentThreadView from './basecommentthreadview';
9
+ import type { CommentThread } from '../../commentsrepository';
10
+ import type { CommentThreadConfig } from '../../../config';
11
+ declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
12
+ /**
13
+ * The default view for comment thread.
14
+ */
15
+ export default class CommentThreadView extends CommentThreadView_base {
16
+ isConfirm: boolean;
17
+ cancelConfirm: () => void;
18
+ showConfirm: (key: string, element: unknown) => Promise<void>;
19
+ /**
20
+ * The locale instance.
21
+ */
22
+ readonly locale: Locale;
23
+ /**
24
+ * A property used by the template.
25
+ *
26
+ * It works as a visual indicator for the user that an action is about to be performed.
27
+ * The value of this property is used in setting the CSS class.
28
+ * The property is used when the user interacts with the view.
29
+ *
30
+ * @observable
31
+ */
32
+ actionIndicator: string | null;
33
+ /**
34
+ * View collection which holds all comment thread children elements.
35
+ *
36
+ * @readonly
37
+ */
38
+ readonly commentThreadChildren: ViewCollection;
39
+ /**
40
+ * `ConfirmView` uses this element as a container for confirmation dialog.
41
+ *
42
+ * The element is set after `view#render()` is called.
43
+ *
44
+ * @member {HTMLElement|null} #containerElement
45
+ */
46
+ containerElement: HTMLElement | null;
47
+ /**
48
+ * Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
49
+ *
50
+ * @readonly
51
+ */
52
+ readonly resolveButton: ButtonView;
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
57
+ /**
58
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
59
+ *
60
+ * Overwrite this method if you want to set a custom template for the comment thread view.
61
+ *
62
+ * The default template looks as follows:
63
+ *
64
+ * ```ts
65
+ * const bind = this.bindTemplate;
66
+ *
67
+ * {
68
+ * tag: 'div',
69
+ *
70
+ * attributes: {
71
+ * class: [
72
+ * 'ck-thread',
73
+ * bind.if( 'isActive', 'ck-thread--active' ),
74
+ * bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
75
+ * bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
76
+ * ],
77
+ * 'data-thread-id': this._model.id,
78
+ * // Needed for managing focus after adding new comment.
79
+ * tabindex: -1
80
+ * },
81
+ *
82
+ * children: [
83
+ * {
84
+ * tag: 'div',
85
+ * attributes: {
86
+ * class: 'ck-thread__container'
87
+ * },
88
+ * children: [
89
+ * this.commentsListView,
90
+ * this.commentThreadInputView
91
+ * ]
92
+ * }
93
+ * ]
94
+ * };
95
+ * ```
96
+ *
97
+ * See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
98
+ * the possible annotation customizations.
99
+ *
100
+ * @returns The definition of a comment thread view's template.
101
+ */
102
+ getTemplate(): TemplateDefinition;
103
+ /**
104
+ * @inheritDoc
105
+ */
106
+ render(): void;
107
+ }
108
+ export {};