@ckeditor/ckeditor5-comments 38.1.0 → 38.1.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 (85) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +3 -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/utils/common-translations.d.ts +5 -5
  83. package/src/utils/common-translations.js +1 -1
  84. package/src/utils/createmutationobserver.d.ts +13 -13
  85. 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';
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
+ };
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1eba=['element','isVisible','isResolvable','length','_trimContextValue','hasContext','bindTemplate','Reopen','remove','overlay','add','.ck-context__value','label','isReadOnly','div','.ck-context','span','ck-context','ck-context--quotes','render','icon','Comment\x20was\x20made\x20on\x20an\x20element','classList','execute','scrollWidth','substring','_model','value','...','setTemplate','mouseenter','offsetWidth','locale','_createReopenButton','contextValue','bind','listenTo','fire','_attachContextActions','ck-context-wrapper'];(function(_0x361754,_0x1eba7d){const _0x238f7a=function(_0x372601){while(--_0x372601){_0x361754['push'](_0x361754['shift']());}};_0x238f7a(++_0x1eba7d);}(_0x1eba,0x147));const _0x238f=function(_0x361754,_0x1eba7d){_0x361754=_0x361754-0x0;let _0x238f7a=_0x1eba[_0x361754];return _0x238f7a;};import{View as _0x4ff07b,ButtonView as _0x5bcc66}from'ckeditor5/src/ui';import{getTranslation as _0xaff651}from'../../../utils/common-translations';import _0x4bde56 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Tt extends _0x4ff07b{constructor(_0x30f0f7,_0x1ebcac){super(_0x30f0f7);const _0x5a25e4=this[_0x238f('0x27')];this[_0x238f('0x13')]=_0x1ebcac,this['reopenButtonView']=this['_createReopenButton'](),this[_0x238f('0x1c')](_0x238f('0x26'))['to'](this['_model'],'context',_0x1a204c=>!!_0x1a204c),this[_0x238f('0x1c')](_0x238f('0x1b'))['to'](this[_0x238f('0x13')],'context',_0x590e7b=>_0x590e7b&&_0x590e7b[_0x238f('0x14')]?this[_0x238f('0x25')](_0x590e7b['value']):_0xaff651(this['locale'],_0x238f('0xe'))),this[_0x238f('0x16')]({'tag':_0x238f('0x7'),'attributes':{'class':['ck-thread__header']},'children':[{'tag':_0x238f('0x7'),'attributes':{'class':[_0x238f('0x20')]},'children':[{'tag':_0x238f('0x7'),'attributes':{'class':[_0x238f('0xa'),_0x5a25e4['if'](_0x238f('0x26'),_0x238f('0xb'))]},'children':[{'tag':_0x238f('0x9'),'attributes':{'class':['ck-context__value']},'children':[{'text':_0x5a25e4['to'](_0x238f('0x1b'))}]}]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}[_0x238f('0xc')](){super['render'](),this['_attachContextActions']();}[_0x238f('0x1a')](){const _0x2f4f42=new _0x5bcc66(this['locale']);return _0x2f4f42[_0x238f('0x5')]=_0xaff651(this[_0x238f('0x19')],_0x238f('0x0')),_0x2f4f42['tooltip']=_0xaff651(this['locale'],_0x238f('0x0')),_0x2f4f42[_0x238f('0xd')]=_0x4bde56,_0x2f4f42[_0x238f('0x1c')]('isEnabled')['to'](this['_model'],_0x238f('0x6'),_0x2d97c1=>!_0x2d97c1),_0x2f4f42[_0x238f('0x1c')](_0x238f('0x22'))['to'](this[_0x238f('0x13')],_0x238f('0x23')),_0x2f4f42['on'](_0x238f('0x10'),()=>{this[_0x238f('0x1e')]('reopenCommentThread',this[_0x238f('0x13')]['id']);}),_0x2f4f42;}[_0x238f('0x25')](_0x40eb3a){if(_0x40eb3a[_0x238f('0x24')]<0x96)return _0x40eb3a;const _0x132433=_0x40eb3a['lastIndexOf']('\x20',0x93);return _0x40eb3a[_0x238f('0x12')](0x0,_0x132433>-0x1?_0x132433:0x93)+_0x238f('0x15');}[_0x238f('0x1f')](){const _0x1f81c1=this[_0x238f('0x21')]['querySelector'](_0x238f('0x8')),_0xd5e88b=_0x1f81c1['querySelector'](_0x238f('0x4'));this[_0x238f('0x1d')](_0x1f81c1,_0x238f('0x17'),()=>{_0xd5e88b[_0x238f('0x18')]<_0xd5e88b[_0x238f('0x11')]&&_0x1f81c1[_0x238f('0xf')][_0x238f('0x3')](_0x238f('0x2'));}),this['listenTo'](_0x1f81c1,'mouseleave',()=>{_0x1f81c1[_0x238f('0xf')][_0x238f('0x1')](_0x238f('0x2'));});}}
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');});}}
@@ -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';
5
+ import CommentInputView from './commentinputview';
6
+ import type { Locale } from 'ckeditor5/src/utils';
7
+ import type { EditorConfig } from 'ckeditor5/src/core';
8
+ import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
9
+ /**
10
+ * View that represents comment input area for a comment thread. Includes editor, user view and buttons.
11
+ */
12
+ export default class CommentThreadInputView extends View {
13
+ /**
14
+ * Specifies whether the comment input view should be visible (`true`) or hidden (`false`).
15
+ *
16
+ * @observable
17
+ */
18
+ showInput: boolean;
19
+ /**
20
+ * Comment input view.
21
+ */
22
+ commentInputView: CommentInputView;
23
+ /**
24
+ * User view for the input area. Presents the local user.
25
+ */
26
+ userView: UserView;
27
+ /**
28
+ * @param locale The localization service instance.
29
+ * @param localUser Current local user.
30
+ * @param editorConfig
31
+ */
32
+ constructor(locale: Locale, localUser: User, editorConfig: EditorConfig);
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ destroy(): Promise<void>;
37
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x1272=['createEditor','focusTracker','ck-thread__user','then','userView','destroy','showInput','editor','commentInputView','bindTemplate','setTemplate','extendTemplate','change:showInput','set'];(function(_0x3de805,_0x12728e){var _0x21e2fc=function(_0x3e2f31){while(--_0x3e2f31){_0x3de805['push'](_0x3de805['shift']());}};_0x21e2fc(++_0x12728e);}(_0x1272,0x168));var _0x21e2=function(_0x3de805,_0x12728e){_0x3de805=_0x3de805-0x0;var _0x21e2fc=_0x1272[_0x3de805];return _0x21e2fc;};import{View as _0x15351b}from'ckeditor5/src/ui';import _0x4924b5 from'./commentinputview';import{UserView as _0x1f4a08}from'ckeditor5-collaboration/src/collaboration-core';export default class Ct extends _0x15351b{constructor(_0x48753b,_0x2cf2f4,_0x1b00b5){super(_0x48753b),this[_0x21e2('0xc')]=new _0x4924b5(_0x48753b,_0x1b00b5),this[_0x21e2('0xc')]['bind']('showButtons')['to'](this[_0x21e2('0xc')][_0x21e2('0x5')],'isFocused',this['commentInputView'],'value',(_0x4d175a,_0x514ea4)=>_0x4d175a||!!_0x514ea4),this[_0x21e2('0x3')](_0x21e2('0xa'),!0x1),this['on'](_0x21e2('0x2'),()=>{this[_0x21e2('0xa')]&&!this['commentInputView'][_0x21e2('0xb')]&&this[_0x21e2('0xc')][_0x21e2('0x4')]();}),this[_0x21e2('0x8')]=new _0x1f4a08(_0x48753b,_0x2cf2f4),this[_0x21e2('0x8')][_0x21e2('0x1')]({'attributes':{'class':_0x21e2('0x6')}}),this[_0x21e2('0xc')][_0x21e2('0x1')]({'attributes':{'class':'ck-thread__input'}}),this[_0x21e2('0x0')]({'tag':'div','attributes':{'class':['ck-comment__input-container',this[_0x21e2('0xd')]['if'](_0x21e2('0xa'),'ck-comment__input-container--active')]},'children':[this['userView'],this[_0x21e2('0xc')]]});}[_0x21e2('0x9')](){return this[_0x21e2('0xc')][_0x21e2('0x9')]()[_0x21e2('0x7')](()=>super[_0x21e2('0x9')]());}}
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')]());}}
@@ -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';
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 {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x362f=['containerElement','ck-comment--resolve','ck-thread--remove-confirmation','commentsListView','icon','element','isVisible','actionIndicator','fire','isActive','high','label','commentThreadInputView','isSystemComment','execute','Delete\x20comment\x20thread?','change:isResolved','commentThreadHeaderView','resolveCommentThread','ck-thread--active','bindTemplate','locale','render','getTemplate','bind','addMany','unbind','listenTo','isConfirm','_createResolveButton','_boundFirstCommentView','change:isReadOnly','stop','add','change:isActive','_bindFirstCommentView','commentThreadChildren','showConfirm','length','get','extendTemplate','setTemplate','isResolved','_cancelAllConfirms','querySelector','Resolve','resolveButton','cancelConfirm','_model','remove','removeButton','ck-thread','check','ck-thread--','commentViews','div'];(function(_0x500fcb,_0x362fe5){const _0x3b1176=function(_0x428010){while(--_0x428010){_0x500fcb['push'](_0x500fcb['shift']());}};_0x3b1176(++_0x362fe5);}(_0x362f,0x1b4));const _0x3b11=function(_0x500fcb,_0x362fe5){_0x500fcb=_0x500fcb-0x0;let _0x3b1176=_0x362f[_0x500fcb];return _0x3b1176;};import{ConfirmMixin as _0x5e885a}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x5254b9}from'ckeditor5/src/ui';import{icons as _0x5cc11a}from'ckeditor5/src/core';import _0x1e74dd from'./basecommentthreadview';import{getTranslation as _0x194090}from'../../../utils/common-translations';export default class lt extends _0x5e885a(_0x1e74dd){constructor(_0x49d615,_0x3dab94,_0x162dc9,_0x4807ce){super(_0x49d615,_0x3dab94,_0x162dc9,_0x4807ce),this['commentThreadChildren']=this['createCollection'](),this['commentThreadChildren'][_0x3b11('0x25')]([this[_0x3b11('0xf')],this[_0x3b11('0x18')]]),this[_0x3b11('0x4')][_0x3b11('0x36')]&&this['commentThreadChildren'][_0x3b11('0x2d')](this['commentThreadHeaderView'],0x0),this['_model']['on'](_0x3b11('0x1c'),(_0x52a6de,_0x564098,_0x42e64d)=>{_0x42e64d?this[_0x3b11('0x30')]['add'](this[_0x3b11('0x1d')],0x0):this['commentThreadChildren'][_0x3b11('0x5')](this['commentThreadHeaderView']);}),this['set'](_0x3b11('0x13'),null),this[_0x3b11('0xc')]=null,this['_boundFirstCommentView']=null,this[_0x3b11('0x21')]=_0x49d615,this[_0x3b11('0x2')]=this[_0x3b11('0x29')](),this[_0x3b11('0x35')](this[_0x3b11('0x23')]()),this['on'](_0x3b11('0x2e'),(_0x3b6533,_0x2fc1da,_0xa2de87)=>{_0xa2de87||this[_0x3b11('0x37')]();}),this[_0x3b11('0x27')](this[_0x3b11('0x4')],_0x3b11('0x2b'),(_0x87b3fe,_0xbf476d,_0x15aee9)=>{_0x15aee9&&this[_0x3b11('0x37')]();}),this[_0x3b11('0x32')]>0x0&&this[_0x3b11('0x2f')](),this['listenTo'](this['commentsListView']['commentViews'],_0x3b11('0x2d'),()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x8ade5d=this[_0x3b11('0x20')];return{'tag':_0x3b11('0xb'),'attributes':{'class':[_0x3b11('0x7'),'ck-reset_all-excluded',_0x8ade5d['if'](_0x3b11('0x15'),_0x3b11('0x1f')),_0x8ade5d['if'](_0x3b11('0x28'),_0x3b11('0xe')),_0x8ade5d['to'](_0x3b11('0x13'),_0x3a43c2=>_0x3a43c2?_0x3b11('0x9')+_0x3a43c2:'')],'data-thread-id':this[_0x3b11('0x4')]['id'],'tabindex':-0x1},'children':[{'tag':_0x3b11('0xb'),'attributes':{'class':'ck-thread__container'},'children':this[_0x3b11('0x30')]}]};}['render'](){super[_0x3b11('0x22')](),this[_0x3b11('0xc')]=this[_0x3b11('0x11')][_0x3b11('0x0')]('.ck-thread__container');}[_0x3b11('0x37')](){this[_0x3b11('0x3')]();for(const _0x107588 of this['commentsListView'][_0x3b11('0xa')])_0x107588[_0x3b11('0x3')]();}['_bindFirstCommentView'](){const {locale:_0x1306ce}=this,_0x383a10=this[_0x3b11('0xf')][_0x3b11('0xa')][_0x3b11('0x33')](0x0);_0x383a10===this[_0x3b11('0x2a')]||_0x383a10[_0x3b11('0x19')]||(this[_0x3b11('0x2a')]=_0x383a10,this[_0x3b11('0x26')](_0x3b11('0x13')),this[_0x3b11('0x24')](_0x3b11('0x13'))['to'](_0x383a10,_0x3b11('0x13'),_0x57c4a0=>'remove'===_0x57c4a0?_0x3b11('0x5'):null),_0x383a10['placeholder']=_0x194090(_0x1306ce,'Write\x20a\x20comment...'),_0x383a10[_0x3b11('0x6')]['on'](_0x3b11('0x1a'),_0x2012c4=>{_0x2012c4[_0x3b11('0x2c')](),this[_0x3b11('0x31')](_0x194090(_0x1306ce,_0x3b11('0x1b')),this[_0x3b11('0xc')])['then'](()=>{this[_0x3b11('0x14')]('removeCommentThread');});},{'priority':_0x3b11('0x16')}),_0x383a10['actionBar'][_0x3b11('0x2d')](this[_0x3b11('0x2')],0x0));}['_createResolveButton'](){const _0x3513ed=new _0x5254b9(this[_0x3b11('0x21')]);return _0x3513ed[_0x3b11('0x17')]=_0x194090(this[_0x3b11('0x21')],_0x3b11('0x1')),_0x3513ed['tooltip']=_0x194090(this['locale'],_0x3b11('0x1')),_0x3513ed[_0x3b11('0x10')]=_0x5cc11a[_0x3b11('0x8')],_0x3513ed[_0x3b11('0x34')]({'attributes':{'class':_0x3b11('0xd')}}),_0x3513ed[_0x3b11('0x24')]('isEnabled')['to'](this[_0x3b11('0x4')],'isReadOnly',_0x22fc36=>!_0x22fc36),_0x3513ed['bind'](_0x3b11('0x12'))['to'](this[_0x3b11('0x4')],'isResolvable',this['_model'],_0x3b11('0x36'),(_0x795037,_0x4b1a88)=>_0x795037&&!_0x4b1a88),_0x3513ed['on']('execute',()=>{this[_0x3b11('0x14')](_0x3b11('0x1e'),this[_0x3b11('0x4')]['id']);}),_0x3513ed;}}
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;}}