@ckeditor/ckeditor5-real-time-collaboration 36.0.1 → 37.0.0-rc.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.
- package/build/real-time-collaboration.js +1 -1
- package/package.json +22 -5
- package/src/augmentation.d.ts +57 -0
- package/src/augmentation.js +23 -0
- package/src/common-translations.d.ts +5 -0
- package/src/common-translations.js +1 -1
- package/src/config.d.ts +33 -0
- package/src/config.js +23 -0
- package/src/index.d.ts +9 -0
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.d.ts +38 -0
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.d.ts +7 -0
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.d.ts +7 -0
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.d.ts +6 -0
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.d.ts +14 -0
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.d.ts +7 -0
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.d.ts +11 -0
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.d.ts +22 -0
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.d.ts +42 -0
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.d.ts +29 -0
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.d.ts +119 -0
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.d.ts +114 -0
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.d.ts +31 -0
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.d.ts +51 -0
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.d.ts +21 -0
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +38 -0
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.d.ts +23 -0
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +34 -0
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.d.ts +21 -0
- package/src/realtimecollaborativetrackchanges.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-real-time-collaboration",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0-rc.0",
|
|
4
4
|
"description": "A set of CKEditor 5 features enabling real-time collaboration within the editor using CKEditor Cloud Services.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -26,11 +26,28 @@
|
|
|
26
26
|
"framework"
|
|
27
27
|
],
|
|
28
28
|
"main": "src/index.js",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dll:build": "webpack",
|
|
31
|
+
"build": "tsc -p ./tsconfig.json",
|
|
32
|
+
"postversion": "npm run build"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"build",
|
|
36
|
+
"lang",
|
|
37
|
+
"src/**/*.js",
|
|
38
|
+
"src/**/*.d.ts",
|
|
39
|
+
"theme",
|
|
40
|
+
"ckeditor5-metadata.json",
|
|
41
|
+
"CHANGELOG.md"
|
|
42
|
+
],
|
|
29
43
|
"dependencies": {
|
|
30
|
-
"@ckeditor/
|
|
31
|
-
"@ckeditor/
|
|
32
|
-
"ckeditor5": "^
|
|
44
|
+
"@ckeditor/ckeditor5-cloud-services": "^37.0.0-rc.0",
|
|
45
|
+
"@ckeditor/ckeditor-cloud-services-collaboration": "^43.0.0-rc.0",
|
|
46
|
+
"@ckeditor/ckeditor5-operations-compressor": "^37.0.0-rc.0",
|
|
47
|
+
"ckeditor5": "^37.0.0-rc.0",
|
|
33
48
|
"ckeditor5-collaboration": "^36.0.1",
|
|
34
49
|
"lodash-es": "^4.17.11"
|
|
35
|
-
}
|
|
50
|
+
},
|
|
51
|
+
"types": "src/index.d.ts",
|
|
52
|
+
"obfuscated": true
|
|
36
53
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import '@ckeditor/ckeditor5-cloud-services';
|
|
2
|
+
import type { PresenceListConfig } from './config';
|
|
3
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
4
|
+
interface EditorConfig {
|
|
5
|
+
presenceList?: PresenceListConfig;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare module '@ckeditor/ckeditor5-cloud-services' {
|
|
9
|
+
interface CloudServicesConfig {
|
|
10
|
+
/**
|
|
11
|
+
* The timeout (in seconds) for the connection. Defaults to 10.
|
|
12
|
+
*
|
|
13
|
+
* If the connection will not be established after the specified number of second passes, the editor will throw an error.
|
|
14
|
+
*
|
|
15
|
+
* Raise this value if you are experiencing connection timeout problems.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* ClassicEditor
|
|
19
|
+
* .create( {
|
|
20
|
+
* cloudServices: {
|
|
21
|
+
* connectionTimeout: 20,
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* } )
|
|
25
|
+
* .then( ... )
|
|
26
|
+
* .catch( ... );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
connectionTimeout?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The timeout (in seconds) for each request send to the Cloud Services. Defaults to 20.
|
|
32
|
+
*
|
|
33
|
+
* If the request is not finished after the specified number of second passes, the editor will throw an error.
|
|
34
|
+
*
|
|
35
|
+
* Raise this value if you expect that your requests will be big
|
|
36
|
+
* (e.g. mostly concerns the document data and the initial request).
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* ClassicEditor
|
|
40
|
+
* .create( {
|
|
41
|
+
* cloudServices: {
|
|
42
|
+
* requestTimeout: 40,
|
|
43
|
+
* // ...
|
|
44
|
+
* }
|
|
45
|
+
* } )
|
|
46
|
+
* .then( ... )
|
|
47
|
+
* .catch( ... );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
requestTimeout?: number;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
declare module 'ckeditor5-collaboration/src/collaboration-core' {
|
|
54
|
+
interface User {
|
|
55
|
+
orderNumber?: number;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import'@ckeditor/ckeditor5-cloud-services';
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x366e1e,_0x5b8f43,_0x40fc41){const t=_0x366e1e['t'];switch(_0x5b8f43){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x40fc41);default:return'';}}
|
package/src/config.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
2
|
+
/**
|
|
3
|
+
* @module real-time-collaboration/config
|
|
4
|
+
* @publicApi
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The configuration of the real-time collaboration features.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* ClassicEditor
|
|
11
|
+
* .create( {
|
|
12
|
+
* presenceList: ... // Collaboration presence list configuration.
|
|
13
|
+
* } )
|
|
14
|
+
* .then( ... )
|
|
15
|
+
* .catch( ... );
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
19
|
+
*/
|
|
20
|
+
export interface PresenceListConfig {
|
|
21
|
+
/**
|
|
22
|
+
* The number of users that need to be connected in order to switch the presence list to the dropdown view.
|
|
23
|
+
*/
|
|
24
|
+
collapseAt?: number;
|
|
25
|
+
/**
|
|
26
|
+
* DOM element that will hold the feature’s UI.
|
|
27
|
+
*/
|
|
28
|
+
container?: HTMLElement;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function that will be invoked after a click on a presence list member.
|
|
31
|
+
*/
|
|
32
|
+
onClick?: (user: User, element: HTMLElement) => void;
|
|
33
|
+
}
|
package/src/config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as RealTimeCollaborativeEditing } from './realtimecollaborativeediting';
|
|
2
|
+
export { default as RealTimeCollaborativeTrackChanges } from './realtimecollaborativetrackchanges';
|
|
3
|
+
export { default as RealTimeCollaborativeComments } from './realtimecollaborativecomments';
|
|
4
|
+
export { default as RealTimeCollaborativeRevisionHistory } from './realtimecollaborativerevisionhistory';
|
|
5
|
+
export { default as CloudServicesCommentsAdapter } from './realtimecollaborativecomments/cloudservicescommentsadapter';
|
|
6
|
+
export { default as CloudServicesTrackChangesAdapter } from './realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';
|
|
7
|
+
export { default as CloudServicesRevisionHistoryAdapter } from './realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';
|
|
8
|
+
export { default as PresenceList } from './presencelist';
|
|
9
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export{default as RealTimeCollaborativeEditing}from'./realtimecollaborativeediting';export{default as RealTimeCollaborativeTrackChanges}from'./realtimecollaborativetrackchanges';export{default as RealTimeCollaborativeComments}from'./realtimecollaborativecomments';export{default as RealTimeCollaborativeRevisionHistory}from'./realtimecollaborativerevisionhistory';export{default as CloudServicesCommentsAdapter}from'./realtimecollaborativecomments/cloudservicescommentsadapter';export{default as CloudServicesTrackChangesAdapter}from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';export{default as CloudServicesRevisionHistoryAdapter}from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';export{default as PresenceList}from'./presencelist';
|
|
23
|
+
export{default as RealTimeCollaborativeEditing}from'./realtimecollaborativeediting';export{default as RealTimeCollaborativeTrackChanges}from'./realtimecollaborativetrackchanges';export{default as RealTimeCollaborativeComments}from'./realtimecollaborativecomments';export{default as RealTimeCollaborativeRevisionHistory}from'./realtimecollaborativerevisionhistory';export{default as CloudServicesCommentsAdapter}from'./realtimecollaborativecomments/cloudservicescommentsadapter';export{default as CloudServicesTrackChangesAdapter}from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';export{default as CloudServicesRevisionHistoryAdapter}from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';export{default as PresenceList}from'./presencelist';import'./augmentation';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ContextPlugin, type Context, type Editor, type ContextPluginDependencies } from 'ckeditor5/src/core';
|
|
2
|
+
import { Collection } from 'ckeditor5/src/utils';
|
|
3
|
+
import { BodyCollection, BalloonPanelView } from 'ckeditor5/src/ui';
|
|
4
|
+
import PresenceListView from './view/presencelistview';
|
|
5
|
+
import PresenceDropdownListView from './view/presencedropdownlistview';
|
|
6
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
7
|
+
export default class PresenceListUI extends ContextPlugin {
|
|
8
|
+
usersCount: number;
|
|
9
|
+
lastConnectedUsers: Collection<User>;
|
|
10
|
+
balloonPanelView: BalloonPanelView;
|
|
11
|
+
view: PresenceListView;
|
|
12
|
+
presenceDropdownView: PresenceDropdownListView | undefined;
|
|
13
|
+
bodyCollection: BodyCollection;
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(context: Context | Editor);
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get requires(): ContextPluginDependencies;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Creates and shows dropdown list with all connected users.
|
|
28
|
+
*/
|
|
29
|
+
showDropdown(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Hides and destroys dropdown list with all connected users.
|
|
32
|
+
*/
|
|
33
|
+
hideDropdown(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2b4f=['using','reverse','content','length','bodyCollection','isCollapsed','isRendered','destroy','render','counterView','attachToDom','remove','items','_handleUserAdd','define','_allConnectedUsers','onClick','presenceDropdownView','hasTooltip','requires','presenceList.collapseAt','presenceList.container','isHidden','set','execute','add','bindTo','from','appendChild','presenceList','presencelist-missing-container','number','view','listenTo','lastConnectedUsers','locale','detachFromDom','get','element','balloonPanelView','config','_handleUserRemove','presencelist-collapseat-invalid-format','usersCount','_createView','context','bind','inlineListView','hideDropdown','unpin','showDropdown','class'];(function(_0x270e69,_0x2b4fdf){const _0x3e45b2=function(_0x293201){while(--_0x293201){_0x270e69['push'](_0x270e69['shift']());}};_0x3e45b2(++_0x2b4fdf);}(_0x2b4f,0x108));const _0x3e45=function(_0x270e69,_0x2b4fdf){_0x270e69=_0x270e69-0x0;let _0x3e45b2=_0x2b4f[_0x270e69];return _0x3e45b2;};import{ContextPlugin as _0x2d4a75}from'ckeditor5/src/core';import{CKEditorError as _0xdd5878,Collection as _0x342c69}from'ckeditor5/src/utils';import{clickOutsideHandler as _0x2c705c,BodyCollection as _0x539884,BalloonPanelView as _0x142c7f}from'ckeditor5/src/ui';import{isElement as _0x5300ed}from'lodash-es';import _0x210f51 from'../realtimecollaborativeediting/sessions';import _0x395bbd from'./view/presencelistview';import _0x4e5c3b from'./view/presencedropdownlistview';import _0x450eea from'./view/presencedropdownlistitemview';import _0x453ef7 from'./view/presenceinlinelistitemview';export default class i extends _0x2d4a75{constructor(_0x1cd49c){super(_0x1cd49c),this[_0x3e45('0x29')][_0x3e45('0x24')][_0x3e45('0xa')](_0x3e45('0x19'),{'collapseAt':0x6});const _0x5cd3f3=_0x1cd49c[_0x3e45('0x24')]['get'](_0x3e45('0x10'));if(_0x3e45('0x1b')!=typeof _0x5cd3f3)throw new _0xdd5878(_0x3e45('0x26'),this);if(_0x5cd3f3<0x1)throw new _0xdd5878('presencelist-collapseat-invalid-format',this);this[_0x3e45('0xb')]=this[_0x3e45('0x29')]['plugins']['get'](_0x210f51)['allConnectedUsers'],this[_0x3e45('0x13')](_0x3e45('0x27'),0x0),this[_0x3e45('0x1e')]=new _0x342c69(),this[_0x3e45('0x23')]=new _0x142c7f(),this['balloonPanelView'][_0x3e45('0x2f')]='ck\x20ck-presence-list__balloon',this[_0x3e45('0x1c')]=this[_0x3e45('0x28')](),this[_0x3e45('0xd')]=void 0x0;}static get[_0x3e45('0xf')](){return[_0x210f51];}['init'](){for(const _0x570cf9 of this[_0x3e45('0xb')])this['_handleUserAdd'](_0x570cf9);this['listenTo'](this[_0x3e45('0xb')],_0x3e45('0x15'),(_0x6cd7d0,_0x14a31d)=>{this[_0x3e45('0x9')](_0x14a31d);}),this[_0x3e45('0x1d')](this[_0x3e45('0xb')],'remove',(_0x1237cb,_0x331990)=>{this[_0x3e45('0x25')](_0x331990);});}[_0x3e45('0x28')](){const _0x2f7859=this[_0x3e45('0x29')],_0x1fa02d=new _0x395bbd(this[_0x3e45('0x29')]['locale']),_0x28aafe=this[_0x3e45('0x23')];if(!_0x5300ed(_0x2f7859[_0x3e45('0x24')][_0x3e45('0x21')](_0x3e45('0x11'))))throw new _0xdd5878(_0x3e45('0x1a'),this);return _0x1fa02d[_0x3e45('0x5')][_0x3e45('0x2a')](_0x3e45('0x27'))['to'](this),_0x1fa02d['bind'](_0x3e45('0x1'))['to'](this,'usersCount',_0x26bea0=>{const _0x496822=_0x26bea0>=_0x2f7859[_0x3e45('0x24')][_0x3e45('0x21')]('presenceList.collapseAt');return _0x1fa02d[_0x3e45('0x5')][_0x3e45('0x12')]=!(0x1==_0x26bea0||_0x496822),_0x496822||this[_0x3e45('0x2c')](),_0x496822;}),_0x1fa02d['inlineListView'][_0x3e45('0x8')][_0x3e45('0x16')](this[_0x3e45('0x1e')])[_0x3e45('0x30')](_0x29194f=>{const _0x2cb071=_0x2f7859[_0x3e45('0x24')][_0x3e45('0x21')]('presenceList'),_0x51f9df=new _0x453ef7(_0x2f7859['locale'],_0x29194f,!!_0x2cb071[_0x3e45('0xc')]);return _0x51f9df[_0x3e45('0x2a')](_0x3e45('0xe'))['to'](_0x1fa02d,'isCollapsed',_0x117950=>!_0x117950),_0x2cb071['onClick']&&this['listenTo'](_0x51f9df,_0x3e45('0x14'),()=>{this[_0x3e45('0x1c')][_0x3e45('0x1')]||_0x2cb071[_0x3e45('0xc')](_0x29194f,_0x51f9df[_0x3e45('0x22')]);}),_0x51f9df;}),this[_0x3e45('0x1d')](_0x1fa02d[_0x3e45('0x2b')],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this[_0x3e45('0x1c')]['isCollapsed']&&this[_0x3e45('0x2e')]();}),_0x1fa02d[_0x3e45('0x4')](),_0x28aafe[_0x3e45('0x4')](),_0x2c705c({'emitter':_0x1fa02d,'activator':()=>_0x28aafe['isVisible'],'contextElements':[_0x28aafe['element'],_0x1fa02d[_0x3e45('0x2b')]['element']],'callback':()=>this['hideDropdown']()}),_0x2f7859['config'][_0x3e45('0x21')]('presenceList.container')[_0x3e45('0x18')](_0x1fa02d[_0x3e45('0x22')]),this[_0x3e45('0x0')]=new _0x539884(this[_0x3e45('0x29')]['locale']),this[_0x3e45('0x0')][_0x3e45('0x6')](),this[_0x3e45('0x0')][_0x3e45('0x15')](_0x28aafe),_0x1fa02d;}[_0x3e45('0x9')](_0x354fcb){this['usersCount']++,0x5==this[_0x3e45('0x1e')][_0x3e45('0x33')]&&this[_0x3e45('0x1e')][_0x3e45('0x7')](0x0),this[_0x3e45('0x1e')][_0x3e45('0x15')](_0x354fcb);}['_handleUserRemove'](_0x44cc1e){if(this[_0x3e45('0x27')]--,this['lastConnectedUsers'][_0x3e45('0x21')](_0x44cc1e['id'])&&(this[_0x3e45('0x1e')]['remove'](_0x44cc1e['id']),this['lastConnectedUsers'][_0x3e45('0x33')]<this[_0x3e45('0x27')]))for(const _0x2a0db of Array[_0x3e45('0x17')](this['_allConnectedUsers'])[_0x3e45('0x31')]())if(!this[_0x3e45('0x1e')]['get'](_0x2a0db['id']))return void this[_0x3e45('0x1e')]['add'](_0x2a0db,0x0);}[_0x3e45('0x2e')](){if(this[_0x3e45('0xd')])return;this[_0x3e45('0xd')]=new _0x4e5c3b(this[_0x3e45('0x29')][_0x3e45('0x1f')]);const _0x36ddc9=this[_0x3e45('0x29')][_0x3e45('0x24')][_0x3e45('0x21')]('presenceList');this['presenceDropdownView']['items'][_0x3e45('0x16')](this[_0x3e45('0xb')])[_0x3e45('0x30')](_0x4946a2=>{const _0x56ae63=new _0x450eea(this[_0x3e45('0x29')][_0x3e45('0x1f')],_0x4946a2,!!_0x36ddc9[_0x3e45('0xc')]);return _0x36ddc9[_0x3e45('0xc')]&&this['listenTo'](_0x56ae63,'execute',()=>{_0x36ddc9[_0x3e45('0xc')](_0x4946a2,_0x56ae63['element']);}),_0x56ae63;}),this[_0x3e45('0x23')][_0x3e45('0x32')][_0x3e45('0x15')](this['presenceDropdownView']),this[_0x3e45('0x23')]['pin']({'target':this[_0x3e45('0x1c')][_0x3e45('0x2b')][_0x3e45('0x22')]});}[_0x3e45('0x2c')](){this[_0x3e45('0xd')]&&(this['balloonPanelView'][_0x3e45('0x2d')](),this[_0x3e45('0x23')][_0x3e45('0x32')][_0x3e45('0x7')](this[_0x3e45('0xd')]),this['presenceDropdownView'][_0x3e45('0x3')](),this[_0x3e45('0xd')]=void 0x0);}[_0x3e45('0x3')](){super['destroy'](),this[_0x3e45('0x1c')]&&this[_0x3e45('0x1c')][_0x3e45('0x2')]&&this[_0x3e45('0x1c')][_0x3e45('0x3')](),this[_0x3e45('0x0')]&&this[_0x3e45('0x0')][_0x3e45('0x20')]();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2a0e=['ck-presence-list__counter','set','setTemplate','isHidden','bindTemplate','usersCount','div','CONNECTED_USERS','ck-presence-list__counter--hidden'];(function(_0x24af6b,_0x2a0ec6){const _0x55431f=function(_0x582bff){while(--_0x582bff){_0x24af6b['push'](_0x24af6b['shift']());}};_0x55431f(++_0x2a0ec6);}(_0x2a0e,0xfe));const _0x5543=function(_0x24af6b,_0x2a0ec6){_0x24af6b=_0x24af6b-0x0;let _0x55431f=_0x2a0e[_0x24af6b];return _0x55431f;};import{View as _0x1fad13}from'ckeditor5/src/ui';import{getTranslation as _0x20d24a}from'../../common-translations';export default class nt extends _0x1fad13{constructor(_0xc7f81b){super(_0xc7f81b);const _0x5466b0=this[_0x5543('0x2')];this[_0x5543('0x8')](_0x5543('0x3'),0x0),this[_0x5543('0x8')](_0x5543('0x1'),!0x0),this[_0x5543('0x0')]({'tag':_0x5543('0x4'),'attributes':{'class':['ck',_0x5543('0x7'),_0x5466b0['if']('isHidden',_0x5543('0x6'))]},'children':[{'text':_0x5466b0['to'](_0x5543('0x3'),_0x29eb24=>_0x20d24a(_0xc7f81b,_0x5543('0x5'),_0x29eb24))}]});}}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { View } from 'ckeditor5/src/ui';
|
|
2
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
3
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
4
|
+
export default class PresenceDropdownListItemView extends View {
|
|
5
|
+
userView: UserView;
|
|
6
|
+
constructor(locale: Locale, user: User, isButton: boolean);
|
|
7
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x6ab8=['tag','button','execute','getBackgroundColorClass','div','setTemplate','ck-user__full-name','span','name','userView'];(function(_0x4d5006,_0x6ab823){const _0x30d7f4=function(_0x2ff0f8){while(--_0x2ff0f8){_0x4d5006['push'](_0x4d5006['shift']());}};_0x30d7f4(++_0x6ab823);}(_0x6ab8,0x1a9));const _0x30d7=function(_0x4d5006,_0x6ab823){_0x4d5006=_0x4d5006-0x0;let _0x30d7f4=_0x6ab8[_0x4d5006];return _0x30d7f4;};import{View as _0x249fe9}from'ckeditor5/src/ui';import{UserView as _0x25b725}from'ckeditor5-collaboration/src/collaboration-core';export default class C extends _0x249fe9{constructor(_0x46791d,_0x4f3915,_0x2af47d){super(_0x46791d);const _0x3ddd6a=this['bindTemplate'];this[_0x30d7('0x4')]=new _0x25b725(_0x46791d,_0x4f3915);const _0x189c7e={'tag':_0x30d7('0x9'),'attributes':{'class':['ck','ck-presence-list__dropdown-list-item']},'children':[this[_0x30d7('0x4')],{'tag':'span','attributes':{'class':['ck',_0x30d7('0x1')]},'children':[{'text':_0x4f3915[_0x30d7('0x3')]}]},{'tag':_0x30d7('0x2'),'attributes':{'class':['ck','ck-presence-list__marker',_0x4f3915['color'][_0x30d7('0x8')]()],'aria-hidden':'true'}}]};_0x2af47d&&(_0x189c7e[_0x30d7('0x5')]=_0x30d7('0x6'),_0x189c7e['on']={'click':_0x3ddd6a['to'](()=>this['fire'](_0x30d7('0x7')))}),this[_0x30d7('0x0')](_0x189c7e);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x2144=['ck-presence-list__dropdown-list','setTemplate','items','div','ck-presence-list__dropdown-list-wrapper'];(function(_0x27e396,_0x214444){var _0x2b3927=function(_0x16be4b){while(--_0x16be4b){_0x27e396['push'](_0x27e396['shift']());}};_0x2b3927(++_0x214444);}(_0x2144,0x10b));var _0x2b39=function(_0x27e396,_0x214444){_0x27e396=_0x27e396-0x0;var _0x2b3927=_0x2144[_0x27e396];return _0x2b3927;};import{View as _0xe21e41}from'ckeditor5/src/ui';export default class A extends _0xe21e41{constructor(_0x5761bd){super(_0x5761bd),this[_0x2b39('0x0')]=this['createCollection'](),this[_0x2b39('0x4')]({'tag':_0x2b39('0x1'),'attributes':{'class':['ck',_0x2b39('0x3')]},'children':[{'tag':_0x2b39('0x1'),'attributes':{'class':['ck',_0x2b39('0x2')]},'children':this[_0x2b39('0x0')]}]});}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { View } from 'ckeditor5/src/ui';
|
|
2
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
3
|
+
import { UserView, type User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
4
|
+
export default class PresenceInlineListItemView extends View {
|
|
5
|
+
hasTooltip: boolean;
|
|
6
|
+
tooltipPosition: string;
|
|
7
|
+
userView: UserView;
|
|
8
|
+
markerView: MarkerView;
|
|
9
|
+
constructor(locale: Locale, user: User, isButton: boolean);
|
|
10
|
+
}
|
|
11
|
+
declare class MarkerView extends View {
|
|
12
|
+
constructor(locale: Locale, user: User);
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1d7d=['tooltipPosition','set','setTemplate','bindTemplate','span','markerView','userView','color','fire','hasTooltip','div','getBackgroundColorClass','ck-presence-list__list-item__tooltip','name','tag','execute','true','ck-presence-list__marker'];(function(_0x4d6249,_0x1d7d54){const _0x4beed=function(_0x18481b){while(--_0x18481b){_0x4d6249['push'](_0x4d6249['shift']());}};_0x4beed(++_0x1d7d54);}(_0x1d7d,0x1a9));const _0x4bee=function(_0x4d6249,_0x1d7d54){_0x4d6249=_0x4d6249-0x0;let _0x4beed=_0x1d7d[_0x4d6249];return _0x4beed;};import{View as _0x462d8d}from'ckeditor5/src/ui';import{UserView as _0x134fcb}from'ckeditor5-collaboration/src/collaboration-core';export default class _ extends _0x462d8d{constructor(_0x5549f6,_0x990dfc,_0x4ed552){super(_0x5549f6);const _0x89806f=this[_0x4bee('0xa')];this[_0x4bee('0x8')](_0x4bee('0x10'),!0x0),this[_0x4bee('0x8')](_0x4bee('0x7'),''),this[_0x4bee('0xd')]=new _0x134fcb(_0x5549f6,_0x990dfc),this[_0x4bee('0xc')]=new lt(_0x5549f6,_0x990dfc);const _0xa59e7c={'tag':_0x4bee('0x11'),'attributes':{'class':['ck','ck-presence-list__list-item'],'data-cke-tooltip-text':this['userView'][_0x4bee('0x2')],'data-cke-tooltip-position':_0x89806f['to'](_0x4bee('0x7')),'data-cke-tooltip-disabled':_0x89806f['to'](_0x4bee('0x10'),_0x4bbaaf=>!_0x4bbaaf),'data-cke-tooltip-class':_0x4bee('0x1')},'children':[this['userView'],this[_0x4bee('0xc')]]};_0x4ed552&&(_0xa59e7c[_0x4bee('0x3')]='button',_0xa59e7c['on']={'click':_0x89806f['to'](()=>this[_0x4bee('0xf')](_0x4bee('0x4')))}),this[_0x4bee('0x9')](_0xa59e7c);}}class lt extends _0x462d8d{constructor(_0x8a23c9,_0x3062f8){super(_0x8a23c9),this[_0x4bee('0x9')]({'tag':_0x4bee('0xb'),'attributes':{'class':['ck',_0x4bee('0x6'),_0x3062f8[_0x4bee('0xe')][_0x4bee('0x0')]()],'aria-hidden':_0x4bee('0x5')}});}}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
2
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
3
|
+
import type PresenceInlineListItemView from './presenceinlinelistitemview';
|
|
4
|
+
export default class PresenceInlineListView extends View {
|
|
5
|
+
items: ViewCollection<PresenceInlineListItemView>;
|
|
6
|
+
constructor(locale: Locale);
|
|
7
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x54b6=['fire','items','div','createCollection','bindTemplate'];(function(_0x525f02,_0x54b602){const _0x35df25=function(_0x496814){while(--_0x496814){_0x525f02['push'](_0x525f02['shift']());}};_0x35df25(++_0x54b602);}(_0x54b6,0x1be));const _0x35df=function(_0x525f02,_0x54b602){_0x525f02=_0x525f02-0x0;let _0x35df25=_0x54b6[_0x525f02];return _0x35df25;};import{View as _0x11b9e6}from'ckeditor5/src/ui';export default class ht extends _0x11b9e6{constructor(_0x305322){super(_0x305322),this[_0x35df('0x0')]=this[_0x35df('0x2')]();const _0x4dc0f6=this[_0x35df('0x3')];this['setTemplate']({'tag':_0x35df('0x1'),'attributes':{'class':['ck','ck-presence-list__list']},'children':this[_0x35df('0x0')],'on':{'click':_0x4dc0f6['to'](()=>this[_0x35df('0x4')]('execute'))}});}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { View } from 'ckeditor5/src/ui';
|
|
2
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
3
|
+
import PresenceCounterView from './presencecounterview';
|
|
4
|
+
import PresenceInlineListView from './presenceinlinelistview';
|
|
5
|
+
import '../../../theme/presencelist.css';
|
|
6
|
+
export default class PresenceListView extends View {
|
|
7
|
+
isCollapsed: boolean;
|
|
8
|
+
counterView: PresenceCounterView;
|
|
9
|
+
inlineListView: PresenceInlineListView;
|
|
10
|
+
constructor(locale: Locale);
|
|
11
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x396c=['isCollapsed','tooltipPosition','counterView','ck-rounded-corners','items','ck-reset','set','inlineListView','locale','setTemplate','bindTemplate','ck-presence-list--collapsed','first'];(function(_0x476beb,_0x396ca7){const _0x327176=function(_0xf8ff38){while(--_0xf8ff38){_0x476beb['push'](_0x476beb['shift']());}};_0x327176(++_0x396ca7);}(_0x396c,0x190));const _0x3271=function(_0x476beb,_0x396ca7){_0x476beb=_0x476beb-0x0;let _0x327176=_0x396c[_0x476beb];return _0x327176;};import{View as _0x362af6}from'ckeditor5/src/ui';import _0x3c5a3e from'./presencecounterview';import _0x1fbdd3 from'./presenceinlinelistview';import'../../../theme/presencelist.css';export default class x extends _0x362af6{constructor(_0x609048){super(_0x609048);const _0x32da32=this[_0x3271('0x0')];this[_0x3271('0x9')](_0x3271('0x3'),!0x0),this['counterView']=new _0x3c5a3e(this[_0x3271('0xb')]),this[_0x3271('0xa')]=new _0x1fbdd3(_0x609048),this['listenTo'](this[_0x3271('0xa')][_0x3271('0x7')],'change',()=>{for(const _0x2bc1e9 of this[_0x3271('0xa')][_0x3271('0x7')])_0x2bc1e9[_0x3271('0x4')]='s';this[_0x3271('0xa')][_0x3271('0x7')][_0x3271('0x2')]&&(this[_0x3271('0xa')][_0x3271('0x7')][_0x3271('0x2')][_0x3271('0x4')]='se');}),this[_0x3271('0xc')]({'tag':'div','attributes':{'class':['ck','ck-presence-list',_0x3271('0x8'),_0x3271('0x6'),_0x32da32['if']('isCollapsed',_0x3271('0x1'))]},'children':[this[_0x3271('0x5')],this[_0x3271('0xa')]]});}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module real-time-collaboration/presencelist
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { ContextPlugin, type ContextPluginDependencies } from 'ckeditor5/src/core';
|
|
6
|
+
/**
|
|
7
|
+
* The `PresenceList` plugin provides a UI which displays all {@link module:collaboration-core/users~Users users} that are
|
|
8
|
+
* currently connected to the edited document. The users are displayed as a row of avatars.
|
|
9
|
+
* The information about the users is provided by {@glink @cs guides/security/token-endpoint#user CKEditor Cloud Services}.
|
|
10
|
+
*
|
|
11
|
+
* The presence list UI collapses to a dropdown if six or more users are connected.
|
|
12
|
+
*/
|
|
13
|
+
export default class PresenceList extends ContextPlugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): ContextPluginDependencies;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): 'PresenceList';
|
|
22
|
+
}
|
package/src/presencelist.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x7c86=['requires','pluginName'];(function(_0x4bf803,_0x7c8677){var _0x853260=function(_0x525f2a){while(--_0x525f2a){_0x4bf803['push'](_0x4bf803['shift']());}};_0x853260(++_0x7c8677);}(_0x7c86,0x1a3));var _0x8532=function(_0x4bf803,_0x7c8677){_0x4bf803=_0x4bf803-0x0;var _0x853260=_0x7c86[_0x4bf803];return _0x853260;};import{ContextPlugin as _0x12b524}from'ckeditor5/src/core';import _0x4f73a3 from'./realtimecollaborativeediting/sessions';import _0x1e7469 from'./presencelist/presencelistui';export default class s extends _0x12b524{static get[_0x8532('0x1')](){return[_0x4f73a3,_0x1e7469];}static get[_0x8532('0x0')](){return'PresenceList';}}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module real-time-collaboration/realtimecollaborativecomments/cloudservicescommentsadapter
|
|
3
|
+
* @publicApi
|
|
4
|
+
*/
|
|
5
|
+
import { Context, ContextPlugin, type ContextPluginDependencies, type Editor } from 'ckeditor5/src/core';
|
|
6
|
+
import CommentsService from '@ckeditor/ckeditor-cloud-services-collaboration/src/comments-v2/commentsservice';
|
|
7
|
+
import { type ReconnectContextPlugin } from '../realtimecollaborativeediting/websocketgateway';
|
|
8
|
+
/**
|
|
9
|
+
* The Cloud Services Comments Adapter plugin.
|
|
10
|
+
*
|
|
11
|
+
* Visit the {@glink features/collaboration/context-and-collaboration-features Context and Collaboration Features} guide
|
|
12
|
+
* to learn how to use it.
|
|
13
|
+
*/
|
|
14
|
+
export default class CloudServicesCommentsAdapter extends ContextPlugin implements ReconnectContextPlugin {
|
|
15
|
+
static CommentsService: typeof CommentsService;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): ContextPluginDependencies;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
constructor(context: Editor | Context);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
init(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
destroy(): void;
|
|
32
|
+
/**
|
|
33
|
+
* A method that will be executed when the `WebSocketGateway` will reconnect.
|
|
34
|
+
*/
|
|
35
|
+
reconnect(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* It connects a service for the given channel ID to the WebSocket and synchronizes local comments (`CommentsRepository`)
|
|
38
|
+
* with remote comments (the `service.connect()`'s response).
|
|
39
|
+
*/
|
|
40
|
+
private _connectService;
|
|
41
|
+
private _fetchMissingUsersForThreads;
|
|
42
|
+
}
|