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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +4 -3
  3. package/src/annotations/annotation.d.ts +86 -86
  4. package/src/annotations/annotation.js +1 -1
  5. package/src/annotations/annotationcollection.d.ts +94 -94
  6. package/src/annotations/annotationcollection.js +1 -1
  7. package/src/annotations/annotations.d.ts +150 -150
  8. package/src/annotations/annotations.js +1 -1
  9. package/src/annotations/annotationsuis.d.ts +228 -228
  10. package/src/annotations/annotationsuis.js +1 -1
  11. package/src/annotations/editorannotations.d.ts +63 -63
  12. package/src/annotations/editorannotations.js +1 -1
  13. package/src/annotations/inlineannotations.d.ts +86 -86
  14. package/src/annotations/inlineannotations.js +1 -1
  15. package/src/annotations/narrowsidebar.d.ts +81 -81
  16. package/src/annotations/narrowsidebar.js +1 -1
  17. package/src/annotations/sidebar.d.ts +96 -96
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.d.ts +25 -25
  20. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  21. package/src/annotations/view/annotationview.d.ts +86 -86
  22. package/src/annotations/view/annotationview.js +1 -1
  23. package/src/annotations/view/sidebaritemview.d.ts +51 -51
  24. package/src/annotations/view/sidebaritemview.js +1 -1
  25. package/src/annotations/view/sidebarview.d.ts +28 -28
  26. package/src/annotations/view/sidebarview.js +1 -1
  27. package/src/annotations/widesidebar.d.ts +73 -73
  28. package/src/annotations/widesidebar.js +1 -1
  29. package/src/augmentation.d.ts +48 -48
  30. package/src/comments/addcommentthreadcommand.d.ts +31 -31
  31. package/src/comments/addcommentthreadcommand.js +1 -1
  32. package/src/comments/commentsarchive.d.ts +27 -27
  33. package/src/comments/commentsarchive.js +1 -1
  34. package/src/comments/commentsarchiveui.d.ts +34 -34
  35. package/src/comments/commentsarchiveui.js +1 -1
  36. package/src/comments/commentsediting.d.ts +75 -75
  37. package/src/comments/commentsediting.js +1 -1
  38. package/src/comments/commentsrepository.d.ts +1088 -1088
  39. package/src/comments/commentsrepository.js +1 -1
  40. package/src/comments/commentsui.d.ts +29 -29
  41. package/src/comments/commentsui.js +1 -1
  42. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +13 -13
  43. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  44. package/src/comments/integrations/importword.d.ts +17 -17
  45. package/src/comments/integrations/importword.js +1 -1
  46. package/src/comments/ui/commenteditor/commenteditor.d.ts +32 -32
  47. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  48. package/src/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
  49. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
  51. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  52. package/src/comments/ui/commentthreadcontroller.d.ts +64 -64
  53. package/src/comments/ui/commentthreadcontroller.js +1 -1
  54. package/src/comments/ui/view/basecommentthreadview.d.ts +108 -108
  55. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  56. package/src/comments/ui/view/basecommentview.d.ts +108 -108
  57. package/src/comments/ui/view/basecommentview.js +1 -1
  58. package/src/comments/ui/view/collapsedcommentsview.d.ts +9 -9
  59. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  60. package/src/comments/ui/view/commentcontentview.d.ts +10 -10
  61. package/src/comments/ui/view/commentcontentview.js +1 -1
  62. package/src/comments/ui/view/commentinputview.d.ts +82 -82
  63. package/src/comments/ui/view/commentinputview.js +1 -1
  64. package/src/comments/ui/view/commentsarchiveview.d.ts +34 -34
  65. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  66. package/src/comments/ui/view/commentslistview.d.ts +96 -96
  67. package/src/comments/ui/view/commentslistview.js +1 -1
  68. package/src/comments/ui/view/commentthreadheaderview.d.ts +46 -46
  69. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  70. package/src/comments/ui/view/commentthreadinputview.d.ts +37 -37
  71. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  72. package/src/comments/ui/view/commentthreadview.d.ts +113 -113
  73. package/src/comments/ui/view/commentthreadview.js +1 -1
  74. package/src/comments/ui/view/commentview.d.ts +239 -239
  75. package/src/comments/ui/view/commentview.js +1 -1
  76. package/src/comments.d.ts +31 -31
  77. package/src/comments.js +1 -1
  78. package/src/commentsonly.d.ts +29 -29
  79. package/src/commentsonly.js +1 -1
  80. package/src/config.d.ts +172 -172
  81. package/src/index.d.ts +21 -21
  82. package/src/index.js +1 -1
  83. package/src/utils/common-translations.d.ts +5 -5
  84. package/src/utils/common-translations.js +1 -1
  85. package/src/utils/createmutationobserver.d.ts +13 -13
  86. package/src/utils/createmutationobserver.js +1 -1
