Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-collaboration-core

Package Overview
Dependencies
Maintainers
1
Versions
674
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-collaboration-core - npm Package Compare versions

Comparing version 19.0.0 to 19.0.1

2

CHANGELOG.md
Changelog
=========
## 19.0.0 (2020-04-30)
## 19.0.1 (2020-04-30)

@@ -6,0 +6,0 @@ ### BREAKING CHANGES

{
"name": "@ckeditor/ckeditor5-collaboration-core",
"version": "19.0.0",
"version": "19.0.1",
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich-text editor.",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md",

@@ -23,2 +23,2 @@ /*

*/
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'];}}
import _0x366855 from'@ckeditor/ckeditor5-core/src/contextplugin';import _0xe10bd7 from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0x55678d from'@ckeditor/ckeditor5-utils/src/ckeditorerror';export default class r extends _0x366855{static get['pluginName'](){return'Users';}constructor(_0x5c8a2e){super(_0x5c8a2e),_0x5c8a2e['config']['define']('users.anonymousUserId','anonymous-user'),_0x5c8a2e['config']['define']('users.colorsCount',0x8),this['users']=new _0xe10bd7(),this['s']=_0x5c8a2e['locale'],this['i']=null,this['o']=0x0,this['l']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x3f009d=this['context'];this['licenseKey']=_0x3f009d['config']['get']('licenseKey'),this['i']=setInterval(()=>{let _0x15a36b;for(const _0x2d937b in _0x3f009d){const _0x19e7c8=_0x3f009d[_0x2d937b];if('licenseKeyTrial'===_0x19e7c8||'licenseKeyInvalid'===_0x19e7c8||'licenseKeyValid'===_0x19e7c8||'licenseKeyTrialLimit'==_0x19e7c8){delete _0x3f009d[_0x2d937b],_0x15a36b=_0x19e7c8;break;}}if('licenseKeyInvalid'===_0x15a36b)throw clearInterval(this['i']),new _0x55678d('invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.',null);if('licenseKeyTrial'===_0x15a36b&&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'===_0x15a36b)throw clearInterval(this['i']),new _0x55678d('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'===_0x15a36b&&clearInterval(this['i']);},0x3e8);}get['me'](){return null==this['l']?null:this['getUser'](this['l']);}['addUser'](_0x1f0b24){if(!(_0x1f0b24=Object['assign']({},_0x1f0b24,{'color':this['u']()}))['id']||'string'!=typeof _0x1f0b24['id'])throw new _0x55678d('users-add-invalid-id:\x20The\x20id\x20must\x20be\x20a\x20string.');if(this['users']['has'](_0x1f0b24['id']))throw new _0x55678d('users-add-duplicated-id:\x20User\x20with\x20a\x20given\x20id\x20is\x20already\x20added.',null,{'id':_0x1f0b24['id']});_0x1f0b24['name']=function(_0x9bb81,_0x3f53ae=''){const {t:t}=_0x9bb81;return''==(_0x3f53ae=_0x3f53ae['trim']())?t('Anonymous'):_0x3f53ae;}(this['s'],_0x1f0b24['name']);const _0x43626b=new n(_0x1f0b24);return this['users']['add'](_0x43626b),_0x43626b;}['getUser'](_0x193386){return this['users']['get'](_0x193386);}['useAnonymousUser'](){const _0x246f7c=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['s'];this['users']['has'](_0x246f7c)||(this['addUser']({'id':_0x246f7c,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x246f7c));}['defineMe'](_0x313e1f){if(this['l'])throw new _0x55678d('users-me-already-defined:\x20Cannot\x20add\x20a\x20local\x20user\x20more\x20than\x20once.',null);if(!this['getUser'](_0x313e1f))throw new _0x55678d('users-me-missing-user:\x20Cannot\x20add\x20an\x20undefined\x20user\x20as\x20a\x20local\x20user.',null);this['l']=_0x313e1f;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['i']);}['u'](){const _0x264f68=this['context']['config']['get']('users.colorsCount');return this['o']>=_0x264f68&&(this['o']=0x0),new o(this['o']++);}}class n{constructor(_0x3332cc){this['id']=_0x3332cc['id'],this['color']=_0x3332cc['color'],this['name']=_0x3332cc['name'],this['avatar']=_0x3332cc['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){return this['name']['split']('\x20')['map'](_0x85bce9=>_0x85bce9['charAt'](0x0))['slice'](0x0,0x2)['join']('')['toUpperCase']();}}class o{constructor(_0x4d8bfc){this['h']=_0x4d8bfc;}['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 @@ /*

*/
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']}]}]});}}
const _0x1670=['ck-user','name','isAnonymous','ck-user__img','setTemplate','avatar','initials','div','push','ck-user__anonymous','ck\x20ck-user__name'];(function(_0x53c286,_0xfd8fb0){const _0x37ee22=function(_0x431922){while(--_0x431922){_0x53c286['push'](_0x53c286['shift']());}};_0x37ee22(++_0xfd8fb0);}(_0x1670,0x1c5));const _0x402b=function(_0x53c286,_0xfd8fb0){_0x53c286=_0x53c286-0x0;let _0x37ee22=_0x1670[_0x53c286];return _0x37ee22;};import _0x8af3ed from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class a extends _0x8af3ed{constructor(_0x27c6df,_0x2ec6b3){super(_0x27c6df),this[_0x402b('0xa')]=_0x2ec6b3[_0x402b('0xa')];const _0x2ce668=['ck',_0x402b('0x1')];_0x2ec6b3[_0x402b('0x0')]&&_0x2ce668[_0x402b('0x6')](_0x402b('0x7')),_0x2ec6b3['avatar']&&_0x2ce668[_0x402b('0x6')]('ck-user__avatar'),this[_0x402b('0x2')]({'tag':_0x402b('0x5'),'attributes':{'class':['ck',_0x402b('0x9')],'data-user-id':_0x2ec6b3['id']},'children':[{'tag':_0x402b('0x5'),'attributes':{'class':_0x2ce668,'style':{'background-image':_0x2ec6b3[_0x402b('0x3')]?'url(\x27'+_0x2ec6b3['avatar']+'\x27)':''}}},{'tag':_0x402b('0x5'),'attributes':{'class':_0x2ec6b3[_0x402b('0x3')]?'ck\x20ck-user__name\x20ck-user__name--hidden':_0x402b('0x8')},'children':[{'text':_0x2ec6b3[_0x402b('0x4')]}]}]});}}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc