@ckeditor/ckeditor5-comments 39.0.1 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE.md +6 -6
  3. package/README.md +14 -14
  4. package/build/comments.js +1 -1
  5. package/build/translations/fa.js +1 -1
  6. package/build/translations/pt-br.js +1 -1
  7. package/lang/translations/af.po +1 -0
  8. package/lang/translations/ar.po +1 -0
  9. package/lang/translations/bg.po +1 -0
  10. package/lang/translations/bn.po +1 -0
  11. package/lang/translations/bs.po +1 -0
  12. package/lang/translations/ca.po +1 -0
  13. package/lang/translations/cs.po +1 -0
  14. package/lang/translations/da.po +1 -0
  15. package/lang/translations/de-ch.po +1 -0
  16. package/lang/translations/de.po +1 -0
  17. package/lang/translations/el.po +1 -0
  18. package/lang/translations/en-au.po +1 -0
  19. package/lang/translations/en.po +1 -0
  20. package/lang/translations/es-co.po +1 -0
  21. package/lang/translations/es.po +1 -0
  22. package/lang/translations/et.po +1 -0
  23. package/lang/translations/fa.po +10 -9
  24. package/lang/translations/fi.po +1 -0
  25. package/lang/translations/fr.po +1 -0
  26. package/lang/translations/gl.po +1 -0
  27. package/lang/translations/he.po +1 -0
  28. package/lang/translations/hi.po +1 -0
  29. package/lang/translations/hr.po +1 -0
  30. package/lang/translations/hu.po +1 -0
  31. package/lang/translations/id.po +1 -0
  32. package/lang/translations/it.po +1 -0
  33. package/lang/translations/ja.po +1 -0
  34. package/lang/translations/jv.po +1 -0
  35. package/lang/translations/ko.po +1 -0
  36. package/lang/translations/lt.po +1 -0
  37. package/lang/translations/lv.po +1 -0
  38. package/lang/translations/ms.po +1 -0
  39. package/lang/translations/nl.po +1 -0
  40. package/lang/translations/no.po +1 -0
  41. package/lang/translations/pl.po +1 -0
  42. package/lang/translations/pt-br.po +4 -3
  43. package/lang/translations/pt.po +1 -0
  44. package/lang/translations/ro.po +1 -0
  45. package/lang/translations/ru.po +1 -0
  46. package/lang/translations/sk.po +1 -0
  47. package/lang/translations/sq.po +1 -0
  48. package/lang/translations/sr-latn.po +1 -0
  49. package/lang/translations/sr.po +1 -0
  50. package/lang/translations/sv.po +1 -0
  51. package/lang/translations/th.po +1 -0
  52. package/lang/translations/tk.po +1 -0
  53. package/lang/translations/tr.po +1 -0
  54. package/lang/translations/tt.po +1 -0
  55. package/lang/translations/ug.po +1 -0
  56. package/lang/translations/uk.po +1 -0
  57. package/lang/translations/ur.po +1 -0
  58. package/lang/translations/vi.po +1 -0
  59. package/lang/translations/zh-cn.po +1 -0
  60. package/lang/translations/zh.po +1 -0
  61. package/package.json +3 -7
  62. package/src/annotations/annotation.d.ts +90 -90
  63. package/src/annotations/annotation.js +1 -1
  64. package/src/annotations/annotationcollection.d.ts +98 -98
  65. package/src/annotations/annotationcollection.js +1 -1
  66. package/src/annotations/annotations.d.ts +154 -154
  67. package/src/annotations/annotations.js +1 -1
  68. package/src/annotations/annotationsuis.d.ts +232 -232
  69. package/src/annotations/annotationsuis.js +1 -1
  70. package/src/annotations/editorannotations.d.ts +67 -67
  71. package/src/annotations/editorannotations.js +1 -1
  72. package/src/annotations/inlineannotations.d.ts +90 -90
  73. package/src/annotations/inlineannotations.js +1 -1
  74. package/src/annotations/narrowsidebar.d.ts +85 -85
  75. package/src/annotations/narrowsidebar.js +1 -1
  76. package/src/annotations/sidebar.d.ts +100 -100
  77. package/src/annotations/sidebar.js +1 -1
  78. package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -29
  79. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  80. package/src/annotations/view/annotationview.d.ts +90 -90
  81. package/src/annotations/view/annotationview.js +1 -1
  82. package/src/annotations/view/sidebaritemview.d.ts +55 -55
  83. package/src/annotations/view/sidebaritemview.js +1 -1
  84. package/src/annotations/view/sidebarview.d.ts +32 -32
  85. package/src/annotations/view/sidebarview.js +1 -1
  86. package/src/annotations/widesidebar.d.ts +77 -77
  87. package/src/annotations/widesidebar.js +1 -1
  88. package/src/augmentation.d.ts +52 -52
  89. package/src/comments/addcommentthreadcommand.d.ts +35 -35
  90. package/src/comments/addcommentthreadcommand.js +1 -1
  91. package/src/comments/commentsarchive.d.ts +31 -31
  92. package/src/comments/commentsarchive.js +1 -1
  93. package/src/comments/commentsarchiveui.d.ts +38 -38
  94. package/src/comments/commentsarchiveui.js +1 -1
  95. package/src/comments/commentsediting.d.ts +79 -79
  96. package/src/comments/commentsediting.js +1 -1
  97. package/src/comments/commentsrepository.d.ts +1129 -1105
  98. package/src/comments/commentsrepository.js +1 -1
  99. package/src/comments/commentsui.d.ts +33 -33
  100. package/src/comments/commentsui.js +1 -1
  101. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -17
  102. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  103. package/src/comments/integrations/importword.d.ts +21 -21
  104. package/src/comments/integrations/importword.js +1 -1
  105. package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -36
  106. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  107. package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -31
  108. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  109. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -36
  110. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  111. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  112. package/src/comments/ui/commentthreadcontroller.js +1 -1
  113. package/src/comments/ui/view/basecommentthreadview.d.ts +119 -112
  114. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  115. package/src/comments/ui/view/basecommentview.d.ts +112 -112
  116. package/src/comments/ui/view/basecommentview.js +1 -1
  117. package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -13
  118. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  119. package/src/comments/ui/view/commentcontentview.d.ts +14 -14
  120. package/src/comments/ui/view/commentcontentview.js +1 -1
  121. package/src/comments/ui/view/commentinputview.d.ts +86 -86
  122. package/src/comments/ui/view/commentinputview.js +1 -1
  123. package/src/comments/ui/view/commentsarchiveview.d.ts +38 -38
  124. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  125. package/src/comments/ui/view/commentslistview.d.ts +100 -100
  126. package/src/comments/ui/view/commentslistview.js +1 -1
  127. package/src/comments/ui/view/commentthreadheaderview.d.ts +50 -50
  128. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  129. package/src/comments/ui/view/commentthreadinputview.d.ts +41 -41
  130. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  131. package/src/comments/ui/view/commentthreadview.d.ts +118 -117
  132. package/src/comments/ui/view/commentthreadview.js +1 -1
  133. package/src/comments/ui/view/commentview.d.ts +243 -243
  134. package/src/comments/ui/view/commentview.js +1 -1
  135. package/src/comments.d.ts +35 -35
  136. package/src/comments.js +1 -1
  137. package/src/commentsonly.d.ts +33 -33
  138. package/src/commentsonly.js +1 -1
  139. package/src/config.d.ts +176 -176
  140. package/src/index.d.ts +24 -24
  141. package/src/utils/common-translations.d.ts +9 -9
  142. package/src/utils/common-translations.js +1 -1
  143. package/src/utils/createmutationobserver.d.ts +14 -14
  144. package/src/utils/createmutationobserver.js +1 -1
  145. package/theme/annotation-inline.css +2 -1
  146. package/theme/annotation.css +2 -3
  147. package/theme/comment.css +39 -38
  148. package/theme/commentinput.css +2 -1
  149. package/theme/commentmarker.css +7 -6
  150. package/theme/commentsarchive.css +2 -1
  151. package/theme/commentthread.css +68 -57
  152. package/theme/icons/add-comment.svg +1 -1
  153. package/theme/icons/comments-archive.svg +1 -1
  154. package/theme/icons/edit-comment.svg +1 -1
  155. package/theme/icons/remove-comment.svg +1 -1
  156. package/theme/sidebar-narrow.css +4 -3
  157. package/theme/sidebar.css +13 -12
