@ckeditor/ckeditor5-comments 36.0.1 → 37.0.0-rc.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 _0x2ce1=['then','element','change','_initializeFocusCycling','editor','fire','document','keystrokes','disabledSubmit','ck-comment__input-actions','check','icon','createEditor','_editorCreationPromise','ck-comment__input-actions--submit','value','editorReady','div','Cancel','_editorConfig','trim','execute','ck-comment__input-actions--cancel','_createSubmitButton','listenTo','extendTemplate','bind','isEnabled','label','focus','cancel','Esc','render','low','focusNext','forEach','getData','view','stop','high','_isDestroyed','firstChild','submit','cancelButtonView','submitButtonView','shift\x20+\x20tab','_createCancelButton','Reply...','focusTracker','placeholder','model','setData','length','create','set','TOO_LONG_COMMENT_ALERT','add'];(function(_0x4ea645,_0x2ce153){const _0x2a290c=function(_0x2dd118){while(--_0x2dd118){_0x4ea645['push'](_0x4ea645['shift']());}};_0x2a290c(++_0x2ce153);}(_0x2ce1,0x1ae));const _0x2a29=function(_0x4ea645,_0x2ce153){_0x4ea645=_0x4ea645-0x0;let _0x2a290c=_0x2ce1[_0x4ea645];return _0x2a290c;};import{View as _0x51b2ea,ViewCollection as _0x4f7d9e,FocusCycler as _0x58b63a,ButtonView as _0x538096}from'ckeditor5/src/ui';import{FocusTracker as _0xf1f17d,KeystrokeHandler as _0x3041bb}from'ckeditor5/src/utils';import{icons as _0x2afc29}from'ckeditor5/src/core';import _0x46393d from'../commenteditor/commenteditor';import{getTranslation as _0xe247c8}from'../../../utils/common-translations';export default class Wt extends _0x51b2ea{constructor(_0x2df5ed,_0x2ec008={}){super(_0x2df5ed),this[_0x2a29('0x1e')]=null,this[_0x2a29('0x2d')]=_0x2ec008,this[_0x2a29('0x21')]=new _0x3041bb(),this[_0x2a29('0x11')]=new _0xf1f17d(),this[_0x2a29('0x17')]('value',_0x2ec008['initialData']||''),this['set'](_0x2a29('0x22'),!0x1),this[_0x2a29('0x17')]('showButtons',!0x0),this['set'](_0x2a29('0x12'),_0xe247c8(_0x2df5ed,_0x2a29('0x10'))),this[_0x2a29('0xd')]=this[_0x2a29('0x31')](),this[_0x2a29('0xc')]=this[_0x2a29('0xf')](),this['setTemplate']({'tag':_0x2a29('0x2b'),'attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':_0x2a29('0x2b'),'attributes':{'class':[_0x2a29('0x23'),this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this[_0x2a29('0xd')],this[_0x2a29('0xc')]]}]}),this[_0x2a29('0x21')][_0x2a29('0x17')](_0x2a29('0x0'),(_0x3481f9,_0x25d183)=>{this['cancelButtonView']['fire'](_0x2a29('0x2f')),_0x25d183();}),this['on'](_0x2a29('0xb'),(_0x49fb2b,_0x131b4c)=>{_0x131b4c[_0x2a29('0x15')]>0xfde8?(alert(_0xe247c8(_0x2df5ed,_0x2a29('0x18'),[_0x131b4c[_0x2a29('0x15')],0xfde8])),_0x49fb2b[_0x2a29('0x7')]()):this[_0x2a29('0x1e')][_0x2a29('0x14')]('');},{'priority':_0x2a29('0x8')});}[_0x2a29('0x1')](){super[_0x2a29('0x1')](),this[_0x2a29('0x21')][_0x2a29('0x32')](this[_0x2a29('0x1b')]),this['focusTracker']['add'](this['element']);}[_0x2a29('0x26')](){return this['editor']||(this[_0x2a29('0x1e')]=new _0x46393d(this[_0x2a29('0x2d')]),this[_0x2a29('0x27')]=this[_0x2a29('0x1e')][_0x2a29('0x16')]()[_0x2a29('0x1a')](()=>{if(this[_0x2a29('0x9')])return;const _0x48fe48=this[_0x2a29('0x1e')];this[_0x2a29('0x1b')]['insertBefore'](_0x48fe48['ui'][_0x2a29('0x1b')],this['element'][_0x2a29('0xa')]),_0x48fe48[_0x2a29('0x13')][_0x2a29('0x20')]['on'](_0x2a29('0x1c'),()=>this[_0x2a29('0x29')]=_0x48fe48[_0x2a29('0x5')]()),_0x48fe48['bind'](_0x2a29('0x12'))['to'](this),this[_0x2a29('0x1d')](this[_0x2a29('0x1e')]),this[_0x2a29('0x1f')](_0x2a29('0x2a'));})),this[_0x2a29('0x27')];}[_0x2a29('0x37')](){this[_0x2a29('0x1e')]&&this[_0x2a29('0x1e')][_0x2a29('0x37')]();}async['destroy'](){this[_0x2a29('0x9')]||(this[_0x2a29('0x9')]=!0x0,this[_0x2a29('0x1e')]&&(await this[_0x2a29('0x27')],await this[_0x2a29('0x1e')]['destroy']()),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x5207fc}=this,_0x2a9aff=new _0x538096(_0x5207fc);return _0x2a9aff[_0x2a29('0x33')]({'attributes':{'class':[_0x2a29('0x28')]}}),_0x2a9aff[_0x2a29('0x36')]=_0xe247c8(_0x5207fc,'Submit'),_0x2a9aff[_0x2a29('0x25')]=_0x2afc29[_0x2a29('0x24')],_0x2a9aff['on'](_0x2a29('0x2f'),()=>{this['fire'](_0x2a29('0xb'),this[_0x2a29('0x29')]);}),_0x2a9aff[_0x2a29('0x34')](_0x2a29('0x35'))['to'](this,'value',this,_0x2a29('0x22'),(_0x164fba,_0x4445ad)=>!_0x4445ad&&!!_0x164fba[_0x2a29('0x2e')]()),_0x2a9aff;}[_0x2a29('0xf')](){const {locale:_0x3ec8ad}=this,_0x15598e=new _0x538096(_0x3ec8ad);return _0x15598e['extendTemplate']({'attributes':{'class':[_0x2a29('0x30')]}}),_0x15598e[_0x2a29('0x36')]=_0xe247c8(_0x3ec8ad,_0x2a29('0x2c')),_0x15598e[_0x2a29('0x25')]=_0x2afc29[_0x2a29('0x38')],_0x15598e['on']('execute',()=>{this[_0x2a29('0x1e')][_0x2a29('0x14')](''),this[_0x2a29('0x1f')]('cancel');}),_0x15598e;}[_0x2a29('0x1d')](_0xd3991b){const _0x356cb1=this['focusTracker'],_0x1f0b49=new _0x4f7d9e();[_0xd3991b['ui'][_0x2a29('0x6')],this[_0x2a29('0xd')],this[_0x2a29('0xc')]][_0x2a29('0x4')](_0x295000=>{_0x1f0b49[_0x2a29('0x19')](_0x295000),_0x356cb1[_0x2a29('0x19')](_0x295000['element']);});const _0x33700a=new _0x58b63a({'focusables':_0x1f0b49,'focusTracker':_0x356cb1});this[_0x2a29('0x21')][_0x2a29('0x17')]('tab',(_0x591309,_0x18726a)=>{_0x33700a[_0x2a29('0x3')](),_0x18726a();},{'priority':'low'}),this[_0x2a29('0x21')][_0x2a29('0x17')](_0x2a29('0xe'),(_0x67d799,_0x15290f)=>{_0x33700a['focusPrevious'](),_0x15290f();},{'priority':_0x2a29('0x2')});}}
@@ -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 _0x4502=['EMPTY_COMMENTS_ARCHIVE','_focusables','stopPropagation','arrowright','_keystrokes','isActive','arrowdown','length','destroy','listenTo','div','setTemplate','ck-comments-archive','bindTemplate','add','ck-hidden','_focusCycler','arrowup','shift\x20+\x20tab','high','render','tab','ck-comments-archive__content','element','ck-comments-archive__header\x20','set','isEmpty','focus','_focusTracker'];(function(_0x43cd7e,_0x4502f5){const _0x93e579=function(_0x1d2ba4){while(--_0x1d2ba4){_0x43cd7e['push'](_0x43cd7e['shift']());}};_0x93e579(++_0x4502f5);}(_0x4502,0x181));const _0x93e5=function(_0x43cd7e,_0x4502f5){_0x43cd7e=_0x43cd7e-0x0;let _0x93e579=_0x4502[_0x43cd7e];return _0x93e579;};import{View as _0x217820,FocusCycler as _0x1d2737}from'ckeditor5/src/ui';import{FocusTracker as _0x5260c1,KeystrokeHandler as _0x5dc400}from'ckeditor5/src/utils';import{getTranslation as _0x1a8430}from'../../../utils/common-translations';export default class K extends _0x217820{constructor(_0x28705e,_0x26cc2c){super(_0x28705e),this[_0x93e5('0x11')](_0x93e5('0x12'),!_0x26cc2c[_0x93e5('0x1c')]),this[_0x93e5('0x14')]=new _0x5260c1(),this[_0x93e5('0x19')]=new _0x5dc400(),this['_focusables']=_0x26cc2c,this[_0x93e5('0x8')]=new _0x1d2737({'focusables':this[_0x93e5('0x16')],'focusTracker':this[_0x93e5('0x14')],'keystrokeHandler':this[_0x93e5('0x19')],'actions':{'focusPrevious':_0x93e5('0xa'),'focusNext':_0x93e5('0xd')}}),this[_0x93e5('0x1')](_0x26cc2c,_0x93e5('0x6'),()=>{this[_0x93e5('0x12')]=!0x1;}),this['listenTo'](_0x26cc2c,'remove',(_0x326d31,_0x2b4d8d)=>{_0x2b4d8d[_0x93e5('0x1a')]&&this[_0x93e5('0x13')](),_0x26cc2c[_0x93e5('0x1c')]||(this['isEmpty']=!0x0);});const _0x3f660d=this[_0x93e5('0x5')];this[_0x93e5('0x3')]({'tag':_0x93e5('0x2'),'attributes':{'dir':'auto','class':['ck',_0x93e5('0x4')],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x93e5('0x10')]},'children':[{'text':_0x1a8430(_0x28705e,'COMMENTS_ARCHIVE')}]},{'tag':_0x93e5('0x2'),'attributes':{'class':[_0x93e5('0xe')]},'children':[{'tag':'div','children':_0x26cc2c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3f660d['if'](_0x93e5('0x12'),_0x93e5('0x7'),_0x2d289a=>!_0x2d289a)]},'children':[{'text':_0x1a8430(_0x28705e,_0x93e5('0x15'))}]}]}]});}[_0x93e5('0xc')](){super[_0x93e5('0xc')](),this[_0x93e5('0x19')]['listenTo'](this[_0x93e5('0xf')]);const _0xec6b91=_0x20914e=>_0x20914e[_0x93e5('0x17')]();this[_0x93e5('0x19')][_0x93e5('0x11')](_0x93e5('0x18'),_0xec6b91),this[_0x93e5('0x19')][_0x93e5('0x11')]('arrowleft',_0xec6b91),this['_keystrokes'][_0x93e5('0x11')](_0x93e5('0x9'),_0xec6b91),this[_0x93e5('0x19')][_0x93e5('0x11')](_0x93e5('0x1b'),_0xec6b91),this[_0x93e5('0x1')](this[_0x93e5('0xf')],'selectstart',(_0x166ed8,_0xb5d26)=>{_0xb5d26['stopPropagation']();},{'priority':_0x93e5('0xb')});}[_0x93e5('0x0')](){super[_0x93e5('0x0')](),this[_0x93e5('0x14')][_0x93e5('0x0')](),this[_0x93e5('0x19')][_0x93e5('0x0')]();}[_0x93e5('0x13')](){this[_0x93e5('0xf')][_0x93e5('0x13')]();}}
@@ -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 _0x13d8=['_model','resolved','viewUid','_findOptimalIndex','editorConfig','authoredAt','get','maxCommentsWhenCollapsed','_rearrangeExpand','_calculatePosition','maxCommentCharsWhenCollapsed','delegate','_handleInfoComment','add','setTemplate','remove','locale','comments','from','CommentView','Marked\x20as\x20resolved','insert','_handleNewCommentModel','isEditMode','_handleRemoveCommentModel','expand','refreshVisibleViews','hasDirtyComment','_updateHasDirtyComment','_collapsedCommentsView','change:isActive','_shouldCollapse','commentViews','count','isActive','ck-thread__comments','change:hasDirtyComment','resolvedBy','equal','_config','delete','listenTo','focus','resolvedCommentView','formatDateTime','element','bind','_rearrangeCollapse','isResolved','createCollection','render','length','some','set','destroy','commentUpdated','visibleViews'];(function(_0x2b55b1,_0x13d868){const _0x442f0c=function(_0x21276d){while(--_0x21276d){_0x2b55b1['push'](_0x2b55b1['shift']());}};_0x442f0c(++_0x13d868);}(_0x13d8,0x11a));const _0x442f=function(_0x2b55b1,_0x13d868){_0x2b55b1=_0x2b55b1-0x0;let _0x442f0c=_0x13d8[_0x2b55b1];return _0x442f0c;};import{View as _0xae62a1}from'ckeditor5/src/ui';import{diff as _0x9ea7a0,Collection as _0xea51fb}from'ckeditor5/src/utils';import{getTranslation as _0x48380e}from'../../../utils/common-translations';import _0x749f19 from'./collapsedcommentsview';export default class vt extends _0xae62a1{constructor(_0x3b31dc,_0x3e4d5a,_0x2feddb){super(_0x3b31dc),this[_0x442f('0x38')](_0x442f('0x1e'),!0x1),this[_0x442f('0x38')](_0x442f('0x36'),_0x3e4d5a['comments'][_0x442f('0x36')]),this[_0x442f('0x38')](_0x442f('0x25'),!0x1),this[_0x442f('0x3')]=_0x3e4d5a,this[_0x442f('0x2a')]=_0x2feddb,this[_0x442f('0x23')]=this[_0x442f('0x34')](),this[_0x442f('0x2')]=this['createCollection'](),this[_0x442f('0x2e')]=null,this[_0x442f('0x20')]=new _0x749f19(_0x3b31dc),this[_0x442f('0x20')][_0x442f('0x31')](_0x442f('0x24'))['to'](this,_0x442f('0x36'),_0x27b025=>_0x27b025-this[_0x442f('0x2a')][_0x442f('0xa')]);for(const _0x3237a8 of _0x3e4d5a[_0x442f('0x14')])this[_0x442f('0x19')](_0x3237a8);this[_0x442f('0xf')](),this['listenTo'](_0x3e4d5a['comments'],_0x442f('0x10'),(_0x5bba39,_0x429f5b)=>{const _0x4eb94f=this[_0x442f('0xc')](_0x429f5b);this[_0x442f('0x36')]++,this[_0x442f('0x19')](_0x429f5b,_0x4eb94f),this[_0x442f('0x1d')]();}),this['listenTo'](_0x3e4d5a['comments'],_0x442f('0x12'),(_0x5b1249,_0x43d7f2)=>{this[_0x442f('0x36')]--,this[_0x442f('0x1b')](_0x43d7f2),this[_0x442f('0x1d')]();}),this['listenTo'](_0x3e4d5a,_0x442f('0x1'),()=>this[_0x442f('0x1d')]()),this['listenTo'](_0x3e4d5a,'change:isResolved',()=>this['_handleInfoComment']()),this['on'](_0x442f('0x21'),()=>this[_0x442f('0x1d')]()),this['on'](_0x442f('0x27'),()=>this['refreshVisibleViews']()),this[_0x442f('0x11')]({'tag':'ul','attributes':{'class':[_0x442f('0x26')]},'children':this[_0x442f('0x2')]});}get[_0x442f('0x22')](){return this[_0x442f('0x3')]['weight']>this[_0x442f('0x2a')]['maxThreadTotalWeight']&&!this[_0x442f('0x25')]&&!this['hasDirtyComment'];}[_0x442f('0x35')](){super[_0x442f('0x35')](),this[_0x442f('0x1d')]();}['focus'](){this[_0x442f('0x30')][_0x442f('0x2d')]();}['destroy'](){this[_0x442f('0x20')][_0x442f('0x0')]();for(const _0x19aaa9 of this[_0x442f('0x23')])_0x19aaa9[_0x442f('0x0')]();super[_0x442f('0x0')]();}['refreshVisibleViews'](){this['_shouldCollapse']?this[_0x442f('0x32')]():this[_0x442f('0xb')]();}['_handleNewCommentModel'](_0x2b39ec,_0x1d9d3b){const _0x137468=new this[(_0x442f('0x2a'))]['CommentView'](this['locale'],_0x2b39ec,{'maxCommentCharsWhenCollapsed':this[_0x442f('0x2a')]['maxCommentCharsWhenCollapsed'],'formatDateTime':this[_0x442f('0x2a')][_0x442f('0x2f')],'editorConfig':this['_config']['editorConfig']});_0x137468[_0x442f('0x5')]=_0x2b39ec['id'],_0x137468['delegate']('removeComment')['to'](this),_0x137468[_0x442f('0xe')]('updateComment')['to'](this),_0x137468[_0x442f('0xe')]('resolveCommentThread')['to'](this),this[_0x442f('0x2c')](_0x137468,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this[_0x442f('0x23')][_0x442f('0x10')](_0x137468,_0x1d9d3b);}['_calculatePosition'](_0x462d2b){const _0x215350=this[_0x442f('0x3')]['_findOptimalIndex'](_0x462d2b);return this[_0x442f('0x2e')]?this[_0x442f('0x2e')][_0x442f('0x8')]>_0x462d2b[_0x442f('0x8')]?_0x215350-0x1:_0x215350:_0x215350-0x1;}['_handleInfoComment'](){if(this['_model'][_0x442f('0x33')]){const _0x3007ef={'id':_0x442f('0x4'),'author':this[_0x442f('0x3')][_0x442f('0x28')],'authoredAt':this[_0x442f('0x3')]['resolvedAt'],'content':_0x48380e(this[_0x442f('0x13')],_0x442f('0x17')),'attributes':{}};this['resolvedCommentView']=new this['_config'][(_0x442f('0x16'))](this[_0x442f('0x13')],_0x3007ef,{'maxCommentCharsWhenCollapsed':this[_0x442f('0x2a')][_0x442f('0xd')],'formatDateTime':this[_0x442f('0x2a')][_0x442f('0x2f')],'editorConfig':this[_0x442f('0x2a')][_0x442f('0x7')],'isSystemComment':!0x0}),this[_0x442f('0x23')]['add'](this[_0x442f('0x2e')],this[_0x442f('0x3')][_0x442f('0x6')](_0x3007ef));}else this[_0x442f('0x2e')]&&(this[_0x442f('0x23')]['remove'](this[_0x442f('0x2e')]),this[_0x442f('0x2e')][_0x442f('0x0')](),this[_0x442f('0x2e')]=null);this[_0x442f('0x1d')]();}[_0x442f('0x1b')](_0x12bb25){const _0x47b5ba=this['commentViews'][_0x442f('0x12')](_0x12bb25['id']);this['stopListening'](_0x47b5ba),_0x47b5ba[_0x442f('0x1a')]&&this[_0x442f('0x1f')](),_0x47b5ba[_0x442f('0x0')]();}[_0x442f('0x1f')](){this[_0x442f('0x1e')]=Array[_0x442f('0x15')](this[_0x442f('0x23')])[_0x442f('0x37')](_0x3a8559=>_0x3a8559[_0x442f('0x1a')]);}[_0x442f('0x32')](){const _0x24438c=function(_0x21b8df){const _0x256e57=new _0xea51fb();for(const _0x517229 of _0x21b8df)_0x256e57['add'](_0x517229);return _0x256e57;}(this[_0x442f('0x23')]),_0x79fa3=this[_0x442f('0x20')]['count'];for(let _0x5a5cc6=0x1;_0x5a5cc6<=_0x79fa3;_0x5a5cc6++)_0x24438c[_0x442f('0x12')](0x1);for(const _0x13c022 of _0x24438c)_0x13c022['collapse']();_0x79fa3>0x0&&_0x24438c[_0x442f('0x10')](this[_0x442f('0x20')],0x1),ss(_0x9ea7a0(Array[_0x442f('0x15')](this[_0x442f('0x2')]),Array[_0x442f('0x15')](_0x24438c)),this[_0x442f('0x2')],_0x24438c);}[_0x442f('0xb')](){ss(_0x9ea7a0(Array['from'](this[_0x442f('0x2')]),Array[_0x442f('0x15')](this['commentViews'])),this[_0x442f('0x2')],this[_0x442f('0x23')]);for(const _0x3e5e91 of this[_0x442f('0x2')])_0x3e5e91[_0x442f('0x1c')]();}}function ss(_0x55f890,_0x312aa0,_0x56279a){let _0x3905e5=0x0;for(const _0x3af663 of _0x55f890)switch(_0x3af663){case _0x442f('0x18'):_0x312aa0['add'](_0x56279a[_0x442f('0x9')](_0x3905e5),_0x3905e5),_0x3905e5++;break;case _0x442f('0x2b'):_0x312aa0['remove'](_0x3905e5);break;case _0x442f('0x29'):_0x3905e5++;}}
@@ -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 _0x35ef=['bindTemplate','contextValue','remove','value','div','_model','ck-context-wrapper','.ck-context','classList','...','querySelector','scrollWidth','_trimContextValue','ck-context','ck-thread__header','element','_attachContextActions','lastIndexOf','mouseleave','execute','tooltip','reopenButtonView','isResolvable','substring','isVisible','ck-annotation__actions','locale','label','fire','add','Reopen','Comment\x20was\x20made\x20on\x20an\x20element','ck-context--quotes','icon','_createReopenButton','render','bind','.ck-context__value'];(function(_0x1dec27,_0x35ef9b){const _0x34f77f=function(_0x3c564b){while(--_0x3c564b){_0x1dec27['push'](_0x1dec27['shift']());}};_0x34f77f(++_0x35ef9b);}(_0x35ef,0xe1));const _0x34f7=function(_0x1dec27,_0x35ef9b){_0x1dec27=_0x1dec27-0x0;let _0x34f77f=_0x35ef[_0x1dec27];return _0x34f77f;};import{View as _0x2d26a7,ButtonView as _0x2923af}from'ckeditor5/src/ui';import{getTranslation as _0x53564d}from'../../../utils/common-translations';import _0x86fc85 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x2d26a7{constructor(_0x1e619a,_0x2a9a3b){super(_0x1e619a);const _0x562c8f=this[_0x34f7('0x3')];this[_0x34f7('0x8')]=_0x2a9a3b,this[_0x34f7('0x18')]=this[_0x34f7('0x25')](),this[_0x34f7('0x1')]('hasContext')['to'](this[_0x34f7('0x8')],'context',_0x3f3dc6=>!!_0x3f3dc6),this[_0x34f7('0x1')](_0x34f7('0x4'))['to'](this['_model'],'context',_0x48138e=>_0x48138e&&_0x48138e[_0x34f7('0x6')]?this[_0x34f7('0xf')](_0x48138e['value']):_0x53564d(this[_0x34f7('0x1d')],_0x34f7('0x22'))),this['setTemplate']({'tag':_0x34f7('0x7'),'attributes':{'class':[_0x34f7('0x11')]},'children':[{'tag':_0x34f7('0x7'),'attributes':{'class':[_0x34f7('0x9')]},'children':[{'tag':_0x34f7('0x7'),'attributes':{'class':[_0x34f7('0x10'),_0x562c8f['if']('hasContext',_0x34f7('0x23'))]},'children':[{'tag':'span','attributes':{'class':['ck-context__value']},'children':[{'text':_0x562c8f['to']('contextValue')}]}]}]},{'tag':_0x34f7('0x7'),'attributes':{'class':[_0x34f7('0x1c')]},'children':[this[_0x34f7('0x18')]]}]});}[_0x34f7('0x0')](){super[_0x34f7('0x0')](),this[_0x34f7('0x13')]();}[_0x34f7('0x25')](){const _0x10784c=new _0x2923af(this['locale']);return _0x10784c[_0x34f7('0x1e')]=_0x53564d(this[_0x34f7('0x1d')],_0x34f7('0x21')),_0x10784c[_0x34f7('0x17')]=_0x53564d(this[_0x34f7('0x1d')],_0x34f7('0x21')),_0x10784c[_0x34f7('0x24')]=_0x86fc85,_0x10784c[_0x34f7('0x1')](_0x34f7('0x1b'))['to'](this['_model'],_0x34f7('0x19')),_0x10784c['on'](_0x34f7('0x16'),()=>{this[_0x34f7('0x1f')]('reopenCommentThread',this[_0x34f7('0x8')]['id']);}),_0x10784c;}[_0x34f7('0xf')](_0x1d4fc5){if(_0x1d4fc5['length']<0x96)return _0x1d4fc5;const _0x2fc4a8=_0x1d4fc5[_0x34f7('0x14')]('\x20',0x93);return _0x1d4fc5[_0x34f7('0x1a')](0x0,_0x2fc4a8>-0x1?_0x2fc4a8:0x93)+_0x34f7('0xc');}[_0x34f7('0x13')](){const _0x26e464=this[_0x34f7('0x12')][_0x34f7('0xd')](_0x34f7('0xa')),_0x2f01fb=_0x26e464['querySelector'](_0x34f7('0x2'));this['listenTo'](_0x26e464,'mouseenter',()=>{_0x2f01fb['offsetWidth']<_0x2f01fb[_0x34f7('0xe')]&&_0x26e464[_0x34f7('0xb')][_0x34f7('0x20')]('overlay');}),this['listenTo'](_0x26e464,_0x34f7('0x15'),()=>{_0x26e464[_0x34f7('0xb')][_0x34f7('0x5')]('overlay');});}}
@@ -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 _0x59e0=['value','ck-thread__input','showInput','editor','set','commentInputView','ck-comment__input-container','isFocused','extendTemplate','ck-comment__input-container--active','change:showInput','setTemplate','showButtons','ck-thread__user','bind','bindTemplate','destroy','userView'];(function(_0x5467cd,_0x59e080){var _0x18be45=function(_0x31bef4){while(--_0x31bef4){_0x5467cd['push'](_0x5467cd['shift']());}};_0x18be45(++_0x59e080);}(_0x59e0,0x1c6));var _0x18be=function(_0x5467cd,_0x59e080){_0x5467cd=_0x5467cd-0x0;var _0x18be45=_0x59e0[_0x5467cd];return _0x18be45;};import{View as _0x2f42a6}from'ckeditor5/src/ui';import _0x2278ee from'./commentinputview';import{UserView as _0x5c0de9}from'ckeditor5-collaboration/src/collaboration-core';export default class wt extends _0x2f42a6{constructor(_0xfe40ca,_0x3fe03b,_0x15fedc){super(_0xfe40ca),this[_0x18be('0x1')]=new _0x2278ee(_0xfe40ca,_0x15fedc),this[_0x18be('0x1')][_0x18be('0xa')](_0x18be('0x8'))['to'](this[_0x18be('0x1')]['focusTracker'],_0x18be('0x3'),this['commentInputView'],_0x18be('0xe'),(_0x2f376f,_0x257941)=>_0x2f376f||!!_0x257941),this[_0x18be('0x0')](_0x18be('0x10'),!0x1),this['on'](_0x18be('0x6'),()=>{this['showInput']&&!this[_0x18be('0x1')][_0x18be('0x11')]&&this['commentInputView']['createEditor']();}),this[_0x18be('0xd')]=new _0x5c0de9(_0xfe40ca,_0x3fe03b),this[_0x18be('0xd')][_0x18be('0x4')]({'attributes':{'class':_0x18be('0x9')}}),this[_0x18be('0x1')][_0x18be('0x4')]({'attributes':{'class':_0x18be('0xf')}}),this[_0x18be('0x7')]({'tag':'div','attributes':{'class':[_0x18be('0x2'),this[_0x18be('0xb')]['if']('showInput',_0x18be('0x5'))]},'children':[this['userView'],this['commentInputView']]});}['destroy'](){return this[_0x18be('0x1')][_0x18be('0xc')]()['then'](()=>super[_0x18be('0xc')]());}}
@@ -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 {};