@ckeditor/ckeditor5-collaboration-core 29.1.0 → 31.1.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/lang/translations/da.po +21 -0
- package/package.json +2 -2
- package/src/permissions.js +1 -1
- package/src/users/view/userview.js +1 -1
- package/src/users.js +1 -1
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
2
|
+
#
|
3
|
+
# !!! IMPORTANT !!!
|
4
|
+
#
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
7
|
+
#
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
9
|
+
#
|
10
|
+
# To learn more, check out the official contributor's guide:
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
12
|
+
#
|
13
|
+
msgid ""
|
14
|
+
msgstr ""
|
15
|
+
"Language-Team: Danish (https://www.transifex.com/ckeditor/teams/11143/da/)\n"
|
16
|
+
"Language: da\n"
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18
|
+
|
19
|
+
msgctxt "A label for the anonymous user icon"
|
20
|
+
msgid "Anonymous"
|
21
|
+
msgstr "Anonym"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "
|
3
|
+
"version": "31.1.0",
|
4
4
|
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
@@ -27,6 +27,6 @@
|
|
27
27
|
"framework"
|
28
28
|
],
|
29
29
|
"dependencies": {
|
30
|
-
"ckeditor5": "^
|
30
|
+
"ckeditor5": "^31.1.0"
|
31
31
|
}
|
32
32
|
}
|
package/src/permissions.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x3f57=['plugins','commands','find','CommentsOnly','isReadOnly','forceDisabled','editors','CommentsRepository','get','addCommentThread','setPermissions','comment:admin','permissions-set-permissions-invalid-channel-id','clearForceDisabled','includes','has','Permissions','switchReadOnly','collaboration.channelId','noPermissions','config','context'];(function(_0x4387b9,_0x3f5773){const _0x1f35b5=function(_0x10a1a0){while(--_0x10a1a0){_0x4387b9['push'](_0x4387b9['shift']());}};_0x1f35b5(++_0x3f5773);}(_0x3f57,0x17f));const _0x1f35=function(_0x4387b9,_0x3f5773){_0x4387b9=_0x4387b9-0x0;let _0x1f35b5=_0x3f57[_0x4387b9];return _0x1f35b5;};import{ContextPlugin as _0x365a6b,Editor as _0x1f8c4c}from'ckeditor5/src/core';import{CKEditorError as _0x528b32}from'ckeditor5/src/utils';export default class e extends _0x365a6b{static get['pluginName'](){return _0x1f35('0x7');}[_0x1f35('0x1')](_0x160288,_0x12e783){let _0x51b197;if(_0x12e783||(_0x12e783=this[_0x1f35('0xc')]['config']['get'](_0x1f35('0x9'))),this[_0x1f35('0xc')][_0x1f35('0xb')][_0x1f35('0x15')]('collaboration.channelId')==_0x12e783?_0x51b197=this[_0x1f35('0xc')]:this[_0x1f35('0xc')][_0x1f35('0x13')]&&(_0x51b197=this['context']['editors'][_0x1f35('0xf')](_0x5afc58=>_0x5afc58['config'][_0x1f35('0x15')](_0x1f35('0x9'))==_0x12e783)),!_0x51b197)throw new _0x528b32(_0x1f35('0x3'),null);const _0x188401=_0x51b197[_0x1f35('0xd')],_0x3fa3b2=_0x51b197 instanceof _0x1f8c4c,_0x5eb14a=_0x188401[_0x1f35('0x6')]('CommentsRepository')&&_0x188401[_0x1f35('0x15')](_0x1f35('0x14')),_0x858bf8=_0x188401[_0x1f35('0x6')](_0x1f35('0x10'))&&_0x188401[_0x1f35('0x15')](_0x1f35('0x10')),_0x1a62aa=_0x160288['includes']('document:write'),_0x468eaa=_0x160288['includes'](_0x1f35('0x2')),_0x57aab4=_0x160288[_0x1f35('0x5')]('comment:write')||_0x468eaa;if(_0x858bf8&&(_0x858bf8['isEnabled']=!_0x1a62aa&&_0x57aab4),_0x3fa3b2&&(_0x51b197[_0x1f35('0x11')]=!(_0x1a62aa||_0x57aab4&&_0x5eb14a)),_0x5eb14a){_0x5eb14a[_0x1f35('0x8')](!_0x57aab4,_0x12e783),_0x5eb14a['setAdminPermissions'](_0x468eaa,_0x12e783);const _0x2d455e=_0x3fa3b2&&_0x51b197[_0x1f35('0xe')][_0x1f35('0x15')](_0x1f35('0x0'));_0x2d455e&&(_0x57aab4?_0x2d455e[_0x1f35('0x4')](_0x1f35('0xa')):_0x2d455e[_0x1f35('0x12')]('noPermissions'));}}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x16fd=['url(\x27','avatar','ck-user','ck\x20ck-user__name\x20ck-user__name--hidden','div','name','ck-user__avatar','isAnonymous','push','setTemplate','ck-user__img'];(function(_0x557af5,_0x16fd4f){const _0x16b766=function(_0x2e0b8c){while(--_0x2e0b8c){_0x557af5['push'](_0x557af5['shift']());}};_0x16b766(++_0x16fd4f);}(_0x16fd,0x1cb));const _0x16b7=function(_0x557af5,_0x16fd4f){_0x557af5=_0x557af5-0x0;let _0x16b766=_0x16fd[_0x557af5];return _0x16b766;};import{View as _0xf46906}from'ckeditor5/src/ui';import'../../../theme/users.css';export default class a extends _0xf46906{constructor(_0x42deb6,_0x2e6916){super(_0x42deb6),this[_0x16b7('0x8')]=_0x2e6916[_0x16b7('0x8')];const _0x25e2af=['ck',_0x16b7('0x2')];_0x2e6916[_0x16b7('0xa')]&&_0x25e2af[_0x16b7('0x0')]('ck-user__anonymous'),_0x2e6916[_0x16b7('0x4')]&&_0x25e2af['push'](_0x16b7('0x9')),this[_0x16b7('0x1')]({'tag':'div','attributes':{'class':['ck',_0x16b7('0x5')],'data-user-id':_0x2e6916['id']},'children':[{'tag':_0x16b7('0x7'),'attributes':{'class':_0x25e2af,'style':{'background-image':_0x2e6916[_0x16b7('0x4')]?_0x16b7('0x3')+_0x2e6916[_0x16b7('0x4')]+'\x27)':''}}},{'tag':_0x16b7('0x7'),'attributes':{'class':_0x2e6916[_0x16b7('0x4')]?_0x16b7('0x6'):'ck\x20ck-user__name'},'children':[{'text':_0x2e6916['initials']}]}]});}}
|
package/src/users.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
import{ContextPlugin as
|
23
|
+
import{ContextPlugin as _0x2ab2af}from'ckeditor5/src/core';import{Collection as _0x526095,CKEditorError as _0x338fe4}from'ckeditor5/src/utils';import _0x39b788 from'./permissions';import'../theme/usercolors.css';export default class r extends _0x2ab2af{static get['pluginName'](){return'Users';}static get['requires'](){return[_0x39b788];}constructor(_0x50cad2){super(_0x50cad2),_0x50cad2['config']['define']('users.anonymousUserId','anonymous-user'),_0x50cad2['config']['define']('users.colorsCount',0x8),this['users']=new _0x526095(),this['_locale']=_0x50cad2['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x531f7d=this['context'];this['licenseKey']=_0x531f7d['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x64097b;for(const _0x176383 in _0x531f7d){const _0x28825d=_0x531f7d[_0x176383];if('licenseKeyTrial'===_0x28825d||'licenseKeyInvalid'===_0x28825d||'licenseKeyValid'===_0x28825d||'licenseKeyTrialLimit'==_0x28825d){delete _0x531f7d[_0x176383],_0x64097b=_0x28825d;break;}}if('licenseKeyInvalid'===_0x64097b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x338fe4('invalid-license-key',null);if('licenseKeyTrial'===_0x64097b&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit'===_0x64097b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x338fe4('trial-license-key-reached-limit',null);'licenseKeyValid'===_0x64097b&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser'](_0x3bf267){if(!(_0x3bf267=Object['assign']({},_0x3bf267,{'color':this['_getNextColor']()}))['id']||'string'!=typeof _0x3bf267['id'])throw new _0x338fe4('users-add-invalid-id');if(this['users']['has'](_0x3bf267['id']))throw new _0x338fe4('users-add-duplicated-id',null,{'id':_0x3bf267['id']});_0x3bf267['name']=function(_0x10684c,_0x436ca2=''){const {t:t}=_0x10684c;return''==(_0x436ca2=_0x436ca2['trim']())?t('Anonymous'):_0x436ca2;}(this['_locale'],_0x3bf267['name']);const _0x5eb475=new l(_0x3bf267);return this['users']['add'](_0x5eb475),_0x5eb475;}['getUser'](_0x59ac36){return this['users']['get'](_0x59ac36);}['useAnonymousUser'](){const _0x4d877c=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['_locale'];if(this['users']['has'](_0x4d877c))return;this['addUser']({'id':_0x4d877c,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x4d877c);}['defineMe'](_0x56298e){if(this['_myId'])throw new _0x338fe4('users-me-already-defined',null);if(!this['getUser'](_0x56298e))throw new _0x338fe4('users-me-missing-user',null);this['_myId']=_0x56298e;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0xc225d=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0xc225d&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}}class l{constructor(_0x140154){this['id']=_0x140154['id'],this['color']=_0x140154['color'],this['name']=_0x140154['name'],this['avatar']=_0x140154['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){const _0x82f7b3=this['name']['split']('\x20');return 0x1===_0x82f7b3['length']?this['_getInitial'](_0x82f7b3[0x0]):this['_getInitial'](_0x82f7b3[0x0])+this['_getInitial'](_0x82f7b3[_0x82f7b3['length']-0x1]);}['_getInitial'](_0x7fe38c){return _0x7fe38c['charAt'](0x0)['toUpperCase']();}}class u{constructor(_0x155969){this['_id']=_0x155969;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}
|