@ckeditor/ckeditor5-collaboration-core 39.0.2 → 40.0.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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/augmentation.d.ts +38 -38
- package/src/collaborationhistory.d.ts +21 -21
- package/src/collaborationoperation.d.ts +28 -28
- package/src/config.d.ts +102 -102
- package/src/index.d.ts +18 -18
- package/src/permissions.d.ts +45 -45
- package/src/permissions.js +1 -1
- package/src/suggestionstyles.d.ts +12 -12
- package/src/users/view/userview.d.ts +16 -16
- package/src/users/view/userview.js +1 -1
- package/src/users.d.ts +161 -161
- package/src/users.js +1 -1
- package/src/utils/common-translations.d.ts +9 -9
- package/src/utils/common-translations.js +1 -1
- package/src/utils/confirmmixin.d.ts +20 -20
- package/src/utils/confirmmixin.js +1 -1
- package/src/utils/confirmview.d.ts +13 -13
- package/src/utils/confirmview.js +1 -1
- package/src/utils/getdatetimeformatter.d.ts +29 -29
- package/src/utils/getdatetimeformatter.js +1 -1
- package/src/utils/getmarkerdomelement.d.ts +22 -22
- package/src/utils/getmarkerdomelement.js +1 -1
- package/src/utils/hashobject.d.ts +8 -8
- package/src/utils/hashobject.js +1 -1
- package/src/utils/sanitizeEditorConfig.d.ts +15 -15
- package/src/utils/sanitizeEditorConfig.js +1 -1
- package/src/utils/trim-html.d.ts +16 -16
- package/src/utils/trim-html.js +1 -1
- package/theme/icons/notification.svg +1 -1
- package/theme/integrations/codeblock.css +9 -0
- package/theme/integrations/horizontalline.css +9 -0
- package/theme/integrations/image.css +9 -0
- package/theme/integrations/mediaembed.css +9 -0
- package/theme/integrations/pagebreak.css +9 -0
- package/theme/integrations/table.css +9 -0
- package/theme/suggestion.css +9 -0
- package/theme/suggestionmarker.css +2 -1
- package/theme/usercolormixin.css +10 -1
- package/theme/usercolors.css +2 -1
- package/theme/users.css +2 -1
package/LICENSE.md
CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
|
|
2
2
|
==========================
|
3
3
|
|
4
4
|
**CKEditor 5 collaboration core** (https://ckeditor.com/collaboration/)<br>
|
5
|
-
Copyright (c) 2003-
|
5
|
+
Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
6
6
|
|
7
7
|
CKEditor 5 collaboration core is licensed under a commercial license and is protected by copyright law.
|
8
8
|
We operate on subscription-based licensing terms. For more details about available licensing options please contact us at sales@cksource.com.
|
package/README.md
CHANGED
@@ -19,7 +19,7 @@ As a licensed CKEditor 5 collaboration features user you can report bugs an
|
|
19
19
|
## License
|
20
20
|
|
21
21
|
**CKEditor 5 collaboration core**<br>
|
22
|
-
Copyright (c) 2003-
|
22
|
+
Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
23
23
|
|
24
24
|
CKEditor 5 collaboration core is licensed under a commercial license and is protected by copyright law.
|
25
25
|
For more details about available licensing options please contact us at sales@cksource.com.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "
|
3
|
+
"version": "40.0.0",
|
4
4
|
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
@@ -31,7 +31,7 @@
|
|
31
31
|
],
|
32
32
|
"main": "src/index.js",
|
33
33
|
"dependencies": {
|
34
|
-
"ckeditor5": "
|
34
|
+
"ckeditor5": "40.0.0",
|
35
35
|
"date-fns": "2.30.0"
|
36
36
|
},
|
37
37
|
"files": [
|
package/src/augmentation.d.ts
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
import type { LocaleConfig, Users } from './index';
|
6
|
-
import type { RealTimeCollaborationConfig } from './config';
|
7
|
-
declare module '@ckeditor/ckeditor5-core' {
|
8
|
-
interface EditorConfig {
|
9
|
-
/**
|
10
|
-
* The locale configuration of the editor.
|
11
|
-
*/
|
12
|
-
locale?: LocaleConfig;
|
13
|
-
/**
|
14
|
-
* The users plugin configuration.
|
15
|
-
*/
|
16
|
-
users?: {
|
17
|
-
/**
|
18
|
-
* User ID value that will be used for the anonymous user.
|
19
|
-
*/
|
20
|
-
anonymousUserId?: string;
|
21
|
-
/**
|
22
|
-
* Number of defined colors that are randomly assigned to users.
|
23
|
-
*/
|
24
|
-
colorsCount?: number;
|
25
|
-
};
|
26
|
-
/**
|
27
|
-
* The configuration of the real time collaboration feature.
|
28
|
-
*
|
29
|
-
* Read more in {@link module:collaboration-core/config~RealTimeCollaborationConfig}.
|
30
|
-
*
|
31
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
32
|
-
*/
|
33
|
-
collaboration?: RealTimeCollaborationConfig;
|
34
|
-
}
|
35
|
-
interface PluginsMap {
|
36
|
-
[Users.pluginName]: Users;
|
37
|
-
}
|
38
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
import type { LocaleConfig, Users } from './index';
|
6
|
+
import type { RealTimeCollaborationConfig } from './config';
|
7
|
+
declare module '@ckeditor/ckeditor5-core' {
|
8
|
+
interface EditorConfig {
|
9
|
+
/**
|
10
|
+
* The locale configuration of the editor.
|
11
|
+
*/
|
12
|
+
locale?: LocaleConfig;
|
13
|
+
/**
|
14
|
+
* The users plugin configuration.
|
15
|
+
*/
|
16
|
+
users?: {
|
17
|
+
/**
|
18
|
+
* User ID value that will be used for the anonymous user.
|
19
|
+
*/
|
20
|
+
anonymousUserId?: string;
|
21
|
+
/**
|
22
|
+
* Number of defined colors that are randomly assigned to users.
|
23
|
+
*/
|
24
|
+
colorsCount?: number;
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* The configuration of the real time collaboration feature.
|
28
|
+
*
|
29
|
+
* Read more in {@link module:collaboration-core/config~RealTimeCollaborationConfig}.
|
30
|
+
*
|
31
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
32
|
+
*/
|
33
|
+
collaboration?: RealTimeCollaborationConfig;
|
34
|
+
}
|
35
|
+
interface PluginsMap {
|
36
|
+
[Users.pluginName]: Users;
|
37
|
+
}
|
38
|
+
}
|
@@ -1,21 +1,21 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/collaborationhistory
|
7
|
-
* @publicApi
|
8
|
-
*/
|
9
|
-
import type { default as CollaborationOperation } from './collaborationoperation';
|
10
|
-
/**
|
11
|
-
* Interface compatible with {@link module:engine/model/history~History} with the difference that it uses
|
12
|
-
* {@link module:collaboration-core/collaborationoperation~CollaborationOperation} instead of regular model operations.
|
13
|
-
*/
|
14
|
-
export default interface CollaborationHistory {
|
15
|
-
_operations: Array<CollaborationOperation>;
|
16
|
-
version: number;
|
17
|
-
getOperations(fromBaseVersion?: number, toBaseVersion?: number): Array<CollaborationOperation>;
|
18
|
-
getOperation(baseVersion: number): CollaborationOperation | undefined;
|
19
|
-
addOperation(operation: CollaborationOperation): void;
|
20
|
-
reset(): void;
|
21
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/collaborationhistory
|
7
|
+
* @publicApi
|
8
|
+
*/
|
9
|
+
import type { default as CollaborationOperation } from './collaborationoperation';
|
10
|
+
/**
|
11
|
+
* Interface compatible with {@link module:engine/model/history~History} with the difference that it uses
|
12
|
+
* {@link module:collaboration-core/collaborationoperation~CollaborationOperation} instead of regular model operations.
|
13
|
+
*/
|
14
|
+
export default interface CollaborationHistory {
|
15
|
+
_operations: Array<CollaborationOperation>;
|
16
|
+
version: number;
|
17
|
+
getOperations(fromBaseVersion?: number, toBaseVersion?: number): Array<CollaborationOperation>;
|
18
|
+
getOperation(baseVersion: number): CollaborationOperation | undefined;
|
19
|
+
addOperation(operation: CollaborationOperation): void;
|
20
|
+
reset(): void;
|
21
|
+
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/collaborationoperation
|
7
|
-
* @publicApi
|
8
|
-
*/
|
9
|
-
import type { Operation, InsertOperation, MergeOperation, MoveOperation, SplitOperation, MarkerOperation, RootOperation, RootAttributeOperation } from 'ckeditor5/src/engine';
|
10
|
-
/**
|
11
|
-
* Extends the {@link module:engine/model/operation/operation operation}.
|
12
|
-
*/
|
13
|
-
export default interface CollaborationOperation extends Operation {
|
14
|
-
_isInit?: boolean;
|
15
|
-
_authorId?: null | string;
|
16
|
-
_isDisconnection?: boolean;
|
17
|
-
createdAt?: Date;
|
18
|
-
wasUndone?: boolean;
|
19
|
-
affectsData?: Record<string, any>;
|
20
|
-
clone(): CollaborationOperation;
|
21
|
-
}
|
22
|
-
export type InsertCollaborationOperation = CollaborationOperation & InsertOperation;
|
23
|
-
export type MoveCollaborationOperation = CollaborationOperation & MoveOperation;
|
24
|
-
export type MergeCollaborationOperation = CollaborationOperation & MergeOperation;
|
25
|
-
export type SplitCollaborationOperation = CollaborationOperation & SplitOperation;
|
26
|
-
export type MarkerCollaborationOperation = CollaborationOperation & MarkerOperation;
|
27
|
-
export type RootCollaborationOperation = CollaborationOperation & RootOperation;
|
28
|
-
export type RootAttributeCollaborationOperation = CollaborationOperation & RootAttributeOperation;
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/collaborationoperation
|
7
|
+
* @publicApi
|
8
|
+
*/
|
9
|
+
import type { Operation, InsertOperation, MergeOperation, MoveOperation, SplitOperation, MarkerOperation, RootOperation, RootAttributeOperation } from 'ckeditor5/src/engine';
|
10
|
+
/**
|
11
|
+
* Extends the {@link module:engine/model/operation/operation operation}.
|
12
|
+
*/
|
13
|
+
export default interface CollaborationOperation extends Operation {
|
14
|
+
_isInit?: boolean;
|
15
|
+
_authorId?: null | string;
|
16
|
+
_isDisconnection?: boolean;
|
17
|
+
createdAt?: Date;
|
18
|
+
wasUndone?: boolean;
|
19
|
+
affectsData?: Record<string, any>;
|
20
|
+
clone(): CollaborationOperation;
|
21
|
+
}
|
22
|
+
export type InsertCollaborationOperation = CollaborationOperation & InsertOperation;
|
23
|
+
export type MoveCollaborationOperation = CollaborationOperation & MoveOperation;
|
24
|
+
export type MergeCollaborationOperation = CollaborationOperation & MergeOperation;
|
25
|
+
export type SplitCollaborationOperation = CollaborationOperation & SplitOperation;
|
26
|
+
export type MarkerCollaborationOperation = CollaborationOperation & MarkerOperation;
|
27
|
+
export type RootCollaborationOperation = CollaborationOperation & RootOperation;
|
28
|
+
export type RootAttributeCollaborationOperation = CollaborationOperation & RootAttributeOperation;
|
package/src/config.d.ts
CHANGED
@@ -1,102 +1,102 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/config
|
7
|
-
* @publicApi
|
8
|
-
*/
|
9
|
-
/**
|
10
|
-
* The locale configuration.
|
11
|
-
*
|
12
|
-
* ```ts
|
13
|
-
* ClassicEditor
|
14
|
-
* .create( {
|
15
|
-
* locale: {
|
16
|
-
* // The localization configuration.
|
17
|
-
* }
|
18
|
-
* } )
|
19
|
-
* .then( ... )
|
20
|
-
* .catch( ... );
|
21
|
-
* ```
|
22
|
-
*
|
23
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
24
|
-
*/
|
25
|
-
export interface LocaleConfig {
|
26
|
-
/**
|
27
|
-
* A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying
|
28
|
-
* comments and suggestions details.
|
29
|
-
*
|
30
|
-
* The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
|
31
|
-
*
|
32
|
-
* ```ts
|
33
|
-
* import format from 'date-fns/format';
|
34
|
-
*
|
35
|
-
* ClassicEditor
|
36
|
-
* .create( document.querySelector( '#editor' ), {
|
37
|
-
* toolbar: {
|
38
|
-
* items: [ 'bold', 'italic', '|', 'comment' ]
|
39
|
-
* },
|
40
|
-
* sidebar: {
|
41
|
-
* container: document.querySelector( '#sidebar' )
|
42
|
-
* },
|
43
|
-
* locale: {
|
44
|
-
* dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
|
45
|
-
* }
|
46
|
-
* } )
|
47
|
-
* .catch( error => console.error( error ) );
|
48
|
-
* ```
|
49
|
-
*
|
50
|
-
* @returns The generated date.
|
51
|
-
*/
|
52
|
-
dateTimeFormat?: (date: Date) => string;
|
53
|
-
}
|
54
|
-
/**
|
55
|
-
* The configuration of the real-time collaboration features.
|
56
|
-
*
|
57
|
-
* ```ts
|
58
|
-
* ClassicEditor
|
59
|
-
* .create( {
|
60
|
-
* collaboration: ... // Collaboration features configuration.
|
61
|
-
* } )
|
62
|
-
* .then( ... )
|
63
|
-
* .catch( ... );
|
64
|
-
* ```
|
65
|
-
*
|
66
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
67
|
-
*/
|
68
|
-
export interface RealTimeCollaborationConfig {
|
69
|
-
/**
|
70
|
-
* The channel ID is a unique ID that identifies the data loaded in the editor instance or used by
|
71
|
-
* the context instance.
|
72
|
-
*
|
73
|
-
* If specified for the editor, it is the document ID.
|
74
|
-
*
|
75
|
-
* If you are using multiple editors instances at the same time, each of them should use a different
|
76
|
-
* channel ID to connect to a specific document.
|
77
|
-
*
|
78
|
-
* If specified for context, it is the ID for all the data related to context instance.
|
79
|
-
* This ID will be used for data that is not related to an editor instance, for example comments
|
80
|
-
* outside the editor.
|
81
|
-
*
|
82
|
-
* In the case of context, the ID can be an ID of a subpage or a form, or a different entity accordingly
|
83
|
-
* to your application.
|
84
|
-
*
|
85
|
-
* The channel ID can be used to recognize entity to which piece of data belongs in integrations that use `Context`
|
86
|
-
* and context plugins. For example, if you are preparing a custom integration using the comments API,
|
87
|
-
* you can use the channel ID to recognize whether the comment was added to an editor instance
|
88
|
-
* (and which one) or to the context.
|
89
|
-
*
|
90
|
-
* ```ts
|
91
|
-
* ClassicEditor
|
92
|
-
* .create( {
|
93
|
-
* collaboration: {
|
94
|
-
* channelId: 'your-channel-id'
|
95
|
-
* }
|
96
|
-
* } )
|
97
|
-
* .then( ... )
|
98
|
-
* .catch( ... );
|
99
|
-
* ```
|
100
|
-
*/
|
101
|
-
channelId?: string;
|
102
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/config
|
7
|
+
* @publicApi
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* The locale configuration.
|
11
|
+
*
|
12
|
+
* ```ts
|
13
|
+
* ClassicEditor
|
14
|
+
* .create( {
|
15
|
+
* locale: {
|
16
|
+
* // The localization configuration.
|
17
|
+
* }
|
18
|
+
* } )
|
19
|
+
* .then( ... )
|
20
|
+
* .catch( ... );
|
21
|
+
* ```
|
22
|
+
*
|
23
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
24
|
+
*/
|
25
|
+
export interface LocaleConfig {
|
26
|
+
/**
|
27
|
+
* A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying
|
28
|
+
* comments and suggestions details.
|
29
|
+
*
|
30
|
+
* The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
|
31
|
+
*
|
32
|
+
* ```ts
|
33
|
+
* import format from 'date-fns/format';
|
34
|
+
*
|
35
|
+
* ClassicEditor
|
36
|
+
* .create( document.querySelector( '#editor' ), {
|
37
|
+
* toolbar: {
|
38
|
+
* items: [ 'bold', 'italic', '|', 'comment' ]
|
39
|
+
* },
|
40
|
+
* sidebar: {
|
41
|
+
* container: document.querySelector( '#sidebar' )
|
42
|
+
* },
|
43
|
+
* locale: {
|
44
|
+
* dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
|
45
|
+
* }
|
46
|
+
* } )
|
47
|
+
* .catch( error => console.error( error ) );
|
48
|
+
* ```
|
49
|
+
*
|
50
|
+
* @returns The generated date.
|
51
|
+
*/
|
52
|
+
dateTimeFormat?: (date: Date) => string;
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* The configuration of the real-time collaboration features.
|
56
|
+
*
|
57
|
+
* ```ts
|
58
|
+
* ClassicEditor
|
59
|
+
* .create( {
|
60
|
+
* collaboration: ... // Collaboration features configuration.
|
61
|
+
* } )
|
62
|
+
* .then( ... )
|
63
|
+
* .catch( ... );
|
64
|
+
* ```
|
65
|
+
*
|
66
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
67
|
+
*/
|
68
|
+
export interface RealTimeCollaborationConfig {
|
69
|
+
/**
|
70
|
+
* The channel ID is a unique ID that identifies the data loaded in the editor instance or used by
|
71
|
+
* the context instance.
|
72
|
+
*
|
73
|
+
* If specified for the editor, it is the document ID.
|
74
|
+
*
|
75
|
+
* If you are using multiple editors instances at the same time, each of them should use a different
|
76
|
+
* channel ID to connect to a specific document.
|
77
|
+
*
|
78
|
+
* If specified for context, it is the ID for all the data related to context instance.
|
79
|
+
* This ID will be used for data that is not related to an editor instance, for example comments
|
80
|
+
* outside the editor.
|
81
|
+
*
|
82
|
+
* In the case of context, the ID can be an ID of a subpage or a form, or a different entity accordingly
|
83
|
+
* to your application.
|
84
|
+
*
|
85
|
+
* The channel ID can be used to recognize entity to which piece of data belongs in integrations that use `Context`
|
86
|
+
* and context plugins. For example, if you are preparing a custom integration using the comments API,
|
87
|
+
* you can use the channel ID to recognize whether the comment was added to an editor instance
|
88
|
+
* (and which one) or to the context.
|
89
|
+
*
|
90
|
+
* ```ts
|
91
|
+
* ClassicEditor
|
92
|
+
* .create( {
|
93
|
+
* collaboration: {
|
94
|
+
* channelId: 'your-channel-id'
|
95
|
+
* }
|
96
|
+
* } )
|
97
|
+
* .then( ... )
|
98
|
+
* .catch( ... );
|
99
|
+
* ```
|
100
|
+
*/
|
101
|
+
channelId?: string;
|
102
|
+
}
|
package/src/index.d.ts
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
export { default as Permissions } from './permissions';
|
6
|
-
export { default as Users, type User } from './users';
|
7
|
-
export { default as UserView } from './users/view/userview';
|
8
|
-
export { default as getDateTimeFormatter } from './utils/getdatetimeformatter';
|
9
|
-
export { default as getMarkerDomElement, getAllMarkersDomElementsSorted } from './utils/getmarkerdomelement';
|
10
|
-
export { default as trimHtml } from './utils/trim-html';
|
11
|
-
export { default as ConfirmMixin } from './utils/confirmmixin';
|
12
|
-
export { default as hashObject } from './utils/hashobject';
|
13
|
-
export { default as sanitizeEditorConfig } from './utils/sanitizeEditorConfig';
|
14
|
-
export { default as CollaborationOperation, InsertCollaborationOperation, SplitCollaborationOperation, MarkerCollaborationOperation, MoveCollaborationOperation, MergeCollaborationOperation, RootCollaborationOperation, RootAttributeCollaborationOperation } from './collaborationoperation';
|
15
|
-
export { default as CollaborationHistory } from './collaborationhistory';
|
16
|
-
export type { LocaleConfig, RealTimeCollaborationConfig } from './config';
|
17
|
-
export * from './suggestionstyles';
|
18
|
-
import './augmentation';
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
export { default as Permissions } from './permissions';
|
6
|
+
export { default as Users, type User } from './users';
|
7
|
+
export { default as UserView } from './users/view/userview';
|
8
|
+
export { default as getDateTimeFormatter } from './utils/getdatetimeformatter';
|
9
|
+
export { default as getMarkerDomElement, getAllMarkersDomElementsSorted } from './utils/getmarkerdomelement';
|
10
|
+
export { default as trimHtml } from './utils/trim-html';
|
11
|
+
export { default as ConfirmMixin } from './utils/confirmmixin';
|
12
|
+
export { default as hashObject } from './utils/hashobject';
|
13
|
+
export { default as sanitizeEditorConfig } from './utils/sanitizeEditorConfig';
|
14
|
+
export { default as CollaborationOperation, InsertCollaborationOperation, SplitCollaborationOperation, MarkerCollaborationOperation, MoveCollaborationOperation, MergeCollaborationOperation, RootCollaborationOperation, RootAttributeCollaborationOperation } from './collaborationoperation';
|
15
|
+
export { default as CollaborationHistory } from './collaborationhistory';
|
16
|
+
export type { LocaleConfig, RealTimeCollaborationConfig } from './config';
|
17
|
+
export * from './suggestionstyles';
|
18
|
+
import './augmentation';
|
package/src/permissions.d.ts
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/permissions
|
7
|
-
* @publicApi
|
8
|
-
*/
|
9
|
-
import { ContextPlugin } from 'ckeditor5/src/core';
|
10
|
-
/**
|
11
|
-
* The `Permissions` plugin manages permissions set for the local user.
|
12
|
-
*
|
13
|
-
* Following is the list of all defined permissions:
|
14
|
-
*
|
15
|
-
* * `document:write` - modify the content of the document,
|
16
|
-
* * `comment:write` - create, edit and remove own comments and create, resolve and remove own comment threads,
|
17
|
-
* * `comment:admin` - resolve and remove comment threads created by other users (enables `comment:write`).
|
18
|
-
* * `comment:modify_all` - edit and remove any comments created by other users.
|
19
|
-
*
|
20
|
-
* For example, a user with `comment:write` permission but with no `document:write` permission will be able to add
|
21
|
-
* comments but will not be able to change the document data (comments-only mode).
|
22
|
-
*
|
23
|
-
* By default, the following permissions are set: `document:write`, `comment:write`, `comment:admin`.
|
24
|
-
*
|
25
|
-
* Permissions are handled separately for each channel id (for each editor instance and context instance).
|
26
|
-
*
|
27
|
-
* See also the {@glink features/collaboration/users#user-permissions User permissions} guide to learn how to use this plugin.
|
28
|
-
*/
|
29
|
-
export default class Permissions extends ContextPlugin {
|
30
|
-
/**
|
31
|
-
* @inheritDoc
|
32
|
-
*/
|
33
|
-
static get pluginName(): "Permissions";
|
34
|
-
/**
|
35
|
-
* Sets permissions for editor/context instance with given `channelId`.
|
36
|
-
*
|
37
|
-
* If `channelId` is not set, the channel id of the editor/context to which the plugin was added will be used.
|
38
|
-
* This means that it is not required if the plugin is added to the editor configuration and {@link module:core/context~Context}
|
39
|
-
* is not used.
|
40
|
-
*
|
41
|
-
* @param permissions Permissions to set.
|
42
|
-
* @param channelId The channel ID.
|
43
|
-
*/
|
44
|
-
setPermissions(permissions: Array<string>, channelId?: string): void;
|
45
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/permissions
|
7
|
+
* @publicApi
|
8
|
+
*/
|
9
|
+
import { ContextPlugin } from 'ckeditor5/src/core';
|
10
|
+
/**
|
11
|
+
* The `Permissions` plugin manages permissions set for the local user.
|
12
|
+
*
|
13
|
+
* Following is the list of all defined permissions:
|
14
|
+
*
|
15
|
+
* * `document:write` - modify the content of the document,
|
16
|
+
* * `comment:write` - create, edit and remove own comments and create, resolve and remove own comment threads,
|
17
|
+
* * `comment:admin` - resolve and remove comment threads created by other users (enables `comment:write`).
|
18
|
+
* * `comment:modify_all` - edit and remove any comments created by other users.
|
19
|
+
*
|
20
|
+
* For example, a user with `comment:write` permission but with no `document:write` permission will be able to add
|
21
|
+
* comments but will not be able to change the document data (comments-only mode).
|
22
|
+
*
|
23
|
+
* By default, the following permissions are set: `document:write`, `comment:write`, `comment:admin`.
|
24
|
+
*
|
25
|
+
* Permissions are handled separately for each channel id (for each editor instance and context instance).
|
26
|
+
*
|
27
|
+
* See also the {@glink features/collaboration/users#user-permissions User permissions} guide to learn how to use this plugin.
|
28
|
+
*/
|
29
|
+
export default class Permissions extends ContextPlugin {
|
30
|
+
/**
|
31
|
+
* @inheritDoc
|
32
|
+
*/
|
33
|
+
static get pluginName(): "Permissions";
|
34
|
+
/**
|
35
|
+
* Sets permissions for editor/context instance with given `channelId`.
|
36
|
+
*
|
37
|
+
* If `channelId` is not set, the channel id of the editor/context to which the plugin was added will be used.
|
38
|
+
* This means that it is not required if the plugin is added to the editor configuration and {@link module:core/context~Context}
|
39
|
+
* is not used.
|
40
|
+
*
|
41
|
+
* @param permissions Permissions to set.
|
42
|
+
* @param channelId The channel ID.
|
43
|
+
*/
|
44
|
+
setPermissions(permissions: Array<string>, channelId?: string): void;
|
45
|
+
}
|
package/src/permissions.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x589a=['no-permissions','commands','includes','context','get','editors','setPermissions','disableReadOnlyMode','noPermissions','comment:write','Permissions','collaboration.channelId','comment:admin','find','addCommentThread','permissions-set-permissions-invalid-channel-id','has','CommentsOnly','pluginName','document:write','config','CommentsRepository','isEnabled','comment:modify_all','clearForceDisabled'];(function(_0x1a2819,_0x589a4d){const _0x17aa8a=function(_0x5afd10){while(--_0x5afd10){_0x1a2819['push'](_0x1a2819['shift']());}};_0x17aa8a(++_0x589a4d);}(_0x589a,0x6a));const _0x17aa=function(_0x1a2819,_0x589a4d){_0x1a2819=_0x1a2819-0x0;let _0x17aa8a=_0x589a[_0x1a2819];return _0x17aa8a;};import{ContextPlugin as _0x3e2c45,Editor as _0x5cf335}from'ckeditor5/src/core';import{CKEditorError as _0x2d1f11}from'ckeditor5/src/utils';export default class n extends _0x3e2c45{static get[_0x17aa('0xc')](){return _0x17aa('0x4');}[_0x17aa('0x0')](_0x84380c,_0x578ab1){let _0x7196af;if(_0x578ab1||(_0x578ab1=this[_0x17aa('0x16')][_0x17aa('0xe')][_0x17aa('0x17')](_0x17aa('0x5'))),this[_0x17aa('0x16')]['config'][_0x17aa('0x17')](_0x17aa('0x5'))==_0x578ab1?_0x7196af=this[_0x17aa('0x16')]:'editors'in this[_0x17aa('0x16')]&&this[_0x17aa('0x16')]['editors']&&(_0x7196af=this[_0x17aa('0x16')][_0x17aa('0x18')][_0x17aa('0x7')](_0x93dd10=>_0x93dd10[_0x17aa('0xe')][_0x17aa('0x17')]('collaboration.channelId')==_0x578ab1)),!_0x7196af)throw new _0x2d1f11(_0x17aa('0x9'),null);const _0x5b9f05=_0x7196af['plugins'],_0x1f5480=_0x5b9f05[_0x17aa('0xa')](_0x17aa('0xf'))?_0x5b9f05['get'](_0x17aa('0xf')):void 0x0,_0xd91684=_0x5b9f05['has'](_0x17aa('0xb'))&&_0x5b9f05['get'](_0x17aa('0xb')),_0x2c292a=_0x84380c[_0x17aa('0x15')](_0x17aa('0xd')),_0x59c8c8=_0x84380c['includes'](_0x17aa('0x11')),_0x19966c=_0x84380c['includes'](_0x17aa('0x6')),_0x172ee4=_0x84380c[_0x17aa('0x15')](_0x17aa('0x3')),_0x16227e=_0x172ee4||_0x19966c,_0x38f753=_0x16227e||_0x59c8c8,_0x4582c4=_0x2c292a||_0x16227e;(_0xd91684&&(_0xd91684[_0x17aa('0x10')]=!_0x2c292a&&_0x38f753),_0x7196af instanceof _0x5cf335)&&(!(_0x2c292a||_0x38f753&&_0x1f5480)?_0x7196af['enableReadOnlyMode']('no-permissions'):_0x7196af[_0x17aa('0x1')](_0x17aa('0x13')));if(_0x1f5480){_0x1f5480[_0x17aa('0x0')]({'admin':_0x19966c,'modifyAll':_0x59c8c8,'write':_0x172ee4,'resolve':_0x4582c4},_0x578ab1);const _0x3c98de=_0x7196af instanceof _0x5cf335&&_0x7196af[_0x17aa('0x14')][_0x17aa('0x17')](_0x17aa('0x8'));_0x3c98de&&(_0x16227e?_0x3c98de[_0x17aa('0x12')](_0x17aa('0x2')):_0x3c98de['forceDisabled'](_0x17aa('0x2')));}}}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
import '../theme/suggestion.css';
|
6
|
-
import '../theme/suggestionmarker.css';
|
7
|
-
import '../theme/integrations/image.css';
|
8
|
-
import '../theme/integrations/horizontalline.css';
|
9
|
-
import '../theme/integrations/mediaembed.css';
|
10
|
-
import '../theme/integrations/pagebreak.css';
|
11
|
-
import '../theme/integrations/table.css';
|
12
|
-
import '../theme/integrations/codeblock.css';
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
import '../theme/suggestion.css';
|
6
|
+
import '../theme/suggestionmarker.css';
|
7
|
+
import '../theme/integrations/image.css';
|
8
|
+
import '../theme/integrations/horizontalline.css';
|
9
|
+
import '../theme/integrations/mediaembed.css';
|
10
|
+
import '../theme/integrations/pagebreak.css';
|
11
|
+
import '../theme/integrations/table.css';
|
12
|
+
import '../theme/integrations/codeblock.css';
|
@@ -1,16 +1,16 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/users/view/userview
|
7
|
-
*/
|
8
|
-
import { View, type TemplateDefinition } from 'ckeditor5/src/ui';
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
-
import type { User } from '../../users';
|
11
|
-
import '../../../theme/users.css';
|
12
|
-
export default class UserView extends View {
|
13
|
-
name: string;
|
14
|
-
notificationView: TemplateDefinition | null;
|
15
|
-
constructor(locale: Locale, user: User, notificationText?: null | string);
|
16
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/users/view/userview
|
7
|
+
*/
|
8
|
+
import { View, type TemplateDefinition } from 'ckeditor5/src/ui';
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
+
import type { User } from '../../users';
|
11
|
+
import '../../../theme/users.css';
|
12
|
+
export default class UserView extends View {
|
13
|
+
name: string;
|
14
|
+
notificationView: TemplateDefinition | null;
|
15
|
+
constructor(locale: Locale, user: User, notificationText?: null | string);
|
16
|
+
}
|