@ckeditor/ckeditor5-collaboration-core
Advanced tools
Comparing version 18.0.0 to 19.0.0
Changelog | ||
========= | ||
## 19.0.0 (2020-04-30) | ||
### BREAKING CHANGES | ||
* `Users#me` is now set to `null` if `Users#defineMe()` or `Users#useAnonymousUser()` was not called. | ||
### Features | ||
* Localized user-related UI. | ||
* Introduced `Users#useAnonymousUser()` and `config.users.anonymousUserId`. | ||
### Other changes | ||
* `Users#me` will no longer set the local user to anonymous by default (if `Users#defineMe()` was not called). | ||
## 18.0.0 (2020-03-19) | ||
@@ -5,0 +21,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-collaboration-core", | ||
"version": "18.0.0", | ||
"version": "19.0.0", | ||
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich-text editor.", | ||
@@ -30,6 +30,6 @@ "license": "SEE LICENSE IN LICENSE.md", | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^18.0.0", | ||
"@ckeditor/ckeditor5-ui": "^18.0.0", | ||
"@ckeditor/ckeditor5-utils": "^18.0.0" | ||
"@ckeditor/ckeditor5-core": "^19.0.0", | ||
"@ckeditor/ckeditor5-ui": "^19.0.0", | ||
"@ckeditor/ckeditor5-utils": "^19.0.0" | ||
} | ||
} |
@@ -23,2 +23,2 @@ /* | ||
*/ | ||
const _0x3672=['destroy','assign','trim','string','licenseKeyTrial','config','getOperationAuthor','charAt','avatar','add','users-me-already-defined:\x20Cannot\x20add\x20a\x20local\x20user\x20more\x20than\x20once.','color','context','licenseKeyTrialLimit','trial-license-key-reached-limit:\x20You\x20have\x20exhausted\x20the\x20trial\x20usage\x20limit.\x20You\x20need\x20to\x20restart\x20the\x20editor\x20now.\x20Please\x20contact\x20our\x20customer\x20support\x20to\x20get\x20a\x20full\x20access\x20at\x20https://ckeditor.com/contact/.','licenseKeyValid','initials','users.colorsCount','addUser','split','getMarkerClass','getSelectionClass','Users','invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.','ck-user__marker--','licenseKey','anonymous-user','Anonymous','getUser','users-me-not-defined:\x20Local\x20user\x20is\x20not\x20defined.','init','has','users-add-duplicated-id:\x20User\x20with\x20a\x20given\x20id\x20is\x20already\x20added.','pluginName','name','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.','get','join','warn','decorate','length','licenseKeyInvalid','users','isAnonymous','ck-user__selection--','ck-user__bg-color--','getBackgroundColorClass'];(function(_0x30b596,_0x41f1ad){const _0x1d6f65=function(_0x2b15ae){while(--_0x2b15ae){_0x30b596['push'](_0x30b596['shift']());}};_0x1d6f65(++_0x41f1ad);}(_0x3672,0x1bf));const _0x17af=function(_0x30b596,_0x41f1ad){_0x30b596=_0x30b596-0x0;let _0x1d6f65=_0x3672[_0x30b596];return _0x1d6f65;};import _0x7b0c25 from'@ckeditor/ckeditor5-core/src/contextplugin';import _0x2dff10 from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0xf648cb,{attachLinkToDocumentation as _0x591169}from'@ckeditor/ckeditor5-utils/src/ckeditorerror';export default class n extends _0x7b0c25{static get[_0x17af('0x9')](){return _0x17af('0x2d');}constructor(_0x13927d){super(_0x13927d),this['i']=null,this[_0x17af('0xf')](_0x17af('0x1d')),this['s']=_0x13927d[_0x17af('0x1c')][_0x17af('0xc')](_0x17af('0x28'))||0x8;}[_0x17af('0x6')](){const _0x4a66db=this[_0x17af('0x23')];this[_0x17af('0x12')]=new _0x2dff10(),this['o']=0x0,this[_0x17af('0x1')]=_0x4a66db['config'][_0x17af('0xc')](_0x17af('0x1')),this['i']=setInterval(()=>{let _0x193cd7;for(const _0x55a863 in _0x4a66db){const _0x8f7575=_0x4a66db[_0x55a863];if(_0x17af('0x1b')===_0x8f7575||_0x17af('0x11')===_0x8f7575||_0x17af('0x26')===_0x8f7575||_0x17af('0x24')==_0x8f7575){delete _0x4a66db[_0x55a863],_0x193cd7=_0x8f7575;break;}}if(_0x17af('0x11')===_0x193cd7)throw clearInterval(this['i']),new _0xf648cb(_0x17af('0x2e'),null);if('licenseKeyTrial'===_0x193cd7&&console['info'](_0x17af('0xb')),_0x17af('0x24')===_0x193cd7)throw clearInterval(this['i']),new _0xf648cb(_0x17af('0x25'),null);_0x17af('0x26')===_0x193cd7&&clearInterval(this['i']);},0x3e8);}[_0x17af('0x29')](_0x227803){if(!(_0x227803=Object[_0x17af('0x18')]({},_0x227803,{'color':this['l']()}))['id']||_0x17af('0x1a')!=typeof _0x227803['id'])throw new _0xf648cb('users-add-invalid-id:\x20The\x20id\x20must\x20be\x20a\x20string.');if(this['users'][_0x17af('0x7')](_0x227803['id']))throw new _0xf648cb(_0x17af('0x8'),null,{'id':_0x227803['id']});const _0x13ed63=new o(_0x227803);return this[_0x17af('0x12')][_0x17af('0x20')](_0x13ed63),_0x13ed63;}[_0x17af('0x4')](_0x3a115d){return this['users']['get'](_0x3a115d);}['defineMe'](_0x378e9c){if(this['u'])throw new _0xf648cb(_0x17af('0x21'),null);if(!this['getUser'](_0x378e9c))throw new _0xf648cb('users-me-missing-user:\x20Cannot\x20add\x20an\x20undefined\x20user\x20as\x20a\x20local\x20user.',null);this['u']=_0x378e9c;}get['me'](){if(!this['u']){console[_0x17af('0xe')](_0x591169(_0x17af('0x5')));const _0x8e74a2=_0x17af('0x2');this['addUser']({'name':'','id':_0x8e74a2}),this['defineMe'](_0x8e74a2);}return this[_0x17af('0x4')](this['u']);}[_0x17af('0x1d')](){return this['me'];}['l'](){return this['o']>=this['s']&&(this['o']=0x0),new l(this['o']++);}[_0x17af('0x17')](){super['destroy'](),clearInterval(this['i']);}}class o{constructor(_0x39044e){this['id']=_0x39044e['id'],this['color']=_0x39044e[_0x17af('0x22')],this[_0x17af('0xa')]=function(_0x40f21d=''){if(0x0===_0x40f21d[_0x17af('0x19')]()[_0x17af('0x10')])return _0x17af('0x3');return _0x40f21d[_0x17af('0x19')]();}(_0x39044e[_0x17af('0xa')]),this[_0x17af('0x1f')]=_0x39044e[_0x17af('0x1f')];}get[_0x17af('0x13')](){return'Anonymous'==this[_0x17af('0xa')];}get[_0x17af('0x27')](){return this[_0x17af('0xa')][_0x17af('0x2a')]('\x20')['map'](_0x7d6075=>_0x7d6075[_0x17af('0x1e')](0x0))['slice'](0x0,0x2)[_0x17af('0xd')]('')['toUpperCase']();}}class l{constructor(_0x50f566){this['h']=_0x50f566;}[_0x17af('0x16')](){return _0x17af('0x15')+this['h'];}[_0x17af('0x2c')](){return _0x17af('0x14')+this['h'];}[_0x17af('0x2b')](){return _0x17af('0x0')+this['h'];}} | ||
import _0x2428fb from'@ckeditor/ckeditor5-core/src/contextplugin';import _0x301e35 from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0x32e03e from'@ckeditor/ckeditor5-utils/src/ckeditorerror';export default class r extends _0x2428fb{static get['pluginName'](){return'Users';}constructor(_0x32e5af){super(_0x32e5af),_0x32e5af['config']['define']('users.anonymousUserId','anonymous-user'),_0x32e5af['config']['define']('users.colorsCount',0x8),this['users']=new _0x301e35(),this['s']=_0x32e5af['locale'],this['i']=null,this['o']=0x0,this['l']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x1706fb=this['context'];this['licenseKey']=_0x1706fb['config']['get']('licenseKey'),this['i']=setInterval(()=>{let _0x106062;for(const _0x465cbc in _0x1706fb){const _0x428a41=_0x1706fb[_0x465cbc];if('licenseKeyTrial'===_0x428a41||'licenseKeyInvalid'===_0x428a41||'licenseKeyValid'===_0x428a41||'licenseKeyTrialLimit'==_0x428a41){delete _0x1706fb[_0x465cbc],_0x106062=_0x428a41;break;}}if('licenseKeyInvalid'===_0x106062)throw clearInterval(this['i']),new _0x32e03e('invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.',null);if('licenseKeyTrial'===_0x106062&&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'===_0x106062)throw clearInterval(this['i']),new _0x32e03e('trial-license-key-reached-limit:\x20You\x20have\x20exhausted\x20the\x20trial\x20usage\x20limit.\x20You\x20need\x20to\x20restart\x20the\x20editor\x20now.\x20Please\x20contact\x20our\x20customer\x20support\x20to\x20get\x20a\x20full\x20access\x20at\x20https://ckeditor.com/contact/.',null);'licenseKeyValid'===_0x106062&&clearInterval(this['i']);},0x3e8);}get['me'](){return null==this['l']?null:this['getUser'](this['l']);}['addUser'](_0x1600e7){if(!(_0x1600e7=Object['assign']({},_0x1600e7,{'color':this['u']()}))['id']||'string'!=typeof _0x1600e7['id'])throw new _0x32e03e('users-add-invalid-id:\x20The\x20id\x20must\x20be\x20a\x20string.');if(this['users']['has'](_0x1600e7['id']))throw new _0x32e03e('users-add-duplicated-id:\x20User\x20with\x20a\x20given\x20id\x20is\x20already\x20added.',null,{'id':_0x1600e7['id']});_0x1600e7['name']=function(_0x439e61,_0x43a921=''){const {t:t}=_0x439e61;return''==(_0x43a921=_0x43a921['trim']())?t('Anonymous'):_0x43a921;}(this['s'],_0x1600e7['name']);const _0x22f77e=new n(_0x1600e7);return this['users']['add'](_0x22f77e),_0x22f77e;}['getUser'](_0x35b7f4){return this['users']['get'](_0x35b7f4);}['useAnonymousUser'](){const _0x190bd1=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['s'];this['users']['has'](_0x190bd1)||(this['addUser']({'id':_0x190bd1,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x190bd1));}['defineMe'](_0x1d38a2){if(this['l'])throw new _0x32e03e('users-me-already-defined:\x20Cannot\x20add\x20a\x20local\x20user\x20more\x20than\x20once.',null);if(!this['getUser'](_0x1d38a2))throw new _0x32e03e('users-me-missing-user:\x20Cannot\x20add\x20an\x20undefined\x20user\x20as\x20a\x20local\x20user.',null);this['l']=_0x1d38a2;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['i']);}['u'](){const _0x4fee2a=this['context']['config']['get']('users.colorsCount');return this['o']>=_0x4fee2a&&(this['o']=0x0),new o(this['o']++);}}class n{constructor(_0x380261){this['id']=_0x380261['id'],this['color']=_0x380261['color'],this['name']=_0x380261['name'],this['avatar']=_0x380261['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){return this['name']['split']('\x20')['map'](_0x5aef81=>_0x5aef81['charAt'](0x0))['slice'](0x0,0x2)['join']('')['toUpperCase']();}}class o{constructor(_0x12f33a){this['h']=_0x12f33a;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['h'];}['getSelectionClass'](){return'ck-user__selection--'+this['h'];}['getMarkerClass'](){return'ck-user__marker--'+this['h'];}} |
@@ -23,2 +23,2 @@ /* | ||
*/ | ||
const _0x562d=['setTemplate','avatar','push','ck-user','initials','isAnonymous','ck-user__avatar','name','url(\x27','ck\x20ck-user__name\x20ck-user__name--hidden','ck-user__anonymous','div'];(function(_0x2c8916,_0x1e015a){const _0x227899=function(_0x5aa994){while(--_0x5aa994){_0x2c8916['push'](_0x2c8916['shift']());}};_0x227899(++_0x1e015a);}(_0x562d,0xd5));const _0x301e=function(_0x2c8916,_0x1e015a){_0x2c8916=_0x2c8916-0x0;let _0x227899=_0x562d[_0x2c8916];return _0x227899;};import _0x374918 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class a extends _0x374918{constructor(_0x590987,_0x1547df){super(_0x590987),this[_0x301e('0xa')]=_0x1547df[_0x301e('0xa')];const _0x1012c4=['ck','ck-user__img'];_0x1547df[_0x301e('0x8')]&&_0x1012c4['push'](_0x301e('0x1')),_0x1547df[_0x301e('0x4')]&&_0x1012c4[_0x301e('0x5')](_0x301e('0x9')),this[_0x301e('0x3')]({'tag':'div','attributes':{'class':['ck',_0x301e('0x6')],'data-user-id':_0x1547df['id']},'children':[{'tag':_0x301e('0x2'),'attributes':{'class':_0x1012c4,'style':{'background-image':_0x1547df[_0x301e('0x4')]?_0x301e('0xb')+_0x1547df[_0x301e('0x4')]+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x1547df[_0x301e('0x4')]?_0x301e('0x0'):'ck\x20ck-user__name'},'children':[{'text':_0x1547df[_0x301e('0x7')]}]}]});}} | ||
import _0x3edd47 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class a extends _0x3edd47{constructor(_0x4e20e9,_0x50d7ad){super(_0x4e20e9),this['name']=_0x50d7ad['name'];const _0x509e6b=['ck','ck-user__img'];_0x50d7ad['isAnonymous']&&_0x509e6b['push']('ck-user__anonymous'),_0x50d7ad['avatar']&&_0x509e6b['push']('ck-user__avatar'),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-user'],'data-user-id':_0x50d7ad['id']},'children':[{'tag':'div','attributes':{'class':_0x509e6b,'style':{'background-image':_0x50d7ad['avatar']?'url(\x27'+_0x50d7ad['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x50d7ad['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name'},'children':[{'text':_0x50d7ad['initials']}]}]});}} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11
19196
169
+ Added@ckeditor/ckeditor5-core@19.0.1(transitive)
+ Added@ckeditor/ckeditor5-engine@19.0.1(transitive)
+ Added@ckeditor/ckeditor5-ui@19.0.1(transitive)
+ Added@ckeditor/ckeditor5-utils@19.0.2(transitive)
- Removed@ckeditor/ckeditor5-core@18.0.0(transitive)
- Removed@ckeditor/ckeditor5-engine@18.0.0(transitive)
- Removed@ckeditor/ckeditor5-ui@18.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@18.0.0(transitive)