@ckeditor/ckeditor5-comments 38.2.0-alpha.1 → 39.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.
- package/README.md +0 -1
- package/build/comments.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +12 -12
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sq.po +2 -2
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +4 -5
- package/src/annotations/annotation.d.ts +10 -6
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.d.ts +7 -3
- package/src/annotations/annotationcollection.js +2 -2
- package/src/annotations/annotations.d.ts +10 -6
- package/src/annotations/annotations.js +2 -2
- package/src/annotations/annotationsuis.d.ts +9 -5
- package/src/annotations/annotationsuis.js +2 -2
- package/src/annotations/editorannotations.d.ts +8 -4
- package/src/annotations/editorannotations.js +2 -2
- package/src/annotations/inlineannotations.d.ts +10 -6
- package/src/annotations/inlineannotations.js +2 -2
- package/src/annotations/narrowsidebar.d.ts +10 -6
- package/src/annotations/narrowsidebar.js +2 -2
- package/src/annotations/sidebar.d.ts +9 -5
- package/src/annotations/sidebar.js +2 -2
- package/src/annotations/view/annotationcounterbuttonview.d.ts +6 -2
- package/src/annotations/view/annotationcounterbuttonview.js +2 -2
- package/src/annotations/view/annotationview.d.ts +6 -2
- package/src/annotations/view/annotationview.js +2 -2
- package/src/annotations/view/sidebaritemview.d.ts +6 -2
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.d.ts +6 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.d.ts +9 -5
- package/src/annotations/widesidebar.js +2 -2
- package/src/augmentation.d.ts +5 -1
- package/src/augmentation.js +1 -1
- package/src/comments/addcommentthreadcommand.d.ts +5 -1
- package/src/comments/addcommentthreadcommand.js +2 -2
- package/src/comments/commentsarchive.d.ts +8 -4
- package/src/comments/commentsarchive.js +2 -2
- package/src/comments/commentsarchiveui.d.ts +9 -5
- package/src/comments/commentsarchiveui.js +2 -2
- package/src/comments/commentsediting.d.ts +10 -6
- package/src/comments/commentsediting.js +2 -2
- package/src/comments/commentsrepository.d.ts +30 -13
- package/src/comments/commentsrepository.js +2 -2
- package/src/comments/commentsui.d.ts +9 -5
- package/src/comments/commentsui.js +2 -2
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +5 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
- package/src/comments/integrations/importword.d.ts +5 -1
- package/src/comments/integrations/importword.js +2 -2
- package/src/comments/ui/commenteditor/commenteditor.d.ts +9 -5
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +7 -3
- package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +7 -3
- package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
- package/src/comments/ui/commentthreadcontroller.d.ts +6 -6
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.d.ts +12 -8
- package/src/comments/ui/view/basecommentthreadview.js +2 -2
- package/src/comments/ui/view/basecommentview.d.ts +8 -4
- package/src/comments/ui/view/basecommentview.js +2 -2
- package/src/comments/ui/view/collapsedcommentsview.d.ts +6 -2
- package/src/comments/ui/view/collapsedcommentsview.js +2 -2
- package/src/comments/ui/view/commentcontentview.d.ts +6 -2
- package/src/comments/ui/view/commentcontentview.js +2 -2
- package/src/comments/ui/view/commentinputview.d.ts +8 -4
- package/src/comments/ui/view/commentinputview.js +2 -2
- package/src/comments/ui/view/commentsarchiveview.d.ts +7 -3
- package/src/comments/ui/view/commentsarchiveview.js +2 -2
- package/src/comments/ui/view/commentslistview.d.ts +9 -5
- package/src/comments/ui/view/commentslistview.js +2 -2
- package/src/comments/ui/view/commentthreadheaderview.d.ts +7 -3
- package/src/comments/ui/view/commentthreadheaderview.js +2 -2
- package/src/comments/ui/view/commentthreadinputview.d.ts +9 -5
- package/src/comments/ui/view/commentthreadinputview.js +2 -2
- package/src/comments/ui/view/commentthreadview.d.ts +11 -7
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.d.ts +12 -8
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.d.ts +14 -10
- package/src/comments.js +2 -2
- package/src/commentsonly.d.ts +6 -2
- package/src/commentsonly.js +2 -2
- package/src/config.d.ts +11 -7
- package/src/config.js +1 -1
- package/src/index.d.ts +24 -21
- package/src/index.js +2 -2
- package/src/utils/common-translations.d.ts +5 -1
- package/src/utils/common-translations.js +2 -2
- package/src/utils/createmutationobserver.d.ts +2 -1
- package/src/utils/createmutationobserver.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x20b2=['disabledSubmit','extendTemplate','_editorCreationPromise','element','insertBefore','model','render','focusNext','getData','_editorConfig','change','add','low','shift\x20+\x20tab','label','setData','editorReady','setTemplate','_createSubmitButton','ck-comment__input-actions--submit','submitLabel','ck-comment__input-wrapper','submitButtonView','withText','Esc','Reply...','create','execute','value','bindTemplate','destroy','_isDestroyed','createEditor','cancelButtonView','TOO_LONG_COMMENT_ALERT','stop','focusTracker','div','initialData','focus','editor','firstChild','listenTo','view','bind','ck-comment__input-actions--active','length','forEach','document','fire','set','trim','submit','keystrokes','_initializeFocusCycling','showButtons','tab','high'];(function(_0x19ecfa,_0x20b279){const _0xd507c9=function(_0x548a12){while(--_0x548a12){_0x19ecfa['push'](_0x19ecfa['shift']());}};_0xd507c9(++_0x20b279);}(_0x20b2,0xd0));const _0xd507=function(_0x19ecfa,_0x20b279){_0x19ecfa=_0x19ecfa-0x0;let _0xd507c9=_0x20b2[_0x19ecfa];return _0xd507c9;};import{View as _0x1f0224,ViewCollection as _0xd26e5d,FocusCycler as _0x3d7b91,ButtonView as _0x14dae1}from'ckeditor5/src/ui';import{FocusTracker as _0x13c67a,KeystrokeHandler as _0x21fd59}from'ckeditor5/src/utils';import _0x1a276e from'../commenteditor/commenteditor';import{getTranslation as _0x3b7e66}from'../../../utils/common-translations';export default class Xt extends _0x1f0224{constructor(_0x590aa2,_0x32bc2e={}){super(_0x590aa2),this['editor']=null,this[_0xd507('0x21')]=_0x32bc2e,this[_0xd507('0x13')]=new _0x21fd59(),this[_0xd507('0x2')]=new _0x13c67a(),this[_0xd507('0x10')](_0xd507('0x34'),_0x32bc2e[_0xd507('0x4')]||''),this[_0xd507('0x10')](_0xd507('0x18'),!0x1),this['set'](_0xd507('0x15'),!0x0),this[_0xd507('0x10')]('placeholder',_0x3b7e66(_0x590aa2,_0xd507('0x31'))),this[_0xd507('0x10')](_0xd507('0x2c'),_0x3b7e66(_0x590aa2,'Reply')),this[_0xd507('0x2e')]=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this[_0xd507('0x29')]({'tag':_0xd507('0x3'),'attributes':{'class':[_0xd507('0x2d')]},'children':[{'tag':_0xd507('0x3'),'attributes':{'class':['ck-comment__input-actions',this[_0xd507('0x35')]['if'](_0xd507('0x15'),_0xd507('0xb'))]},'children':[this[_0xd507('0x2e')],this[_0xd507('0x39')]]}]}),this[_0xd507('0x13')][_0xd507('0x10')](_0xd507('0x30'),(_0x4be729,_0x47219d)=>{this[_0xd507('0x39')][_0xd507('0xf')](_0xd507('0x33')),_0x47219d();}),this['on'](_0xd507('0x12'),(_0x65645e,_0x480283)=>{_0x480283[_0xd507('0xc')]>0xfde8?(alert(_0x3b7e66(_0x590aa2,_0xd507('0x0'),[_0x480283[_0xd507('0xc')],0xfde8])),_0x65645e[_0xd507('0x1')]()):this[_0xd507('0x6')][_0xd507('0x27')]('');},{'priority':_0xd507('0x17')});}[_0xd507('0x1e')](){super[_0xd507('0x1e')](),this[_0xd507('0x13')][_0xd507('0x8')](this[_0xd507('0x1b')]),this[_0xd507('0x2')]['add'](this[_0xd507('0x1b')]);}[_0xd507('0x38')](){return this[_0xd507('0x6')]||(this['editor']=new _0x1a276e(this[_0xd507('0x21')]),this['_editorCreationPromise']=this['editor'][_0xd507('0x32')]()['then'](()=>{if(this['_isDestroyed'])return;const _0x3a4aaf=this['editor'];this[_0xd507('0x1b')][_0xd507('0x1c')](_0x3a4aaf['ui']['element'],this[_0xd507('0x1b')][_0xd507('0x7')]),_0x3a4aaf[_0xd507('0x1d')][_0xd507('0xe')]['on'](_0xd507('0x22'),()=>this[_0xd507('0x34')]=_0x3a4aaf[_0xd507('0x20')]()),_0x3a4aaf['bind']('placeholder')['to'](this),this[_0xd507('0x14')](this[_0xd507('0x6')]),this[_0xd507('0xf')](_0xd507('0x28'),this[_0xd507('0x6')]);})),this[_0xd507('0x1a')];}[_0xd507('0x5')](){this[_0xd507('0x6')]&&this[_0xd507('0x6')][_0xd507('0x5')]();}async[_0xd507('0x36')](){this[_0xd507('0x37')]||(this[_0xd507('0x37')]=!0x0,this[_0xd507('0x6')]&&(await this[_0xd507('0x1a')],await this[_0xd507('0x6')][_0xd507('0x36')](),this[_0xd507('0xf')]('editorDestroyed',this[_0xd507('0x6')])),await super[_0xd507('0x36')]());}[_0xd507('0x2a')](){const {locale:_0x123429}=this,_0x4f3fde=new _0x14dae1(_0x123429);return _0x4f3fde[_0xd507('0x19')]({'attributes':{'class':[_0xd507('0x2b')]}}),_0x4f3fde[_0xd507('0x2f')]=!0x0,_0x4f3fde[_0xd507('0xa')](_0xd507('0x26'))['to'](this,_0xd507('0x2c')),_0x4f3fde['on'](_0xd507('0x33'),()=>{this[_0xd507('0xf')]('submit',this[_0xd507('0x34')]);}),_0x4f3fde[_0xd507('0xa')]('isEnabled')['to'](this,_0xd507('0x34'),this,_0xd507('0x18'),(_0x118f35,_0x2283e6)=>!_0x2283e6&&!!_0x118f35[_0xd507('0x11')]()),_0x4f3fde;}['_createCancelButton'](){const {locale:_0x4beec3}=this,_0x35af4e=new _0x14dae1(_0x4beec3);return _0x35af4e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x35af4e[_0xd507('0x26')]=_0x3b7e66(_0x4beec3,'Cancel'),_0x35af4e['withText']=!0x0,_0x35af4e['on']('execute',()=>{this['editor'][_0xd507('0x27')](''),this[_0xd507('0xf')]('cancel');}),_0x35af4e;}[_0xd507('0x14')](_0xb66daf){const _0x61bfc5=this[_0xd507('0x2')],_0x13ef76=new _0xd26e5d();[_0xb66daf['ui'][_0xd507('0x9')],this[_0xd507('0x2e')],this[_0xd507('0x39')]][_0xd507('0xd')](_0x15da68=>{_0x13ef76[_0xd507('0x23')](_0x15da68),_0x61bfc5[_0xd507('0x23')](_0x15da68[_0xd507('0x1b')]);});const _0xb15bcd=new _0x3d7b91({'focusables':_0x13ef76,'focusTracker':_0x61bfc5});this[_0xd507('0x13')][_0xd507('0x10')](_0xd507('0x16'),(_0xe20cfc,_0xc2578a)=>{_0xb15bcd[_0xd507('0x1f')](),_0xc2578a();},{'priority':_0xd507('0x24')}),this[_0xd507('0x13')][_0xd507('0x10')](_0xd507('0x25'),(_0x59b396,_0x6dc3ea)=>{_0xb15bcd['focusPrevious'](),_0x6dc3ea();},{'priority':_0xd507('0x24')});}}
|
|
@@ -1,9 +1,13 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentslistview
|
|
3
7
|
*/
|
|
4
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils
|
|
6
|
-
import type AnnotationView from '../../../annotations/view/annotationview
|
|
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';
|
|
7
11
|
/**
|
|
8
12
|
* A view representing the content of comments archive.
|
|
9
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x537b=['auto','set','_keystrokes','selectstart','_focusables','shift\x20+\x20tab','tab','element','destroy','ck-comments-archive__content','length','remove','ck-comments-archive__header\x20','ck-hidden','isActive','ck-comments-archive','isEmpty','arrowdown','listenTo','ck-comments-archive__info','render','COMMENTS_ARCHIVE','focus','EMPTY_COMMENTS_ARCHIVE','_focusTracker','high','arrowup','arrowright','stopPropagation','div'];(function(_0x1bbbf8,_0x537b84){const _0x6aca5f=function(_0x5f0936){while(--_0x5f0936){_0x1bbbf8['push'](_0x1bbbf8['shift']());}};_0x6aca5f(++_0x537b84);}(_0x537b,0xd8));const _0x6aca=function(_0x1bbbf8,_0x537b84){_0x1bbbf8=_0x1bbbf8-0x0;let _0x6aca5f=_0x537b[_0x1bbbf8];return _0x6aca5f;};import{View as _0x52e26a,FocusCycler as _0x41a625}from'ckeditor5/src/ui';import{FocusTracker as _0x52a9fa,KeystrokeHandler as _0x3d33c8}from'ckeditor5/src/utils';import{getTranslation as _0x4cc09b}from'../../../utils/common-translations';export default class K extends _0x52e26a{constructor(_0x3aca3c,_0x4a6c67){super(_0x3aca3c),this[_0x6aca('0x19')]('isEmpty',!_0x4a6c67[_0x6aca('0x4')]),this['_focusTracker']=new _0x52a9fa(),this[_0x6aca('0x1a')]=new _0x3d33c8(),this[_0x6aca('0x1c')]=_0x4a6c67,this['_focusCycler']=new _0x41a625({'focusables':this['_focusables'],'focusTracker':this[_0x6aca('0x12')],'keystrokeHandler':this['_keystrokes'],'actions':{'focusPrevious':_0x6aca('0x1d'),'focusNext':_0x6aca('0x0')}}),this[_0x6aca('0xc')](_0x4a6c67,'add',()=>{this[_0x6aca('0xa')]=!0x1;}),this[_0x6aca('0xc')](_0x4a6c67,_0x6aca('0x5'),(_0x298e87,_0x1b81c6)=>{_0x1b81c6[_0x6aca('0x8')]&&this[_0x6aca('0x10')](),_0x4a6c67['length']||(this['isEmpty']=!0x0);});const _0x130d4a=this['bindTemplate'];this['setTemplate']({'tag':_0x6aca('0x17'),'attributes':{'dir':_0x6aca('0x18'),'class':['ck',_0x6aca('0x9')],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x6aca('0x6')]},'children':[{'text':_0x4cc09b(_0x3aca3c,_0x6aca('0xf'))}]},{'tag':'div','attributes':{'class':[_0x6aca('0x3')]},'children':[{'tag':'div','children':_0x4a6c67},{'tag':'p','attributes':{'class':[_0x6aca('0xd'),_0x130d4a['if']('isEmpty',_0x6aca('0x7'),_0x1dc3d3=>!_0x1dc3d3)]},'children':[{'text':_0x4cc09b(_0x3aca3c,_0x6aca('0x11'))}]}]}]});}[_0x6aca('0xe')](){super[_0x6aca('0xe')](),this[_0x6aca('0x1a')][_0x6aca('0xc')](this[_0x6aca('0x1')]);const _0x37d3ac=_0xf58886=>_0xf58886[_0x6aca('0x16')]();this[_0x6aca('0x1a')]['set'](_0x6aca('0x15'),_0x37d3ac),this['_keystrokes'][_0x6aca('0x19')]('arrowleft',_0x37d3ac),this['_keystrokes'][_0x6aca('0x19')](_0x6aca('0x14'),_0x37d3ac),this['_keystrokes'][_0x6aca('0x19')](_0x6aca('0xb'),_0x37d3ac),this[_0x6aca('0xc')](this[_0x6aca('0x1')],_0x6aca('0x1b'),(_0x19d0e6,_0x271103)=>{_0x271103[_0x6aca('0x16')]();},{'priority':_0x6aca('0x13')});}[_0x6aca('0x2')](){super[_0x6aca('0x2')](),this[_0x6aca('0x12')][_0x6aca('0x2')](),this[_0x6aca('0x1a')][_0x6aca('0x2')]();}[_0x6aca('0x10')](){this[_0x6aca('0x1')][_0x6aca('0x10')]();}}
|
|
@@ -1,11 +1,15 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentslistview
|
|
3
7
|
*/
|
|
4
|
-
import { View, type ViewCollection } from 'ckeditor5/src/ui
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils
|
|
6
|
-
import type { CommentThread } from '../../commentsrepository
|
|
7
|
-
import type CommentView from './commentview
|
|
8
|
-
import type { CommentThreadConfig } from '../../../config
|
|
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';
|
|
9
13
|
/**
|
|
10
14
|
* A view representing the list of comments. It should be used as a part of the comment thread view.
|
|
11
15
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3219=['CommentView','render','viewUid','_handleNewCommentModel','_model','_rearrangeExpand','insert','isActive','maxThreadTotalWeight','formatDateTime','resolveCommentThread','resolvedCommentView','destroy','_findOptimalIndex','bind','equal','resolvedBy','_shouldCollapse','_rearrangeCollapse','set','Marked\x20as\x20resolved','from','refreshVisibleViews','resolvedAt','removeComment','_collapsedCommentsView','setTemplate','_handleRemoveCommentModel','add','maxCommentCharsWhenCollapsed','listenTo','locale','comments','maxCommentsWhenCollapsed','stopListening','change:hasDirtyComment','createCollection','_updateHasDirtyComment','commentViews','editorConfig','isEditMode','count','length','commentUpdated','ck-thread__comments','resolved','visibleViews','hasDirtyComment','focus','_config','delegate','_handleInfoComment','get','remove','_calculatePosition'];(function(_0x3d285d,_0x321925){const _0x558c1c=function(_0x1a2aea){while(--_0x1a2aea){_0x3d285d['push'](_0x3d285d['shift']());}};_0x558c1c(++_0x321925);}(_0x3219,0x165));const _0x558c=function(_0x3d285d,_0x321925){_0x3d285d=_0x3d285d-0x0;let _0x558c1c=_0x3219[_0x3d285d];return _0x558c1c;};import{View as _0x4ccee3}from'ckeditor5/src/ui';import{diff as _0x552b33,Collection as _0x4b2ac7}from'ckeditor5/src/utils';import{getTranslation as _0x9e052a}from'../../../utils/common-translations';import _0x181d1e from'./collapsedcommentsview';export default class wt extends _0x4ccee3{constructor(_0x2ad216,_0x2f3706,_0x4a2c89){super(_0x2ad216),this['set'](_0x558c('0x14'),!0x1),this[_0x558c('0x2f')](_0x558c('0xf'),_0x2f3706[_0x558c('0x5')][_0x558c('0xf')]),this[_0x558c('0x2f')](_0x558c('0x23'),!0x1),this['_model']=_0x2f3706,this[_0x558c('0x16')]=_0x4a2c89,this[_0x558c('0xb')]=this[_0x558c('0x9')](),this[_0x558c('0x13')]=this[_0x558c('0x9')](),this['resolvedCommentView']=null,this['_collapsedCommentsView']=new _0x181d1e(_0x2ad216),this[_0x558c('0x35')][_0x558c('0x2a')]('count')['to'](this,'length',_0xab6940=>_0xab6940-this[_0x558c('0x16')][_0x558c('0x6')]);for(const _0x556d74 of _0x2f3706['comments'])this[_0x558c('0x1f')](_0x556d74);this[_0x558c('0x18')](),this[_0x558c('0x3')](_0x2f3706[_0x558c('0x5')],_0x558c('0x1'),(_0x112367,_0x2e07eb)=>{const _0xc78dea=this[_0x558c('0x1b')](_0x2e07eb);this['length']++,this[_0x558c('0x1f')](_0x2e07eb,_0xc78dea),this[_0x558c('0x32')]();}),this[_0x558c('0x3')](_0x2f3706[_0x558c('0x5')],_0x558c('0x1a'),(_0x184209,_0x4c7a84)=>{this['length']--,this[_0x558c('0x0')](_0x4c7a84),this[_0x558c('0x32')]();}),this['listenTo'](_0x2f3706,_0x558c('0x10'),()=>this[_0x558c('0x32')]()),this[_0x558c('0x3')](_0x2f3706,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this[_0x558c('0x32')]()),this['on'](_0x558c('0x8'),()=>this[_0x558c('0x32')]()),this[_0x558c('0x36')]({'tag':'ul','attributes':{'class':[_0x558c('0x11')]},'children':this[_0x558c('0x13')]});}get['_shouldCollapse'](){return this[_0x558c('0x20')]['weight']>this[_0x558c('0x16')][_0x558c('0x24')]&&!this[_0x558c('0x23')]&&!this[_0x558c('0x14')];}[_0x558c('0x1d')](){super[_0x558c('0x1d')](),this[_0x558c('0x32')]();}[_0x558c('0x15')](){this['element'][_0x558c('0x15')]();}['destroy'](){this[_0x558c('0x35')][_0x558c('0x28')]();for(const _0x3cd5bb of this[_0x558c('0xb')])_0x3cd5bb[_0x558c('0x28')]();super[_0x558c('0x28')]();}['refreshVisibleViews'](){this[_0x558c('0x2d')]?this[_0x558c('0x2e')]():this[_0x558c('0x21')]();}[_0x558c('0x1f')](_0x4e803b,_0x21eed8){const _0x1ecf1d=new this[(_0x558c('0x16'))][(_0x558c('0x1c'))](this[_0x558c('0x4')],_0x4e803b,{'maxCommentCharsWhenCollapsed':this[_0x558c('0x16')][_0x558c('0x2')],'formatDateTime':this[_0x558c('0x16')]['formatDateTime'],'editorConfig':this['_config'][_0x558c('0xc')]});_0x1ecf1d[_0x558c('0x1e')]=_0x4e803b['id'],_0x1ecf1d[_0x558c('0x17')](_0x558c('0x34'))['to'](this),_0x1ecf1d['delegate']('updateComment')['to'](this),_0x1ecf1d['delegate'](_0x558c('0x26'))['to'](this),_0x1ecf1d[_0x558c('0x17')]('editorReady')['to'](this),_0x1ecf1d[_0x558c('0x17')]('editorDestroyed')['to'](this),this[_0x558c('0x3')](_0x1ecf1d,'change:isEditMode',()=>this[_0x558c('0xa')]()),this[_0x558c('0xb')]['add'](_0x1ecf1d,_0x21eed8);}[_0x558c('0x1b')](_0xe25f3f){const _0x2c2888=this[_0x558c('0x20')][_0x558c('0x29')](_0xe25f3f);return this[_0x558c('0x27')]?this[_0x558c('0x27')]['authoredAt']>_0xe25f3f['authoredAt']?_0x2c2888-0x1:_0x2c2888:_0x2c2888-0x1;}['_handleInfoComment'](){if(this[_0x558c('0x20')][_0x558c('0x2c')]&&this['_model'][_0x558c('0x33')]){const _0x903808={'id':_0x558c('0x12'),'author':this[_0x558c('0x20')][_0x558c('0x2c')],'authoredAt':this[_0x558c('0x20')][_0x558c('0x33')],'content':_0x9e052a(this[_0x558c('0x4')],_0x558c('0x30')),'attributes':{}};this[_0x558c('0x27')]=new this[(_0x558c('0x16'))][(_0x558c('0x1c'))](this[_0x558c('0x4')],_0x903808,{'maxCommentCharsWhenCollapsed':this[_0x558c('0x16')][_0x558c('0x2')],'formatDateTime':this[_0x558c('0x16')][_0x558c('0x25')],'editorConfig':this[_0x558c('0x16')][_0x558c('0xc')],'isSystemComment':!0x0}),this['commentViews'][_0x558c('0x1')](this[_0x558c('0x27')],this[_0x558c('0x20')][_0x558c('0x29')](_0x903808));}else this['resolvedCommentView']&&(this[_0x558c('0xb')]['remove'](this['resolvedCommentView']),this['resolvedCommentView'][_0x558c('0x28')](),this['resolvedCommentView']=null);this[_0x558c('0x32')]();}[_0x558c('0x0')](_0x3f0fd6){const _0x4a1b83=this['commentViews']['remove'](_0x3f0fd6['id']);this[_0x558c('0x7')](_0x4a1b83),_0x4a1b83[_0x558c('0xd')]&&this['_updateHasDirtyComment'](),_0x4a1b83[_0x558c('0x28')]();}[_0x558c('0xa')](){this[_0x558c('0x14')]=Array[_0x558c('0x31')](this['commentViews'])['some'](_0x26d3f2=>_0x26d3f2[_0x558c('0xd')]);}['_rearrangeCollapse'](){const _0x1a7649=function(_0x4122cf){const _0x56bb79=new _0x4b2ac7();for(const _0x391650 of _0x4122cf)_0x56bb79['add'](_0x391650);return _0x56bb79;}(this['commentViews']),_0xb4164d=this[_0x558c('0x35')][_0x558c('0xe')];for(let _0x564322=0x1;_0x564322<=_0xb4164d;_0x564322++)_0x1a7649['remove'](0x1);for(const _0x42b1c4 of _0x1a7649)_0x42b1c4['collapse']();_0xb4164d>0x0&&_0x1a7649[_0x558c('0x1')](this[_0x558c('0x35')],0x1),ss(_0x552b33(Array['from'](this[_0x558c('0x13')]),Array[_0x558c('0x31')](_0x1a7649)),this[_0x558c('0x13')],_0x1a7649);}[_0x558c('0x21')](){ss(_0x552b33(Array['from'](this[_0x558c('0x13')]),Array[_0x558c('0x31')](this[_0x558c('0xb')])),this[_0x558c('0x13')],this[_0x558c('0xb')]);for(const _0x1ac136 of this[_0x558c('0x13')])_0x1ac136['expand']();}}function ss(_0x79ddb2,_0x1c77e2,_0x2d7409){let _0x324b35=0x0;for(const _0x270f7d of _0x79ddb2)switch(_0x270f7d){case _0x558c('0x22'):_0x1c77e2['add'](_0x2d7409[_0x558c('0x19')](_0x324b35),_0x324b35),_0x324b35++;break;case'delete':_0x1c77e2[_0x558c('0x1a')](_0x324b35);break;case _0x558c('0x2b'):_0x324b35++;}}
|
|
@@ -1,9 +1,13 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentthreadheaderview
|
|
3
7
|
*/
|
|
4
|
-
import { View, ButtonView } from 'ckeditor5/src/ui
|
|
5
|
-
import type { Locale } from 'ckeditor5/src/utils
|
|
6
|
-
import type { CommentThread } from '../../commentsrepository
|
|
8
|
+
import { View, ButtonView } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
7
11
|
export declare const MAX_CONTENT_LENGTH = 150;
|
|
8
12
|
/**
|
|
9
13
|
* A view for the comment thread header.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xdebf=['substring','mouseenter','remove','label','_model','isVisible','hasContext','tooltip','context','setTemplate','listenTo','overlay','ck-thread__header','reopenButtonView','length','scrollWidth','Reopen','bindTemplate','isResolvable','ck-context__value','ck-context','offsetWidth','icon','span','isReadOnly','...','execute','reopenCommentThread','querySelector','.ck-context__value','bind','add','value','_attachContextActions','div','mouseleave','isEnabled','.ck-context','Comment\x20was\x20made\x20on\x20an\x20element','render','classList','_createReopenButton','element','lastIndexOf','contextValue','ck-annotation__actions','locale'];(function(_0x2b6de6,_0xdebfc2){const _0x5826e3=function(_0x45b2c5){while(--_0x45b2c5){_0x2b6de6['push'](_0x2b6de6['shift']());}};_0x5826e3(++_0xdebfc2);}(_0xdebf,0x11a));const _0x5826=function(_0x2b6de6,_0xdebfc2){_0x2b6de6=_0x2b6de6-0x0;let _0x5826e3=_0xdebf[_0x2b6de6];return _0x5826e3;};import{View as _0x10945b,ButtonView as _0x5d383b}from'ckeditor5/src/ui';import{getTranslation as _0x3d4896}from'../../../utils/common-translations';import _0x585959 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Rt extends _0x10945b{constructor(_0x4895eb,_0x3374e3){super(_0x4895eb);const _0x480772=this[_0x5826('0x11')];this[_0x5826('0x4')]=_0x3374e3,this['reopenButtonView']=this[_0x5826('0x29')](),this[_0x5826('0x1e')](_0x5826('0x6'))['to'](this['_model'],_0x5826('0x8'),_0x1d58c3=>!!_0x1d58c3),this[_0x5826('0x1e')](_0x5826('0x2c'))['to'](this[_0x5826('0x4')],_0x5826('0x8'),_0x2233cf=>_0x2233cf&&_0x2233cf['value']?this['_trimContextValue'](_0x2233cf[_0x5826('0x20')]):_0x3d4896(this[_0x5826('0x2e')],_0x5826('0x26'))),this[_0x5826('0x9')]({'tag':_0x5826('0x22'),'attributes':{'class':[_0x5826('0xc')]},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':_0x5826('0x22'),'attributes':{'class':[_0x5826('0x14'),_0x480772['if'](_0x5826('0x6'),'ck-context--quotes')]},'children':[{'tag':_0x5826('0x17'),'attributes':{'class':[_0x5826('0x13')]},'children':[{'text':_0x480772['to'](_0x5826('0x2c'))}]}]}]},{'tag':_0x5826('0x22'),'attributes':{'class':[_0x5826('0x2d')]},'children':[this[_0x5826('0xd')]]}]});}[_0x5826('0x27')](){super['render'](),this[_0x5826('0x21')]();}[_0x5826('0x29')](){const _0x320916=new _0x5d383b(this[_0x5826('0x2e')]);return _0x320916[_0x5826('0x3')]=_0x3d4896(this[_0x5826('0x2e')],_0x5826('0x10')),_0x320916[_0x5826('0x7')]=_0x3d4896(this[_0x5826('0x2e')],_0x5826('0x10')),_0x320916[_0x5826('0x16')]=_0x585959,_0x320916[_0x5826('0x1e')](_0x5826('0x24'))['to'](this['_model'],_0x5826('0x18'),_0x42669e=>!_0x42669e),_0x320916['bind'](_0x5826('0x5'))['to'](this[_0x5826('0x4')],_0x5826('0x12')),_0x320916['on'](_0x5826('0x1a'),()=>{this['fire'](_0x5826('0x1b'),this[_0x5826('0x4')]['id']);}),_0x320916;}['_trimContextValue'](_0x3c9732){if(_0x3c9732[_0x5826('0xe')]<0x96)return _0x3c9732;const _0xa9243f=_0x3c9732[_0x5826('0x2b')]('\x20',0x93);return _0x3c9732[_0x5826('0x0')](0x0,_0xa9243f>-0x1?_0xa9243f:0x93)+_0x5826('0x19');}[_0x5826('0x21')](){const _0x13b0c1=this[_0x5826('0x2a')][_0x5826('0x1c')](_0x5826('0x25')),_0x3e72e5=_0x13b0c1['querySelector'](_0x5826('0x1d'));this[_0x5826('0xa')](_0x13b0c1,_0x5826('0x1'),()=>{_0x3e72e5[_0x5826('0x15')]<_0x3e72e5[_0x5826('0xf')]&&_0x13b0c1[_0x5826('0x28')][_0x5826('0x1f')](_0x5826('0xb'));}),this[_0x5826('0xa')](_0x13b0c1,_0x5826('0x23'),()=>{_0x13b0c1[_0x5826('0x28')][_0x5826('0x2')](_0x5826('0xb'));});}}
|
|
@@ -1,11 +1,15 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentthreadinputview
|
|
3
7
|
*/
|
|
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';
|
|
8
|
+
import { View } from 'ckeditor5/src/ui';
|
|
9
|
+
import CommentInputView from './commentinputview';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
11
|
+
import type { EditorConfig } from 'ckeditor5/src/core';
|
|
12
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
9
13
|
/**
|
|
10
14
|
* View that represents comment input area for a comment thread. Includes editor, user view and buttons.
|
|
11
15
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x2a6e=['commentInputView','userView','ck-thread__input','delegate','focusTracker','bind','showButtons','editor','isFocused','destroy','set','div','setTemplate','createEditor','editorReady','ck-comment__input-container','ck-comment__input-container--active','extendTemplate','bindTemplate','ck-thread__user','showInput'];(function(_0x144d7b,_0x2a6eb9){var _0x2d85cb=function(_0x56ab52){while(--_0x56ab52){_0x144d7b['push'](_0x144d7b['shift']());}};_0x2d85cb(++_0x2a6eb9);}(_0x2a6e,0xb9));var _0x2d85=function(_0x144d7b,_0x2a6eb9){_0x144d7b=_0x144d7b-0x0;var _0x2d85cb=_0x2a6e[_0x144d7b];return _0x2d85cb;};import{View as _0x32960a}from'ckeditor5/src/ui';import _0x580964 from'./commentinputview';import{UserView as _0x10ab5a}from'ckeditor5-collaboration/src/collaboration-core';export default class Ct extends _0x32960a{constructor(_0x1a78e0,_0x14b769,_0x1c4f74){super(_0x1a78e0),this['commentInputView']=new _0x580964(_0x1a78e0,_0x1c4f74),this[_0x2d85('0x4')][_0x2d85('0x9')](_0x2d85('0xa'))['to'](this['commentInputView'][_0x2d85('0x8')],_0x2d85('0xc'),this[_0x2d85('0x4')],'value',(_0x48e8c0,_0x2acce1)=>_0x48e8c0||!!_0x2acce1),this[_0x2d85('0xe')](_0x2d85('0x3'),!0x1),this['on']('change:showInput',()=>{this[_0x2d85('0x3')]&&!this[_0x2d85('0x4')][_0x2d85('0xb')]&&this[_0x2d85('0x4')][_0x2d85('0x11')]();}),this[_0x2d85('0x4')][_0x2d85('0x7')](_0x2d85('0x12'))['to'](this),this[_0x2d85('0x4')]['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x10ab5a(_0x1a78e0,_0x14b769),this['userView'][_0x2d85('0x0')]({'attributes':{'class':_0x2d85('0x2')}}),this['commentInputView'][_0x2d85('0x0')]({'attributes':{'class':_0x2d85('0x6')}}),this[_0x2d85('0x10')]({'tag':_0x2d85('0xf'),'attributes':{'class':[_0x2d85('0x13'),this[_0x2d85('0x1')]['if'](_0x2d85('0x3'),_0x2d85('0x14'))]},'children':[this[_0x2d85('0x5')],this[_0x2d85('0x4')]]});}[_0x2d85('0xd')](){return this[_0x2d85('0x4')][_0x2d85('0xd')]()['then'](()=>super[_0x2d85('0xd')]());}}
|
|
@@ -1,14 +1,18 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentthreadview
|
|
3
7
|
* @publicApi
|
|
4
8
|
*/
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils
|
|
6
|
-
import { type User } from 'ckeditor5-collaboration';
|
|
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
|
|
9
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import { type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
11
|
+
import { ButtonView, type TemplateDefinition, type ViewCollection } from 'ckeditor5/src/ui';
|
|
12
|
+
import BaseCommentThreadView from './basecommentthreadview';
|
|
13
|
+
import type { CommentThread } from '../../commentsrepository';
|
|
14
|
+
import type { CommentThreadConfig } from '../../../config';
|
|
15
|
+
declare const CommentThreadView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentThreadView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
12
16
|
/**
|
|
13
17
|
* The default view for comment thread.
|
|
14
18
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3b1a=['remove','Write\x20a\x20comment...','resolveButton','isReadOnly','createCollection','_model','tooltip','isResolved','commentsListView','.ck-thread__container','locale','check','getTemplate','containerElement','icon','commentViews','change:isResolved','change:isActive','stop','commentThreadChildren','actionBar','isResolvable','div','ck-comment--resolve','ck-thread__container','removeButton','actionIndicator','removeCommentThread','resolveCommentThread','commentThreadHeaderView','_cancelAllConfirms','_boundFirstCommentView','showConfirm','Resolve','add','isActive','bind','cancelConfirm','_bindFirstCommentView','length','high','execute','_createResolveButton','setTemplate','Delete\x20comment\x20thread?','isEnabled','then','listenTo','element','fire'];(function(_0x17edac,_0x3b1aae){const _0x24b41c=function(_0x1bcdd1){while(--_0x1bcdd1){_0x17edac['push'](_0x17edac['shift']());}};_0x24b41c(++_0x3b1aae);}(_0x3b1a,0xc8));const _0x24b4=function(_0x17edac,_0x3b1aae){_0x17edac=_0x17edac-0x0;let _0x24b41c=_0x3b1a[_0x17edac];return _0x24b41c;};import{ConfirmMixin as _0x2b402b}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x5568d5}from'ckeditor5/src/ui';import{icons as _0x19feaf}from'ckeditor5/src/core';import _0x232e7a from'./basecommentthreadview';import{getTranslation as _0x23cf98}from'../../../utils/common-translations';export default class lt extends _0x2b402b(_0x232e7a){constructor(_0x26b4e9,_0x23e4da,_0x2065a9,_0x139f9b){super(_0x26b4e9,_0x23e4da,_0x2065a9,_0x139f9b),this[_0x24b4('0x13')]=this[_0x24b4('0x4')](),this[_0x24b4('0x13')]['addMany']([this['commentsListView'],this['commentThreadInputView']]),this['_model'][_0x24b4('0x7')]&&this[_0x24b4('0x13')][_0x24b4('0x22')](this[_0x24b4('0x1d')],0x0),this[_0x24b4('0x5')]['on'](_0x24b4('0x10'),(_0x315884,_0x12b073,_0x4fecbb)=>{_0x4fecbb?this['commentThreadChildren'][_0x24b4('0x22')](this[_0x24b4('0x1d')],0x0):this[_0x24b4('0x13')]['remove'](this['commentThreadHeaderView']);}),this['set'](_0x24b4('0x1a'),null),this[_0x24b4('0xd')]=null,this[_0x24b4('0x1f')]=null,this[_0x24b4('0xa')]=_0x26b4e9,this[_0x24b4('0x2')]=this['_createResolveButton'](),this[_0x24b4('0x2b')](this[_0x24b4('0xc')]()),this['on'](_0x24b4('0x11'),(_0x3bf825,_0x288c59,_0x431818)=>{_0x431818||this[_0x24b4('0x1e')]();}),this[_0x24b4('0x2f')](this[_0x24b4('0x5')],'change:isReadOnly',(_0x4762df,_0x178759,_0x23caf2)=>{_0x23caf2&&this['_cancelAllConfirms']();}),this[_0x24b4('0x27')]>0x0&&this[_0x24b4('0x26')](),this[_0x24b4('0x2f')](this['commentsListView'][_0x24b4('0xf')],_0x24b4('0x22'),()=>{this[_0x24b4('0x26')]();});}[_0x24b4('0xc')](){const _0x25385e=this['bindTemplate'];return{'tag':_0x24b4('0x16'),'attributes':{'class':['ck-thread','ck-reset_all-excluded',_0x25385e['if'](_0x24b4('0x23'),'ck-thread--active'),_0x25385e['if']('isConfirm','ck-thread--remove-confirmation'),_0x25385e['to'](_0x24b4('0x1a'),_0x1b1ffb=>_0x1b1ffb?'ck-thread--'+_0x1b1ffb:'')],'data-thread-id':this['_model']['id'],'tabindex':-0x1},'children':[{'tag':_0x24b4('0x16'),'attributes':{'class':_0x24b4('0x18')},'children':this[_0x24b4('0x13')]}]};}['render'](){super['render'](),this[_0x24b4('0xd')]=this[_0x24b4('0x30')]['querySelector'](_0x24b4('0x9'));}[_0x24b4('0x1e')](){this['cancelConfirm']();for(const _0x3bc022 of this[_0x24b4('0x8')][_0x24b4('0xf')])_0x3bc022[_0x24b4('0x25')]();}[_0x24b4('0x26')](){const {locale:_0x2784b8}=this,_0x5a4a7f=this['commentsListView'][_0x24b4('0xf')]['get'](0x0);_0x5a4a7f===this['_boundFirstCommentView']||_0x5a4a7f['isSystemComment']||(this['_boundFirstCommentView']=_0x5a4a7f,this['unbind'](_0x24b4('0x1a')),this[_0x24b4('0x24')](_0x24b4('0x1a'))['to'](_0x5a4a7f,_0x24b4('0x1a'),_0x14472b=>_0x24b4('0x0')===_0x14472b?'remove':null),_0x5a4a7f['placeholder']=_0x23cf98(_0x2784b8,_0x24b4('0x1')),_0x5a4a7f[_0x24b4('0x19')]['on'](_0x24b4('0x29'),_0xa16824=>{_0xa16824[_0x24b4('0x12')](),this[_0x24b4('0x20')](_0x23cf98(_0x2784b8,_0x24b4('0x2c')),this['containerElement'])[_0x24b4('0x2e')](()=>{this['fire'](_0x24b4('0x1b'));});},{'priority':_0x24b4('0x28')}),_0x5a4a7f[_0x24b4('0x14')][_0x24b4('0x22')](this[_0x24b4('0x2')],0x0));}[_0x24b4('0x2a')](){const _0x5e7714=new _0x5568d5(this[_0x24b4('0xa')]);return _0x5e7714['label']=_0x23cf98(this[_0x24b4('0xa')],_0x24b4('0x21')),_0x5e7714[_0x24b4('0x6')]=_0x23cf98(this[_0x24b4('0xa')],_0x24b4('0x21')),_0x5e7714[_0x24b4('0xe')]=_0x19feaf[_0x24b4('0xb')],_0x5e7714['extendTemplate']({'attributes':{'class':_0x24b4('0x17')}}),_0x5e7714[_0x24b4('0x24')](_0x24b4('0x2d'))['to'](this[_0x24b4('0x5')],_0x24b4('0x3'),_0x31d67c=>!_0x31d67c),_0x5e7714['bind']('isVisible')['to'](this['_model'],_0x24b4('0x15'),this[_0x24b4('0x5')],_0x24b4('0x7'),(_0x186ba4,_0x29a92f)=>_0x186ba4&&!_0x29a92f),_0x5e7714['on']('execute',()=>{this[_0x24b4('0x31')](_0x24b4('0x1c'),this['_model']['id']);}),_0x5e7714;}}
|
|
@@ -1,15 +1,19 @@
|
|
|
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
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module comments/comments/ui/view/commentview
|
|
3
7
|
* @publicApi
|
|
4
8
|
*/
|
|
5
|
-
import { type Locale } from 'ckeditor5/src/utils
|
|
6
|
-
import { ButtonView, type TemplateDefinition, type ViewCollection, type DropdownView } from 'ckeditor5/src/ui
|
|
7
|
-
import { UserView } from 'ckeditor5-collaboration';
|
|
8
|
-
import BaseCommentView from './basecommentview
|
|
9
|
-
import type { Comment } from '../../commentsrepository
|
|
10
|
-
import type CommentInputView from './commentinputview
|
|
11
|
-
import type { CommentViewConfig } from '../../../config
|
|
12
|
-
declare const CommentView_base: import("ckeditor5/src/utils
|
|
9
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import { ButtonView, type TemplateDefinition, type ViewCollection, type DropdownView } from 'ckeditor5/src/ui';
|
|
11
|
+
import { UserView } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
12
|
+
import BaseCommentView from './basecommentview';
|
|
13
|
+
import type { Comment } from '../../commentsrepository';
|
|
14
|
+
import type CommentInputView from './commentinputview';
|
|
15
|
+
import type { CommentViewConfig } from '../../../config';
|
|
16
|
+
declare const CommentView_base: import("ckeditor5/src/utils").Mixed<typeof BaseCommentView, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
13
17
|
/**
|
|
14
18
|
* The default view for comment.
|
|
15
19
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3dbe=['setTemplate','blur','ck-annotation__main','length','listenTo','formatDateTime','actionBar','threeVerticalDots','isSystemComment','placeholder','ck-annotation__user','ck-comment--','execute','pencil','ck-comment','importWord','ck-comment__info-time','removeButton','items','getUserViewNotificationText','render','userView','@external','span','cancelConfirm','then','Show\x20more\x20items','set','Reply...','ck-comment__info-name','_attachActions','isEditMode','push','visibleView','Delete\x20comment?','add','ck-comment--edit','locale','ck-annotation__actions','dropdown','change:isEnabled','_createEditButton','some','_createRemoveButton','panelView','ck-comment__actions','showConfirm','getExternalCommentNote','createCollection','change:isRemovable','isEnabled','ck-comment--info','ck-annotation__info','creator','div','attributes','removeComment','switchToEditMode','Edit','authoredAt','isExternal','_createDropdown','label','edit','ck-comment__info','bindTemplate','remove','ck-annotation__content-wrapper','ck-annotation','withText','editButton','actionIndicator','Remove','resolvedAt','_model','bind','ck-annotation__info-time','EXTERNAL_COMMENT','_createCommentInputView','EXTERNAL_IMPORT_WORD_AVATAR','isVisible','buttonView','ck-comment__external','icon','_config','isRemovable','getTemplate','source','children','addMany','element','ck-comment--remove-confirmation','time','panelPosition'];(function(_0x45be70,_0x3dbe7a){const _0x58308f=function(_0x54996c){while(--_0x54996c){_0x45be70['push'](_0x45be70['shift']());}};_0x58308f(++_0x3dbe7a);}(_0x3dbe,0x189));const _0x5830=function(_0x45be70,_0x3dbe7a){_0x45be70=_0x45be70-0x0;let _0x58308f=_0x3dbe[_0x45be70];return _0x58308f;};import{ButtonView as _0x551c51,createDropdown as _0x11fa72,ListView as _0x1fb435,ListItemView as _0x1e5e94}from'ckeditor5/src/ui';import{icons as _0x318b2c}from'ckeditor5/src/core';import{UserView as _0x294716,ConfirmMixin as _0x4753e4}from'ckeditor5-collaboration/src/collaboration-core';import _0x29014e from'./basecommentview';import _0x36d3bc from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x3c8b2e}from'../../../utils/common-translations';export default class ut extends _0x4753e4(_0x29014e){constructor(_0x1b48c2,_0x365d1,_0x58a8ae){super(_0x1b48c2,_0x365d1,_0x58a8ae),this[_0x5830('0xa')](_0x5830('0x36'),null),this[_0x5830('0xa')](_0x5830('0x56'),_0x3c8b2e(_0x1b48c2,_0x5830('0xb'))),this[_0x5830('0x3a')](_0x5830('0x2a'))['to'](_0x365d1),this['bind'](_0x5830('0x38'))['to'](_0x365d1),this[_0x5830('0x53')]=this[_0x5830('0x1f')](),this[_0x5830('0x55')]||(this[_0x5830('0x35')]=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this[_0x5830('0x1f')](),this[_0x5830('0x1')][_0x5830('0x48')]([this[_0x5830('0x35')],this[_0x5830('0x0')]]),this[_0x5830('0x16')]=this[_0x5830('0x2c')](),this[_0x5830('0x53')][_0x5830('0x12')](this[_0x5830('0x16')])),this[_0x5830('0x4')]=new _0x294716(_0x1b48c2,_0x365d1['author'],this[_0x5830('0x2')]()),this[_0x5830('0x4')]['extendTemplate']({'attributes':{'class':['ck-comment__user',_0x5830('0x57')]}}),this[_0x5830('0x51')](_0x365d1,_0x5830('0x20'),()=>this[_0x5830('0x7')]()),this[_0x5830('0x4d')](this['getTemplate']());}[_0x5830('0x45')](){const _0x57e52a=this[_0x5830('0x30')],_0x4f98d8=[{'tag':'div','attributes':{'class':[_0x5830('0x2f'),_0x5830('0x23')]},'children':[{'tag':_0x5830('0x6'),'children':[{'text':this[_0x5830('0x4')]['name']}],'attributes':{'class':[_0x5830('0xc'),'ck-annotation__info-name']}},{'tag':_0x5830('0x4b'),'attributes':{'datetime':_0x57e52a['to']('authoredAt'),'class':[_0x5830('0x5d'),_0x5830('0x3b')]},'children':[{'text':_0x57e52a['to'](_0x5830('0x2a'),_0x3c6709=>this[_0x5830('0x43')][_0x5830('0x52')](_0x3c6709))}]}]},{'tag':_0x5830('0x25'),'attributes':{'class':[_0x5830('0x1c'),_0x5830('0x15'),_0x57e52a['if'](_0x5830('0xe'),'ck-comment__actions--hidden'),_0x57e52a['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':_0x5830('0x25'),'attributes':{'class':[_0x5830('0x32')]},'children':this[_0x5830('0x10')]}];return this['_model']['isExternal']&&_0x4f98d8[_0x5830('0xf')]({'tag':_0x5830('0x25'),'attributes':{'class':[_0x5830('0x41')]},'children':[{'text':this[_0x5830('0x1e')]()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x57e52a['if']('isConfirm',_0x5830('0x4a'))],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':[_0x5830('0x5b'),_0x5830('0x33'),_0x57e52a['if'](_0x5830('0xe'),'ck-comment--edit'),_0x57e52a['if'](_0x5830('0x55'),_0x5830('0x22')),_0x57e52a['to'](_0x5830('0x36'),_0x3dd824=>_0x3dd824?_0x5830('0x58')+_0x3dd824:'')],'data-author-id':this[_0x5830('0x39')]['author']['id'],'data-comment-id':this[_0x5830('0x39')]['id']},'children':[this[_0x5830('0x4')],{'tag':_0x5830('0x25'),'attributes':{'class':['ck-comment__main',_0x5830('0x4f')]},'children':_0x4f98d8}]}]};}[_0x5830('0x18')](){const _0x2fcf26=new _0x551c51(this[_0x5830('0x14')]);return _0x2fcf26[_0x5830('0x2d')]=_0x3c8b2e(this[_0x5830('0x14')],_0x5830('0x29')),_0x2fcf26[_0x5830('0x42')]=_0x318b2c[_0x5830('0x5a')],_0x2fcf26[_0x5830('0x34')]=!0x0,_0x2fcf26['extendTemplate']({'attributes':{'class':_0x5830('0x13')}}),_0x2fcf26['bind']('isEnabled')['to'](this[_0x5830('0x39')],'isReadOnly',_0x35ebf9=>!_0x35ebf9),_0x2fcf26[_0x5830('0x3a')]('isVisible')['to'](this['_model'],'isEditable'),_0x2fcf26['on']('execute',()=>this[_0x5830('0x28')]()),_0x2fcf26;}[_0x5830('0x1a')](){const _0x226b64=new _0x551c51(this[_0x5830('0x14')]);return _0x226b64['label']=_0x3c8b2e(this['locale'],_0x5830('0x37')),_0x226b64[_0x5830('0x42')]=_0x36d3bc,_0x226b64[_0x5830('0x34')]=!0x0,_0x226b64['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x226b64['bind'](_0x5830('0x21'))['to'](this[_0x5830('0x39')],'isReadOnly',_0x54f59c=>!_0x54f59c),_0x226b64[_0x5830('0x3a')]('isVisible')['to'](this[_0x5830('0x39')],_0x5830('0x44')),_0x226b64['on'](_0x5830('0x59'),()=>{this[_0x5830('0x1d')](_0x3c8b2e(this[_0x5830('0x14')],_0x5830('0x11')),this[_0x5830('0x49')])[_0x5830('0x8')](()=>{this['fire'](_0x5830('0x27'),this[_0x5830('0x39')]['id']);});}),_0x226b64;}[_0x5830('0x2c')](){const _0x239cea=_0x11fa72(this[_0x5830('0x14')]),_0x5cd13c=_0x239cea[_0x5830('0x1b')]['children'],_0x3129ef=new _0x1fb435(this[_0x5830('0x14')]),_0x77c72=(_0x27330e,_0x341e28=-0x1)=>{const _0x53d68b=new _0x1e5e94(this[_0x5830('0x14')]);_0x53d68b[_0x5830('0x47')][_0x5830('0x12')](_0x27330e);const _0x48b32c=_0x341e28>-0x1?_0x341e28:_0x3129ef['items'][_0x5830('0x50')];_0x3129ef[_0x5830('0x1')]['add'](_0x53d68b,_0x48b32c),_0x239cea[_0x5830('0x51')](_0x27330e,_0x5830('0x17'),()=>{_0x239cea[_0x5830('0x21')]=[...this[_0x5830('0x1')]][_0x5830('0x19')](_0x4a4ff1=>_0x4a4ff1['isEnabled']);}),_0x239cea[_0x5830('0x51')](_0x27330e,'change:isVisible',()=>{_0x239cea[_0x5830('0x40')][_0x5830('0x3f')]=[...this[_0x5830('0x1')]][_0x5830('0x19')](_0x1ac130=>_0x1ac130[_0x5830('0x3f')]);});};_0x239cea[_0x5830('0x4c')]='sw',_0x239cea[_0x5830('0x40')][_0x5830('0xa')]({'label':_0x3c8b2e(this[_0x5830('0x14')],_0x5830('0x9')),'icon':_0x318b2c[_0x5830('0x54')]}),_0x239cea[_0x5830('0x21')]=[...this[_0x5830('0x1')]][_0x5830('0x19')](_0x3f7532=>_0x3f7532[_0x5830('0x21')]),_0x239cea[_0x5830('0x40')][_0x5830('0x3f')]=[...this['items']]['some'](_0x510618=>_0x510618[_0x5830('0x3f')]);for(const _0x41ca45 of this[_0x5830('0x1')])_0x77c72(_0x41ca45);return _0x5cd13c['add'](_0x3129ef),_0x239cea[_0x5830('0x51')](this['items'],_0x5830('0x12'),(_0x1ecce5,_0x308446,_0x520049)=>{_0x77c72(_0x308446,_0x520049);}),_0x239cea[_0x5830('0x51')](this[_0x5830('0x1')],_0x5830('0x31'),(_0x10e68e,_0x57c06a,_0x531351)=>{_0x3129ef[_0x5830('0x1')][_0x5830('0x31')](_0x531351);}),_0x239cea;}[_0x5830('0xd')](_0x40bf30,_0x45836f){const _0x5df962=_0x40bf30&&_0x40bf30[_0x5830('0x49')];_0x5df962&&(this[_0x5830('0x51')](_0x5df962,'mouseenter',()=>this[_0x5830('0x36')]=_0x45836f),this['listenTo'](_0x5df962,'focus',()=>this[_0x5830('0x36')]=_0x45836f),this['listenTo'](_0x5df962,'mouseleave',()=>this['actionIndicator']=null),this[_0x5830('0x51')](_0x5df962,_0x5830('0x4e'),()=>this[_0x5830('0x36')]=null));}[_0x5830('0x3d')](){const _0x6af77a=super[_0x5830('0x3d')]();return _0x6af77a['bind']('placeholder')['to'](this),_0x6af77a;}[_0x5830('0x1e')](){return _0x5830('0x5c')===this[_0x5830('0x39')][_0x5830('0x26')][_0x5830('0x5')][_0x5830('0x46')]?_0x3c8b2e(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):_0x3c8b2e(this[_0x5830('0x14')],_0x5830('0x3c'));}['getUserViewNotificationText'](){return this[_0x5830('0x39')][_0x5830('0x2b')]?_0x5830('0x5c')===this[_0x5830('0x39')][_0x5830('0x26')][_0x5830('0x5')][_0x5830('0x46')]?_0x3c8b2e(this[_0x5830('0x14')],_0x5830('0x3e'),this[_0x5830('0x39')][_0x5830('0x24')]['name']):_0x3c8b2e(this[_0x5830('0x14')],'EXTERNAL_AVATAR',this[_0x5830('0x39')][_0x5830('0x24')]['name']):null;}[_0x5830('0x3')](){super[_0x5830('0x3')](),this[_0x5830('0xd')](this[_0x5830('0x35')],_0x5830('0x2e')),this[_0x5830('0xd')](this['removeButton'],_0x5830('0x31'));}}
|