Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-collaboration-core

Package Overview
Dependencies
Maintainers
1
Versions
595
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 20.0.0 to 20.0.1

2

CHANGELOG.md
Changelog
=========
## 20.0.0 (2020-06-23)
## 20.0.1 (2020-06-26)

@@ -6,0 +6,0 @@ Internal changes only (updated dependencies, documentation, etc.).

{
"name": "@ckeditor/ckeditor5-collaboration-core",
"version": "20.0.0",
"version": "20.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 _0x1746f6 from'@ckeditor/ckeditor5-core/src/contextplugin';import _0x22a955 from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0x12c5f3 from'@ckeditor/ckeditor5-utils/src/ckeditorerror';export default class r extends _0x1746f6{static get['pluginName'](){return'Users';}constructor(_0x50cf97){super(_0x50cf97),_0x50cf97['config']['define']('users.anonymousUserId','anonymous-user'),_0x50cf97['config']['define']('users.colorsCount',0x8),this['users']=new _0x22a955(),this['s']=_0x50cf97['locale'],this['i']=null,this['o']=0x0,this['l']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x43be5a=this['context'];this['licenseKey']=_0x43be5a['config']['get']('licenseKey'),this['i']=setInterval(()=>{let _0x51b865;for(const _0x12acd9 in _0x43be5a){const _0x2982a0=_0x43be5a[_0x12acd9];if('licenseKeyTrial'===_0x2982a0||'licenseKeyInvalid'===_0x2982a0||'licenseKeyValid'===_0x2982a0||'licenseKeyTrialLimit'==_0x2982a0){delete _0x43be5a[_0x12acd9],_0x51b865=_0x2982a0;break;}}if('licenseKeyInvalid'===_0x51b865)throw clearInterval(this['i']),new _0x12c5f3('invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.',null);if('licenseKeyTrial'===_0x51b865&&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'===_0x51b865)throw clearInterval(this['i']),new _0x12c5f3('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'===_0x51b865&&clearInterval(this['i']);},0x3e8);}get['me'](){return null==this['l']?null:this['getUser'](this['l']);}['addUser'](_0x4fe0cd){if(!(_0x4fe0cd=Object['assign']({},_0x4fe0cd,{'color':this['u']()}))['id']||'string'!=typeof _0x4fe0cd['id'])throw new _0x12c5f3('users-add-invalid-id:\x20The\x20id\x20must\x20be\x20a\x20string.');if(this['users']['has'](_0x4fe0cd['id']))throw new _0x12c5f3('users-add-duplicated-id:\x20User\x20with\x20a\x20given\x20id\x20is\x20already\x20added.',null,{'id':_0x4fe0cd['id']});_0x4fe0cd['name']=function(_0x5c15af,_0x16511e=''){const {t:t}=_0x5c15af;return''==(_0x16511e=_0x16511e['trim']())?t('Anonymous'):_0x16511e;}(this['s'],_0x4fe0cd['name']);const _0x254cfc=new n(_0x4fe0cd);return this['users']['add'](_0x254cfc),_0x254cfc;}['getUser'](_0x418e11){return this['users']['get'](_0x418e11);}['useAnonymousUser'](){const _0x56c4a7=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['s'];if(this['users']['has'](_0x56c4a7))return;this['addUser']({'id':_0x56c4a7,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x56c4a7);}['defineMe'](_0x3504c6){if(this['l'])throw new _0x12c5f3('users-me-already-defined:\x20Cannot\x20add\x20a\x20local\x20user\x20more\x20than\x20once.',null);if(!this['getUser'](_0x3504c6))throw new _0x12c5f3('users-me-missing-user:\x20Cannot\x20add\x20an\x20undefined\x20user\x20as\x20a\x20local\x20user.',null);this['l']=_0x3504c6;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['i']);}['u'](){const _0x45eccd=this['context']['config']['get']('users.colorsCount');return this['o']>=_0x45eccd&&(this['o']=0x0),new o(this['o']++);}}class n{constructor(_0x5de6b3){this['id']=_0x5de6b3['id'],this['color']=_0x5de6b3['color'],this['name']=_0x5de6b3['name'],this['avatar']=_0x5de6b3['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){return this['name']['split']('\x20')['map'](_0x1d9019=>_0x1d9019['charAt'](0x0))['slice'](0x0,0x2)['join']('')['toUpperCase']();}}class o{constructor(_0x90c92c){this['h']=_0x90c92c;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['h'];}['getSelectionClass'](){return'ck-user__selection--'+this['h'];}['getMarkerClass'](){return'ck-user__marker--'+this['h'];}}
import _0x44e570 from'@ckeditor/ckeditor5-core/src/contextplugin';import _0x4cd840 from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0x54fec3 from'@ckeditor/ckeditor5-utils/src/ckeditorerror';export default class r extends _0x44e570{static get['pluginName'](){return'Users';}constructor(_0x153e6d){super(_0x153e6d),_0x153e6d['config']['define']('users.anonymousUserId','anonymous-user'),_0x153e6d['config']['define']('users.colorsCount',0x8),this['users']=new _0x4cd840(),this['s']=_0x153e6d['locale'],this['i']=null,this['o']=0x0,this['l']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x3ed4da=this['context'];this['licenseKey']=_0x3ed4da['config']['get']('licenseKey'),this['i']=setInterval(()=>{let _0x17ad5e;for(const _0x281fe5 in _0x3ed4da){const _0x2f7a2f=_0x3ed4da[_0x281fe5];if('licenseKeyTrial'===_0x2f7a2f||'licenseKeyInvalid'===_0x2f7a2f||'licenseKeyValid'===_0x2f7a2f||'licenseKeyTrialLimit'==_0x2f7a2f){delete _0x3ed4da[_0x281fe5],_0x17ad5e=_0x2f7a2f;break;}}if('licenseKeyInvalid'===_0x17ad5e)throw clearInterval(this['i']),new _0x54fec3('invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.',null);if('licenseKeyTrial'===_0x17ad5e&&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'===_0x17ad5e)throw clearInterval(this['i']),new _0x54fec3('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'===_0x17ad5e&&clearInterval(this['i']);},0x3e8);}get['me'](){return null==this['l']?null:this['getUser'](this['l']);}['addUser'](_0x10145c){if(!(_0x10145c=Object['assign']({},_0x10145c,{'color':this['u']()}))['id']||'string'!=typeof _0x10145c['id'])throw new _0x54fec3('users-add-invalid-id:\x20The\x20id\x20must\x20be\x20a\x20string.');if(this['users']['has'](_0x10145c['id']))throw new _0x54fec3('users-add-duplicated-id:\x20User\x20with\x20a\x20given\x20id\x20is\x20already\x20added.',null,{'id':_0x10145c['id']});_0x10145c['name']=function(_0x4b9fbd,_0x34ee0f=''){const {t:t}=_0x4b9fbd;return''==(_0x34ee0f=_0x34ee0f['trim']())?t('Anonymous'):_0x34ee0f;}(this['s'],_0x10145c['name']);const _0x1d2c15=new n(_0x10145c);return this['users']['add'](_0x1d2c15),_0x1d2c15;}['getUser'](_0x585d7f){return this['users']['get'](_0x585d7f);}['useAnonymousUser'](){const _0x3a8c70=this['context']['config']['get']('users.anonymousUserId'),{t:t}=this['s'];if(this['users']['has'](_0x3a8c70))return;this['addUser']({'id':_0x3a8c70,'name':t('Anonymous')})['_isAnonymous']=!0x0,this['defineMe'](_0x3a8c70);}['defineMe'](_0x30145b){if(this['l'])throw new _0x54fec3('users-me-already-defined:\x20Cannot\x20add\x20a\x20local\x20user\x20more\x20than\x20once.',null);if(!this['getUser'](_0x30145b))throw new _0x54fec3('users-me-missing-user:\x20Cannot\x20add\x20an\x20undefined\x20user\x20as\x20a\x20local\x20user.',null);this['l']=_0x30145b;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['i']);}['u'](){const _0x43fbb6=this['context']['config']['get']('users.colorsCount');return this['o']>=_0x43fbb6&&(this['o']=0x0),new o(this['o']++);}}class n{constructor(_0x45b687){this['id']=_0x45b687['id'],this['color']=_0x45b687['color'],this['name']=_0x45b687['name'],this['avatar']=_0x45b687['avatar'],this['_isAnonymous']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['initials'](){return this['name']['split']('\x20')['map'](_0x45fa51=>_0x45fa51['charAt'](0x0))['slice'](0x0,0x2)['join']('')['toUpperCase']();}}class o{constructor(_0x3f32ff){this['h']=_0x3f32ff;}['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 _0x5ac6=['ck\x20ck-user__name','name','div','isAnonymous','avatar','initials','ck\x20ck-user__name\x20ck-user__name--hidden','url(\x27','ck-user__img','ck-user__avatar','push','ck-user__anonymous','ck-user'];(function(_0x381d10,_0x5ac69a){const _0x4e35ff=function(_0x328eac){while(--_0x328eac){_0x381d10['push'](_0x381d10['shift']());}};_0x4e35ff(++_0x5ac69a);}(_0x5ac6,0x14f));const _0x4e35=function(_0x381d10,_0x5ac69a){_0x381d10=_0x381d10-0x0;let _0x4e35ff=_0x5ac6[_0x381d10];return _0x4e35ff;};import _0x5cdbe5 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class a extends _0x5cdbe5{constructor(_0x1aac36,_0x481d3a){super(_0x1aac36),this[_0x4e35('0x4')]=_0x481d3a[_0x4e35('0x4')];const _0x31f337=['ck',_0x4e35('0xb')];_0x481d3a[_0x4e35('0x6')]&&_0x31f337[_0x4e35('0x0')](_0x4e35('0x1')),_0x481d3a[_0x4e35('0x7')]&&_0x31f337[_0x4e35('0x0')](_0x4e35('0xc')),this['setTemplate']({'tag':'div','attributes':{'class':['ck',_0x4e35('0x2')],'data-user-id':_0x481d3a['id']},'children':[{'tag':'div','attributes':{'class':_0x31f337,'style':{'background-image':_0x481d3a[_0x4e35('0x7')]?_0x4e35('0xa')+_0x481d3a[_0x4e35('0x7')]+'\x27)':''}}},{'tag':_0x4e35('0x5'),'attributes':{'class':_0x481d3a[_0x4e35('0x7')]?_0x4e35('0x9'):_0x4e35('0x3')},'children':[{'text':_0x481d3a[_0x4e35('0x8')]}]}]});}}
const _0x2bbc=['initials','avatar','ck-user','div','ck\x20ck-user__name\x20ck-user__name--hidden','url(\x27','setTemplate','name'];(function(_0x5b85eb,_0x2bbc61){const _0x3e9ec3=function(_0x4e088b){while(--_0x4e088b){_0x5b85eb['push'](_0x5b85eb['shift']());}};_0x3e9ec3(++_0x2bbc61);}(_0x2bbc,0x7c));const _0x3e9e=function(_0x5b85eb,_0x2bbc61){_0x5b85eb=_0x5b85eb-0x0;let _0x3e9ec3=_0x2bbc[_0x5b85eb];return _0x3e9ec3;};import _0x20d217 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class a extends _0x20d217{constructor(_0x8a6a49,_0x4ba746){super(_0x8a6a49),this['name']=_0x4ba746[_0x3e9e('0x3')];const _0x29474e=['ck','ck-user__img'];_0x4ba746['isAnonymous']&&_0x29474e['push']('ck-user__anonymous'),_0x4ba746[_0x3e9e('0x5')]&&_0x29474e['push']('ck-user__avatar'),this[_0x3e9e('0x2')]({'tag':_0x3e9e('0x7'),'attributes':{'class':['ck',_0x3e9e('0x6')],'data-user-id':_0x4ba746['id']},'children':[{'tag':_0x3e9e('0x7'),'attributes':{'class':_0x29474e,'style':{'background-image':_0x4ba746[_0x3e9e('0x5')]?_0x3e9e('0x1')+_0x4ba746['avatar']+'\x27)':''}}},{'tag':_0x3e9e('0x7'),'attributes':{'class':_0x4ba746['avatar']?_0x3e9e('0x0'):'ck\x20ck-user__name'},'children':[{'text':_0x4ba746[_0x3e9e('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