@@ -1,46 +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
- };
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadheaderview
3
+ */
4
+ import { View, ButtonView } from 'ckeditor5/src/ui.js';
5
+ import type { Locale } from 'ckeditor5/src/utils.js';
6
+ import type { CommentThread } from '../../commentsrepository.js';
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
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5874=['isEnabled','ck-context-wrapper','execute','querySelector','context','bind','listenTo','offsetWidth','bindTemplate','ck-context--quotes','lastIndexOf','length','reopenButtonView','Comment\x20was\x20made\x20on\x20an\x20element','substring','isVisible','label','ck-context__value','classList','div','mouseleave','scrollWidth','overlay','_attachContextActions','contextValue','isResolvable','fire','_createReopenButton','render','value','tooltip','_trimContextValue','...','.ck-context','locale','hasContext','mouseenter','reopenCommentThread','setTemplate','ck-thread__header','isReadOnly','span','_model','add'];(function(_0x161eef,_0x5874db){const _0x5b5b7b=function(_0xa5a862){while(--_0xa5a862){_0x161eef['push'](_0x161eef['shift']());}};_0x5b5b7b(++_0x5874db);}(_0x5874,0xc0));const _0x5b5b=function(_0x161eef,_0x5874db){_0x161eef=_0x161eef-0x0;let _0x5b5b7b=_0x5874[_0x161eef];return _0x5b5b7b;};import{View as _0x4970dc,ButtonView as _0x586cf4}from'ckeditor5/src/ui';import{getTranslation as _0x493f88}from'../../../utils/common-translations';import _0x36d0a1 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x4970dc{constructor(_0x1d976a,_0x1c93d5){super(_0x1d976a);const _0x125f16=this[_0x5b5b('0x24')];this[_0x5b5b('0x1a')]=_0x1c93d5,this[_0x5b5b('0x28')]=this['_createReopenButton'](),this['bind'](_0x5b5b('0x13'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x20'),_0x4919d9=>!!_0x4919d9),this[_0x5b5b('0x21')](_0x5b5b('0x8'))['to'](this['_model'],_0x5b5b('0x20'),_0x892379=>_0x892379&&_0x892379[_0x5b5b('0xd')]?this['_trimContextValue'](_0x892379[_0x5b5b('0xd')]):_0x493f88(this[_0x5b5b('0x12')],_0x5b5b('0x29'))),this[_0x5b5b('0x16')]({'tag':_0x5b5b('0x3'),'attributes':{'class':[_0x5b5b('0x17')]},'children':[{'tag':_0x5b5b('0x3'),'attributes':{'class':[_0x5b5b('0x1d')]},'children':[{'tag':_0x5b5b('0x3'),'attributes':{'class':['ck-context',_0x125f16['if'](_0x5b5b('0x13'),_0x5b5b('0x25'))]},'children':[{'tag':_0x5b5b('0x19'),'attributes':{'class':[_0x5b5b('0x1')]},'children':[{'text':_0x125f16['to']('contextValue')}]}]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this[_0x5b5b('0x28')]]}]});}[_0x5b5b('0xc')](){super['render'](),this[_0x5b5b('0x7')]();}[_0x5b5b('0xb')](){const _0x4d6e39=new _0x586cf4(this[_0x5b5b('0x12')]);return _0x4d6e39[_0x5b5b('0x0')]=_0x493f88(this[_0x5b5b('0x12')],'Reopen'),_0x4d6e39[_0x5b5b('0xe')]=_0x493f88(this['locale'],'Reopen'),_0x4d6e39['icon']=_0x36d0a1,_0x4d6e39[_0x5b5b('0x21')](_0x5b5b('0x1c'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x18'),_0x3e9798=>!_0x3e9798),_0x4d6e39[_0x5b5b('0x21')](_0x5b5b('0x2b'))['to'](this[_0x5b5b('0x1a')],_0x5b5b('0x9')),_0x4d6e39['on'](_0x5b5b('0x1e'),()=>{this[_0x5b5b('0xa')](_0x5b5b('0x15'),this['_model']['id']);}),_0x4d6e39;}[_0x5b5b('0xf')](_0x14effc){if(_0x14effc[_0x5b5b('0x27')]<0x96)return _0x14effc;const _0x3578bc=_0x14effc[_0x5b5b('0x26')]('\x20',0x93);return _0x14effc[_0x5b5b('0x2a')](0x0,_0x3578bc>-0x1?_0x3578bc:0x93)+_0x5b5b('0x10');}[_0x5b5b('0x7')](){const _0x2294dc=this['element']['querySelector'](_0x5b5b('0x11')),_0x5a90ed=_0x2294dc[_0x5b5b('0x1f')]('.ck-context__value');this['listenTo'](_0x2294dc,_0x5b5b('0x14'),()=>{_0x5a90ed[_0x5b5b('0x23')]<_0x5a90ed[_0x5b5b('0x5')]&&_0x2294dc[_0x5b5b('0x2')][_0x5b5b('0x1b')](_0x5b5b('0x6'));}),this[_0x5b5b('0x22')](_0x2294dc,_0x5b5b('0x4'),()=>{_0x2294dc[_0x5b5b('0x2')]['remove']('overlay');});}}
23
+ const _0x5082=['classList','icon','ck-annotation__actions','reopenCommentThread','listenTo','bind','lastIndexOf','querySelector','render','tooltip','mouseleave','substring','div','length','_trimContextValue','ck-context','reopenButtonView','ck-context-wrapper','overlay','fire','remove','context','span','locale','_createReopenButton','isReadOnly','ck-context--quotes','bindTemplate','value','.ck-context__value','...','hasContext','contextValue','_attachContextActions','.ck-context','label','_model','ck-context__value','Reopen'];(function(_0x20d351,_0x508277){const _0x16be7d=function(_0x41fbe0){while(--_0x41fbe0){_0x20d351['push'](_0x20d351['shift']());}};_0x16be7d(++_0x508277);}(_0x5082,0xed));const _0x16be=function(_0x20d351,_0x508277){_0x20d351=_0x20d351-0x0;let _0x16be7d=_0x5082[_0x20d351];return _0x16be7d;};import{View as _0x2364ef,ButtonView as _0x59fa77}from'ckeditor5/src/ui.js';import{getTranslation as _0x36b754}from'../../../utils/common-translations.js';import _0x4b2b34 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Rt extends _0x2364ef{constructor(_0x314303,_0xd3df4d){super(_0x314303);const _0x35bdb8=this[_0x16be('0x18')];this[_0x16be('0x21')]=_0xd3df4d,this[_0x16be('0xd')]=this[_0x16be('0x15')](),this[_0x16be('0x2')](_0x16be('0x1c'))['to'](this['_model'],_0x16be('0x12'),_0x2f9b44=>!!_0x2f9b44),this[_0x16be('0x2')](_0x16be('0x1d'))['to'](this[_0x16be('0x21')],_0x16be('0x12'),_0x139c59=>_0x139c59&&_0x139c59[_0x16be('0x19')]?this[_0x16be('0xb')](_0x139c59[_0x16be('0x19')]):_0x36b754(this[_0x16be('0x14')],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':_0x16be('0x9'),'attributes':{'class':['ck-thread__header']},'children':[{'tag':_0x16be('0x9'),'attributes':{'class':[_0x16be('0xe')]},'children':[{'tag':_0x16be('0x9'),'attributes':{'class':[_0x16be('0xc'),_0x35bdb8['if'](_0x16be('0x1c'),_0x16be('0x17'))]},'children':[{'tag':_0x16be('0x13'),'attributes':{'class':[_0x16be('0x22')]},'children':[{'text':_0x35bdb8['to']('contextValue')}]}]}]},{'tag':_0x16be('0x9'),'attributes':{'class':[_0x16be('0x26')]},'children':[this[_0x16be('0xd')]]}]});}[_0x16be('0x5')](){super[_0x16be('0x5')](),this[_0x16be('0x1e')]();}[_0x16be('0x15')](){const _0x30af88=new _0x59fa77(this[_0x16be('0x14')]);return _0x30af88[_0x16be('0x20')]=_0x36b754(this[_0x16be('0x14')],_0x16be('0x23')),_0x30af88[_0x16be('0x6')]=_0x36b754(this[_0x16be('0x14')],_0x16be('0x23')),_0x30af88[_0x16be('0x25')]=_0x4b2b34,_0x30af88['bind']('isEnabled')['to'](this[_0x16be('0x21')],_0x16be('0x16'),_0x56a1a9=>!_0x56a1a9),_0x30af88[_0x16be('0x2')]('isVisible')['to'](this[_0x16be('0x21')],'isResolvable'),_0x30af88['on']('execute',()=>{this[_0x16be('0x10')](_0x16be('0x0'),this[_0x16be('0x21')]['id']);}),_0x30af88;}['_trimContextValue'](_0x105748){if(_0x105748[_0x16be('0xa')]<0x96)return _0x105748;const _0x11a864=_0x105748[_0x16be('0x3')]('\x20',0x93);return _0x105748[_0x16be('0x8')](0x0,_0x11a864>-0x1?_0x11a864:0x93)+_0x16be('0x1b');}[_0x16be('0x1e')](){const _0x3b7d99=this['element'][_0x16be('0x4')](_0x16be('0x1f')),_0x47b09d=_0x3b7d99[_0x16be('0x4')](_0x16be('0x1a'));this['listenTo'](_0x3b7d99,'mouseenter',()=>{_0x47b09d['offsetWidth']<_0x47b09d['scrollWidth']&&_0x3b7d99[_0x16be('0x24')]['add'](_0x16be('0xf'));}),this[_0x16be('0x1')](_0x3b7d99,_0x16be('0x7'),()=>{_0x3b7d99[_0x16be('0x24')][_0x16be('0x11')](_0x16be('0xf'));});}}
@@ -1,37 +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
- }
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadinputview
3
+ */
4
+ import { View } from 'ckeditor5/src/ui.js';
5
+ import CommentInputView from './commentinputview.js';
6
+ import type { Locale } from 'ckeditor5/src/utils.js';
7
+ import type { EditorConfig } from 'ckeditor5/src/core.js';
8
+ import { UserView, type User } from 'ckeditor5-collaboration';
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 _0x7a12=['set','change:showInput','createEditor','editor','focusTracker','userView','showInput','destroy','ck-comment__input-container--active','extendTemplate','ck-thread__input','ck-comment__input-container','commentInputView','then','value','bind','bindTemplate','showButtons','isFocused'];(function(_0x2eab6c,_0x7a12f1){var _0x11af23=function(_0x5386c1){while(--_0x5386c1){_0x2eab6c['push'](_0x2eab6c['shift']());}};_0x11af23(++_0x7a12f1);}(_0x7a12,0x128));var _0x11af=function(_0x2eab6c,_0x7a12f1){_0x2eab6c=_0x2eab6c-0x0;var _0x11af23=_0x7a12[_0x2eab6c];return _0x11af23;};import{View as _0x31bddb}from'ckeditor5/src/ui';import _0x4d8b04 from'./commentinputview';import{UserView as _0x46672c}from'ckeditor5-collaboration/src/collaboration-core';export default class Ct extends _0x31bddb{constructor(_0x94df9a,_0x144b84,_0x1b0467){super(_0x94df9a),this[_0x11af('0x1')]=new _0x4d8b04(_0x94df9a,_0x1b0467),this[_0x11af('0x1')][_0x11af('0x4')](_0x11af('0x6'))['to'](this[_0x11af('0x1')][_0x11af('0xc')],_0x11af('0x7'),this[_0x11af('0x1')],_0x11af('0x3'),(_0x4f8bd0,_0xe37c08)=>_0x4f8bd0||!!_0xe37c08),this[_0x11af('0x8')](_0x11af('0xe'),!0x1),this['on'](_0x11af('0x9'),()=>{this[_0x11af('0xe')]&&!this[_0x11af('0x1')][_0x11af('0xb')]&&this[_0x11af('0x1')][_0x11af('0xa')]();}),this[_0x11af('0xd')]=new _0x46672c(_0x94df9a,_0x144b84),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user'}}),this['commentInputView'][_0x11af('0x11')]({'attributes':{'class':_0x11af('0x12')}}),this['setTemplate']({'tag':'div','attributes':{'class':[_0x11af('0x0'),this[_0x11af('0x5')]['if'](_0x11af('0xe'),_0x11af('0x10'))]},'children':[this['userView'],this[_0x11af('0x1')]]});}[_0x11af('0xf')](){return this['commentInputView'][_0x11af('0xf')]()[_0x11af('0x2')](()=>super[_0x11af('0xf')]());}}
23
+ var _0x214b=['ck-comment__input-container','destroy','commentInputView','delegate','isFocused','editorReady','set','showInput','userView','ck-thread__input','then','setTemplate','bindTemplate','value','ck-thread__user','ck-comment__input-container--active','showButtons','extendTemplate','createEditor','focusTracker','bind'];(function(_0x54bd99,_0x214b9c){var _0x3d9d63=function(_0x530353){while(--_0x530353){_0x54bd99['push'](_0x54bd99['shift']());}};_0x3d9d63(++_0x214b9c);}(_0x214b,0x1c8));var _0x3d9d=function(_0x54bd99,_0x214b9c){_0x54bd99=_0x54bd99-0x0;var _0x3d9d63=_0x214b[_0x54bd99];return _0x3d9d63;};import{View as _0x324c2c}from'ckeditor5/src/ui.js';import _0x237cf5 from'./commentinputview.js';import{UserView as _0x552bf1}from'ckeditor5-collaboration';export default class wt extends _0x324c2c{constructor(_0x7f9254,_0x54457b,_0xa77a9f){super(_0x7f9254),this[_0x3d9d('0x8')]=new _0x237cf5(_0x7f9254,_0xa77a9f),this[_0x3d9d('0x8')][_0x3d9d('0x5')](_0x3d9d('0x1'))['to'](this[_0x3d9d('0x8')][_0x3d9d('0x4')],_0x3d9d('0xa'),this['commentInputView'],_0x3d9d('0x13'),(_0x5e6250,_0x11f928)=>_0x5e6250||!!_0x11f928),this[_0x3d9d('0xc')](_0x3d9d('0xd'),!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this[_0x3d9d('0x8')]['editor']&&this[_0x3d9d('0x8')][_0x3d9d('0x3')]();}),this[_0x3d9d('0x8')][_0x3d9d('0x9')](_0x3d9d('0xb'))['to'](this),this[_0x3d9d('0x8')][_0x3d9d('0x9')]('editorDestroyed')['to'](this),this[_0x3d9d('0xe')]=new _0x552bf1(_0x7f9254,_0x54457b),this[_0x3d9d('0xe')][_0x3d9d('0x2')]({'attributes':{'class':_0x3d9d('0x14')}}),this[_0x3d9d('0x8')][_0x3d9d('0x2')]({'attributes':{'class':_0x3d9d('0xf')}}),this[_0x3d9d('0x11')]({'tag':'div','attributes':{'class':[_0x3d9d('0x6'),this[_0x3d9d('0x12')]['if'](_0x3d9d('0xd'),_0x3d9d('0x0'))]},'children':[this[_0x3d9d('0xe')],this[_0x3d9d('0x8')]]});}[_0x3d9d('0x7')](){return this[_0x3d9d('0x8')][_0x3d9d('0x7')]()[_0x3d9d('0x10')](()=>super['destroy']());}}
@@ -1,113 +1,113 @@
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
- * These views are:
37
- *
38
- * * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
39
- * resolved),
40
- * * {@link ~CommentThreadView#commentsListView `commentsListView`},
41
- * * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
42
- *
43
- * @readonly
44
- */
45
- readonly commentThreadChildren: ViewCollection;
46
- /**
47
- * `ConfirmView` uses this element as a container for confirmation dialog.
48
- *
49
- * The element is set after `view#render()` is called.
50
- *
51
- * @member {HTMLElement|null} #containerElement
52
- */
53
- containerElement: HTMLElement | null;
54
- /**
55
- * Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
56
- *
57
- * @readonly
58
- */
59
- readonly resolveButton: ButtonView;
60
- /**
61
- * @inheritDoc
62
- */
63
- constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
64
- /**
65
- * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
66
- *
67
- * Overwrite this method if you want to set a custom template for the comment thread view.
68
- *
69
- * The default template looks as follows:
70
- *
71
- * ```ts
72
- * const bind = this.bindTemplate;
73
- *
74
- * {
75
- * tag: 'div',
76
- *
77
- * attributes: {
78
- * class: [
79
- * 'ck-thread',
80
- * 'ck-reset_all-excluded',
81
- * bind.if( 'isActive', 'ck-thread--active' ),
82
- * bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
83
- * bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
84
- * ],
85
- * 'data-thread-id': this._model.id,
86
- * // Needed for managing focus after adding new comment.
87
- * tabindex: -1
88
- * },
89
- *
90
- * children: [
91
- * {
92
- * tag: 'div',
93
- * attributes: {
94
- * class: 'ck-thread__container'
95
- * },
96
- * children: this.commentThreadChildren
97
- * }
98
- * ]
99
- * };
100
- * ```
101
- *
102
- * See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
103
- * the possible annotation customizations.
104
- *
105
- * @returns The definition of a comment thread view's template.
106
- */
107
- getTemplate(): TemplateDefinition;
108
- /**
109
- * @inheritDoc
110
- */
111
- render(): void;
112
- }
113
- export {};
1
+ /**
2
+ * @module comments/comments/ui/view/commentthreadview
3
+ * @publicApi
4
+ */
5
+ import { type Locale } from 'ckeditor5/src/utils.js';
6
+ import { type User } from 'ckeditor5-collaboration';
7
+ import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui.js';
8
+ import BaseCommentThreadView from './basecommentthreadview.js';
9
+ import type { CommentThread } from '../../commentsrepository.js';
10
+ import type { CommentThreadConfig } from '../../../config.js';
11
+ declare const CommentThreadView_base: import("ckeditor5/src/utils.js").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin.js").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
+ * These views are:
37
+ *
38
+ * * {@link ~CommentThreadView#commentThreadHeaderView `commentThreadHeaderView`} (added at the beginning when the comment thread is
39
+ * resolved),
40
+ * * {@link ~CommentThreadView#commentsListView `commentsListView`},
41
+ * * {@link ~CommentThreadView#commentThreadInputView `commentThreadInputView`}.
42
+ *
43
+ * @readonly
44
+ */
45
+ readonly commentThreadChildren: ViewCollection;
46
+ /**
47
+ * `ConfirmView` uses this element as a container for confirmation dialog.
48
+ *
49
+ * The element is set after `view#render()` is called.
50
+ *
51
+ * @member {HTMLElement|null} #containerElement
52
+ */
53
+ containerElement: HTMLElement | null;
54
+ /**
55
+ * Resolve button view. Resolve button fires the 'resolveCommentThread' event when submitted.
56
+ *
57
+ * @readonly
58
+ */
59
+ readonly resolveButton: ButtonView;
60
+ /**
61
+ * @inheritDoc
62
+ */
63
+ constructor(locale: Locale, model: CommentThread, localUser: User, config: CommentThreadConfig);
64
+ /**
65
+ * Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
66
+ *
67
+ * Overwrite this method if you want to set a custom template for the comment thread view.
68
+ *
69
+ * The default template looks as follows:
70
+ *
71
+ * ```ts
72
+ * const bind = this.bindTemplate;
73
+ *
74
+ * {
75
+ * tag: 'div',
76
+ *
77
+ * attributes: {
78
+ * class: [
79
+ * 'ck-thread',
80
+ * 'ck-reset_all-excluded',
81
+ * bind.if( 'isActive', 'ck-thread--active' ),
82
+ * bind.if( 'isConfirm', 'ck-thread--remove-confirmation' ),
83
+ * bind.to( 'actionIndicator', value => value ? `ck-thread--${ value }` : '' )
84
+ * ],
85
+ * 'data-thread-id': this._model.id,
86
+ * // Needed for managing focus after adding new comment.
87
+ * tabindex: -1
88
+ * },
89
+ *
90
+ * children: [
91
+ * {
92
+ * tag: 'div',
93
+ * attributes: {
94
+ * class: 'ck-thread__container'
95
+ * },
96
+ * children: this.commentThreadChildren
97
+ * }
98
+ * ]
99
+ * };
100
+ * ```
101
+ *
102
+ * See the {@glink features/collaboration/annotations/annotations-custom-view Annotation custom view guide} to learn more about
103
+ * the possible annotation customizations.
104
+ *
105
+ * @returns The definition of a comment thread view's template.
106
+ */
107
+ getTemplate(): TemplateDefinition;
108
+ /**
109
+ * @inheritDoc
110
+ */
111
+ render(): void;
112
+ }
113
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1bbe=['_bindFirstCommentView','element','cancelConfirm','_model','querySelector','tooltip','resolveButton','ck-thread--remove-confirmation','isSystemComment','get','commentThreadChildren','removeButton','ck-reset_all-excluded','actionIndicator','ck-thread','fire','div','change:isReadOnly','check','render','.ck-thread__container','bind','Resolve','_createResolveButton','addMany','icon','commentViews','isResolved','unbind','_cancelAllConfirms','commentThreadInputView','length','add','showConfirm','set','ck-thread__container','_boundFirstCommentView','remove','commentsListView','Write\x20a\x20comment...','change:isResolved','listenTo','locale','label','isEnabled','isResolvable','ck-thread--active','resolveCommentThread','containerElement','high','ck-comment--resolve','isReadOnly','bindTemplate','stop','isActive'];(function(_0x264f63,_0x1bbe20){const _0x114206=function(_0x1769c2){while(--_0x1769c2){_0x264f63['push'](_0x264f63['shift']());}};_0x114206(++_0x1bbe20);}(_0x1bbe,0x105));const _0x1142=function(_0x264f63,_0x1bbe20){_0x264f63=_0x264f63-0x0;let _0x114206=_0x1bbe[_0x264f63];return _0x114206;};import{ConfirmMixin as _0x4bc22b}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x3e62bf}from'ckeditor5/src/ui';import{icons as _0x32e751}from'ckeditor5/src/core';import _0x660b62 from'./basecommentthreadview';import{getTranslation as _0x5de917}from'../../../utils/common-translations';export default class lt extends _0x4bc22b(_0x660b62){constructor(_0x2df31b,_0x569de2,_0xde8a42,_0x527970){super(_0x2df31b,_0x569de2,_0xde8a42,_0x527970),this[_0x1142('0x18')]=this['createCollection'](),this[_0x1142('0x18')][_0x1142('0x26')]([this[_0x1142('0x34')],this[_0x1142('0x2c')]]),this['_model'][_0x1142('0x29')]&&this[_0x1142('0x18')][_0x1142('0x2e')](this['commentThreadHeaderView'],0x0),this[_0x1142('0x11')]['on'](_0x1142('0x36'),(_0x5eeb48,_0x5a1848,_0x52812e)=>{_0x52812e?this[_0x1142('0x18')][_0x1142('0x2e')](this['commentThreadHeaderView'],0x0):this['commentThreadChildren'][_0x1142('0x33')](this['commentThreadHeaderView']);}),this[_0x1142('0x30')](_0x1142('0x1b'),null),this[_0x1142('0x7')]=null,this[_0x1142('0x32')]=null,this[_0x1142('0x1')]=_0x2df31b,this[_0x1142('0x14')]=this[_0x1142('0x25')](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x42f7c1,_0x13a1e6,_0x588e12)=>{_0x588e12||this[_0x1142('0x2b')]();}),this['listenTo'](this[_0x1142('0x11')],_0x1142('0x1f'),(_0x4178c7,_0x3aa274,_0x5e3e22)=>{_0x5e3e22&&this['_cancelAllConfirms']();}),this[_0x1142('0x2d')]>0x0&&this[_0x1142('0xe')](),this[_0x1142('0x0')](this[_0x1142('0x34')]['commentViews'],_0x1142('0x2e'),()=>{this[_0x1142('0xe')]();});}['getTemplate'](){const _0x4d0437=this[_0x1142('0xb')];return{'tag':_0x1142('0x1e'),'attributes':{'class':[_0x1142('0x1c'),_0x1142('0x1a'),_0x4d0437['if'](_0x1142('0xd'),_0x1142('0x5')),_0x4d0437['if']('isConfirm',_0x1142('0x15')),_0x4d0437['to']('actionIndicator',_0x30574d=>_0x30574d?'ck-thread--'+_0x30574d:'')],'data-thread-id':this[_0x1142('0x11')]['id'],'tabindex':-0x1},'children':[{'tag':_0x1142('0x1e'),'attributes':{'class':_0x1142('0x31')},'children':this['commentThreadChildren']}]};}[_0x1142('0x21')](){super[_0x1142('0x21')](),this[_0x1142('0x7')]=this[_0x1142('0xf')][_0x1142('0x12')](_0x1142('0x22'));}[_0x1142('0x2b')](){this[_0x1142('0x10')]();for(const _0x6a013c of this['commentsListView'][_0x1142('0x28')])_0x6a013c[_0x1142('0x10')]();}[_0x1142('0xe')](){const {locale:_0x185e05}=this,_0x19c8ba=this[_0x1142('0x34')][_0x1142('0x28')][_0x1142('0x17')](0x0);_0x19c8ba===this[_0x1142('0x32')]||_0x19c8ba[_0x1142('0x16')]||(this[_0x1142('0x32')]=_0x19c8ba,this[_0x1142('0x2a')]('actionIndicator'),this[_0x1142('0x23')](_0x1142('0x1b'))['to'](_0x19c8ba,_0x1142('0x1b'),_0x9f5ba3=>_0x1142('0x33')===_0x9f5ba3?_0x1142('0x33'):null),_0x19c8ba['placeholder']=_0x5de917(_0x185e05,_0x1142('0x35')),_0x19c8ba[_0x1142('0x19')]['on']('execute',_0x7b7c8=>{_0x7b7c8[_0x1142('0xc')](),this[_0x1142('0x2f')](_0x5de917(_0x185e05,'Delete\x20comment\x20thread?'),this[_0x1142('0x7')])['then'](()=>{this[_0x1142('0x1d')]('removeCommentThread');});},{'priority':_0x1142('0x8')}),_0x19c8ba['actionBar'][_0x1142('0x2e')](this[_0x1142('0x14')],0x0));}[_0x1142('0x25')](){const _0x207de0=new _0x3e62bf(this[_0x1142('0x1')]);return _0x207de0[_0x1142('0x2')]=_0x5de917(this[_0x1142('0x1')],_0x1142('0x24')),_0x207de0[_0x1142('0x13')]=_0x5de917(this[_0x1142('0x1')],_0x1142('0x24')),_0x207de0[_0x1142('0x27')]=_0x32e751[_0x1142('0x20')],_0x207de0['extendTemplate']({'attributes':{'class':_0x1142('0x9')}}),_0x207de0['bind'](_0x1142('0x3'))['to'](this[_0x1142('0x11')],_0x1142('0xa'),_0x82dfc=>!_0x82dfc),_0x207de0[_0x1142('0x23')]('isVisible')['to'](this[_0x1142('0x11')],_0x1142('0x4'),this[_0x1142('0x11')],'isResolved',(_0x1ab464,_0x29afd4)=>_0x1ab464&&!_0x29afd4),_0x207de0['on']('execute',()=>{this[_0x1142('0x1d')](_0x1142('0x6'),this[_0x1142('0x11')]['id']);}),_0x207de0;}}
23
+ const _0x1001=['isEnabled','showConfirm','getTemplate','setTemplate','commentViews','containerElement','commentsListView','bind','createCollection','remove','isActive','icon','ck-thread--remove-confirmation','ck-thread--','change:isReadOnly','isReadOnly','actionIndicator','_boundFirstCommentView','resolveButton','isResolvable','set','tooltip','commentThreadChildren','check','change:isResolved','listenTo','_createResolveButton','querySelector','add','commentThreadInputView','ck-comment--resolve','render','isSystemComment','Delete\x20comment\x20thread?','locale','execute','_bindFirstCommentView','get','bindTemplate','div','ck-reset_all-excluded','Resolve','_model','actionBar','ck-thread--active','addMany','cancelConfirm','commentThreadHeaderView','length','stop','_cancelAllConfirms','isResolved','removeButton','change:isActive','extendTemplate'];(function(_0x196cd3,_0x1001a9){const _0x1ceeba=function(_0x52a0f2){while(--_0x52a0f2){_0x196cd3['push'](_0x196cd3['shift']());}};_0x1ceeba(++_0x1001a9);}(_0x1001,0xce));const _0x1cee=function(_0x196cd3,_0x1001a9){_0x196cd3=_0x196cd3-0x0;let _0x1ceeba=_0x1001[_0x196cd3];return _0x1ceeba;};import{ConfirmMixin as _0x300966}from'ckeditor5-collaboration';import{ButtonView as _0x318935}from'ckeditor5/src/ui.js';import{icons as _0x3f9481}from'ckeditor5/src/core.js';import _0x5bd235 from'./basecommentthreadview.js';import{getTranslation as _0x3aaf3b}from'../../../utils/common-translations.js';export default class lt extends _0x300966(_0x5bd235){constructor(_0x22bf68,_0x9e1b52,_0xaa2923,_0x2a3eb1){super(_0x22bf68,_0x9e1b52,_0xaa2923,_0x2a3eb1),this['commentThreadChildren']=this[_0x1cee('0x16')](),this[_0x1cee('0x24')][_0x1cee('0x4')]([this[_0x1cee('0x14')],this[_0x1cee('0x2b')]]),this['_model'][_0x1cee('0xa')]&&this['commentThreadChildren'][_0x1cee('0x2a')](this['commentThreadHeaderView'],0x0),this[_0x1cee('0x1')]['on'](_0x1cee('0x26'),(_0x437204,_0x2ea199,_0x4a746c)=>{_0x4a746c?this[_0x1cee('0x24')]['add'](this[_0x1cee('0x6')],0x0):this[_0x1cee('0x24')]['remove'](this[_0x1cee('0x6')]);}),this[_0x1cee('0x22')]('actionIndicator',null),this['containerElement']=null,this[_0x1cee('0x1f')]=null,this[_0x1cee('0x30')]=_0x22bf68,this['resolveButton']=this[_0x1cee('0x28')](),this[_0x1cee('0x11')](this['getTemplate']()),this['on'](_0x1cee('0xc'),(_0x4208c4,_0x1ee72a,_0x31a214)=>{_0x31a214||this[_0x1cee('0x9')]();}),this[_0x1cee('0x27')](this['_model'],_0x1cee('0x1c'),(_0x31aca5,_0x2a312f,_0x5bd1e6)=>{_0x5bd1e6&&this['_cancelAllConfirms']();}),this[_0x1cee('0x7')]>0x0&&this['_bindFirstCommentView'](),this[_0x1cee('0x27')](this[_0x1cee('0x14')][_0x1cee('0x12')],_0x1cee('0x2a'),()=>{this['_bindFirstCommentView']();});}[_0x1cee('0x10')](){const _0x4e66f9=this[_0x1cee('0x34')];return{'tag':_0x1cee('0x35'),'attributes':{'class':['ck-thread',_0x1cee('0x36'),_0x4e66f9['if'](_0x1cee('0x18'),_0x1cee('0x3')),_0x4e66f9['if']('isConfirm',_0x1cee('0x1a')),_0x4e66f9['to']('actionIndicator',_0x59fe82=>_0x59fe82?_0x1cee('0x1b')+_0x59fe82:'')],'data-thread-id':this[_0x1cee('0x1')]['id'],'tabindex':-0x1},'children':[{'tag':_0x1cee('0x35'),'attributes':{'class':'ck-thread__container'},'children':this[_0x1cee('0x24')]}]};}[_0x1cee('0x2d')](){super[_0x1cee('0x2d')](),this['containerElement']=this['element'][_0x1cee('0x29')]('.ck-thread__container');}[_0x1cee('0x9')](){this[_0x1cee('0x5')]();for(const _0x49fd89 of this[_0x1cee('0x14')][_0x1cee('0x12')])_0x49fd89['cancelConfirm']();}[_0x1cee('0x32')](){const {locale:_0x4ef5af}=this,_0x579fff=this['commentsListView']['commentViews'][_0x1cee('0x33')](0x0);_0x579fff===this[_0x1cee('0x1f')]||_0x579fff[_0x1cee('0x2e')]||(this[_0x1cee('0x1f')]=_0x579fff,this['unbind'](_0x1cee('0x1e')),this[_0x1cee('0x15')](_0x1cee('0x1e'))['to'](_0x579fff,_0x1cee('0x1e'),_0x1f9842=>_0x1cee('0x17')===_0x1f9842?'remove':null),_0x579fff['placeholder']=_0x3aaf3b(_0x4ef5af,'Write\x20a\x20comment...'),_0x579fff[_0x1cee('0xb')]['on'](_0x1cee('0x31'),_0xfc897f=>{_0xfc897f[_0x1cee('0x8')](),this[_0x1cee('0xf')](_0x3aaf3b(_0x4ef5af,_0x1cee('0x2f')),this[_0x1cee('0x13')])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),_0x579fff[_0x1cee('0x2')]['add'](this[_0x1cee('0x20')],0x0));}[_0x1cee('0x28')](){const _0x508793=new _0x318935(this[_0x1cee('0x30')]);return _0x508793['label']=_0x3aaf3b(this[_0x1cee('0x30')],_0x1cee('0x0')),_0x508793[_0x1cee('0x23')]=_0x3aaf3b(this['locale'],'Resolve'),_0x508793[_0x1cee('0x19')]=_0x3f9481[_0x1cee('0x25')],_0x508793[_0x1cee('0xd')]({'attributes':{'class':_0x1cee('0x2c')}}),_0x508793[_0x1cee('0x15')](_0x1cee('0xe'))['to'](this[_0x1cee('0x1')],_0x1cee('0x1d'),_0x386624=>!_0x386624),_0x508793[_0x1cee('0x15')]('isVisible')['to'](this['_model'],_0x1cee('0x21'),this[_0x1cee('0x1')],_0x1cee('0xa'),(_0x120f0d,_0x463368)=>_0x120f0d&&!_0x463368),_0x508793['on'](_0x1cee('0x31'),()=>{this['fire']('resolveCommentThread',this[_0x1cee('0x1')]['id']);}),_0x508793;}}