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 1.0.3 to 1.1.0

6

CHANGELOG.md
Changelog
=========
## 1.1.0 (2019-07-04)
### Features
* Added the `user-id` data attribute to the `user` element. Now you can attach some action to user avatars in the presence list and comments.
## 1.0.3 (2019-06-05)

@@ -5,0 +11,0 @@

8

package.json
{
"name": "@ckeditor/ckeditor5-collaboration-core",
"version": "1.0.3",
"version": "1.1.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": "^12.1.1",
"@ckeditor/ckeditor5-ui": "^13.0.0",
"@ckeditor/ckeditor5-utils": "^12.1.1"
"@ckeditor/ckeditor5-core": "^12.2.0",
"@ckeditor/ckeditor5-ui": "^13.0.1",
"@ckeditor/ckeditor5-utils": "^13.0.0"
}
}
# CKEditor 5 collaboration core
CKEditor 5 collaboration core is a low-level API that provides base features to support multiple users working together in a rich-text editor. It is used in collaborative features such as [comments](https://ckeditor.com/collaboration/comments/) or [real-time collaboration](https://ckeditor.com/collaboration/real-time/) in CKEditor 5.
CKEditor 5 collaboration core is a low-level API that provides base features to support multiple users working together in a rich-text editor. It is used in collaborative features such as [comments](https://ckeditor.com/collaboration/comments/), [track changes](https://ckeditor.com/collaboration/track-changes/) or [real-time collaboration](https://ckeditor.com/collaboration/real-time/) in CKEditor 5.

@@ -5,0 +5,0 @@ For more information about collaboration visit [CKEditor 5 collaboration overview documentation](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/collaboration.html).

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

*/
var _0x3e1e=['getSelectionClass','ck-user__selection--','getMarkerClass','ck-user__marker--','trim','length','pluginName','Users','init','editor','users','licenseKey','licenseKeyTrial','licenseKeyInvalid','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','You\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/.','addUser','color','add','getUser','get','users-me-already-defined:\x20Cannot\x20add\x20local\x20user\x20more\x20than\x20once.','users-me-missing-user:\x20Cannot\x20add\x20undefined\x20user\x20as\x20local\x20user.','users-me-not-defined:\x20Local\x20user\x20is\x20not\x20defined.','destroy','string','name','avatar','isAnonymous','Anonymous','initials','split','map','charAt','slice','join','toUpperCase','getBackgroundColorClass'];(function(_0xb87923,_0x3496b1){var _0x13fbdd=function(_0x310ae7){while(--_0x310ae7){_0xb87923['push'](_0xb87923['shift']());}};_0x13fbdd(++_0x3496b1);}(_0x3e1e,0x146));var _0x3a1e=function(_0x199bab,_0x2c629e){_0x199bab=_0x199bab-0x0;var _0xc04390=_0x3e1e[_0x199bab];return _0xc04390;};import _0x4f06b1 from'@ckeditor/ckeditor5-core/src/plugin';import _0x26d34a from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';const colorsCount=0x8;export default class Users extends _0x4f06b1{static get[_0x3a1e('0x0')](){return _0x3a1e('0x1');}constructor(e){super(e),this['e']=null;}[_0x3a1e('0x2')](){const e=this[_0x3a1e('0x3')];this[_0x3a1e('0x4')]=new _0x26d34a(),this['s']=0x0,this[_0x3a1e('0x5')]=e['config']['get'](_0x3a1e('0x5'));let s=!0x1;this['e']=setInterval(()=>{let r;for(const s in e){const i=e[s];_0x3a1e('0x6')!==i&&_0x3a1e('0x7')!==i&&'licenseKeyValid'!==i||(r=i);}if('licenseKeyInvalid'===r&&this['r']('Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.'),_0x3a1e('0x6')!==r)r&&clearInterval(this['e']);else{s||(console[_0x3a1e('0x8')](_0x3a1e('0x9')),s=!0x0);for(const s in e)_0x3a1e('0xa')===e[s]&&this['r'](_0x3a1e('0xb'));}},0x7d0);}[_0x3a1e('0xc')](e){e[_0x3a1e('0xd')]=this['i']();const s=new User(e);return this['users'][_0x3a1e('0xe')](s),s;}[_0x3a1e('0xf')](e){return this['users'][_0x3a1e('0x10')](e);}['defineMe'](e){if(this['o'])throw new Error(_0x3a1e('0x11'));if(!this[_0x3a1e('0xf')](e))throw new Error(_0x3a1e('0x12'));this['o']=e;}get['me'](){if(!this['o'])throw new Error(_0x3a1e('0x13'));return this[_0x3a1e('0xf')](this['o']);}['i'](){return this['s']>=colorsCount&&(this['s']=0x0),new Color(this['s']++);}['r'](e){throw clearInterval(this['e']),this[_0x3a1e('0x3')]['isReadOnly']=!0x0,new Error(e);}[_0x3a1e('0x14')](){super['destroy'](),clearInterval(this['e']);}};class User{constructor(e){if(!e['id']||_0x3a1e('0x15')!=typeof e['id'])throw new Error('user-invalid-id:\x20Id\x20is\x20required\x20as\x20a\x20String.');this['id']=e['id'],this['color']=e[_0x3a1e('0xd')],this[_0x3a1e('0x16')]=_getName(e['name']),this[_0x3a1e('0x17')]=e[_0x3a1e('0x17')];}get[_0x3a1e('0x18')](){return _0x3a1e('0x19')==this[_0x3a1e('0x16')];}get[_0x3a1e('0x1a')](){return this[_0x3a1e('0x16')][_0x3a1e('0x1b')]('\x20')[_0x3a1e('0x1c')](e=>e[_0x3a1e('0x1d')](0x0))[_0x3a1e('0x1e')](0x0,0x2)[_0x3a1e('0x1f')]('')[_0x3a1e('0x20')]();}}class Color{constructor(e){this['n']=e;}[_0x3a1e('0x21')](){return'ck-user__bg-color--'+this['n'];}[_0x3a1e('0x22')](){return _0x3a1e('0x23')+this['n'];}[_0x3a1e('0x24')](){return _0x3a1e('0x25')+this['n'];}}function _getName(e=''){return 0x0===e[_0x3a1e('0x26')]()[_0x3a1e('0x27')]?_0x3a1e('0x19'):e[_0x3a1e('0x26')]();}
var _0x351e=['split','map','join','toUpperCase','getBackgroundColorClass','ck-user__bg-color--','ck-user__selection--','trim','pluginName','init','editor','users','config','get','licenseKey','licenseKeyTrial','licenseKeyInvalid','invalid-license-key:\x20Invalid\x20license\x20key.\x20Please\x20contact\x20our\x20customer\x20support\x20at\x20https://ckeditor.com/contact/.','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.','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/.','addUser','add','getUser','users-me-already-defined:\x20Cannot\x20add\x20local\x20user\x20more\x20than\x20once.','users-me-missing-user:\x20Cannot\x20add\x20undefined\x20user\x20as\x20local\x20user.','isReadOnly','destroy','user-invalid-id:\x20Id\x20is\x20required\x20as\x20a\x20string.','color','name','avatar','Anonymous','initials'];(function(_0x548f5f,_0x2da8c1){var _0x1cec27=function(_0x48c17f){while(--_0x48c17f){_0x548f5f['push'](_0x548f5f['shift']());}};_0x1cec27(++_0x2da8c1);}(_0x351e,0x6e));var _0x526a=function(_0x40ac8a,_0x145865){_0x40ac8a=_0x40ac8a-0x0;var _0x26c7c1=_0x351e[_0x40ac8a];return _0x26c7c1;};import _0x281d1a from'@ckeditor/ckeditor5-core/src/plugin';import _0x31d4bb from'@ckeditor/ckeditor5-utils/src/collection';import'../theme/usercolors.css';import _0x160184 from'@ckeditor/ckeditor5-utils/src/ckeditorerror';const colorsCount=0x8;export default class Users extends _0x281d1a{static get[_0x526a('0x0')](){return'Users';}constructor(e){super(e),this['e']=null;}[_0x526a('0x1')](){const e=this[_0x526a('0x2')];this[_0x526a('0x3')]=new _0x31d4bb(),this['r']=0x0,this['licenseKey']=e[_0x526a('0x4')][_0x526a('0x5')](_0x526a('0x6'));let r=!0x1;this['e']=setInterval(()=>{let i;for(const r in e){const s=e[r];_0x526a('0x7')!==s&&'licenseKeyInvalid'!==s&&'licenseKeyValid'!==s||(i=s);}if(_0x526a('0x8')===i)throw this['i'](),new _0x160184(_0x526a('0x9'),this);if(_0x526a('0x7')!==i)i&&clearInterval(this['e']);else{r||(console[_0x526a('0xa')](_0x526a('0xb')),r=!0x0);for(const r in e)if('licenseKeyTrialLimit'===e[r])throw this['i'](),new _0x160184(_0x526a('0xc'),this);}},0x7d0);}[_0x526a('0xd')](e){e['color']=this['s']();const r=new User(e,this[_0x526a('0x2')]);return this['users'][_0x526a('0xe')](r),r;}[_0x526a('0xf')](e){return this[_0x526a('0x3')][_0x526a('0x5')](e);}['defineMe'](e){if(this['o'])throw new _0x160184(_0x526a('0x10'),this);if(!this[_0x526a('0xf')](e))throw new _0x160184(_0x526a('0x11'),this);this['o']=e;}get['me'](){if(!this['o'])throw new _0x160184('users-me-not-defined:\x20Local\x20user\x20is\x20not\x20defined.',this);return this['getUser'](this['o']);}['s'](){return this['r']>=colorsCount&&(this['r']=0x0),new Color(this['r']++);}['i'](){clearInterval(this['e']),this[_0x526a('0x2')][_0x526a('0x12')]=!0x0;}[_0x526a('0x13')](){super[_0x526a('0x13')](),clearInterval(this['e']);}};class User{constructor(e,r){if(!e['id']||'string'!=typeof e['id'])throw new _0x160184(_0x526a('0x14'),r);this['id']=e['id'],this['color']=e[_0x526a('0x15')],this[_0x526a('0x16')]=_getName(e['name']),this['avatar']=e[_0x526a('0x17')];}get['isAnonymous'](){return _0x526a('0x18')==this[_0x526a('0x16')];}get[_0x526a('0x19')](){return this[_0x526a('0x16')][_0x526a('0x1a')]('\x20')[_0x526a('0x1b')](e=>e['charAt'](0x0))['slice'](0x0,0x2)[_0x526a('0x1c')]('')[_0x526a('0x1d')]();}}class Color{constructor(e){this['n']=e;}[_0x526a('0x1e')](){return _0x526a('0x1f')+this['n'];}['getSelectionClass'](){return _0x526a('0x20')+this['n'];}['getMarkerClass'](){return'ck-user__marker--'+this['n'];}}function _getName(e=''){return 0x0===e[_0x526a('0x21')]()['length']?_0x526a('0x18'):e[_0x526a('0x21')]();}

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

*/
var _0xc628=['isAnonymous','ck-user__anonymous','avatar','setTemplate','div','ck-user','ck\x20ck-user__name\x20ck-user__name--hidden','ck\x20ck-user__name','name'];(function(_0x5d2799,_0x5171eb){var _0x2d2774=function(_0x2de2f1){while(--_0x2de2f1){_0x5d2799['push'](_0x5d2799['shift']());}};_0x2d2774(++_0x5171eb);}(_0xc628,0x104));var _0x1685=function(_0x55553b,_0x46fea9){_0x55553b=_0x55553b-0x0;var _0x105daf=_0xc628[_0x55553b];return _0x105daf;};import _0x46f8d5 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class UserView extends _0x46f8d5{constructor(e,s){super(e),this[_0x1685('0x0')]=s['name'];const r=['ck','ck-user__img'];s[_0x1685('0x1')]&&r['push'](_0x1685('0x2')),s[_0x1685('0x3')]&&r['push']('ck-user__avatar'),this[_0x1685('0x4')]({'tag':_0x1685('0x5'),'attributes':{'class':['ck',_0x1685('0x6')]},'children':[{'tag':_0x1685('0x5'),'attributes':{'class':r,'style':{'background-image':s[_0x1685('0x3')]?'url(\x27'+s[_0x1685('0x3')]+'\x27)':''}}},{'tag':_0x1685('0x5'),'attributes':{'class':s['avatar']?_0x1685('0x7'):_0x1685('0x8')},'children':[{'text':s['initials']}]}]});}};
var _0x38de=['push','ck-user__anonymous','ck-user__avatar','setTemplate','div','ck-user','avatar','url(\x27','ck\x20ck-user__name\x20ck-user__name--hidden','ck\x20ck-user__name','initials','name','ck-user__img','isAnonymous'];(function(_0x2cd143,_0x394de2){var _0x530b01=function(_0x536ec9){while(--_0x536ec9){_0x2cd143['push'](_0x2cd143['shift']());}};_0x530b01(++_0x394de2);}(_0x38de,0x1e7));var _0x4b64=function(_0x5eaa78,_0x5591bd){_0x5eaa78=_0x5eaa78-0x0;var _0x2f6ec8=_0x38de[_0x5eaa78];return _0x2f6ec8;};import _0x3b3bf5 from'@ckeditor/ckeditor5-ui/src/view';import'../../../theme/users.css';export default class UserView extends _0x3b3bf5{constructor(e,s){super(e),this['name']=s[_0x4b64('0x0')];const r=['ck',_0x4b64('0x1')];s[_0x4b64('0x2')]&&r[_0x4b64('0x3')](_0x4b64('0x4')),s['avatar']&&r[_0x4b64('0x3')](_0x4b64('0x5')),this[_0x4b64('0x6')]({'tag':_0x4b64('0x7'),'attributes':{'class':['ck',_0x4b64('0x8')],'data-user-id':s['id']},'children':[{'tag':_0x4b64('0x7'),'attributes':{'class':r,'style':{'background-image':s[_0x4b64('0x9')]?_0x4b64('0xa')+s[_0x4b64('0x9')]+'\x27)':''}}},{'tag':'div','attributes':{'class':s[_0x4b64('0x9')]?_0x4b64('0xb'):_0x4b64('0xc')},'children':[{'text':s[_0x4b64('0xd')]}]}]});}};
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