@@ -1,86 +1,86 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module comments/comments/ui/view/commentinputview
7
- */
8
- import { View, ButtonView } from 'ckeditor5/src/ui';
9
- import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
10
- import { type EditorConfig, type DataApi } from 'ckeditor5/src/core';
11
- import CommentEditor from '../commenteditor/commenteditor';
12
- /**
13
- * A view for the comment input section that includes a comment editor.
14
- */
15
- export default class CommentInputView extends View {
16
- /**
17
- * Comment editor.
18
- */
19
- editor: CommentEditor & DataApi | null;
20
- /**
21
- * The input value (comment editor content).
22
- *
23
- * @observable
24
- */
25
- value: string;
26
- /**
27
- * When set to `true` it is not possible to submit the commit.
28
- *
29
- * @observable
30
- */
31
- disabledSubmit: boolean;
32
- /**
33
- * Specifies whether the buttons should be visible (`true`) or hidden (`false`).
34
- *
35
- * @observable
36
- */
37
- showButtons: boolean;
38
- /**
39
- * The comment editor placeholder.
40
- *
41
- * @observable
42
- */
43
- placeholder: string;
44
- /**
45
- * The submit button label.
46
- *
47
- * @observable
48
- */
49
- submitLabel: string;
50
- element: HTMLElement;
51
- /**
52
- * Keystroke handler for the view.
53
- */
54
- keystrokes: KeystrokeHandler;
55
- /**
56
- * Focus tracker for the view.
57
- */
58
- focusTracker: FocusTracker;
59
- /**
60
- * Button view for the button which submits the comment.
61
- */
62
- submitButtonView: ButtonView;
63
- /**
64
- * Button view for the button which cancels comment input.
65
- */
66
- cancelButtonView: ButtonView;
67
- constructor(locale: Locale, editorConfig?: EditorConfig);
68
- /**
69
- * @inheritDoc
70
- */
71
- render(): void;
72
- /**
73
- * Creates the comment editor instance.
74
- *
75
- * @returns Promise resolved after the editor instance is initialized.
76
- */
77
- createEditor(): Promise<CommentEditor | undefined>;
78
- /**
79
- * Focuses the view.
80
- */
81
- focus(): void;
82
- /**
83
- * @inheritDoc
84
- */
85
- destroy(): Promise<void>;
86
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module comments/comments/ui/view/commentinputview
7
+ */
8
+ import { View, ButtonView } from 'ckeditor5/src/ui';
9
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
10
+ import { type EditorConfig, type DataApi } from 'ckeditor5/src/core';
11
+ import CommentEditor from '../commenteditor/commenteditor';
12
+ /**
13
+ * A view for the comment input section that includes a comment editor.
14
+ */
15
+ export default class CommentInputView extends View {
16
+ /**
17
+ * Comment editor.
18
+ */
19
+ editor: CommentEditor & DataApi | null;
20
+ /**
21
+ * The input value (comment editor content).
22
+ *
23
+ * @observable
24
+ */
25
+ value: string;
26
+ /**
27
+ * When set to `true` it is not possible to submit the commit.
28
+ *
29
+ * @observable
30
+ */
31
+ disabledSubmit: boolean;
32
+ /**
33
+ * Specifies whether the buttons should be visible (`true`) or hidden (`false`).
34
+ *
35
+ * @observable
36
+ */
37
+ showButtons: boolean;
38
+ /**
39
+ * The comment editor placeholder.
40
+ *
41
+ * @observable
42
+ */
43
+ placeholder: string;
44
+ /**
45
+ * The submit button label.
46
+ *
47
+ * @observable
48
+ */
49
+ submitLabel: string;
50
+ element: HTMLElement;
51
+ /**
52
+ * Keystroke handler for the view.
53
+ */
54
+ keystrokes: KeystrokeHandler;
55
+ /**
56
+ * Focus tracker for the view.
57
+ */
58
+ focusTracker: FocusTracker;
59
+ /**
60
+ * Button view for the button which submits the comment.
61
+ */
62
+ submitButtonView: ButtonView;
63
+ /**
64
+ * Button view for the button which cancels comment input.
65
+ */
66
+ cancelButtonView: ButtonView;
67
+ constructor(locale: Locale, editorConfig?: EditorConfig);
68
+ /**
69
+ * @inheritDoc
70
+ */
71
+ render(): void;
72
+ /**
73
+ * Creates the comment editor instance.
74
+ *
75
+ * @returns Promise resolved after the editor instance is initialized.
76
+ */
77
+ createEditor(): Promise<CommentEditor | undefined>;
78
+ /**
79
+ * Focuses the view.
80
+ */
81
+ focus(): void;
82
+ /**
83
+ * @inheritDoc
84
+ */
85
+ destroy(): Promise<void>;
86
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3dfb=['then','Cancel','_editorConfig','change','label','focusPrevious','submitButtonView','submit','Esc','showButtons','bindTemplate','extendTemplate','editor','render','destroy','initialData','ck-comment__input-wrapper','focusTracker','setData','low','tab','ck-comment__input-actions--cancel','value','set','_createSubmitButton','_isDestroyed','withText','forEach','cancelButtonView','firstChild','placeholder','create','getData','submitLabel','insertBefore','length','createEditor','cancel','bind','stop','ck-comment__input-actions','Reply','fire','listenTo','high','editorReady','keystrokes','focus','_initializeFocusCycling','shift\x20+\x20tab','trim','add','editorDestroyed','execute','element','div','ck-comment__input-actions--active','setTemplate'];(function(_0xbf4e00,_0x3dfbfc){const _0x1c72b6=function(_0x1e984b){while(--_0x1e984b){_0xbf4e00['push'](_0xbf4e00['shift']());}};_0x1c72b6(++_0x3dfbfc);}(_0x3dfb,0x96));const _0x1c72=function(_0xbf4e00,_0x3dfbfc){_0xbf4e00=_0xbf4e00-0x0;let _0x1c72b6=_0x3dfb[_0xbf4e00];return _0x1c72b6;};import{View as _0x470711,ViewCollection as _0x1124a1,FocusCycler as _0x241ecb,ButtonView as _0x133d4f}from'ckeditor5/src/ui';import{FocusTracker as _0x57da46,KeystrokeHandler as _0x2e7e90}from'ckeditor5/src/utils';import _0x4ba238 from'../commenteditor/commenteditor';import{getTranslation as _0x546a41}from'../../../utils/common-translations';export default class Xt extends _0x470711{constructor(_0x10e841,_0x4722e8={}){super(_0x10e841),this[_0x1c72('0x24')]=null,this[_0x1c72('0x1a')]=_0x4722e8,this[_0x1c72('0xc')]=new _0x2e7e90(),this[_0x1c72('0x29')]=new _0x57da46(),this[_0x1c72('0x2f')](_0x1c72('0x2e'),_0x4722e8[_0x1c72('0x27')]||''),this['set']('disabledSubmit',!0x1),this[_0x1c72('0x2f')](_0x1c72('0x21'),!0x0),this[_0x1c72('0x2f')](_0x1c72('0x36'),_0x546a41(_0x10e841,'Reply...')),this[_0x1c72('0x2f')](_0x1c72('0x39'),_0x546a41(_0x10e841,_0x1c72('0x7'))),this[_0x1c72('0x1e')]=this[_0x1c72('0x30')](),this[_0x1c72('0x34')]=this['_createCancelButton'](),this[_0x1c72('0x17')]({'tag':'div','attributes':{'class':[_0x1c72('0x28')]},'children':[{'tag':_0x1c72('0x15'),'attributes':{'class':[_0x1c72('0x6'),this[_0x1c72('0x22')]['if'](_0x1c72('0x21'),_0x1c72('0x16'))]},'children':[this['submitButtonView'],this[_0x1c72('0x34')]]}]}),this[_0x1c72('0xc')][_0x1c72('0x2f')](_0x1c72('0x20'),(_0x12d4a4,_0x277460)=>{this[_0x1c72('0x34')][_0x1c72('0x8')]('execute'),_0x277460();}),this['on'](_0x1c72('0x1f'),(_0x242ea5,_0x37b7c4)=>{_0x37b7c4[_0x1c72('0x1')]>0xfde8?(alert(_0x546a41(_0x10e841,'TOO_LONG_COMMENT_ALERT',[_0x37b7c4[_0x1c72('0x1')],0xfde8])),_0x242ea5[_0x1c72('0x5')]()):this['editor'][_0x1c72('0x2a')]('');},{'priority':_0x1c72('0xa')});}[_0x1c72('0x25')](){super[_0x1c72('0x25')](),this[_0x1c72('0xc')][_0x1c72('0x9')](this[_0x1c72('0x14')]),this[_0x1c72('0x29')][_0x1c72('0x11')](this[_0x1c72('0x14')]);}[_0x1c72('0x2')](){return this[_0x1c72('0x24')]||(this[_0x1c72('0x24')]=new _0x4ba238(this['_editorConfig']),this['_editorCreationPromise']=this[_0x1c72('0x24')][_0x1c72('0x37')]()[_0x1c72('0x18')](()=>{if(this['_isDestroyed'])return;const _0x5ec3c5=this[_0x1c72('0x24')];this['element'][_0x1c72('0x0')](_0x5ec3c5['ui']['element'],this[_0x1c72('0x14')][_0x1c72('0x35')]),_0x5ec3c5['model']['document']['on'](_0x1c72('0x1b'),()=>this[_0x1c72('0x2e')]=_0x5ec3c5[_0x1c72('0x38')]()),_0x5ec3c5[_0x1c72('0x4')](_0x1c72('0x36'))['to'](this),this[_0x1c72('0xe')](this[_0x1c72('0x24')]),this['fire'](_0x1c72('0xb'),this['editor']);})),this['_editorCreationPromise'];}[_0x1c72('0xd')](){this[_0x1c72('0x24')]&&this[_0x1c72('0x24')][_0x1c72('0xd')]();}async[_0x1c72('0x26')](){this[_0x1c72('0x31')]||(this[_0x1c72('0x31')]=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor'][_0x1c72('0x26')](),this[_0x1c72('0x8')](_0x1c72('0x12'),this['editor'])),await super[_0x1c72('0x26')]());}[_0x1c72('0x30')](){const {locale:_0x551684}=this,_0x302193=new _0x133d4f(_0x551684);return _0x302193[_0x1c72('0x23')]({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x302193[_0x1c72('0x32')]=!0x0,_0x302193[_0x1c72('0x4')]('label')['to'](this,'submitLabel'),_0x302193['on'](_0x1c72('0x13'),()=>{this[_0x1c72('0x8')]('submit',this['value']);}),_0x302193[_0x1c72('0x4')]('isEnabled')['to'](this,_0x1c72('0x2e'),this,'disabledSubmit',(_0x366fec,_0x23c7c4)=>!_0x23c7c4&&!!_0x366fec[_0x1c72('0x10')]()),_0x302193;}['_createCancelButton'](){const {locale:_0x5becba}=this,_0x8ba88=new _0x133d4f(_0x5becba);return _0x8ba88[_0x1c72('0x23')]({'attributes':{'class':[_0x1c72('0x2d')]}}),_0x8ba88[_0x1c72('0x1c')]=_0x546a41(_0x5becba,_0x1c72('0x19')),_0x8ba88['withText']=!0x0,_0x8ba88['on'](_0x1c72('0x13'),()=>{this[_0x1c72('0x24')][_0x1c72('0x2a')](''),this[_0x1c72('0x8')](_0x1c72('0x3'));}),_0x8ba88;}[_0x1c72('0xe')](_0x410ced){const _0x2cc619=this['focusTracker'],_0x48d82f=new _0x1124a1();[_0x410ced['ui']['view'],this[_0x1c72('0x1e')],this[_0x1c72('0x34')]][_0x1c72('0x33')](_0x34524d=>{_0x48d82f[_0x1c72('0x11')](_0x34524d),_0x2cc619[_0x1c72('0x11')](_0x34524d[_0x1c72('0x14')]);});const _0x33d4d7=new _0x241ecb({'focusables':_0x48d82f,'focusTracker':_0x2cc619});this[_0x1c72('0xc')]['set'](_0x1c72('0x2c'),(_0x3aa7c7,_0x2bbc23)=>{_0x33d4d7['focusNext'](),_0x2bbc23();},{'priority':_0x1c72('0x2b')}),this[_0x1c72('0xc')]['set'](_0x1c72('0xf'),(_0x7104d6,_0x5f4425)=>{_0x33d4d7[_0x1c72('0x1d')](),_0x5f4425();},{'priority':_0x1c72('0x2b')});}}
23
+ const _0x1fea=['destroy','stop','value','document','render','_editorCreationPromise','trim','showButtons','editorDestroyed','submitLabel','focusPrevious','extendTemplate','shift\x20+\x20tab','TOO_LONG_COMMENT_ALERT','execute','set','_editorConfig','bind','fire','setTemplate','cancelButtonView','_isDestroyed','forEach','_initializeFocusCycling','ck-comment__input-actions--cancel','submitButtonView','high','add','view','createEditor','isEnabled','then','focusTracker','bindTemplate','editor','getData','submit','disabledSubmit','model','ck-comment__input-actions--active','label','tab','Reply','element','focus','Reply...','insertBefore','change','_createCancelButton','_createSubmitButton','keystrokes','editorReady','length','placeholder','setData','Esc','div','withText','focusNext'];(function(_0x5db6d9,_0x1feabe){const _0x3d4fba=function(_0xde5a71){while(--_0xde5a71){_0x5db6d9['push'](_0x5db6d9['shift']());}};_0x3d4fba(++_0x1feabe);}(_0x1fea,0x1ee));const _0x3d4f=function(_0x5db6d9,_0x1feabe){_0x5db6d9=_0x5db6d9-0x0;let _0x3d4fba=_0x1fea[_0x5db6d9];return _0x3d4fba;};import{View as _0x929e88,ViewCollection as _0x5c22ee,FocusCycler as _0x35ace6,ButtonView as _0x1fb324}from'ckeditor5/src/ui';import{FocusTracker as _0x71f41d,KeystrokeHandler as _0x19bd40}from'ckeditor5/src/utils';import _0x5a886e from'../commenteditor/commenteditor';import{getTranslation as _0x46aa76}from'../../../utils/common-translations';export default class Xt extends _0x929e88{constructor(_0x31e755,_0x25d3e2={}){super(_0x31e755),this[_0x3d4f('0xc')]=null,this[_0x3d4f('0x35')]=_0x25d3e2,this[_0x3d4f('0x1c')]=new _0x19bd40(),this['focusTracker']=new _0x71f41d(),this[_0x3d4f('0x34')](_0x3d4f('0x27'),_0x25d3e2['initialData']||''),this[_0x3d4f('0x34')](_0x3d4f('0xf'),!0x1),this[_0x3d4f('0x34')](_0x3d4f('0x2c'),!0x0),this[_0x3d4f('0x34')](_0x3d4f('0x1f'),_0x46aa76(_0x31e755,_0x3d4f('0x17'))),this['set'](_0x3d4f('0x2e'),_0x46aa76(_0x31e755,_0x3d4f('0x14'))),this[_0x3d4f('0x3')]=this['_createSubmitButton'](),this[_0x3d4f('0x39')]=this[_0x3d4f('0x1a')](),this[_0x3d4f('0x38')]({'tag':_0x3d4f('0x22'),'attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this[_0x3d4f('0xb')]['if'](_0x3d4f('0x2c'),_0x3d4f('0x11'))]},'children':[this[_0x3d4f('0x3')],this[_0x3d4f('0x39')]]}]}),this[_0x3d4f('0x1c')][_0x3d4f('0x34')](_0x3d4f('0x21'),(_0x58c7d7,_0x5a00ae)=>{this[_0x3d4f('0x39')][_0x3d4f('0x37')](_0x3d4f('0x33')),_0x5a00ae();}),this['on']('submit',(_0x99c590,_0x446e80)=>{_0x446e80[_0x3d4f('0x1e')]>0xfde8?(alert(_0x46aa76(_0x31e755,_0x3d4f('0x32'),[_0x446e80[_0x3d4f('0x1e')],0xfde8])),_0x99c590[_0x3d4f('0x26')]()):this[_0x3d4f('0xc')]['setData']('');},{'priority':_0x3d4f('0x4')});}[_0x3d4f('0x29')](){super['render'](),this[_0x3d4f('0x1c')]['listenTo'](this['element']),this[_0x3d4f('0xa')][_0x3d4f('0x5')](this[_0x3d4f('0x15')]);}[_0x3d4f('0x7')](){return this[_0x3d4f('0xc')]||(this[_0x3d4f('0xc')]=new _0x5a886e(this[_0x3d4f('0x35')]),this[_0x3d4f('0x2a')]=this[_0x3d4f('0xc')]['create']()[_0x3d4f('0x9')](()=>{if(this[_0x3d4f('0x3a')])return;const _0x4910e1=this[_0x3d4f('0xc')];this[_0x3d4f('0x15')][_0x3d4f('0x18')](_0x4910e1['ui']['element'],this[_0x3d4f('0x15')]['firstChild']),_0x4910e1[_0x3d4f('0x10')][_0x3d4f('0x28')]['on'](_0x3d4f('0x19'),()=>this[_0x3d4f('0x27')]=_0x4910e1[_0x3d4f('0xd')]()),_0x4910e1[_0x3d4f('0x36')](_0x3d4f('0x1f'))['to'](this),this['_initializeFocusCycling'](this[_0x3d4f('0xc')]),this[_0x3d4f('0x37')](_0x3d4f('0x1d'),this[_0x3d4f('0xc')]);})),this['_editorCreationPromise'];}[_0x3d4f('0x16')](){this[_0x3d4f('0xc')]&&this[_0x3d4f('0xc')]['focus']();}async['destroy'](){this[_0x3d4f('0x3a')]||(this[_0x3d4f('0x3a')]=!0x0,this[_0x3d4f('0xc')]&&(await this[_0x3d4f('0x2a')],await this['editor'][_0x3d4f('0x25')](),this[_0x3d4f('0x37')](_0x3d4f('0x2d'),this['editor'])),await super[_0x3d4f('0x25')]());}[_0x3d4f('0x1b')](){const {locale:_0x75cb13}=this,_0x11785c=new _0x1fb324(_0x75cb13);return _0x11785c[_0x3d4f('0x30')]({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x11785c[_0x3d4f('0x23')]=!0x0,_0x11785c['bind'](_0x3d4f('0x12'))['to'](this,'submitLabel'),_0x11785c['on'](_0x3d4f('0x33'),()=>{this[_0x3d4f('0x37')](_0x3d4f('0xe'),this[_0x3d4f('0x27')]);}),_0x11785c[_0x3d4f('0x36')](_0x3d4f('0x8'))['to'](this,_0x3d4f('0x27'),this,_0x3d4f('0xf'),(_0x11daae,_0x4b2809)=>!_0x4b2809&&!!_0x11daae[_0x3d4f('0x2b')]()),_0x11785c;}[_0x3d4f('0x1a')](){const {locale:_0x483b28}=this,_0x29e6f2=new _0x1fb324(_0x483b28);return _0x29e6f2['extendTemplate']({'attributes':{'class':[_0x3d4f('0x2')]}}),_0x29e6f2[_0x3d4f('0x12')]=_0x46aa76(_0x483b28,'Cancel'),_0x29e6f2['withText']=!0x0,_0x29e6f2['on'](_0x3d4f('0x33'),()=>{this[_0x3d4f('0xc')][_0x3d4f('0x20')](''),this[_0x3d4f('0x37')]('cancel');}),_0x29e6f2;}[_0x3d4f('0x1')](_0x3098cd){const _0x56ca51=this[_0x3d4f('0xa')],_0x3346eb=new _0x5c22ee();[_0x3098cd['ui'][_0x3d4f('0x6')],this['submitButtonView'],this[_0x3d4f('0x39')]][_0x3d4f('0x0')](_0x35413d=>{_0x3346eb[_0x3d4f('0x5')](_0x35413d),_0x56ca51[_0x3d4f('0x5')](_0x35413d[_0x3d4f('0x15')]);});const _0x702a15=new _0x35ace6({'focusables':_0x3346eb,'focusTracker':_0x56ca51});this[_0x3d4f('0x1c')][_0x3d4f('0x34')](_0x3d4f('0x13'),(_0xc9cb93,_0x2196cd)=>{_0x702a15[_0x3d4f('0x24')](),_0x2196cd();},{'priority':'low'}),this[_0x3d4f('0x1c')][_0x3d4f('0x34')](_0x3d4f('0x31'),(_0x34842e,_0x48b852)=>{_0x702a15[_0x3d4f('0x2f')](),_0x48b852();},{'priority':'low'});}}
@@ -1,38 +1,38 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module comments/comments/ui/view/commentslistview
7
- */
8
- import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
- import { type Locale } from 'ckeditor5/src/utils';
10
- import type AnnotationView from '../../../annotations/view/annotationview';
11
- /**
12
- * A view representing the content of comments archive.
13
- */
14
- export default class CommentsArchiveView extends View {
15
- /**
16
- * The flag indicating whether there are items to display in the comments archive.
17
- *
18
- * @observable
19
- */
20
- isEmpty: boolean;
21
- /**
22
- * @param locale The localization service instance.
23
- * @param annotationViews Resolved comment thread annotation views to render inside the comments archive.
24
- */
25
- constructor(locale: Locale, annotationViews: ViewCollection<AnnotationView>);
26
- /**
27
- * @inheritDoc
28
- */
29
- render(): void;
30
- /**
31
- * @inheritDoc
32
- */
33
- destroy(): void;
34
- /**
35
- * @inheritDoc
36
- */
37
- focus(): void;
38
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module comments/comments/ui/view/commentslistview
7
+ */
8
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
+ import { type Locale } from 'ckeditor5/src/utils';
10
+ import type AnnotationView from '../../../annotations/view/annotationview';
11
+ /**
12
+ * A view representing the content of comments archive.
13
+ */
14
+ export default class CommentsArchiveView extends View {
15
+ /**
16
+ * The flag indicating whether there are items to display in the comments archive.
17
+ *
18
+ * @observable
19
+ */
20
+ isEmpty: boolean;
21
+ /**
22
+ * @param locale The localization service instance.
23
+ * @param annotationViews Resolved comment thread annotation views to render inside the comments archive.
24
+ */
25
+ constructor(locale: Locale, annotationViews: ViewCollection<AnnotationView>);
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ render(): void;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ destroy(): void;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ focus(): void;
38
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2a6a=['high','shift\x20+\x20tab','_focusables','set','add','focus','isEmpty','arrowleft','ck-hidden','stopPropagation','_keystrokes','remove','auto','render','element','EMPTY_COMMENTS_ARCHIVE','listenTo','isActive','arrowup','ck-comments-archive__header\x20','ck-comments-archive__content','div','arrowdown','selectstart','length','destroy','COMMENTS_ARCHIVE','_focusTracker'];(function(_0x407fb3,_0x2a6ad1){const _0x269a3c=function(_0x4aea2d){while(--_0x4aea2d){_0x407fb3['push'](_0x407fb3['shift']());}};_0x269a3c(++_0x2a6ad1);}(_0x2a6a,0x173));const _0x269a=function(_0x407fb3,_0x2a6ad1){_0x407fb3=_0x407fb3-0x0;let _0x269a3c=_0x2a6a[_0x407fb3];return _0x269a3c;};import{View as _0x52b47,FocusCycler as _0x4e35c6}from'ckeditor5/src/ui';import{FocusTracker as _0x7953ad,KeystrokeHandler as _0x4d3375}from'ckeditor5/src/utils';import{getTranslation as _0x39444e}from'../../../utils/common-translations';export default class K extends _0x52b47{constructor(_0x158a80,_0x22daeb){super(_0x158a80),this[_0x269a('0x18')]('isEmpty',!_0x22daeb[_0x269a('0x11')]),this[_0x269a('0x14')]=new _0x7953ad(),this[_0x269a('0x3')]=new _0x4d3375(),this[_0x269a('0x17')]=_0x22daeb,this['_focusCycler']=new _0x4e35c6({'focusables':this['_focusables'],'focusTracker':this[_0x269a('0x14')],'keystrokeHandler':this[_0x269a('0x3')],'actions':{'focusPrevious':_0x269a('0x16'),'focusNext':'tab'}}),this['listenTo'](_0x22daeb,_0x269a('0x19'),()=>{this[_0x269a('0x1b')]=!0x1;}),this[_0x269a('0x9')](_0x22daeb,_0x269a('0x4'),(_0x2da182,_0x14086e)=>{_0x14086e[_0x269a('0xa')]&&this[_0x269a('0x1a')](),_0x22daeb[_0x269a('0x11')]||(this['isEmpty']=!0x0);});const _0x29c18b=this['bindTemplate'];this['setTemplate']({'tag':_0x269a('0xe'),'attributes':{'dir':_0x269a('0x5'),'class':['ck','ck-comments-archive'],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x269a('0xc')]},'children':[{'text':_0x39444e(_0x158a80,_0x269a('0x13'))}]},{'tag':_0x269a('0xe'),'attributes':{'class':[_0x269a('0xd')]},'children':[{'tag':_0x269a('0xe'),'children':_0x22daeb},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x29c18b['if']('isEmpty',_0x269a('0x1'),_0x3f84a0=>!_0x3f84a0)]},'children':[{'text':_0x39444e(_0x158a80,_0x269a('0x8'))}]}]}]});}[_0x269a('0x6')](){super['render'](),this[_0x269a('0x3')][_0x269a('0x9')](this[_0x269a('0x7')]);const _0x167323=_0x3c5d47=>_0x3c5d47[_0x269a('0x2')]();this[_0x269a('0x3')][_0x269a('0x18')]('arrowright',_0x167323),this['_keystrokes'][_0x269a('0x18')](_0x269a('0x0'),_0x167323),this[_0x269a('0x3')][_0x269a('0x18')](_0x269a('0xb'),_0x167323),this[_0x269a('0x3')][_0x269a('0x18')](_0x269a('0xf'),_0x167323),this[_0x269a('0x9')](this[_0x269a('0x7')],_0x269a('0x10'),(_0x203565,_0x47c1ce)=>{_0x47c1ce[_0x269a('0x2')]();},{'priority':_0x269a('0x15')});}[_0x269a('0x12')](){super[_0x269a('0x12')](),this[_0x269a('0x14')][_0x269a('0x12')](),this[_0x269a('0x3')][_0x269a('0x12')]();}[_0x269a('0x1a')](){this[_0x269a('0x7')]['focus']();}}
23
+ const _0x53b0=['element','shift\x20+\x20tab','arrowup','setTemplate','_keystrokes','EMPTY_COMMENTS_ARCHIVE','bindTemplate','remove','ck-comments-archive','ck-comments-archive__content','destroy','ck-hidden','isEmpty','ck-comments-archive__info','length','stopPropagation','isActive','listenTo','auto','div','COMMENTS_ARCHIVE','arrowdown','arrowleft','tab','arrowright','ck-comments-archive__header\x20','focus','_focusables','set','_focusTracker','render'];(function(_0x486540,_0x53b0d){const _0xb60a99=function(_0x500e28){while(--_0x500e28){_0x486540['push'](_0x486540['shift']());}};_0xb60a99(++_0x53b0d);}(_0x53b0,0x194));const _0xb60a=function(_0x486540,_0x53b0d){_0x486540=_0x486540-0x0;let _0xb60a99=_0x53b0[_0x486540];return _0xb60a99;};import{View as _0x4652a5,FocusCycler as _0xda85c9}from'ckeditor5/src/ui';import{FocusTracker as _0x1354b1,KeystrokeHandler as _0x310de1}from'ckeditor5/src/utils';import{getTranslation as _0x8cfdb0}from'../../../utils/common-translations';export default class K extends _0x4652a5{constructor(_0x232e0e,_0x270f0d){super(_0x232e0e),this[_0xb60a('0x1b')](_0xb60a('0xb'),!_0x270f0d[_0xb60a('0xd')]),this[_0xb60a('0x1c')]=new _0x1354b1(),this[_0xb60a('0x3')]=new _0x310de1(),this[_0xb60a('0x1a')]=_0x270f0d,this['_focusCycler']=new _0xda85c9({'focusables':this[_0xb60a('0x1a')],'focusTracker':this['_focusTracker'],'keystrokeHandler':this['_keystrokes'],'actions':{'focusPrevious':_0xb60a('0x0'),'focusNext':_0xb60a('0x16')}}),this[_0xb60a('0x10')](_0x270f0d,'add',()=>{this[_0xb60a('0xb')]=!0x1;}),this[_0xb60a('0x10')](_0x270f0d,_0xb60a('0x6'),(_0x20cf86,_0x3cb2ad)=>{_0x3cb2ad[_0xb60a('0xf')]&&this[_0xb60a('0x19')](),_0x270f0d[_0xb60a('0xd')]||(this['isEmpty']=!0x0);});const _0x21147c=this[_0xb60a('0x5')];this[_0xb60a('0x2')]({'tag':_0xb60a('0x12'),'attributes':{'dir':_0xb60a('0x11'),'class':['ck',_0xb60a('0x7')],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0xb60a('0x18')]},'children':[{'text':_0x8cfdb0(_0x232e0e,_0xb60a('0x13'))}]},{'tag':'div','attributes':{'class':[_0xb60a('0x8')]},'children':[{'tag':_0xb60a('0x12'),'children':_0x270f0d},{'tag':'p','attributes':{'class':[_0xb60a('0xc'),_0x21147c['if'](_0xb60a('0xb'),_0xb60a('0xa'),_0x214828=>!_0x214828)]},'children':[{'text':_0x8cfdb0(_0x232e0e,_0xb60a('0x4'))}]}]}]});}[_0xb60a('0x1d')](){super[_0xb60a('0x1d')](),this[_0xb60a('0x3')][_0xb60a('0x10')](this['element']);const _0x15a082=_0x127820=>_0x127820[_0xb60a('0xe')]();this['_keystrokes'][_0xb60a('0x1b')](_0xb60a('0x17'),_0x15a082),this[_0xb60a('0x3')][_0xb60a('0x1b')](_0xb60a('0x15'),_0x15a082),this['_keystrokes']['set'](_0xb60a('0x1'),_0x15a082),this[_0xb60a('0x3')][_0xb60a('0x1b')](_0xb60a('0x14'),_0x15a082),this[_0xb60a('0x10')](this[_0xb60a('0x1e')],'selectstart',(_0x441103,_0x1a1f3e)=>{_0x1a1f3e[_0xb60a('0xe')]();},{'priority':'high'});}[_0xb60a('0x9')](){super[_0xb60a('0x9')](),this['_focusTracker'][_0xb60a('0x9')](),this[_0xb60a('0x3')][_0xb60a('0x9')]();}[_0xb60a('0x19')](){this['element'][_0xb60a('0x19')]();}}
@@ -1,100 +1,100 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module comments/comments/ui/view/commentslistview
7
- */
8
- import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
- import { type Locale } from 'ckeditor5/src/utils';
10
- import type { CommentThread } from '../../commentsrepository';
11
- import type CommentView from './commentview';
12
- import type { CommentThreadConfig } from '../../../config';
13
- /**
14
- * A view representing the list of comments. It should be used as a part of the comment thread view.
15
- */
16
- export default class CommentsListView extends View {
17
- locale: Locale;
18
- /**
19
- * Informs whether the list contains any comment view that is in the editing mode.
20
- *
21
- * @observable
22
- */
23
- hasDirtyComment: boolean;
24
- /**
25
- * Number of comments in the list.
26
- *
27
- * @observable
28
- */
29
- length: number;
30
- /**
31
- * Informs whether the comments list view is in the active state ("highlighted").
32
- * Comment list view is in that state when it is focused or it was activated by the user in any different way.
33
- *
34
- * @observable
35
- */
36
- isActive: boolean;
37
- /**
38
- * View collection which holds all comment views to be displayed.
39
- * It may also contain collapsed count view if the comments list view is collapsed and some comment views are hidden.
40
- *
41
- * @readonly
42
- */
43
- readonly visibleViews: ViewCollection;
44
- /**
45
- * View collection which holds all comment views created for given comment thread.
46
- *
47
- * @readonly
48
- */
49
- readonly commentViews: ViewCollection;
50
- /**
51
- * Comment view used to display information that comment has been resolved.
52
- *
53
- * @readonly
54
- */
55
- resolvedCommentView: CommentView | null;
56
- /**
57
- * @param locale The localization service instance.
58
- * @param model The model on which the view will base.
59
- * @param config Additional view configuration.
60
- */
61
- constructor(locale: Locale, model: CommentThread, config: CommentThreadConfig);
62
- /**
63
- * @inheritDoc
64
- */
65
- render(): void;
66
- /**
67
- * Focuses the view.
68
- */
69
- focus(): void;
70
- /**
71
- * @inheritDoc
72
- */
73
- destroy(): void;
74
- /**
75
- * Refreshes the list of the visible views.
76
- *
77
- * When doing so, it performs a minimal amount of changes, so that views are not re-added, which might cause undesirable effects
78
- * like focus loss or glitches due to CSS animations.
79
- *
80
- * The comments list may be collapsed or expanded:
81
- *
82
- * * it is expanded, if it {@link ~#isActive is active},
83
- * * it is expanded, if {@link module:comments/comments/commentsrepository~CommentThread#weight comment thread weight}
84
- * is lower than allowed (`config.comments.maxThreadTotalWeight`),
85
- * * it is expanded, if it {@link ~#hasDirtyComment has any comments in edit mode},
86
- * * it is collapsed, if neither of above is true.
87
- *
88
- * When comments list is in collapsed state, it displays at most `config.comments.maxCommentsWhenCollapsed` comment views:
89
- *
90
- * * first comment view,
91
- * * {@link ~#_collapsedCommentsView collapsed comments counter} (if there are any hidden views),
92
- * * appropriate number of the comments from the bottom of the thread.
93
- *
94
- * All the comments are also {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#collapse set to collapsed state}.
95
- *
96
- * When comments list in in expanded state, it displays all comment views for all comments. All the comments are also
97
- * {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#expand set to expanded state}.
98
- */
99
- refreshVisibleViews(): void;
100
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module comments/comments/ui/view/commentslistview
7
+ */
8
+ import { View, type ViewCollection } from 'ckeditor5/src/ui';
9
+ import { type Locale } from 'ckeditor5/src/utils';
10
+ import type { CommentThread } from '../../commentsrepository';
11
+ import type CommentView from './commentview';
12
+ import type { CommentThreadConfig } from '../../../config';
13
+ /**
14
+ * A view representing the list of comments. It should be used as a part of the comment thread view.
15
+ */
16
+ export default class CommentsListView extends View {
17
+ locale: Locale;
18
+ /**
19
+ * Informs whether the list contains any comment view that is in the editing mode.
20
+ *
21
+ * @observable
22
+ */
23
+ hasDirtyComment: boolean;
24
+ /**
25
+ * Number of comments in the list.
26
+ *
27
+ * @observable
28
+ */
29
+ length: number;
30
+ /**
31
+ * Informs whether the comments list view is in the active state ("highlighted").
32
+ * Comment list view is in that state when it is focused or it was activated by the user in any different way.
33
+ *
34
+ * @observable
35
+ */
36
+ isActive: boolean;
37
+ /**
38
+ * View collection which holds all comment views to be displayed.
39
+ * It may also contain collapsed count view if the comments list view is collapsed and some comment views are hidden.
40
+ *
41
+ * @readonly
42
+ */
43
+ readonly visibleViews: ViewCollection;
44
+ /**
45
+ * View collection which holds all comment views created for given comment thread.
46
+ *
47
+ * @readonly
48
+ */
49
+ readonly commentViews: ViewCollection;
50
+ /**
51
+ * Comment view used to display information that comment has been resolved.
52
+ *
53
+ * @readonly
54
+ */
55
+ resolvedCommentView: CommentView | null;
56
+ /**
57
+ * @param locale The localization service instance.
58
+ * @param model The model on which the view will base.
59
+ * @param config Additional view configuration.
60
+ */
61
+ constructor(locale: Locale, model: CommentThread, config: CommentThreadConfig);
62
+ /**
63
+ * @inheritDoc
64
+ */
65
+ render(): void;
66
+ /**
67
+ * Focuses the view.
68
+ */
69
+ focus(): void;
70
+ /**
71
+ * @inheritDoc
72
+ */
73
+ destroy(): void;
74
+ /**
75
+ * Refreshes the list of the visible views.
76
+ *
77
+ * When doing so, it performs a minimal amount of changes, so that views are not re-added, which might cause undesirable effects
78
+ * like focus loss or glitches due to CSS animations.
79
+ *
80
+ * The comments list may be collapsed or expanded:
81
+ *
82
+ * * it is expanded, if it {@link ~#isActive is active},
83
+ * * it is expanded, if {@link module:comments/comments/commentsrepository~CommentThread#weight comment thread weight}
84
+ * is lower than allowed (`config.comments.maxThreadTotalWeight`),
85
+ * * it is expanded, if it {@link ~#hasDirtyComment has any comments in edit mode},
86
+ * * it is collapsed, if neither of above is true.
87
+ *
88
+ * When comments list is in collapsed state, it displays at most `config.comments.maxCommentsWhenCollapsed` comment views:
89
+ *
90
+ * * first comment view,
91
+ * * {@link ~#_collapsedCommentsView collapsed comments counter} (if there are any hidden views),
92
+ * * appropriate number of the comments from the bottom of the thread.
93
+ *
94
+ * All the comments are also {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#collapse set to collapsed state}.
95
+ *
96
+ * When comments list in in expanded state, it displays all comment views for all comments. All the comments are also
97
+ * {@link module:comments/comments/ui/view/basecommentview~BaseCommentView#expand set to expanded state}.
98
+ */
99
+ refreshVisibleViews(): void;
100
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xa192=['length','visibleViews','resolvedBy','maxCommentCharsWhenCollapsed','commentViews','change:isEditMode','_handleNewCommentModel','isActive','updateComment','change:isResolved','_findOptimalIndex','from','focus','setTemplate','resolvedAt','_collapsedCommentsView','collapse','Marked\x20as\x20resolved','equal','destroy','ck-thread__comments','_calculatePosition','createCollection','refreshVisibleViews','maxThreadTotalWeight','add','_handleInfoComment','_updateHasDirtyComment','element','hasDirtyComment','_handleRemoveCommentModel','count','_model','locale','some','remove','expand','weight','listenTo','comments','authoredAt','editorReady','_config','editorConfig','formatDateTime','delete','resolvedCommentView','_rearrangeCollapse','_shouldCollapse','_rearrangeExpand','delegate','editorDestroyed','bind','CommentView','stopListening','get','set','isEditMode'];(function(_0x5c3fe1,_0xa1923c){const _0x2e0d3c=function(_0x45922d){while(--_0x45922d){_0x5c3fe1['push'](_0x5c3fe1['shift']());}};_0x2e0d3c(++_0xa1923c);}(_0xa192,0x1e7));const _0x2e0d=function(_0x5c3fe1,_0xa1923c){_0x5c3fe1=_0x5c3fe1-0x0;let _0x2e0d3c=_0xa192[_0x5c3fe1];return _0x2e0d3c;};import{View as _0x5c5e36}from'ckeditor5/src/ui';import{diff as _0x4141e9,Collection as _0x5c43ae}from'ckeditor5/src/utils';import{getTranslation as _0x5054b5}from'../../../utils/common-translations';import _0xe4c0a9 from'./collapsedcommentsview';export default class wt extends _0x5c5e36{constructor(_0x56966c,_0x46722d,_0x45d7d0){super(_0x56966c),this['set']('hasDirtyComment',!0x1),this['set']('length',_0x46722d[_0x2e0d('0x10')]['length']),this[_0x2e0d('0x21')](_0x2e0d('0x2a'),!0x1),this['_model']=_0x46722d,this[_0x2e0d('0x13')]=_0x45d7d0,this[_0x2e0d('0x27')]=this[_0x2e0d('0x39')](),this[_0x2e0d('0x24')]=this[_0x2e0d('0x39')](),this[_0x2e0d('0x17')]=null,this[_0x2e0d('0x32')]=new _0xe4c0a9(_0x56966c),this[_0x2e0d('0x32')][_0x2e0d('0x1d')](_0x2e0d('0x8'))['to'](this,_0x2e0d('0x23'),_0x17c8fe=>_0x17c8fe-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2658da of _0x46722d[_0x2e0d('0x10')])this[_0x2e0d('0x29')](_0x2658da);this['_handleInfoComment'](),this['listenTo'](_0x46722d[_0x2e0d('0x10')],_0x2e0d('0x2'),(_0xf4ecb9,_0x2d33b4)=>{const _0x41b754=this[_0x2e0d('0x38')](_0x2d33b4);this['length']++,this[_0x2e0d('0x29')](_0x2d33b4,_0x41b754),this['refreshVisibleViews']();}),this[_0x2e0d('0xf')](_0x46722d[_0x2e0d('0x10')],_0x2e0d('0xc'),(_0x3b72ec,_0x45fed9)=>{this[_0x2e0d('0x23')]--,this[_0x2e0d('0x7')](_0x45fed9),this['refreshVisibleViews']();}),this[_0x2e0d('0xf')](_0x46722d,'commentUpdated',()=>this[_0x2e0d('0x0')]()),this[_0x2e0d('0xf')](_0x46722d,_0x2e0d('0x2c'),()=>this[_0x2e0d('0x3')]()),this['on']('change:isActive',()=>this[_0x2e0d('0x0')]()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this[_0x2e0d('0x30')]({'tag':'ul','attributes':{'class':[_0x2e0d('0x37')]},'children':this[_0x2e0d('0x24')]});}get[_0x2e0d('0x19')](){return this['_model'][_0x2e0d('0xe')]>this[_0x2e0d('0x13')][_0x2e0d('0x1')]&&!this[_0x2e0d('0x2a')]&&!this['hasDirtyComment'];}['render'](){super['render'](),this[_0x2e0d('0x0')]();}[_0x2e0d('0x2f')](){this[_0x2e0d('0x5')][_0x2e0d('0x2f')]();}[_0x2e0d('0x36')](){this[_0x2e0d('0x32')][_0x2e0d('0x36')]();for(const _0x66935f of this[_0x2e0d('0x27')])_0x66935f[_0x2e0d('0x36')]();super[_0x2e0d('0x36')]();}['refreshVisibleViews'](){this[_0x2e0d('0x19')]?this['_rearrangeCollapse']():this[_0x2e0d('0x1a')]();}['_handleNewCommentModel'](_0x25d86a,_0x3c65f7){const _0x14f6e5=new this[(_0x2e0d('0x13'))][(_0x2e0d('0x1e'))](this['locale'],_0x25d86a,{'maxCommentCharsWhenCollapsed':this[_0x2e0d('0x13')][_0x2e0d('0x26')],'formatDateTime':this[_0x2e0d('0x13')][_0x2e0d('0x15')],'editorConfig':this['_config'][_0x2e0d('0x14')]});_0x14f6e5['viewUid']=_0x25d86a['id'],_0x14f6e5[_0x2e0d('0x1b')]('removeComment')['to'](this),_0x14f6e5[_0x2e0d('0x1b')](_0x2e0d('0x2b'))['to'](this),_0x14f6e5['delegate']('resolveCommentThread')['to'](this),_0x14f6e5['delegate'](_0x2e0d('0x12'))['to'](this),_0x14f6e5[_0x2e0d('0x1b')](_0x2e0d('0x1c'))['to'](this),this['listenTo'](_0x14f6e5,_0x2e0d('0x28'),()=>this[_0x2e0d('0x4')]()),this[_0x2e0d('0x27')][_0x2e0d('0x2')](_0x14f6e5,_0x3c65f7);}[_0x2e0d('0x38')](_0x3024d0){const _0x336084=this[_0x2e0d('0x9')][_0x2e0d('0x2d')](_0x3024d0);return this[_0x2e0d('0x17')]?this['resolvedCommentView'][_0x2e0d('0x11')]>_0x3024d0[_0x2e0d('0x11')]?_0x336084-0x1:_0x336084:_0x336084-0x1;}[_0x2e0d('0x3')](){if(this[_0x2e0d('0x9')][_0x2e0d('0x25')]&&this[_0x2e0d('0x9')][_0x2e0d('0x31')]){const _0xab3f2c={'id':'resolved','author':this['_model'][_0x2e0d('0x25')],'authoredAt':this[_0x2e0d('0x9')]['resolvedAt'],'content':_0x5054b5(this[_0x2e0d('0xa')],_0x2e0d('0x34')),'attributes':{}};this[_0x2e0d('0x17')]=new this['_config'][(_0x2e0d('0x1e'))](this[_0x2e0d('0xa')],_0xab3f2c,{'maxCommentCharsWhenCollapsed':this[_0x2e0d('0x13')][_0x2e0d('0x26')],'formatDateTime':this[_0x2e0d('0x13')][_0x2e0d('0x15')],'editorConfig':this['_config'][_0x2e0d('0x14')],'isSystemComment':!0x0}),this[_0x2e0d('0x27')]['add'](this[_0x2e0d('0x17')],this[_0x2e0d('0x9')][_0x2e0d('0x2d')](_0xab3f2c));}else this[_0x2e0d('0x17')]&&(this['commentViews']['remove'](this[_0x2e0d('0x17')]),this[_0x2e0d('0x17')][_0x2e0d('0x36')](),this[_0x2e0d('0x17')]=null);this[_0x2e0d('0x0')]();}['_handleRemoveCommentModel'](_0x20fa11){const _0x4c962f=this[_0x2e0d('0x27')][_0x2e0d('0xc')](_0x20fa11['id']);this[_0x2e0d('0x1f')](_0x4c962f),_0x4c962f[_0x2e0d('0x22')]&&this[_0x2e0d('0x4')](),_0x4c962f[_0x2e0d('0x36')]();}[_0x2e0d('0x4')](){this[_0x2e0d('0x6')]=Array['from'](this[_0x2e0d('0x27')])[_0x2e0d('0xb')](_0x263845=>_0x263845[_0x2e0d('0x22')]);}[_0x2e0d('0x18')](){const _0x492490=function(_0x20ba76){const _0x2628a3=new _0x5c43ae();for(const _0x35ab37 of _0x20ba76)_0x2628a3[_0x2e0d('0x2')](_0x35ab37);return _0x2628a3;}(this[_0x2e0d('0x27')]),_0x3ea828=this['_collapsedCommentsView']['count'];for(let _0x19e358=0x1;_0x19e358<=_0x3ea828;_0x19e358++)_0x492490['remove'](0x1);for(const _0x28402c of _0x492490)_0x28402c[_0x2e0d('0x33')]();_0x3ea828>0x0&&_0x492490[_0x2e0d('0x2')](this[_0x2e0d('0x32')],0x1),ss(_0x4141e9(Array[_0x2e0d('0x2e')](this['visibleViews']),Array[_0x2e0d('0x2e')](_0x492490)),this[_0x2e0d('0x24')],_0x492490);}[_0x2e0d('0x1a')](){ss(_0x4141e9(Array[_0x2e0d('0x2e')](this[_0x2e0d('0x24')]),Array[_0x2e0d('0x2e')](this['commentViews'])),this[_0x2e0d('0x24')],this[_0x2e0d('0x27')]);for(const _0x3879e0 of this[_0x2e0d('0x24')])_0x3879e0[_0x2e0d('0xd')]();}}function ss(_0x21bc31,_0xe3a488,_0x4e648a){let _0x2bf598=0x0;for(const _0x1f13dd of _0x21bc31)switch(_0x1f13dd){case'insert':_0xe3a488['add'](_0x4e648a[_0x2e0d('0x20')](_0x2bf598),_0x2bf598),_0x2bf598++;break;case _0x2e0d('0x16'):_0xe3a488[_0x2e0d('0xc')](_0x2bf598);break;case _0x2e0d('0x35'):_0x2bf598++;}}
23
+ const _0x1806=['_calculatePosition','resolvedBy','remove','delegate','setTemplate','resolveCommentThread','weight','equal','authoredAt','from','change:isResolved','set','some','comments','formatDateTime','bind','locale','_updateHasDirtyComment','_handleRemoveCommentModel','resolvedAt','maxCommentCharsWhenCollapsed','maxCommentsWhenCollapsed','listenTo','collapse','Marked\x20as\x20resolved','editorConfig','_rearrangeCollapse','isActive','viewUid','commentViews','change:hasDirtyComment','count','createCollection','_collapsedCommentsView','element','_shouldCollapse','maxThreadTotalWeight','resolvedCommentView','change:isEditMode','delete','_handleInfoComment','length','destroy','CommentView','isEditMode','commentUpdated','ck-thread__comments','_model','_config','editorReady','_handleNewCommentModel','_rearrangeExpand','hasDirtyComment','visibleViews','refreshVisibleViews','_findOptimalIndex','render','editorDestroyed','add','focus'];(function(_0x371447,_0x18063f){const _0x476516=function(_0x371fa0){while(--_0x371fa0){_0x371447['push'](_0x371447['shift']());}};_0x476516(++_0x18063f);}(_0x1806,0x14b));const _0x4765=function(_0x371447,_0x18063f){_0x371447=_0x371447-0x0;let _0x476516=_0x1806[_0x371447];return _0x476516;};import{View as _0x3f6fc7}from'ckeditor5/src/ui';import{diff as _0x21f32e,Collection as _0x28aed6}from'ckeditor5/src/utils';import{getTranslation as _0x2379b9}from'../../../utils/common-translations';import _0x4b3d40 from'./collapsedcommentsview';export default class wt extends _0x3f6fc7{constructor(_0x53f40c,_0x5d738d,_0x2afc28){super(_0x53f40c),this[_0x4765('0x28')](_0x4765('0x15'),!0x1),this[_0x4765('0x28')]('length',_0x5d738d['comments'][_0x4765('0xa')]),this[_0x4765('0x28')](_0x4765('0x38'),!0x1),this[_0x4765('0x10')]=_0x5d738d,this[_0x4765('0x11')]=_0x2afc28,this[_0x4765('0x3a')]=this[_0x4765('0x1')](),this['visibleViews']=this['createCollection'](),this[_0x4765('0x6')]=null,this[_0x4765('0x2')]=new _0x4b3d40(_0x53f40c),this['_collapsedCommentsView'][_0x4765('0x2c')](_0x4765('0x0'))['to'](this,_0x4765('0xa'),_0x20b398=>_0x20b398-this[_0x4765('0x11')][_0x4765('0x32')]);for(const _0x13d522 of _0x5d738d['comments'])this['_handleNewCommentModel'](_0x13d522);this[_0x4765('0x9')](),this[_0x4765('0x33')](_0x5d738d['comments'],_0x4765('0x1b'),(_0x17dd5f,_0x2d289d)=>{const _0x48f831=this[_0x4765('0x1d')](_0x2d289d);this[_0x4765('0xa')]++,this[_0x4765('0x13')](_0x2d289d,_0x48f831),this[_0x4765('0x17')]();}),this[_0x4765('0x33')](_0x5d738d[_0x4765('0x2a')],'remove',(_0x395706,_0x461da7)=>{this[_0x4765('0xa')]--,this[_0x4765('0x2f')](_0x461da7),this[_0x4765('0x17')]();}),this['listenTo'](_0x5d738d,_0x4765('0xe'),()=>this['refreshVisibleViews']()),this[_0x4765('0x33')](_0x5d738d,_0x4765('0x27'),()=>this[_0x4765('0x9')]()),this['on']('change:isActive',()=>this[_0x4765('0x17')]()),this['on'](_0x4765('0x3b'),()=>this[_0x4765('0x17')]()),this[_0x4765('0x21')]({'tag':'ul','attributes':{'class':[_0x4765('0xf')]},'children':this[_0x4765('0x16')]});}get[_0x4765('0x4')](){return this[_0x4765('0x10')][_0x4765('0x23')]>this[_0x4765('0x11')][_0x4765('0x5')]&&!this[_0x4765('0x38')]&&!this[_0x4765('0x15')];}[_0x4765('0x19')](){super[_0x4765('0x19')](),this['refreshVisibleViews']();}[_0x4765('0x1c')](){this[_0x4765('0x3')][_0x4765('0x1c')]();}[_0x4765('0xb')](){this['_collapsedCommentsView']['destroy']();for(const _0x477a5c of this[_0x4765('0x3a')])_0x477a5c[_0x4765('0xb')]();super[_0x4765('0xb')]();}['refreshVisibleViews'](){this[_0x4765('0x4')]?this[_0x4765('0x37')]():this[_0x4765('0x14')]();}['_handleNewCommentModel'](_0x19e94b,_0x3e85b5){const _0x44407b=new this[(_0x4765('0x11'))][(_0x4765('0xc'))](this[_0x4765('0x2d')],_0x19e94b,{'maxCommentCharsWhenCollapsed':this[_0x4765('0x11')][_0x4765('0x31')],'formatDateTime':this[_0x4765('0x11')][_0x4765('0x2b')],'editorConfig':this[_0x4765('0x11')][_0x4765('0x36')]});_0x44407b[_0x4765('0x39')]=_0x19e94b['id'],_0x44407b['delegate']('removeComment')['to'](this),_0x44407b[_0x4765('0x20')]('updateComment')['to'](this),_0x44407b[_0x4765('0x20')](_0x4765('0x22'))['to'](this),_0x44407b[_0x4765('0x20')](_0x4765('0x12'))['to'](this),_0x44407b[_0x4765('0x20')](_0x4765('0x1a'))['to'](this),this[_0x4765('0x33')](_0x44407b,_0x4765('0x7'),()=>this[_0x4765('0x2e')]()),this['commentViews'][_0x4765('0x1b')](_0x44407b,_0x3e85b5);}[_0x4765('0x1d')](_0x32ad6e){const _0x1abed0=this[_0x4765('0x10')][_0x4765('0x18')](_0x32ad6e);return this[_0x4765('0x6')]?this[_0x4765('0x6')][_0x4765('0x25')]>_0x32ad6e['authoredAt']?_0x1abed0-0x1:_0x1abed0:_0x1abed0-0x1;}[_0x4765('0x9')](){if(this['_model'][_0x4765('0x1e')]&&this[_0x4765('0x10')][_0x4765('0x30')]){const _0x3c9fb9={'id':'resolved','author':this[_0x4765('0x10')][_0x4765('0x1e')],'authoredAt':this[_0x4765('0x10')][_0x4765('0x30')],'content':_0x2379b9(this[_0x4765('0x2d')],_0x4765('0x35')),'attributes':{}};this[_0x4765('0x6')]=new this[(_0x4765('0x11'))][(_0x4765('0xc'))](this[_0x4765('0x2d')],_0x3c9fb9,{'maxCommentCharsWhenCollapsed':this[_0x4765('0x11')][_0x4765('0x31')],'formatDateTime':this['_config'][_0x4765('0x2b')],'editorConfig':this[_0x4765('0x11')][_0x4765('0x36')],'isSystemComment':!0x0}),this[_0x4765('0x3a')]['add'](this['resolvedCommentView'],this[_0x4765('0x10')]['_findOptimalIndex'](_0x3c9fb9));}else this[_0x4765('0x6')]&&(this[_0x4765('0x3a')]['remove'](this[_0x4765('0x6')]),this[_0x4765('0x6')][_0x4765('0xb')](),this[_0x4765('0x6')]=null);this[_0x4765('0x17')]();}[_0x4765('0x2f')](_0x2013ce){const _0x577d0f=this[_0x4765('0x3a')]['remove'](_0x2013ce['id']);this['stopListening'](_0x577d0f),_0x577d0f[_0x4765('0xd')]&&this[_0x4765('0x2e')](),_0x577d0f[_0x4765('0xb')]();}[_0x4765('0x2e')](){this[_0x4765('0x15')]=Array[_0x4765('0x26')](this[_0x4765('0x3a')])[_0x4765('0x29')](_0x43e8b4=>_0x43e8b4[_0x4765('0xd')]);}['_rearrangeCollapse'](){const _0x199efb=function(_0x437d75){const _0x1fc6c8=new _0x28aed6();for(const _0x10ca81 of _0x437d75)_0x1fc6c8[_0x4765('0x1b')](_0x10ca81);return _0x1fc6c8;}(this[_0x4765('0x3a')]),_0x2a1c2a=this['_collapsedCommentsView'][_0x4765('0x0')];for(let _0x206560=0x1;_0x206560<=_0x2a1c2a;_0x206560++)_0x199efb[_0x4765('0x1f')](0x1);for(const _0x5710c7 of _0x199efb)_0x5710c7[_0x4765('0x34')]();_0x2a1c2a>0x0&&_0x199efb[_0x4765('0x1b')](this[_0x4765('0x2')],0x1),ss(_0x21f32e(Array[_0x4765('0x26')](this[_0x4765('0x16')]),Array[_0x4765('0x26')](_0x199efb)),this[_0x4765('0x16')],_0x199efb);}[_0x4765('0x14')](){ss(_0x21f32e(Array[_0x4765('0x26')](this['visibleViews']),Array['from'](this[_0x4765('0x3a')])),this[_0x4765('0x16')],this[_0x4765('0x3a')]);for(const _0x5e99d1 of this[_0x4765('0x16')])_0x5e99d1['expand']();}}function ss(_0x31dbc4,_0x108c9a,_0xfc5ec6){let _0x303557=0x0;for(const _0x28c386 of _0x31dbc4)switch(_0x28c386){case'insert':_0x108c9a['add'](_0xfc5ec6['get'](_0x303557),_0x303557),_0x303557++;break;case _0x4765('0x8'):_0x108c9a[_0x4765('0x1f')](_0x303557);break;case _0x4765('0x24'):_0x303557++;}}