@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.
@@ -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": "29.1.0",
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": "^29.1.0"
30
+ "ckeditor5": "^31.1.0"
31
31
  }
32
32
  }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x586d=['find','includes','get','pluginName','editors','permissions-set-permissions-invalid-channel-id','forceDisabled','commands','Permissions','has','setAdminPermissions','setPermissions','collaboration.channelId','context','noPermissions','isReadOnly','config','comment:write','CommentsRepository','plugins','comment:admin','CommentsOnly','clearForceDisabled','switchReadOnly'];(function(_0x5ee8ce,_0x586deb){const _0x12ed5f=function(_0x429f26){while(--_0x429f26){_0x5ee8ce['push'](_0x5ee8ce['shift']());}};_0x12ed5f(++_0x586deb);}(_0x586d,0x1f3));const _0x12ed=function(_0x5ee8ce,_0x586deb){_0x5ee8ce=_0x5ee8ce-0x0;let _0x12ed5f=_0x586d[_0x5ee8ce];return _0x12ed5f;};import{ContextPlugin as _0x5ee861,Editor as _0x550c3f}from'ckeditor5/src/core';import{CKEditorError as _0x2d47f0}from'ckeditor5/src/utils';export default class e extends _0x5ee861{static get[_0x12ed('0x8')](){return _0x12ed('0xd');}[_0x12ed('0x10')](_0x143528,_0x4dd363){let _0x22243e;if(_0x4dd363||(_0x4dd363=this[_0x12ed('0x12')][_0x12ed('0x15')][_0x12ed('0x7')](_0x12ed('0x11'))),this[_0x12ed('0x12')][_0x12ed('0x15')][_0x12ed('0x7')](_0x12ed('0x11'))==_0x4dd363?_0x22243e=this[_0x12ed('0x12')]:this[_0x12ed('0x12')]['editors']&&(_0x22243e=this[_0x12ed('0x12')][_0x12ed('0x9')][_0x12ed('0x5')](_0x138cfc=>_0x138cfc[_0x12ed('0x15')][_0x12ed('0x7')](_0x12ed('0x11'))==_0x4dd363)),!_0x22243e)throw new _0x2d47f0(_0x12ed('0xa'),null);const _0x38efe5=_0x22243e[_0x12ed('0x0')],_0x3164df=_0x22243e instanceof _0x550c3f,_0x57eaa9=_0x38efe5[_0x12ed('0xe')](_0x12ed('0x17'))&&_0x38efe5[_0x12ed('0x7')]('CommentsRepository'),_0x5c6765=_0x38efe5[_0x12ed('0xe')](_0x12ed('0x2'))&&_0x38efe5[_0x12ed('0x7')]('CommentsOnly'),_0x3783fd=_0x143528[_0x12ed('0x6')]('document:write'),_0x3959b4=_0x143528['includes'](_0x12ed('0x1')),_0x5f1a1f=_0x143528[_0x12ed('0x6')](_0x12ed('0x16'))||_0x3959b4;if(_0x5c6765&&(_0x5c6765['isEnabled']=!_0x3783fd&&_0x5f1a1f),_0x3164df&&(_0x22243e[_0x12ed('0x14')]=!(_0x3783fd||_0x5f1a1f&&_0x57eaa9)),_0x57eaa9){_0x57eaa9[_0x12ed('0x4')](!_0x5f1a1f,_0x4dd363),_0x57eaa9[_0x12ed('0xf')](_0x3959b4,_0x4dd363);const _0x578543=_0x3164df&&_0x22243e[_0x12ed('0xc')][_0x12ed('0x7')]('addCommentThread');_0x578543&&(_0x5f1a1f?_0x578543[_0x12ed('0x3')](_0x12ed('0x13')):_0x578543[_0x12ed('0xb')]('noPermissions'));}}}
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 _0x51ba=['ck-user__anonymous','ck-user','avatar','isAnonymous','setTemplate','initials','div','push','ck\x20ck-user__name'];(function(_0x51f4c3,_0x51baa2){const _0x855b55=function(_0x49f2db){while(--_0x49f2db){_0x51f4c3['push'](_0x51f4c3['shift']());}};_0x855b55(++_0x51baa2);}(_0x51ba,0x1bc));const _0x855b=function(_0x51f4c3,_0x51baa2){_0x51f4c3=_0x51f4c3-0x0;let _0x855b55=_0x51ba[_0x51f4c3];return _0x855b55;};import{View as _0x149942}from'ckeditor5/src/ui';import'../../../theme/users.css';export default class a extends _0x149942{constructor(_0x2e7c91,_0x139831){super(_0x2e7c91),this['name']=_0x139831['name'];const _0xbc5dc2=['ck','ck-user__img'];_0x139831[_0x855b('0x0')]&&_0xbc5dc2[_0x855b('0x4')](_0x855b('0x6')),_0x139831[_0x855b('0x8')]&&_0xbc5dc2[_0x855b('0x4')]('ck-user__avatar'),this[_0x855b('0x1')]({'tag':_0x855b('0x3'),'attributes':{'class':['ck',_0x855b('0x7')],'data-user-id':_0x139831['id']},'children':[{'tag':_0x855b('0x3'),'attributes':{'class':_0xbc5dc2,'style':{'background-image':_0x139831[_0x855b('0x8')]?'url(\x27'+_0x139831[_0x855b('0x8')]+'\x27)':''}}},{'tag':_0x855b('0x3'),'attributes':{'class':_0x139831['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':_0x855b('0x5')},'children':[{'text':_0x139831[_0x855b('0x2')]}]}]});}}
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 _0x1e79e3}from'ckeditor5/src/core';import{Collection as _0x1fadd9,CKEditorError as _0x41bb3c}from'ckeditor5/src/utils';import _0x149531 from'./permissions';import'../theme/usercolors.css';export default class r extends _0x1e79e3{static get['pluginName'](){return'Users';}static get['requires'](){return[_0x149531];}constructor(_0x4e1ece){super(_0x4e1ece),_0x4e1ece['config']['define']('users.anonymousUserId','anonymous-user'),_0x4e1ece['config']['define']('users.colorsCount',0x8),this['users']=new _0x1fadd9(),this['_locale']=_0x4e1ece['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x24faf2=this['context'];this['licenseKey']=_0x24faf2['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xa18d2;for(const _0x1501a7 in _0x24faf2){const _0x478ad1=_0x24faf2[_0x1501a7];if('licenseKeyTrial'===_0x478ad1||'licenseKeyInvalid'===_0x478ad1||'licenseKeyValid'===_0x478ad1||'licenseKeyTrialLimit'==_0x478ad1){delete _0x24faf2[_0x1501a7],_0xa18d2=_0x478ad1;break;}}if('licenseKeyInvalid'===_0xa18d2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x41bb3c('invalid-license-key',null);if('licenseKeyTrial'===_0xa18d2&&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'===_0xa18d2)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x41bb3c('trial-license-key-reached-limit',null);'licenseKeyValid'===_0xa18d2&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser'](_0x8c64d7){if(!(_0x8c64d7=Object['assign']({},_0x8c64d7,{'color':this['_getNextColor']()}))['id']||'string'!=typeof _0x8c64d7['id'])throw new _0x41bb3c('users-add-invalid-id');if(this['users']['has'](_0x8c64d7['id']))throw new _0x41bb3c('users-add-duplicated-id',null,{'id':_0x8c64d7['id']});_0x8c64d7['name']=function(_0x1573d2,_0x40d9ca=''){const {t:t}=_0x1573d2;return''==(_0x40d9ca=_0x40d9ca['trim']())?t('Anonymous'):_0x40d9ca;}(this['_locale'],_0x8c64d7['name']);const _0x20d2b9=new l(_0x8c64d7);return this['users']['add'](_0x20d2b9),_0x20d2b9;}['getUser'](_0xccf965){return this['users']['get'](_0xccf965);}['useAnonymousUser'](){const _0x30d0ad=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['_locale'];if(this['users']['has'](_0x30d0ad))return;this['addUser']({'id':_0x30d0ad,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x30d0ad);}['defineMe'](_0x2e4a4d){if(this['_myId'])throw new _0x41bb3c('users-me-already-defined',null);if(!this['getUser'](_0x2e4a4d))throw new _0x41bb3c('users-me-missing-user',null);this['_myId']=_0x2e4a4d;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x5bceb7=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x5bceb7&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}}class l{constructor(_0x17a00b){this['id']=_0x17a00b['id'],this['color']=_0x17a00b['color'],this['name']=_0x17a00b['name'],this['avatar']=_0x17a00b['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){const _0x3e5c7f=this['name']['split']('\x20');return 0x1===_0x3e5c7f['length']?this['_getInitial'](_0x3e5c7f[0x0]):this['_getInitial'](_0x3e5c7f[0x0])+this['_getInitial'](_0x3e5c7f[_0x3e5c7f['length']-0x1]);}['_getInitial'](_0x44fca0){return _0x44fca0['charAt'](0x0)['toUpperCase']();}}class u{constructor(_0x55b269){this['_id']=_0x55b269;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}
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'];}}