@ckeditor/ckeditor5-comments 38.2.0-alpha.1 → 39.0.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.
- 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 _0x3dfb=['then','Cancel','_editorConfig','change','label','focusPrevious','submitButtonView','submit','Esc','showButtons','bindTemplate','extendTemplate','editor','render','destroy','initialData','ck-comment__input-wrapper','focusTracker','setData','low','tab','ck-comment__input-actions--cancel','value','set','_createSubmitButton','_isDestroyed','withText','forEach','cancelButtonView','firstChild','placeholder','create','getData','submitLabel','insertBefore','length','createEditor','cancel','bind','stop','ck-comment__input-actions','Reply','fire','listenTo','high','editorReady','keystrokes','focus','_initializeFocusCycling','shift\x20+\x20tab','trim','add','editorDestroyed','execute','element','div','ck-comment__input-actions--active','setTemplate'];(function(_0xbf4e00,_0x3dfbfc){const _0x1c72b6=function(_0x1e984b){while(--_0x1e984b){_0xbf4e00['push'](_0xbf4e00['shift']());}};_0x1c72b6(++_0x3dfbfc);}(_0x3dfb,0x96));const _0x1c72=function(_0xbf4e00,_0x3dfbfc){_0xbf4e00=_0xbf4e00-0x0;let _0x1c72b6=_0x3dfb[_0xbf4e00];return _0x1c72b6;};import{View as _0x470711,ViewCollection as _0x1124a1,FocusCycler as _0x241ecb,ButtonView as _0x133d4f}from'ckeditor5/src/ui';import{FocusTracker as _0x57da46,KeystrokeHandler as _0x2e7e90}from'ckeditor5/src/utils';import _0x4ba238 from'../commenteditor/commenteditor';import{getTranslation as _0x546a41}from'../../../utils/common-translations';export default class Xt extends _0x470711{constructor(_0x10e841,_0x4722e8={}){super(_0x10e841),this[_0x1c72('0x24')]=null,this[_0x1c72('0x1a')]=_0x4722e8,this[_0x1c72('0xc')]=new _0x2e7e90(),this[_0x1c72('0x29')]=new _0x57da46(),this[_0x1c72('0x2f')](_0x1c72('0x2e'),_0x4722e8[_0x1c72('0x27')]||''),this['set']('disabledSubmit',!0x1),this[_0x1c72('0x2f')](_0x1c72('0x21'),!0x0),this[_0x1c72('0x2f')](_0x1c72('0x36'),_0x546a41(_0x10e841,'Reply...')),this[_0x1c72('0x2f')](_0x1c72('0x39'),_0x546a41(_0x10e841,_0x1c72('0x7'))),this[_0x1c72('0x1e')]=this[_0x1c72('0x30')](),this[_0x1c72('0x34')]=this['_createCancelButton'](),this[_0x1c72('0x17')]({'tag':'div','attributes':{'class':[_0x1c72('0x28')]},'children':[{'tag':_0x1c72('0x15'),'attributes':{'class':[_0x1c72('0x6'),this[_0x1c72('0x22')]['if'](_0x1c72('0x21'),_0x1c72('0x16'))]},'children':[this['submitButtonView'],this[_0x1c72('0x34')]]}]}),this[_0x1c72('0xc')][_0x1c72('0x2f')](_0x1c72('0x20'),(_0x12d4a4,_0x277460)=>{this[_0x1c72('0x34')][_0x1c72('0x8')]('execute'),_0x277460();}),this['on'](_0x1c72('0x1f'),(_0x242ea5,_0x37b7c4)=>{_0x37b7c4[_0x1c72('0x1')]>0xfde8?(alert(_0x546a41(_0x10e841,'TOO_LONG_COMMENT_ALERT',[_0x37b7c4[_0x1c72('0x1')],0xfde8])),_0x242ea5[_0x1c72('0x5')]()):this['editor'][_0x1c72('0x2a')]('');},{'priority':_0x1c72('0xa')});}[_0x1c72('0x25')](){super[_0x1c72('0x25')](),this[_0x1c72('0xc')][_0x1c72('0x9')](this[_0x1c72('0x14')]),this[_0x1c72('0x29')][_0x1c72('0x11')](this[_0x1c72('0x14')]);}[_0x1c72('0x2')](){return this[_0x1c72('0x24')]||(this[_0x1c72('0x24')]=new _0x4ba238(this['_editorConfig']),this['_editorCreationPromise']=this[_0x1c72('0x24')][_0x1c72('0x37')]()[_0x1c72('0x18')](()=>{if(this['_isDestroyed'])return;const _0x5ec3c5=this[_0x1c72('0x24')];this['element'][_0x1c72('0x0')](_0x5ec3c5['ui']['element'],this[_0x1c72('0x14')][_0x1c72('0x35')]),_0x5ec3c5['model']['document']['on'](_0x1c72('0x1b'),()=>this[_0x1c72('0x2e')]=_0x5ec3c5[_0x1c72('0x38')]()),_0x5ec3c5[_0x1c72('0x4')](_0x1c72('0x36'))['to'](this),this[_0x1c72('0xe')](this[_0x1c72('0x24')]),this['fire'](_0x1c72('0xb'),this['editor']);})),this['_editorCreationPromise'];}[_0x1c72('0xd')](){this[_0x1c72('0x24')]&&this[_0x1c72('0x24')][_0x1c72('0xd')]();}async[_0x1c72('0x26')](){this[_0x1c72('0x31')]||(this[_0x1c72('0x31')]=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor'][_0x1c72('0x26')](),this[_0x1c72('0x8')](_0x1c72('0x12'),this['editor'])),await super[_0x1c72('0x26')]());}[_0x1c72('0x30')](){const {locale:_0x551684}=this,_0x302193=new _0x133d4f(_0x551684);return _0x302193[_0x1c72('0x23')]({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x302193[_0x1c72('0x32')]=!0x0,_0x302193[_0x1c72('0x4')]('label')['to'](this,'submitLabel'),_0x302193['on'](_0x1c72('0x13'),()=>{this[_0x1c72('0x8')]('submit',this['value']);}),_0x302193[_0x1c72('0x4')]('isEnabled')['to'](this,_0x1c72('0x2e'),this,'disabledSubmit',(_0x366fec,_0x23c7c4)=>!_0x23c7c4&&!!_0x366fec[_0x1c72('0x10')]()),_0x302193;}['_createCancelButton'](){const {locale:_0x5becba}=this,_0x8ba88=new _0x133d4f(_0x5becba);return _0x8ba88[_0x1c72('0x23')]({'attributes':{'class':[_0x1c72('0x2d')]}}),_0x8ba88[_0x1c72('0x1c')]=_0x546a41(_0x5becba,_0x1c72('0x19')),_0x8ba88['withText']=!0x0,_0x8ba88['on'](_0x1c72('0x13'),()=>{this[_0x1c72('0x24')][_0x1c72('0x2a')](''),this[_0x1c72('0x8')](_0x1c72('0x3'));}),_0x8ba88;}[_0x1c72('0xe')](_0x410ced){const _0x2cc619=this['focusTracker'],_0x48d82f=new _0x1124a1();[_0x410ced['ui']['view'],this[_0x1c72('0x1e')],this[_0x1c72('0x34')]][_0x1c72('0x33')](_0x34524d=>{_0x48d82f[_0x1c72('0x11')](_0x34524d),_0x2cc619[_0x1c72('0x11')](_0x34524d[_0x1c72('0x14')]);});const _0x33d4d7=new _0x241ecb({'focusables':_0x48d82f,'focusTracker':_0x2cc619});this[_0x1c72('0xc')]['set'](_0x1c72('0x2c'),(_0x3aa7c7,_0x2bbc23)=>{_0x33d4d7['focusNext'](),_0x2bbc23();},{'priority':_0x1c72('0x2b')}),this[_0x1c72('0xc')]['set'](_0x1c72('0xf'),(_0x7104d6,_0x5f4425)=>{_0x33d4d7[_0x1c72('0x1d')](),_0x5f4425();},{'priority':_0x1c72('0x2b')});}}
|
|
@@ -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 _0x2a6a=['high','shift\x20+\x20tab','_focusables','set','add','focus','isEmpty','arrowleft','ck-hidden','stopPropagation','_keystrokes','remove','auto','render','element','EMPTY_COMMENTS_ARCHIVE','listenTo','isActive','arrowup','ck-comments-archive__header\x20','ck-comments-archive__content','div','arrowdown','selectstart','length','destroy','COMMENTS_ARCHIVE','_focusTracker'];(function(_0x407fb3,_0x2a6ad1){const _0x269a3c=function(_0x4aea2d){while(--_0x4aea2d){_0x407fb3['push'](_0x407fb3['shift']());}};_0x269a3c(++_0x2a6ad1);}(_0x2a6a,0x173));const _0x269a=function(_0x407fb3,_0x2a6ad1){_0x407fb3=_0x407fb3-0x0;let _0x269a3c=_0x2a6a[_0x407fb3];return _0x269a3c;};import{View as _0x52b47,FocusCycler as _0x4e35c6}from'ckeditor5/src/ui';import{FocusTracker as _0x7953ad,KeystrokeHandler as _0x4d3375}from'ckeditor5/src/utils';import{getTranslation as _0x39444e}from'../../../utils/common-translations';export default class K extends _0x52b47{constructor(_0x158a80,_0x22daeb){super(_0x158a80),this[_0x269a('0x18')]('isEmpty',!_0x22daeb[_0x269a('0x11')]),this[_0x269a('0x14')]=new _0x7953ad(),this[_0x269a('0x3')]=new _0x4d3375(),this[_0x269a('0x17')]=_0x22daeb,this['_focusCycler']=new _0x4e35c6({'focusables':this['_focusables'],'focusTracker':this[_0x269a('0x14')],'keystrokeHandler':this[_0x269a('0x3')],'actions':{'focusPrevious':_0x269a('0x16'),'focusNext':'tab'}}),this['listenTo'](_0x22daeb,_0x269a('0x19'),()=>{this[_0x269a('0x1b')]=!0x1;}),this[_0x269a('0x9')](_0x22daeb,_0x269a('0x4'),(_0x2da182,_0x14086e)=>{_0x14086e[_0x269a('0xa')]&&this[_0x269a('0x1a')](),_0x22daeb[_0x269a('0x11')]||(this['isEmpty']=!0x0);});const _0x29c18b=this['bindTemplate'];this['setTemplate']({'tag':_0x269a('0xe'),'attributes':{'dir':_0x269a('0x5'),'class':['ck','ck-comments-archive'],'tabindex':-0x1},'children':[{'tag':'p','attributes':{'class':[_0x269a('0xc')]},'children':[{'text':_0x39444e(_0x158a80,_0x269a('0x13'))}]},{'tag':_0x269a('0xe'),'attributes':{'class':[_0x269a('0xd')]},'children':[{'tag':_0x269a('0xe'),'children':_0x22daeb},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x29c18b['if']('isEmpty',_0x269a('0x1'),_0x3f84a0=>!_0x3f84a0)]},'children':[{'text':_0x39444e(_0x158a80,_0x269a('0x8'))}]}]}]});}[_0x269a('0x6')](){super['render'](),this[_0x269a('0x3')][_0x269a('0x9')](this[_0x269a('0x7')]);const _0x167323=_0x3c5d47=>_0x3c5d47[_0x269a('0x2')]();this[_0x269a('0x3')][_0x269a('0x18')]('arrowright',_0x167323),this['_keystrokes'][_0x269a('0x18')](_0x269a('0x0'),_0x167323),this[_0x269a('0x3')][_0x269a('0x18')](_0x269a('0xb'),_0x167323),this[_0x269a('0x3')][_0x269a('0x18')](_0x269a('0xf'),_0x167323),this[_0x269a('0x9')](this[_0x269a('0x7')],_0x269a('0x10'),(_0x203565,_0x47c1ce)=>{_0x47c1ce[_0x269a('0x2')]();},{'priority':_0x269a('0x15')});}[_0x269a('0x12')](){super[_0x269a('0x12')](),this[_0x269a('0x14')][_0x269a('0x12')](),this[_0x269a('0x3')][_0x269a('0x12')]();}[_0x269a('0x1a')](){this[_0x269a('0x7')]['focus']();}}
|
|
@@ -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 _0xa192=['length','visibleViews','resolvedBy','maxCommentCharsWhenCollapsed','commentViews','change:isEditMode','_handleNewCommentModel','isActive','updateComment','change:isResolved','_findOptimalIndex','from','focus','setTemplate','resolvedAt','_collapsedCommentsView','collapse','Marked\x20as\x20resolved','equal','destroy','ck-thread__comments','_calculatePosition','createCollection','refreshVisibleViews','maxThreadTotalWeight','add','_handleInfoComment','_updateHasDirtyComment','element','hasDirtyComment','_handleRemoveCommentModel','count','_model','locale','some','remove','expand','weight','listenTo','comments','authoredAt','editorReady','_config','editorConfig','formatDateTime','delete','resolvedCommentView','_rearrangeCollapse','_shouldCollapse','_rearrangeExpand','delegate','editorDestroyed','bind','CommentView','stopListening','get','set','isEditMode'];(function(_0x5c3fe1,_0xa1923c){const _0x2e0d3c=function(_0x45922d){while(--_0x45922d){_0x5c3fe1['push'](_0x5c3fe1['shift']());}};_0x2e0d3c(++_0xa1923c);}(_0xa192,0x1e7));const _0x2e0d=function(_0x5c3fe1,_0xa1923c){_0x5c3fe1=_0x5c3fe1-0x0;let _0x2e0d3c=_0xa192[_0x5c3fe1];return _0x2e0d3c;};import{View as _0x5c5e36}from'ckeditor5/src/ui';import{diff as _0x4141e9,Collection as _0x5c43ae}from'ckeditor5/src/utils';import{getTranslation as _0x5054b5}from'../../../utils/common-translations';import _0xe4c0a9 from'./collapsedcommentsview';export default class wt extends _0x5c5e36{constructor(_0x56966c,_0x46722d,_0x45d7d0){super(_0x56966c),this['set']('hasDirtyComment',!0x1),this['set']('length',_0x46722d[_0x2e0d('0x10')]['length']),this[_0x2e0d('0x21')](_0x2e0d('0x2a'),!0x1),this['_model']=_0x46722d,this[_0x2e0d('0x13')]=_0x45d7d0,this[_0x2e0d('0x27')]=this[_0x2e0d('0x39')](),this[_0x2e0d('0x24')]=this[_0x2e0d('0x39')](),this[_0x2e0d('0x17')]=null,this[_0x2e0d('0x32')]=new _0xe4c0a9(_0x56966c),this[_0x2e0d('0x32')][_0x2e0d('0x1d')](_0x2e0d('0x8'))['to'](this,_0x2e0d('0x23'),_0x17c8fe=>_0x17c8fe-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2658da of _0x46722d[_0x2e0d('0x10')])this[_0x2e0d('0x29')](_0x2658da);this['_handleInfoComment'](),this['listenTo'](_0x46722d[_0x2e0d('0x10')],_0x2e0d('0x2'),(_0xf4ecb9,_0x2d33b4)=>{const _0x41b754=this[_0x2e0d('0x38')](_0x2d33b4);this['length']++,this[_0x2e0d('0x29')](_0x2d33b4,_0x41b754),this['refreshVisibleViews']();}),this[_0x2e0d('0xf')](_0x46722d[_0x2e0d('0x10')],_0x2e0d('0xc'),(_0x3b72ec,_0x45fed9)=>{this[_0x2e0d('0x23')]--,this[_0x2e0d('0x7')](_0x45fed9),this['refreshVisibleViews']();}),this[_0x2e0d('0xf')](_0x46722d,'commentUpdated',()=>this[_0x2e0d('0x0')]()),this[_0x2e0d('0xf')](_0x46722d,_0x2e0d('0x2c'),()=>this[_0x2e0d('0x3')]()),this['on']('change:isActive',()=>this[_0x2e0d('0x0')]()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this[_0x2e0d('0x30')]({'tag':'ul','attributes':{'class':[_0x2e0d('0x37')]},'children':this[_0x2e0d('0x24')]});}get[_0x2e0d('0x19')](){return this['_model'][_0x2e0d('0xe')]>this[_0x2e0d('0x13')][_0x2e0d('0x1')]&&!this[_0x2e0d('0x2a')]&&!this['hasDirtyComment'];}['render'](){super['render'](),this[_0x2e0d('0x0')]();}[_0x2e0d('0x2f')](){this[_0x2e0d('0x5')][_0x2e0d('0x2f')]();}[_0x2e0d('0x36')](){this[_0x2e0d('0x32')][_0x2e0d('0x36')]();for(const _0x66935f of this[_0x2e0d('0x27')])_0x66935f[_0x2e0d('0x36')]();super[_0x2e0d('0x36')]();}['refreshVisibleViews'](){this[_0x2e0d('0x19')]?this['_rearrangeCollapse']():this[_0x2e0d('0x1a')]();}['_handleNewCommentModel'](_0x25d86a,_0x3c65f7){const _0x14f6e5=new this[(_0x2e0d('0x13'))][(_0x2e0d('0x1e'))](this['locale'],_0x25d86a,{'maxCommentCharsWhenCollapsed':this[_0x2e0d('0x13')][_0x2e0d('0x26')],'formatDateTime':this[_0x2e0d('0x13')][_0x2e0d('0x15')],'editorConfig':this['_config'][_0x2e0d('0x14')]});_0x14f6e5['viewUid']=_0x25d86a['id'],_0x14f6e5[_0x2e0d('0x1b')]('removeComment')['to'](this),_0x14f6e5[_0x2e0d('0x1b')](_0x2e0d('0x2b'))['to'](this),_0x14f6e5['delegate']('resolveCommentThread')['to'](this),_0x14f6e5['delegate'](_0x2e0d('0x12'))['to'](this),_0x14f6e5[_0x2e0d('0x1b')](_0x2e0d('0x1c'))['to'](this),this['listenTo'](_0x14f6e5,_0x2e0d('0x28'),()=>this[_0x2e0d('0x4')]()),this[_0x2e0d('0x27')][_0x2e0d('0x2')](_0x14f6e5,_0x3c65f7);}[_0x2e0d('0x38')](_0x3024d0){const _0x336084=this[_0x2e0d('0x9')][_0x2e0d('0x2d')](_0x3024d0);return this[_0x2e0d('0x17')]?this['resolvedCommentView'][_0x2e0d('0x11')]>_0x3024d0[_0x2e0d('0x11')]?_0x336084-0x1:_0x336084:_0x336084-0x1;}[_0x2e0d('0x3')](){if(this[_0x2e0d('0x9')][_0x2e0d('0x25')]&&this[_0x2e0d('0x9')][_0x2e0d('0x31')]){const _0xab3f2c={'id':'resolved','author':this['_model'][_0x2e0d('0x25')],'authoredAt':this[_0x2e0d('0x9')]['resolvedAt'],'content':_0x5054b5(this[_0x2e0d('0xa')],_0x2e0d('0x34')),'attributes':{}};this[_0x2e0d('0x17')]=new this['_config'][(_0x2e0d('0x1e'))](this[_0x2e0d('0xa')],_0xab3f2c,{'maxCommentCharsWhenCollapsed':this[_0x2e0d('0x13')][_0x2e0d('0x26')],'formatDateTime':this[_0x2e0d('0x13')][_0x2e0d('0x15')],'editorConfig':this['_config'][_0x2e0d('0x14')],'isSystemComment':!0x0}),this[_0x2e0d('0x27')]['add'](this[_0x2e0d('0x17')],this[_0x2e0d('0x9')][_0x2e0d('0x2d')](_0xab3f2c));}else this[_0x2e0d('0x17')]&&(this['commentViews']['remove'](this[_0x2e0d('0x17')]),this[_0x2e0d('0x17')][_0x2e0d('0x36')](),this[_0x2e0d('0x17')]=null);this[_0x2e0d('0x0')]();}['_handleRemoveCommentModel'](_0x20fa11){const _0x4c962f=this[_0x2e0d('0x27')][_0x2e0d('0xc')](_0x20fa11['id']);this[_0x2e0d('0x1f')](_0x4c962f),_0x4c962f[_0x2e0d('0x22')]&&this[_0x2e0d('0x4')](),_0x4c962f[_0x2e0d('0x36')]();}[_0x2e0d('0x4')](){this[_0x2e0d('0x6')]=Array['from'](this[_0x2e0d('0x27')])[_0x2e0d('0xb')](_0x263845=>_0x263845[_0x2e0d('0x22')]);}[_0x2e0d('0x18')](){const _0x492490=function(_0x20ba76){const _0x2628a3=new _0x5c43ae();for(const _0x35ab37 of _0x20ba76)_0x2628a3[_0x2e0d('0x2')](_0x35ab37);return _0x2628a3;}(this[_0x2e0d('0x27')]),_0x3ea828=this['_collapsedCommentsView']['count'];for(let _0x19e358=0x1;_0x19e358<=_0x3ea828;_0x19e358++)_0x492490['remove'](0x1);for(const _0x28402c of _0x492490)_0x28402c[_0x2e0d('0x33')]();_0x3ea828>0x0&&_0x492490[_0x2e0d('0x2')](this[_0x2e0d('0x32')],0x1),ss(_0x4141e9(Array[_0x2e0d('0x2e')](this['visibleViews']),Array[_0x2e0d('0x2e')](_0x492490)),this[_0x2e0d('0x24')],_0x492490);}[_0x2e0d('0x1a')](){ss(_0x4141e9(Array[_0x2e0d('0x2e')](this[_0x2e0d('0x24')]),Array[_0x2e0d('0x2e')](this['commentViews'])),this[_0x2e0d('0x24')],this[_0x2e0d('0x27')]);for(const _0x3879e0 of this[_0x2e0d('0x24')])_0x3879e0[_0x2e0d('0xd')]();}}function ss(_0x21bc31,_0xe3a488,_0x4e648a){let _0x2bf598=0x0;for(const _0x1f13dd of _0x21bc31)switch(_0x1f13dd){case'insert':_0xe3a488['add'](_0x4e648a[_0x2e0d('0x20')](_0x2bf598),_0x2bf598),_0x2bf598++;break;case _0x2e0d('0x16'):_0xe3a488[_0x2e0d('0xc')](_0x2bf598);break;case _0x2e0d('0x35'):_0x2bf598++;}}
|
|
@@ -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 _0x2256=['ck-context--quotes','.ck-context','...','execute','offsetWidth','_attachContextActions','.ck-context__value','add','hasContext','remove','ck-context-wrapper','setTemplate','ck-context','span','scrollWidth','div','mouseleave','mouseenter','overlay','_model','_createReopenButton','substring','render','Reopen','locale','label','querySelector','contextValue','bind','context','icon','ck-annotation__actions','bindTemplate','classList','tooltip','isReadOnly','ck-context__value','value','reopenButtonView','_trimContextValue'];(function(_0x4dc6f5,_0x225684){const _0x4faac5=function(_0x2bd056){while(--_0x2bd056){_0x4dc6f5['push'](_0x4dc6f5['shift']());}};_0x4faac5(++_0x225684);}(_0x2256,0x1ab));const _0x4faa=function(_0x4dc6f5,_0x225684){_0x4dc6f5=_0x4dc6f5-0x0;let _0x4faac5=_0x2256[_0x4dc6f5];return _0x4faac5;};import{View as _0x5bfb09,ButtonView as _0x2020bb}from'ckeditor5/src/ui';import{getTranslation as _0x4ecb1d}from'../../../utils/common-translations';import _0x288207 from'../../../../theme/icons/undo.svg';export const MAX_CONTENT_LENGTH=0x96;export default class Rt extends _0x5bfb09{constructor(_0x33e83c,_0x3b57e2){super(_0x33e83c);const _0x19f06e=this[_0x4faa('0x5')];this[_0x4faa('0x20')]=_0x3b57e2,this['reopenButtonView']=this[_0x4faa('0x21')](),this[_0x4faa('0x1')]('hasContext')['to'](this[_0x4faa('0x20')],_0x4faa('0x2'),_0x4f61e7=>!!_0x4f61e7),this['bind'](_0x4faa('0x0'))['to'](this[_0x4faa('0x20')],_0x4faa('0x2'),_0x34dd38=>_0x34dd38&&_0x34dd38[_0x4faa('0xa')]?this['_trimContextValue'](_0x34dd38[_0x4faa('0xa')]):_0x4ecb1d(this[_0x4faa('0x25')],'Comment\x20was\x20made\x20on\x20an\x20element')),this[_0x4faa('0x18')]({'tag':_0x4faa('0x1c'),'attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':[_0x4faa('0x17')]},'children':[{'tag':_0x4faa('0x1c'),'attributes':{'class':[_0x4faa('0x19'),_0x19f06e['if'](_0x4faa('0x15'),_0x4faa('0xd'))]},'children':[{'tag':_0x4faa('0x1a'),'attributes':{'class':[_0x4faa('0x9')]},'children':[{'text':_0x19f06e['to'](_0x4faa('0x0'))}]}]}]},{'tag':_0x4faa('0x1c'),'attributes':{'class':[_0x4faa('0x4')]},'children':[this[_0x4faa('0xb')]]}]});}[_0x4faa('0x23')](){super[_0x4faa('0x23')](),this[_0x4faa('0x12')]();}[_0x4faa('0x21')](){const _0x30402d=new _0x2020bb(this['locale']);return _0x30402d[_0x4faa('0x26')]=_0x4ecb1d(this[_0x4faa('0x25')],_0x4faa('0x24')),_0x30402d[_0x4faa('0x7')]=_0x4ecb1d(this['locale'],_0x4faa('0x24')),_0x30402d[_0x4faa('0x3')]=_0x288207,_0x30402d['bind']('isEnabled')['to'](this[_0x4faa('0x20')],_0x4faa('0x8'),_0x58792e=>!_0x58792e),_0x30402d[_0x4faa('0x1')]('isVisible')['to'](this[_0x4faa('0x20')],'isResolvable'),_0x30402d['on'](_0x4faa('0x10'),()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x30402d;}[_0x4faa('0xc')](_0x42f185){if(_0x42f185['length']<0x96)return _0x42f185;const _0x53aacb=_0x42f185['lastIndexOf']('\x20',0x93);return _0x42f185[_0x4faa('0x22')](0x0,_0x53aacb>-0x1?_0x53aacb:0x93)+_0x4faa('0xf');}['_attachContextActions'](){const _0x44d27d=this['element'][_0x4faa('0x27')](_0x4faa('0xe')),_0xe44d34=_0x44d27d[_0x4faa('0x27')](_0x4faa('0x13'));this['listenTo'](_0x44d27d,_0x4faa('0x1e'),()=>{_0xe44d34[_0x4faa('0x11')]<_0xe44d34[_0x4faa('0x1b')]&&_0x44d27d[_0x4faa('0x6')][_0x4faa('0x14')](_0x4faa('0x1f'));}),this['listenTo'](_0x44d27d,_0x4faa('0x1d'),()=>{_0x44d27d[_0x4faa('0x6')][_0x4faa('0x16')](_0x4faa('0x1f'));});}}
|
|
@@ -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 _0x274a=['commentInputView','ck-thread__user','bindTemplate','userView','editor','editorDestroyed','change:showInput','setTemplate','isFocused','set','value','editorReady','destroy','bind','extendTemplate','then','ck-comment__input-container--active','showInput','showButtons','div'];(function(_0x43ad63,_0x274a98){var _0x2aed1f=function(_0x1c21d8){while(--_0x1c21d8){_0x43ad63['push'](_0x43ad63['shift']());}};_0x2aed1f(++_0x274a98);}(_0x274a,0x180));var _0x2aed=function(_0x43ad63,_0x274a98){_0x43ad63=_0x43ad63-0x0;var _0x2aed1f=_0x274a[_0x43ad63];return _0x2aed1f;};import{View as _0x247b85}from'ckeditor5/src/ui';import _0x573971 from'./commentinputview';import{UserView as _0x52ae5a}from'ckeditor5-collaboration/src/collaboration-core';export default class Ct extends _0x247b85{constructor(_0x152c1f,_0xf170f8,_0xb43f69){super(_0x152c1f),this[_0x2aed('0x10')]=new _0x573971(_0x152c1f,_0xb43f69),this['commentInputView'][_0x2aed('0x9')](_0x2aed('0xe'))['to'](this[_0x2aed('0x10')]['focusTracker'],_0x2aed('0x4'),this[_0x2aed('0x10')],_0x2aed('0x6'),(_0x4801a9,_0x96b8fb)=>_0x4801a9||!!_0x96b8fb),this[_0x2aed('0x5')](_0x2aed('0xd'),!0x1),this['on'](_0x2aed('0x2'),()=>{this[_0x2aed('0xd')]&&!this[_0x2aed('0x10')][_0x2aed('0x0')]&&this[_0x2aed('0x10')]['createEditor']();}),this['commentInputView']['delegate'](_0x2aed('0x7'))['to'](this),this['commentInputView']['delegate'](_0x2aed('0x1'))['to'](this),this[_0x2aed('0x13')]=new _0x52ae5a(_0x152c1f,_0xf170f8),this[_0x2aed('0x13')][_0x2aed('0xa')]({'attributes':{'class':_0x2aed('0x11')}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this[_0x2aed('0x3')]({'tag':_0x2aed('0xf'),'attributes':{'class':['ck-comment__input-container',this[_0x2aed('0x12')]['if'](_0x2aed('0xd'),_0x2aed('0xc'))]},'children':[this['userView'],this[_0x2aed('0x10')]]});}['destroy'](){return this['commentInputView']['destroy']()[_0x2aed('0xb')](()=>super[_0x2aed('0x8')]());}}
|
|
@@ -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 _0x2215=['_cancelAllConfirms','_boundFirstCommentView','execute','_model','ck-reset_all-excluded','setTemplate','commentViews','bind','Resolve','.ck-thread__container','showConfirm','addMany','isReadOnly','div','length','commentsListView','isResolvable','ck-thread--active','getTemplate','removeButton','add','resolveCommentThread','label','high','bindTemplate','_bindFirstCommentView','icon','commentThreadHeaderView','then','stop','ck-comment--resolve','render','change:isActive','fire','_createResolveButton','containerElement','set','actionBar','element','isConfirm','ck-thread--remove-confirmation','change:isReadOnly','check','listenTo','ck-thread__container','cancelConfirm','isResolved','locale','tooltip','actionIndicator','isActive','extendTemplate','resolveButton','commentThreadChildren','ck-thread','isVisible','querySelector','commentThreadInputView','change:isResolved','unbind','remove'];(function(_0x32b1cc,_0x2215ae){const _0x494c28=function(_0x4450aa){while(--_0x4450aa){_0x32b1cc['push'](_0x32b1cc['shift']());}};_0x494c28(++_0x2215ae);}(_0x2215,0x139));const _0x494c=function(_0x32b1cc,_0x2215ae){_0x32b1cc=_0x32b1cc-0x0;let _0x494c28=_0x2215[_0x32b1cc];return _0x494c28;};import{ConfirmMixin as _0x25169b}from'ckeditor5-collaboration/src/collaboration-core';import{ButtonView as _0x5250b2}from'ckeditor5/src/ui';import{icons as _0x21c6e9}from'ckeditor5/src/core';import _0x35f071 from'./basecommentthreadview';import{getTranslation as _0x18ee0b}from'../../../utils/common-translations';export default class lt extends _0x25169b(_0x35f071){constructor(_0x1018f5,_0x53e6a7,_0x258f27,_0x638867){super(_0x1018f5,_0x53e6a7,_0x258f27,_0x638867),this['commentThreadChildren']=this['createCollection'](),this[_0x494c('0x2d')][_0x494c('0x3')]([this[_0x494c('0x7')],this[_0x494c('0x31')]]),this[_0x494c('0x38')][_0x494c('0x26')]&&this[_0x494c('0x2d')][_0x494c('0xc')](this['commentThreadHeaderView'],0x0),this[_0x494c('0x38')]['on'](_0x494c('0x32'),(_0xd144dd,_0x40fd5b,_0x224989)=>{_0x224989?this[_0x494c('0x2d')][_0x494c('0xc')](this[_0x494c('0x13')],0x0):this[_0x494c('0x2d')]['remove'](this[_0x494c('0x13')]);}),this[_0x494c('0x1c')](_0x494c('0x29'),null),this[_0x494c('0x1b')]=null,this['_boundFirstCommentView']=null,this[_0x494c('0x27')]=_0x1018f5,this[_0x494c('0x2c')]=this[_0x494c('0x1a')](),this[_0x494c('0x3a')](this['getTemplate']()),this['on'](_0x494c('0x18'),(_0x50fe60,_0x5bebbb,_0x2ac206)=>{_0x2ac206||this[_0x494c('0x35')]();}),this[_0x494c('0x23')](this[_0x494c('0x38')],_0x494c('0x21'),(_0x1f6e4c,_0x3d1620,_0x29d165)=>{_0x29d165&&this[_0x494c('0x35')]();}),this[_0x494c('0x6')]>0x0&&this[_0x494c('0x11')](),this[_0x494c('0x23')](this[_0x494c('0x7')][_0x494c('0x3b')],'add',()=>{this['_bindFirstCommentView']();});}[_0x494c('0xa')](){const _0x59c2dd=this[_0x494c('0x10')];return{'tag':_0x494c('0x5'),'attributes':{'class':[_0x494c('0x2e'),_0x494c('0x39'),_0x59c2dd['if'](_0x494c('0x2a'),_0x494c('0x9')),_0x59c2dd['if'](_0x494c('0x1f'),_0x494c('0x20')),_0x59c2dd['to'](_0x494c('0x29'),_0x55b13d=>_0x55b13d?'ck-thread--'+_0x55b13d:'')],'data-thread-id':this[_0x494c('0x38')]['id'],'tabindex':-0x1},'children':[{'tag':_0x494c('0x5'),'attributes':{'class':_0x494c('0x24')},'children':this['commentThreadChildren']}]};}['render'](){super[_0x494c('0x17')](),this[_0x494c('0x1b')]=this[_0x494c('0x1e')][_0x494c('0x30')](_0x494c('0x1'));}[_0x494c('0x35')](){this['cancelConfirm']();for(const _0x3201c4 of this[_0x494c('0x7')][_0x494c('0x3b')])_0x3201c4[_0x494c('0x25')]();}[_0x494c('0x11')](){const {locale:_0xfc086}=this,_0x2c1eb0=this[_0x494c('0x7')][_0x494c('0x3b')]['get'](0x0);_0x2c1eb0===this[_0x494c('0x36')]||_0x2c1eb0['isSystemComment']||(this['_boundFirstCommentView']=_0x2c1eb0,this[_0x494c('0x33')]('actionIndicator'),this[_0x494c('0x3c')](_0x494c('0x29'))['to'](_0x2c1eb0,_0x494c('0x29'),_0x33b8d7=>'remove'===_0x33b8d7?_0x494c('0x34'):null),_0x2c1eb0['placeholder']=_0x18ee0b(_0xfc086,'Write\x20a\x20comment...'),_0x2c1eb0[_0x494c('0xb')]['on'](_0x494c('0x37'),_0x1f3ea9=>{_0x1f3ea9[_0x494c('0x15')](),this[_0x494c('0x2')](_0x18ee0b(_0xfc086,'Delete\x20comment\x20thread?'),this[_0x494c('0x1b')])[_0x494c('0x14')](()=>{this[_0x494c('0x19')]('removeCommentThread');});},{'priority':_0x494c('0xf')}),_0x2c1eb0[_0x494c('0x1d')][_0x494c('0xc')](this[_0x494c('0x2c')],0x0));}[_0x494c('0x1a')](){const _0x1e2ffb=new _0x5250b2(this[_0x494c('0x27')]);return _0x1e2ffb[_0x494c('0xe')]=_0x18ee0b(this[_0x494c('0x27')],_0x494c('0x0')),_0x1e2ffb[_0x494c('0x28')]=_0x18ee0b(this['locale'],'Resolve'),_0x1e2ffb[_0x494c('0x12')]=_0x21c6e9[_0x494c('0x22')],_0x1e2ffb[_0x494c('0x2b')]({'attributes':{'class':_0x494c('0x16')}}),_0x1e2ffb[_0x494c('0x3c')]('isEnabled')['to'](this['_model'],_0x494c('0x4'),_0x53807f=>!_0x53807f),_0x1e2ffb[_0x494c('0x3c')](_0x494c('0x2f'))['to'](this[_0x494c('0x38')],_0x494c('0x8'),this[_0x494c('0x38')],_0x494c('0x26'),(_0x2a36de,_0x1d77d2)=>_0x2a36de&&!_0x1d77d2),_0x1e2ffb['on'](_0x494c('0x37'),()=>{this['fire'](_0x494c('0xd'),this[_0x494c('0x38')]['id']);}),_0x1e2ffb;}}
|
|
@@ -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 _0x283f=['ck-annotation__content-wrapper','ck-annotation__main','push','ck-comment__actions','icon','add','bind','EXTERNAL_IMPORT_WORD_COMMENT','@external','remove','set','Delete\x20comment?','visibleView','ck-comment__info-time','bindTemplate','then','authoredAt','label','setTemplate','source','items','length','actionBar','isVisible','some','buttonView','render','getUserViewNotificationText','Show\x20more\x20items','threeVerticalDots','fire','Edit','panelPosition','creator','edit','ck-annotation__actions','isRemovable','name','isEditable','div','listenTo','switchToEditMode','ck-comment--remove','userView','placeholder','locale','_createEditButton','ck-annotation','ck-comment__info','ck-annotation__info-time','isEnabled','actionIndicator','cancelConfirm','addMany','_model','ck-comment--edit','removeComment','Remove','panelView','isReadOnly','mouseenter','ck-comment--','_createDropdown','change:isVisible','_config','ck-annotation__user','element','editButton','attributes','getTemplate','isSystemComment','ck-comment__external','Reply...','_attachActions','span','isConfirm','ck-annotation__info','createCollection','_createCommentInputView','_createRemoveButton','change:isRemovable','blur','importWord','showConfirm','author','execute','mouseleave','extendTemplate','change:isEnabled','isEditMode','withText','focus','EXTERNAL_AVATAR','isExternal','ck-comment__user','removeButton'];(function(_0x28118d,_0x283fc8){const _0x5b7a01=function(_0x3c4d2b){while(--_0x3c4d2b){_0x28118d['push'](_0x28118d['shift']());}};_0x5b7a01(++_0x283fc8);}(_0x283f,0x10c));const _0x5b7a=function(_0x28118d,_0x283fc8){_0x28118d=_0x28118d-0x0;let _0x5b7a01=_0x283f[_0x28118d];return _0x5b7a01;};import{ButtonView as _0x479ce7,createDropdown as _0x3b2926,ListView as _0x3a7fb2,ListItemView as _0x3ef960}from'ckeditor5/src/ui';import{icons as _0x4bb238}from'ckeditor5/src/core';import{UserView as _0x855dec,ConfirmMixin as _0x39e3b4}from'ckeditor5-collaboration/src/collaboration-core';import _0x209590 from'./basecommentview';import _0x31b80c from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x3d446c}from'../../../utils/common-translations';export default class ut extends _0x39e3b4(_0x209590){constructor(_0xf4310a,_0x2854d8,_0x28cf05){super(_0xf4310a,_0x2854d8,_0x28cf05),this[_0x5b7a('0x1e')](_0x5b7a('0x47'),null),this[_0x5b7a('0x1e')](_0x5b7a('0x40'),_0x3d446c(_0xf4310a,_0x5b7a('0x5c'))),this[_0x5b7a('0x1a')]('authoredAt')['to'](_0x2854d8),this[_0x5b7a('0x1a')]('resolvedAt')['to'](_0x2854d8),this[_0x5b7a('0x2a')]=this[_0x5b7a('0x1')](),this['isSystemComment']||(this[_0x5b7a('0x57')]=this[_0x5b7a('0x42')](),this[_0x5b7a('0x13')]=this[_0x5b7a('0x3')](),this['items']=this[_0x5b7a('0x1')](),this[_0x5b7a('0x28')][_0x5b7a('0x49')]([this['editButton'],this[_0x5b7a('0x13')]]),this['dropdown']=this[_0x5b7a('0x52')](),this[_0x5b7a('0x2a')][_0x5b7a('0x19')](this['dropdown'])),this[_0x5b7a('0x3f')]=new _0x855dec(_0xf4310a,_0x2854d8[_0x5b7a('0x8')],this[_0x5b7a('0x2f')]()),this['userView'][_0x5b7a('0xb')]({'attributes':{'class':[_0x5b7a('0x12'),_0x5b7a('0x55')]}}),this[_0x5b7a('0x3c')](_0x2854d8,_0x5b7a('0x4'),()=>this[_0x5b7a('0x48')]()),this[_0x5b7a('0x26')](this[_0x5b7a('0x59')]());}[_0x5b7a('0x59')](){const _0x2142d1=this[_0x5b7a('0x22')],_0x3d46b3=[{'tag':_0x5b7a('0x3b'),'attributes':{'class':[_0x5b7a('0x44'),_0x5b7a('0x0')]},'children':[{'tag':_0x5b7a('0x5e'),'children':[{'text':this[_0x5b7a('0x3f')][_0x5b7a('0x39')]}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x2142d1['to']('authoredAt'),'class':[_0x5b7a('0x21'),_0x5b7a('0x45')]},'children':[{'text':_0x2142d1['to'](_0x5b7a('0x24'),_0x552db3=>this[_0x5b7a('0x54')]['formatDateTime'](_0x552db3))}]}]},{'tag':_0x5b7a('0x3b'),'attributes':{'class':[_0x5b7a('0x17'),_0x5b7a('0x37'),_0x2142d1['if'](_0x5b7a('0xd'),'ck-comment__actions--hidden'),_0x2142d1['if'](_0x5b7a('0xd'),'ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':_0x5b7a('0x3b'),'attributes':{'class':[_0x5b7a('0x14')]},'children':this[_0x5b7a('0x20')]}];return this['_model'][_0x5b7a('0x11')]&&_0x3d46b3[_0x5b7a('0x16')]({'tag':_0x5b7a('0x3b'),'attributes':{'class':[_0x5b7a('0x5b')]},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x2142d1['if'](_0x5b7a('0x5f'),'ck-comment--remove-confirmation')],'tabindex':-0x1},'children':[{'tag':_0x5b7a('0x3b'),'attributes':{'class':['ck-comment',_0x5b7a('0x43'),_0x2142d1['if'](_0x5b7a('0xd'),_0x5b7a('0x4b')),_0x2142d1['if'](_0x5b7a('0x5a'),'ck-comment--info'),_0x2142d1['to']('actionIndicator',_0x17f8de=>_0x17f8de?_0x5b7a('0x51')+_0x17f8de:'')],'data-author-id':this[_0x5b7a('0x4a')][_0x5b7a('0x8')]['id'],'data-comment-id':this[_0x5b7a('0x4a')]['id']},'children':[this[_0x5b7a('0x3f')],{'tag':_0x5b7a('0x3b'),'attributes':{'class':['ck-comment__main',_0x5b7a('0x15')]},'children':_0x3d46b3}]}]};}['_createEditButton'](){const _0x2e5d51=new _0x479ce7(this[_0x5b7a('0x41')]);return _0x2e5d51[_0x5b7a('0x25')]=_0x3d446c(this[_0x5b7a('0x41')],_0x5b7a('0x33')),_0x2e5d51[_0x5b7a('0x18')]=_0x4bb238['pencil'],_0x2e5d51[_0x5b7a('0xe')]=!0x0,_0x2e5d51['extendTemplate']({'attributes':{'class':_0x5b7a('0x4b')}}),_0x2e5d51['bind'](_0x5b7a('0x46'))['to'](this[_0x5b7a('0x4a')],_0x5b7a('0x4f'),_0x5df5bb=>!_0x5df5bb),_0x2e5d51[_0x5b7a('0x1a')](_0x5b7a('0x2b'))['to'](this[_0x5b7a('0x4a')],_0x5b7a('0x3a')),_0x2e5d51['on'](_0x5b7a('0x9'),()=>this[_0x5b7a('0x3d')]()),_0x2e5d51;}[_0x5b7a('0x3')](){const _0x4f012f=new _0x479ce7(this['locale']);return _0x4f012f[_0x5b7a('0x25')]=_0x3d446c(this[_0x5b7a('0x41')],_0x5b7a('0x4d')),_0x4f012f[_0x5b7a('0x18')]=_0x31b80c,_0x4f012f[_0x5b7a('0xe')]=!0x0,_0x4f012f[_0x5b7a('0xb')]({'attributes':{'class':_0x5b7a('0x3e')}}),_0x4f012f['bind']('isEnabled')['to'](this[_0x5b7a('0x4a')],_0x5b7a('0x4f'),_0x4bbcfa=>!_0x4bbcfa),_0x4f012f[_0x5b7a('0x1a')](_0x5b7a('0x2b'))['to'](this[_0x5b7a('0x4a')],_0x5b7a('0x38')),_0x4f012f['on'](_0x5b7a('0x9'),()=>{this[_0x5b7a('0x7')](_0x3d446c(this[_0x5b7a('0x41')],_0x5b7a('0x1f')),this[_0x5b7a('0x56')])[_0x5b7a('0x23')](()=>{this[_0x5b7a('0x32')](_0x5b7a('0x4c'),this[_0x5b7a('0x4a')]['id']);});}),_0x4f012f;}['_createDropdown'](){const _0x408349=_0x3b2926(this[_0x5b7a('0x41')]),_0xf07b35=_0x408349[_0x5b7a('0x4e')]['children'],_0xfbbada=new _0x3a7fb2(this['locale']),_0x29b6d2=(_0x144bb0,_0x3c7119=-0x1)=>{const _0x2c3712=new _0x3ef960(this[_0x5b7a('0x41')]);_0x2c3712['children'][_0x5b7a('0x19')](_0x144bb0);const _0x3720cc=_0x3c7119>-0x1?_0x3c7119:_0xfbbada[_0x5b7a('0x28')][_0x5b7a('0x29')];_0xfbbada[_0x5b7a('0x28')][_0x5b7a('0x19')](_0x2c3712,_0x3720cc),_0x408349['listenTo'](_0x144bb0,_0x5b7a('0xc'),()=>{_0x408349[_0x5b7a('0x46')]=[...this['items']][_0x5b7a('0x2c')](_0x40117a=>_0x40117a['isEnabled']);}),_0x408349['listenTo'](_0x144bb0,_0x5b7a('0x53'),()=>{_0x408349['buttonView'][_0x5b7a('0x2b')]=[...this[_0x5b7a('0x28')]]['some'](_0x4e7f98=>_0x4e7f98[_0x5b7a('0x2b')]);});};_0x408349[_0x5b7a('0x34')]='sw',_0x408349[_0x5b7a('0x2d')]['set']({'label':_0x3d446c(this[_0x5b7a('0x41')],_0x5b7a('0x30')),'icon':_0x4bb238[_0x5b7a('0x31')]}),_0x408349[_0x5b7a('0x46')]=[...this['items']][_0x5b7a('0x2c')](_0x5cbc36=>_0x5cbc36[_0x5b7a('0x46')]),_0x408349['buttonView']['isVisible']=[...this['items']][_0x5b7a('0x2c')](_0x2d445b=>_0x2d445b[_0x5b7a('0x2b')]);for(const _0x284273 of this['items'])_0x29b6d2(_0x284273);return _0xf07b35['add'](_0xfbbada),_0x408349[_0x5b7a('0x3c')](this[_0x5b7a('0x28')],'add',(_0x4dc274,_0x1e1edb,_0x263501)=>{_0x29b6d2(_0x1e1edb,_0x263501);}),_0x408349[_0x5b7a('0x3c')](this['items'],_0x5b7a('0x1d'),(_0x364c70,_0x2165b6,_0x1df840)=>{_0xfbbada[_0x5b7a('0x28')][_0x5b7a('0x1d')](_0x1df840);}),_0x408349;}[_0x5b7a('0x5d')](_0x4aaed5,_0x31b314){const _0x194471=_0x4aaed5&&_0x4aaed5[_0x5b7a('0x56')];_0x194471&&(this[_0x5b7a('0x3c')](_0x194471,_0x5b7a('0x50'),()=>this[_0x5b7a('0x47')]=_0x31b314),this[_0x5b7a('0x3c')](_0x194471,_0x5b7a('0xf'),()=>this[_0x5b7a('0x47')]=_0x31b314),this[_0x5b7a('0x3c')](_0x194471,_0x5b7a('0xa'),()=>this[_0x5b7a('0x47')]=null),this[_0x5b7a('0x3c')](_0x194471,_0x5b7a('0x5'),()=>this[_0x5b7a('0x47')]=null));}[_0x5b7a('0x2')](){const _0x76190d=super[_0x5b7a('0x2')]();return _0x76190d['bind']('placeholder')['to'](this),_0x76190d;}['getExternalCommentNote'](){return _0x5b7a('0x6')===this[_0x5b7a('0x4a')][_0x5b7a('0x58')]['@external'][_0x5b7a('0x27')]?_0x3d446c(this[_0x5b7a('0x41')],_0x5b7a('0x1b')):_0x3d446c(this[_0x5b7a('0x41')],'EXTERNAL_COMMENT');}[_0x5b7a('0x2f')](){return this['_model'][_0x5b7a('0x11')]?_0x5b7a('0x6')===this[_0x5b7a('0x4a')][_0x5b7a('0x58')][_0x5b7a('0x1c')][_0x5b7a('0x27')]?_0x3d446c(this[_0x5b7a('0x41')],'EXTERNAL_IMPORT_WORD_AVATAR',this[_0x5b7a('0x4a')][_0x5b7a('0x35')][_0x5b7a('0x39')]):_0x3d446c(this['locale'],_0x5b7a('0x10'),this[_0x5b7a('0x4a')]['creator'][_0x5b7a('0x39')]):null;}[_0x5b7a('0x2e')](){super['render'](),this[_0x5b7a('0x5d')](this['editButton'],_0x5b7a('0x36')),this[_0x5b7a('0x5d')](this[_0x5b7a('0x13')],_0x5b7a('0x1d'));}}
|