@ckeditor/ckeditor5-collaboration-core 36.0.1 → 37.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-collaboration-core",
3
- "version": "36.0.1",
3
+ "version": "37.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/)",
@@ -28,7 +28,20 @@
28
28
  ],
29
29
  "main": "src/index.js",
30
30
  "dependencies": {
31
- "ckeditor5": "^36.0.1",
31
+ "ckeditor5": "^37.0.0",
32
32
  "date-fns": "^2.17.0"
33
- }
33
+ },
34
+ "files": [
35
+ "lang",
36
+ "src/**/*.js",
37
+ "src/**/*.d.ts",
38
+ "theme",
39
+ "CHANGELOG.md"
40
+ ],
41
+ "scripts": {
42
+ "build": "tsc -p ./tsconfig.json",
43
+ "postversion": "npm run build"
44
+ },
45
+ "types": "src/index.d.ts",
46
+ "obfuscated": true
34
47
  }
@@ -0,0 +1,34 @@
1
+ import type { LocaleConfig, Users } from './index';
2
+ import type { RealTimeCollaborationConfig } from './config';
3
+ declare module '@ckeditor/ckeditor5-core' {
4
+ interface EditorConfig {
5
+ /**
6
+ * The locale configuration of the editor.
7
+ */
8
+ locale?: LocaleConfig;
9
+ /**
10
+ * The users plugin configuration.
11
+ */
12
+ users?: {
13
+ /**
14
+ * User ID value that will be used for the anonymous user.
15
+ */
16
+ anonymousUserId?: string;
17
+ /**
18
+ * Number of defined colors that are randomly assigned to users.
19
+ */
20
+ colorsCount?: number;
21
+ };
22
+ /**
23
+ * The configuration of the real time collaboration feature.
24
+ *
25
+ * Read more in {@link module:collaboration-core/config~RealTimeCollaborationConfig}.
26
+ *
27
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
28
+ */
29
+ collaboration?: RealTimeCollaborationConfig;
30
+ }
31
+ interface PluginsMap {
32
+ [Users.pluginName]: Users;
33
+ }
34
+ }
@@ -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{};
@@ -0,0 +1 @@
1
+ export {};
@@ -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{};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module collaboration-core/collaborationoperation
3
+ * @publicApi
4
+ */
5
+ import type { Operation, DocumentFragment, InsertOperation, MergeOperation, MoveOperation, SplitOperation, MarkerOperation } from 'ckeditor5/src/engine';
6
+ /**
7
+ * Extends the {@link module:engine/model/operation/operation operation}.
8
+ */
9
+ export default interface CollaborationOperation extends Operation {
10
+ _isInit?: boolean;
11
+ _authorId?: null | string;
12
+ _isDisconnection?: boolean;
13
+ createdAt?: Date;
14
+ wasUndone?: boolean;
15
+ affectsData?: Record<string, any>;
16
+ root?: DocumentFragment;
17
+ clone(): CollaborationOperation;
18
+ }
19
+ export type InsertCollaborationOperation = CollaborationOperation & InsertOperation;
20
+ export type MoveCollaborationOperation = CollaborationOperation & MoveOperation;
21
+ export type MergeCollaborationOperation = CollaborationOperation & MergeOperation;
22
+ export type SplitCollaborationOperation = CollaborationOperation & SplitOperation;
23
+ export type MarkerCollaborationOperation = CollaborationOperation & MarkerOperation;
@@ -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{};
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @module collaboration-core/config
3
+ * @publicApi
4
+ */
5
+ /**
6
+ * The locale configuration.
7
+ *
8
+ * ```ts
9
+ * ClassicEditor
10
+ * .create( {
11
+ * locale: {
12
+ * // The localization configuration.
13
+ * }
14
+ * } )
15
+ * .then( ... )
16
+ * .catch( ... );
17
+ * ```
18
+ *
19
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
20
+ */
21
+ export interface LocaleConfig {
22
+ /**
23
+ * A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying
24
+ * comments and suggestions details.
25
+ *
26
+ * The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
27
+ *
28
+ * ```ts
29
+ * import format from 'date-fns/format';
30
+ *
31
+ * ClassicEditor
32
+ * .create( document.querySelector( '#editor' ), {
33
+ * toolbar: {
34
+ * items: [ 'bold', 'italic', '|', 'comment' ]
35
+ * },
36
+ * sidebar: {
37
+ * container: document.querySelector( '#sidebar' )
38
+ * },
39
+ * locale: {
40
+ * dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
41
+ * }
42
+ * } )
43
+ * .catch( error => console.error( error ) );
44
+ * ```
45
+ *
46
+ * @returns The generated date.
47
+ */
48
+ dateTimeFormat?: (date: Date) => string;
49
+ }
50
+ /**
51
+ * The configuration of the real-time collaboration features.
52
+ *
53
+ * ```ts
54
+ * ClassicEditor
55
+ * .create( {
56
+ * collaboration: ... // Collaboration features configuration.
57
+ * } )
58
+ * .then( ... )
59
+ * .catch( ... );
60
+ * ```
61
+ *
62
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
63
+ */
64
+ export interface RealTimeCollaborationConfig {
65
+ /**
66
+ * The channel ID is a unique ID that identifies the data loaded in the editor instance or used by
67
+ * the context instance.
68
+ *
69
+ * If specified for the editor, it is the document ID.
70
+ *
71
+ * If you are using multiple editors instances at the same time, each of them should use a different
72
+ * channel ID to connect to a specific document.
73
+ *
74
+ * If specified for context, it is the ID for all the data related to context instance.
75
+ * This ID will be used for data that is not related to an editor instance, for example comments
76
+ * outside the editor.
77
+ *
78
+ * In the case of context, the ID can be an ID of a subpage or a form, or a different entity accordingly
79
+ * to your application.
80
+ *
81
+ * The channel ID can be used to recognize entity to which piece of data belongs in integrations that use `Context`
82
+ * and context plugins. For example, if you are preparing a custom integration using the comments API,
83
+ * you can use the channel ID to recognize whether the comment was added to an editor instance
84
+ * (and which one) or to the context.
85
+ *
86
+ * ```ts
87
+ * ClassicEditor
88
+ * .create( {
89
+ * collaboration: {
90
+ * channelId: 'your-channel-id'
91
+ * }
92
+ * } )
93
+ * .then( ... )
94
+ * .catch( ... );
95
+ * ```
96
+ */
97
+ channelId?: string;
98
+ }
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,13 @@
1
+ export { default as Permissions } from './permissions';
2
+ export { default as Users, type User } from './users';
3
+ export { default as UserView } from './users/view/userview';
4
+ export { default as getDateTimeFormatter } from './utils/getdatetimeformatter';
5
+ export { default as getMarkerDomElement, getAllMarkersDomElementsSorted } from './utils/getmarkerdomelement';
6
+ export { default as trimHtml } from './utils/trim-html';
7
+ export { default as ConfirmMixin } from './utils/confirmmixin';
8
+ export { default as hashObject } from './utils/hashobject';
9
+ export { default as CollaborationOperation, InsertCollaborationOperation, SplitCollaborationOperation, MarkerCollaborationOperation, MoveCollaborationOperation, MergeCollaborationOperation } from './collaborationoperation';
10
+ export { default as CollaborationHistory } from './collaborationhistory';
11
+ export type { LocaleConfig, RealTimeCollaborationConfig } from './config';
12
+ export * from './suggestionstyles';
13
+ import './augmentation';
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export{default as Permissions}from'./permissions';export{default as Users}from'./users';export{default as UserView}from'./users/view/userview';export{default as getDateTimeFormatter}from'./utils/getdatetimeformatter';export{default as getMarkerDomElement,getAllMarkersDomElementsSorted}from'./utils/getmarkerdomelement';export{default as trimHtml}from'./utils/trim-html';export{default as ConfirmMixin}from'./utils/confirmmixin';export{default as hashObject}from'./utils/hashobject';export*from'./suggestionstyles';
23
+ export{default as Permissions}from'./permissions';export{default as Users}from'./users';export{default as UserView}from'./users/view/userview';export{default as getDateTimeFormatter}from'./utils/getdatetimeformatter';export{default as getMarkerDomElement,getAllMarkersDomElementsSorted}from'./utils/getmarkerdomelement';export{default as trimHtml}from'./utils/trim-html';export{default as ConfirmMixin}from'./utils/confirmmixin';export{default as hashObject}from'./utils/hashobject';export*from'./suggestionstyles';import'./augmentation';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @module collaboration-core/permissions
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin } from 'ckeditor5/src/core';
6
+ /**
7
+ * The `Permissions` plugin manages permissions set for the local user.
8
+ *
9
+ * Following is the list of all defined permissions:
10
+ *
11
+ * * `document:write` - modify the content of the document,
12
+ * * `comment:write` - create, edit and remove own comments and create and remove own comment threads,
13
+ * * `comment:admin` - remove comment threads created by other users (enables `comment:write`).
14
+ * * `comment:modify_all` - edit and remove any comments created by any user.
15
+ *
16
+ * For example, a user with `comment:write` permission but with no `document:write` permission will be able to add
17
+ * comments but will not be able to change the document data (comments-only mode).
18
+ *
19
+ * By default, all the permissions are set to enabled.
20
+ *
21
+ * Permissions are handled separately for each channel id (for each editor instance and context instance).
22
+ *
23
+ * See also the {@glink features/collaboration/users#user-permissions User permissions} guide to learn how to use this plugin.
24
+ */
25
+ export default class Permissions extends ContextPlugin {
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): 'Permissions';
30
+ /**
31
+ * Sets permissions for editor/context instance with given `channelId`.
32
+ *
33
+ * If `channelId` is not set, the channel id of the editor/context to which the plugin was added will be used.
34
+ * This means that it is not required if the plugin is added to the editor configuration and {@link module:core/context~Context}
35
+ * is not used.
36
+ *
37
+ * @param permissions Permissions to set.
38
+ * @param channelId The channel ID.
39
+ */
40
+ setPermissions(permissions: Array<string>, channelId?: string): void;
41
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2c0c=['commands','editors','context','isEnabled','config','setAdminPermissions','addCommentThread','pluginName','no-permissions','CommentsOnly','comment:write','enableReadOnlyMode','collaboration.channelId','includes','CommentsRepository','plugins','Permissions','noPermissions','forceDisabled','comment:admin','switchReadOnly','get','has','permissions-set-permissions-invalid-channel-id'];(function(_0x55323e,_0x2c0c88){const _0x543be4=function(_0x2b5864){while(--_0x2b5864){_0x55323e['push'](_0x55323e['shift']());}};_0x543be4(++_0x2c0c88);}(_0x2c0c,0x1ca));const _0x543b=function(_0x55323e,_0x2c0c88){_0x55323e=_0x55323e-0x0;let _0x543be4=_0x2c0c[_0x55323e];return _0x543be4;};import{ContextPlugin as _0x278787,Editor as _0x19ca36}from'ckeditor5/src/core';import{CKEditorError as _0x2685aa}from'ckeditor5/src/utils';export default class i extends _0x278787{static get[_0x543b('0x5')](){return _0x543b('0xe');}['setPermissions'](_0x4fedb3,_0x5aecf0){let _0x23f6d7;if(_0x5aecf0||(_0x5aecf0=this[_0x543b('0x0')][_0x543b('0x2')][_0x543b('0x13')]('collaboration.channelId')),this[_0x543b('0x0')][_0x543b('0x2')][_0x543b('0x13')]('collaboration.channelId')==_0x5aecf0?_0x23f6d7=this[_0x543b('0x0')]:this['context']['editors']&&(_0x23f6d7=this[_0x543b('0x0')][_0x543b('0x17')]['find'](_0x2765dc=>_0x2765dc[_0x543b('0x2')][_0x543b('0x13')](_0x543b('0xa'))==_0x5aecf0)),!_0x23f6d7)throw new _0x2685aa(_0x543b('0x15'),null);const _0x38fdd0=_0x23f6d7[_0x543b('0xd')],_0xb33554=_0x23f6d7 instanceof _0x19ca36,_0x3f88b7=_0x38fdd0[_0x543b('0x14')]('CommentsRepository')&&_0x38fdd0[_0x543b('0x13')](_0x543b('0xc')),_0x2be1a0=_0x38fdd0[_0x543b('0x14')](_0x543b('0x7'))&&_0x38fdd0[_0x543b('0x13')](_0x543b('0x7')),_0x7be03f=_0x4fedb3[_0x543b('0xb')]('document:write'),_0x967fa0=_0x4fedb3['includes'](_0x543b('0x11')),_0xf11077=_0x4fedb3[_0x543b('0xb')](_0x543b('0x8'))||_0x967fa0;(_0x2be1a0&&(_0x2be1a0[_0x543b('0x1')]=!_0x7be03f&&_0xf11077),_0xb33554)&&(!(_0x7be03f||_0xf11077&&_0x3f88b7)?_0x23f6d7[_0x543b('0x9')](_0x543b('0x6')):_0x23f6d7['disableReadOnlyMode'](_0x543b('0x6')));if(_0x3f88b7){_0x3f88b7[_0x543b('0x12')](!_0xf11077,_0x5aecf0),_0x3f88b7[_0x543b('0x3')](_0x967fa0,_0x5aecf0);const _0x5d09ba=_0xb33554&&_0x23f6d7[_0x543b('0x16')][_0x543b('0x13')](_0x543b('0x4'));_0x5d09ba&&(_0xf11077?_0x5d09ba['clearForceDisabled'](_0x543b('0xf')):_0x5d09ba[_0x543b('0x10')](_0x543b('0xf')));}}}
23
+ const _0x3d36=['config','setPermissions','enableReadOnlyMode','includes','no-permissions','CommentsRepository','CommentsOnly','plugins','document:write','context','pluginName','has','collaboration.channelId','noPermissions','editors','comment:admin','get','isEnabled','commands','permissions-set-permissions-invalid-channel-id','find','comment:modify_all'];(function(_0xe23f37,_0x3d3633){const _0x1028b0=function(_0x4416d2){while(--_0x4416d2){_0xe23f37['push'](_0xe23f37['shift']());}};_0x1028b0(++_0x3d3633);}(_0x3d36,0x9f));const _0x1028=function(_0xe23f37,_0x3d3633){_0xe23f37=_0xe23f37-0x0;let _0x1028b0=_0x3d36[_0xe23f37];return _0x1028b0;};import{ContextPlugin as _0x34fc5c,Editor as _0x4044eb}from'ckeditor5/src/core';import{CKEditorError as _0x44bee8}from'ckeditor5/src/utils';export default class n extends _0x34fc5c{static get[_0x1028('0x5')](){return'Permissions';}[_0x1028('0x12')](_0x11981e,_0x163ad2){let _0x2bdfe8;if(_0x163ad2||(_0x163ad2=this[_0x1028('0x4')][_0x1028('0x11')][_0x1028('0xb')]('collaboration.channelId')),this[_0x1028('0x4')][_0x1028('0x11')][_0x1028('0xb')](_0x1028('0x7'))==_0x163ad2?_0x2bdfe8=this[_0x1028('0x4')]:'editors'in this['context']&&this[_0x1028('0x4')][_0x1028('0x9')]&&(_0x2bdfe8=this[_0x1028('0x4')][_0x1028('0x9')][_0x1028('0xf')](_0x435782=>_0x435782[_0x1028('0x11')]['get']('collaboration.channelId')==_0x163ad2)),!_0x2bdfe8)throw new _0x44bee8(_0x1028('0xe'),null);const _0xba20b9=_0x2bdfe8[_0x1028('0x2')],_0x1229da=_0xba20b9['has'](_0x1028('0x0'))?_0xba20b9[_0x1028('0xb')](_0x1028('0x0')):void 0x0,_0x598c57=_0xba20b9[_0x1028('0x6')](_0x1028('0x1'))&&_0xba20b9[_0x1028('0xb')]('CommentsOnly'),_0x2f2678=_0x11981e[_0x1028('0x14')](_0x1028('0x3')),_0x45576f=_0x11981e[_0x1028('0x14')](_0x1028('0x10')),_0x77bc7f=_0x11981e[_0x1028('0x14')](_0x1028('0xa')),_0x48504c=_0x11981e[_0x1028('0x14')]('comment:write'),_0x9cf107=_0x48504c||_0x77bc7f,_0x1ee14b=_0x9cf107||_0x45576f;(_0x598c57&&(_0x598c57[_0x1028('0xc')]=!_0x2f2678&&_0x1ee14b),_0x2bdfe8 instanceof _0x4044eb)&&(!(_0x2f2678||_0x1ee14b&&_0x1229da)?_0x2bdfe8[_0x1028('0x13')](_0x1028('0x15')):_0x2bdfe8['disableReadOnlyMode'](_0x1028('0x15')));if(_0x1229da){_0x1229da[_0x1028('0x12')]({'admin':_0x77bc7f,'modifyAll':_0x45576f,'write':_0x48504c},_0x163ad2);const _0xfd9124=_0x2bdfe8 instanceof _0x4044eb&&_0x2bdfe8[_0x1028('0xd')][_0x1028('0xb')]('addCommentThread');_0xfd9124&&(_0x9cf107?_0xfd9124['clearForceDisabled'](_0x1028('0x8')):_0xfd9124['forceDisabled']('noPermissions'));}}}
@@ -0,0 +1,8 @@
1
+ import '../theme/suggestion.css';
2
+ import '../theme/suggestionmarker.css';
3
+ import '../theme/integrations/image.css';
4
+ import '../theme/integrations/horizontalline.css';
5
+ import '../theme/integrations/mediaembed.css';
6
+ import '../theme/integrations/pagebreak.css';
7
+ import '../theme/integrations/table.css';
8
+ import '../theme/integrations/codeblock.css';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @module collaboration-core/users/view/userview
3
+ */
4
+ import { View, type TemplateDefinition } from 'ckeditor5/src/ui';
5
+ import type { Locale } from 'ckeditor5/src/utils';
6
+ import type { User } from '../../users';
7
+ import '../../../theme/users.css';
8
+ export default class UserView extends View {
9
+ name: string;
10
+ notificationView: TemplateDefinition | null;
11
+ constructor(locale: Locale, user: User, notificationText?: null | string);
12
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5e7c=['ck-user__anonymous','ck\x20ck-user__name','ck\x20ck-user__name\x20ck-user__name--hidden','ck-user','initials','div','url(\x27','name','avatar','isAnonymous','extendTemplate','push','ck-user__img','content','ck-user__avatar','notificationView'];(function(_0x1abb0e,_0x5e7c68){const _0x330a93=function(_0xf30bbc){while(--_0xf30bbc){_0x1abb0e['push'](_0x1abb0e['shift']());}};_0x330a93(++_0x5e7c68);}(_0x5e7c,0xd4));const _0x330a=function(_0x1abb0e,_0x5e7c68){_0x1abb0e=_0x1abb0e-0x0;let _0x330a93=_0x5e7c[_0x1abb0e];return _0x330a93;};import{View as _0xc79341,IconView as _0x1deed0}from'ckeditor5/src/ui';import _0x20979f from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class w extends _0xc79341{constructor(_0xb5ce27,_0x552339,_0x1d8408){super(_0xb5ce27),this['name']=_0x552339[_0x330a('0x3')],this[_0x330a('0xb')]=null;const _0x2e7058=['ck',_0x330a('0x8')];if(_0x552339[_0x330a('0x5')]&&_0x2e7058[_0x330a('0x7')](_0x330a('0xc')),_0x552339['avatar']&&_0x2e7058[_0x330a('0x7')](_0x330a('0xa')),_0x1d8408){const _0x1e0f3c=new _0x1deed0();_0x1e0f3c[_0x330a('0x6')]({'attributes':{'class':['ck-user__icon']}}),_0x1e0f3c[_0x330a('0x9')]=_0x20979f,this[_0x330a('0xb')]={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x1d8408},'children':[_0x1e0f3c]};}const _0x10c29d=[{'tag':_0x330a('0x1'),'attributes':{'class':_0x2e7058,'style':{'background-image':_0x552339['avatar']?_0x330a('0x2')+_0x552339[_0x330a('0x4')]+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x552339[_0x330a('0x4')]?_0x330a('0xe'):_0x330a('0xd')},'children':[{'text':_0x552339[_0x330a('0x0')]}]}];this[_0x330a('0xb')]&&_0x10c29d[_0x330a('0x7')](this[_0x330a('0xb')]),this['setTemplate']({'tag':'div','attributes':{'class':['ck',_0x330a('0xf')],'data-user-id':_0x552339['id']},'children':_0x10c29d});}}
23
+ const _0x36a5=['initials','ck-user','setTemplate','ck-user__anonymous','avatar','content','push','name','ck-user__notification','isAnonymous','notificationView','ck\x20ck-user__name\x20ck-user__name--hidden','div','extendTemplate'];(function(_0x18b9f7,_0x36a598){const _0xb20e2=function(_0x127122){while(--_0x127122){_0x18b9f7['push'](_0x18b9f7['shift']());}};_0xb20e2(++_0x36a598);}(_0x36a5,0xcb));const _0xb20e=function(_0x18b9f7,_0x36a598){_0x18b9f7=_0x18b9f7-0x0;let _0xb20e2=_0x36a5[_0x18b9f7];return _0xb20e2;};import{View as _0xdf60e2,IconView as _0x3b3e81}from'ckeditor5/src/ui';import _0x3475c3 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class $ extends _0xdf60e2{constructor(_0x3b55fc,_0x2be1d2,_0x2924fc){super(_0x3b55fc),this[_0xb20e('0x0')]=_0x2be1d2['name'],this[_0xb20e('0x3')]=null;const _0x1497f1=['ck','ck-user__img'];if(_0x2be1d2[_0xb20e('0x2')]&&_0x1497f1['push'](_0xb20e('0xa')),_0x2be1d2['avatar']&&_0x1497f1[_0xb20e('0xd')]('ck-user__avatar'),_0x2924fc){const _0x6fa6f5=new _0x3b3e81();_0x6fa6f5[_0xb20e('0x6')]({'attributes':{'class':['ck-user__icon']}}),_0x6fa6f5[_0xb20e('0xc')]=_0x3475c3,this['notificationView']={'tag':'div','attributes':{'class':['ck',_0xb20e('0x1')],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x2924fc},'children':[_0x6fa6f5]};}const _0x2fb875=[{'tag':_0xb20e('0x5'),'attributes':{'class':_0x1497f1,'style':{'background-image':_0x2be1d2['avatar']?'url(\x27'+_0x2be1d2[_0xb20e('0xb')]+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x2be1d2[_0xb20e('0xb')]?_0xb20e('0x4'):'ck\x20ck-user__name'},'children':[{'text':_0x2be1d2[_0xb20e('0x7')]}]}];this[_0xb20e('0x3')]&&_0x2fb875[_0xb20e('0xd')](this[_0xb20e('0x3')]),this[_0xb20e('0x9')]({'tag':_0xb20e('0x5'),'attributes':{'class':['ck',_0xb20e('0x8')],'data-user-id':_0x2be1d2['id']},'children':_0x2fb875});}}
package/src/users.d.ts ADDED
@@ -0,0 +1,145 @@
1
+ /**
2
+ * @module collaboration-core/users
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin, type ContextPluginDependencies, type Context, type Editor } from 'ckeditor5/src/core';
6
+ import { Collection } from 'ckeditor5/src/utils';
7
+ import '../theme/usercolors.css';
8
+ /**
9
+ * The `Users` plugin provides the basic interface for setting and getting users involved in the document editing process.
10
+ */
11
+ export default class Users extends ContextPlugin {
12
+ licenseKey: string;
13
+ /**
14
+ * Holds all {@link module:collaboration-core/users~User users} added to the editor.
15
+ *
16
+ * ```ts
17
+ * for ( const user of editor.plugins.get( 'Users' ).users ) {
18
+ * console.log( user.name );
19
+ * }
20
+ * ```
21
+ *
22
+ * Use {@link #addUser} to add a new user.
23
+ */
24
+ readonly users: Collection<User>;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): 'Users';
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get requires(): ContextPluginDependencies;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ constructor(context: Context | Editor);
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ init(): void;
41
+ /**
42
+ * A reference to the local user or `null` if it has not been set.
43
+ */
44
+ get me(): User | null;
45
+ /**
46
+ * Adds a new user to the list of users.
47
+ */
48
+ addUser({ id, name, ...additionalData }: Partial<UserData>): User;
49
+ /**
50
+ * Returns the user with a given ID.
51
+ */
52
+ getUser(id: string): User | null;
53
+ /**
54
+ * Sets an anonymous user as {@link #me}.
55
+ *
56
+ * The user's ID will be set to the value of `config.users.anonymousUserId` property.
57
+ */
58
+ useAnonymousUser(): void;
59
+ /**
60
+ * Sets the user with the given ID as the local user ({@link #me}).
61
+ *
62
+ * The local user can be only set once (this includes setting anonymous as the local user).
63
+ */
64
+ defineMe(userId: string): void;
65
+ /**
66
+ * Returns the author of the operation. It returns {@link #me} by default if it is not overwritten.
67
+ */
68
+ getOperationAuthor(): User | null;
69
+ /**
70
+ * @inheritDoc
71
+ */
72
+ destroy(): void;
73
+ }
74
+ /**
75
+ * The representation of a single user that is involved in document editing.
76
+ */
77
+ export declare class User {
78
+ /**
79
+ * The ID of the user.
80
+ */
81
+ id: string;
82
+ /**
83
+ * CSS colors classes object for the user.
84
+ */
85
+ color: Color;
86
+ /**
87
+ * The name of the user.
88
+ */
89
+ name: string;
90
+ /**
91
+ * The URL pointing to the image with the avatar of the user.
92
+ *
93
+ * If avatar is not set, default avatar is used.
94
+ */
95
+ avatar: string | undefined;
96
+ /**
97
+ * @param data User data.
98
+ * @param data.id The ID of the user.
99
+ * @param data.color A helper object to generate CSS classes with the user color in the UI.
100
+ * @param data.name The name of the user.
101
+ * @param data.avatar The URL to the user avatar.
102
+ */
103
+ constructor(data: UserData);
104
+ /**
105
+ * Is `true` for the anonymous user, `false` otherwise.
106
+ */
107
+ get isAnonymous(): boolean;
108
+ /**
109
+ * The initials of the user.
110
+ *
111
+ * The initials are composed from the user name's first and last words:
112
+ *
113
+ * * for `Joe Doe`, the initials are `JD`,
114
+ * * for `Anonymous` the initials are `A`,
115
+ * * for `Katie John-Newman` the initials are `KJ`,
116
+ * * for `Adam Daniel Smith` the initials are `AS`.
117
+ */
118
+ get initials(): string;
119
+ }
120
+ /**
121
+ * The color object used to generate specified CSS classes with an individual color number assigned to the user.
122
+ */
123
+ declare class Color {
124
+ constructor(colorId: number);
125
+ /**
126
+ * Returns CSS class for user avatar background color.
127
+ */
128
+ getBackgroundColorClass(): string;
129
+ /**
130
+ * Returns CSS class for user selection highlight (the selected range).
131
+ */
132
+ getSelectionClass(): string;
133
+ /**
134
+ * Returns CSS class for user caret position element (the pipe).
135
+ */
136
+ getMarkerClass(): string;
137
+ }
138
+ type UserData = {
139
+ id: string;
140
+ color: Color;
141
+ name: string;
142
+ avatar?: string;
143
+ _isAnonymous?: boolean;
144
+ };
145
+ export {};
package/src/users.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x48e7=['_lastColor','name','trial-license-key-reached-limit-revisions','_getNextColor','context','trim','config','ck-user__marker--','_isAnonymous','_locale','invalid-license-key','licenseKeyTrialLimit:time','_licenseKeyCheckInterval','get','licenseKeyInvalid','destroy','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.','color','locale','init','anonymous-user','users.colorsCount','users-me-already-defined','useAnonymousUser','users-add-duplicated-id','_getInitial','_myId','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:revisions','users-add-invalid-id','avatar','has','_id','toUpperCase','Users','getMarkerClass','getUser','includes','length','define','Anonymous','trial-license-key-reached-limit-time','_addAnonymousUser','users.anonymousUserId','licenseKeyTrial','licenseKeyValid','defineMe','getOperationAuthor','requires','trial-license-key-reached-limit-changes','users','add','initials','users-me-missing-user','ck-user__selection--','licenseKey','addUser','split','ck-user__bg-color--','getBackgroundColorClass'];(function(_0x5cc25a,_0x48e7c7){const _0x11fa9e=function(_0x464de7){while(--_0x464de7){_0x5cc25a['push'](_0x5cc25a['shift']());}};_0x11fa9e(++_0x48e7c7);}(_0x48e7,0x1ea));const _0x11fa=function(_0x5cc25a,_0x48e7c7){_0x5cc25a=_0x5cc25a-0x0;let _0x11fa9e=_0x48e7[_0x5cc25a];return _0x11fa9e;};import{ContextPlugin as _0x328fac}from'ckeditor5/src/core';import{Collection as _0x377eb5,CKEditorError as _0x5148cb}from'ckeditor5/src/utils';import _0x571e12 from'./permissions';import{getTranslation as _0x5c1440}from'./utils/common-translations';import'../theme/usercolors.css';export default class l extends _0x328fac{static get['pluginName'](){return _0x11fa('0x18');}static get[_0x11fa('0x26')](){return[_0x571e12];}constructor(_0x14d6a8){super(_0x14d6a8),_0x14d6a8[_0x11fa('0x38')]['define'](_0x11fa('0x21'),_0x11fa('0xa')),_0x14d6a8[_0x11fa('0x38')][_0x11fa('0x1d')]('users.colorsCount',0x8),this[_0x11fa('0x28')]=new _0x377eb5(),this[_0x11fa('0x3b')]=_0x14d6a8[_0x11fa('0x8')],this[_0x11fa('0x2')]=null,this[_0x11fa('0x32')]=0x0,this[_0x11fa('0x10')]=null,this['decorate']('getOperationAuthor');}[_0x11fa('0x9')](){const _0x25bad9=this[_0x11fa('0x36')];this[_0x11fa('0x2d')]=_0x25bad9[_0x11fa('0x38')]['get'](_0x11fa('0x2d'));const _0xd1ee3a=[_0x11fa('0x22'),_0x11fa('0x4'),_0x11fa('0x23'),'licenseKeyTrialLimit:operations',_0x11fa('0x1'),_0x11fa('0x12')];this[_0x11fa('0x2')]=setInterval(()=>{let _0x3efd92;for(const _0x88b303 in _0x25bad9){const _0x10d2b6=_0x25bad9[_0x88b303];if(_0xd1ee3a[_0x11fa('0x1b')](_0x10d2b6)){delete _0x25bad9[_0x88b303],_0x3efd92=_0x10d2b6;break;}}if(_0x11fa('0x4')===_0x3efd92)throw clearInterval(this[_0x11fa('0x2')]),new _0x5148cb(_0x11fa('0x0'),null);if(_0x11fa('0x22')===_0x3efd92&&console['info'](_0x11fa('0x6')),_0x11fa('0x11')===_0x3efd92)throw clearInterval(this[_0x11fa('0x2')]),new _0x5148cb(_0x11fa('0x27'),null);if(_0x11fa('0x1')===_0x3efd92)throw clearInterval(this[_0x11fa('0x2')]),new _0x5148cb(_0x11fa('0x1f'),null);if(_0x11fa('0x12')===_0x3efd92)throw clearInterval(this[_0x11fa('0x2')]),new _0x5148cb(_0x11fa('0x34'),null);'licenseKeyValid'===_0x3efd92&&clearInterval(this[_0x11fa('0x2')]);},0x3e8),this[_0x11fa('0x20')]();}get['me'](){return null==this[_0x11fa('0x10')]?null:this[_0x11fa('0x1a')](this[_0x11fa('0x10')]);}[_0x11fa('0x2e')](_0x1128d2){if(!(_0x1128d2=Object['assign']({},_0x1128d2,{'color':this['_getNextColor']()}))['id']||'string'!=typeof _0x1128d2['id'])throw new _0x5148cb(_0x11fa('0x13'));if(this[_0x11fa('0x28')][_0x11fa('0x15')](_0x1128d2['id']))throw new _0x5148cb(_0x11fa('0xe'),null,{'id':_0x1128d2['id']});_0x1128d2[_0x11fa('0x33')]=function(_0x6af49,_0x15686f=''){return''==(_0x15686f=_0x15686f[_0x11fa('0x37')]())?_0x5c1440(_0x6af49,_0x11fa('0x1e')):_0x15686f;}(this[_0x11fa('0x3b')],_0x1128d2[_0x11fa('0x33')]);const _0x2965d5=new u(_0x1128d2);return this[_0x11fa('0x28')][_0x11fa('0x29')](_0x2965d5),_0x2965d5;}[_0x11fa('0x1a')](_0x113e35){return this[_0x11fa('0x28')][_0x11fa('0x3')](_0x113e35);}[_0x11fa('0xd')](){const _0x5b05b2=this[_0x11fa('0x36')][_0x11fa('0x38')]['get'](_0x11fa('0x21'));this[_0x11fa('0x10')]||this[_0x11fa('0x24')](_0x5b05b2);}[_0x11fa('0x24')](_0x1ddbe1){if(this['_myId'])throw new _0x5148cb(_0x11fa('0xc'),null);if(!this[_0x11fa('0x1a')](_0x1ddbe1))throw new _0x5148cb(_0x11fa('0x2b'),null);this[_0x11fa('0x10')]=_0x1ddbe1;}[_0x11fa('0x25')](){return this['me'];}[_0x11fa('0x5')](){super['destroy'](),clearInterval(this[_0x11fa('0x2')]);}[_0x11fa('0x35')](){const _0x326798=this[_0x11fa('0x36')]['config'][_0x11fa('0x3')](_0x11fa('0xb'));return this[_0x11fa('0x32')]>=_0x326798&&(this['_lastColor']=0x0),new a(this[_0x11fa('0x32')]++);}[_0x11fa('0x20')](){const _0x555657=this[_0x11fa('0x36')][_0x11fa('0x38')]['get'](_0x11fa('0x21'));this[_0x11fa('0x2e')]({'id':_0x555657,'name':_0x5c1440(this['_locale'],_0x11fa('0x1e'))})[_0x11fa('0x3a')]=!0x0;}}class u{constructor(_0x1c5ba7){this['id']=_0x1c5ba7['id'],this[_0x11fa('0x7')]=_0x1c5ba7[_0x11fa('0x7')],this[_0x11fa('0x33')]=_0x1c5ba7[_0x11fa('0x33')],this['avatar']=_0x1c5ba7[_0x11fa('0x14')],this[_0x11fa('0x3a')]=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get[_0x11fa('0x2a')](){const _0x508cf4=this['name'][_0x11fa('0x2f')]('\x20');return 0x1===_0x508cf4[_0x11fa('0x1c')]?this[_0x11fa('0xf')](_0x508cf4[0x0]):this[_0x11fa('0xf')](_0x508cf4[0x0])+this['_getInitial'](_0x508cf4[_0x508cf4[_0x11fa('0x1c')]-0x1]);}[_0x11fa('0xf')](_0x171dce){return _0x171dce['charAt'](0x0)[_0x11fa('0x17')]();}}class a{constructor(_0x871c6f){this['_id']=_0x871c6f;}[_0x11fa('0x31')](){return _0x11fa('0x30')+this['_id'];}['getSelectionClass'](){return _0x11fa('0x2c')+this[_0x11fa('0x16')];}[_0x11fa('0x19')](){return _0x11fa('0x39')+this[_0x11fa('0x16')];}}
23
+ const _0x2abd=['add','trial-license-key-reached-limit-time','licenseKeyValid','requires','includes','context','users-add-duplicated-id','locale','users','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.','info','name','trial-license-key-reached-limit-changes','users-me-missing-user','_lastColor','getMarkerClass','licenseKeyTrialLimit:revisions','anonymous-user','define','licenseKeyInvalid','Anonymous','addUser','isAnonymous','has','config','_myId','getSelectionClass','getBackgroundColorClass','color','invalid-license-key','_getInitial','toUpperCase','destroy','getUser','avatar','pluginName','_addAnonymousUser','users-me-already-defined','licenseKeyTrialLimit:operations','useAnonymousUser','_isAnonymous','licenseKey','_id','users-add-invalid-id','users.colorsCount','licenseKeyTrial','_licenseKeyCheckInterval','ck-user__selection--','users.anonymousUserId','trim','_locale','defineMe','length','decorate','split','Users','licenseKeyTrialLimit:time','string','get'];(function(_0x4f0f16,_0x2abdf5){const _0x57d86f=function(_0x25c8ca){while(--_0x25c8ca){_0x4f0f16['push'](_0x4f0f16['shift']());}};_0x57d86f(++_0x2abdf5);}(_0x2abd,0x1b0));const _0x57d8=function(_0x4f0f16,_0x2abdf5){_0x4f0f16=_0x4f0f16-0x0;let _0x57d86f=_0x2abd[_0x4f0f16];return _0x57d86f;};import{ContextPlugin as _0x34d480}from'ckeditor5/src/core';import{Collection as _0x3abf4a,CKEditorError as _0x3d6cea}from'ckeditor5/src/utils';import _0xe2efc2 from'./permissions';import{getTranslation as _0xb27d}from'./utils/common-translations';import'../theme/usercolors.css';export default class l extends _0x34d480{static get[_0x57d8('0x10')](){return _0x57d8('0x24');}static get[_0x57d8('0x2b')](){return[_0xe2efc2];}constructor(_0x2da5bb){super(_0x2da5bb),this[_0x57d8('0x2d')]['config'][_0x57d8('0x3a')](_0x57d8('0x1d'),_0x57d8('0x39')),this[_0x57d8('0x2d')]['config'][_0x57d8('0x3a')]('users.colorsCount',0x8),this[_0x57d8('0x30')]=new _0x3abf4a(),this[_0x57d8('0x1f')]=_0x2da5bb[_0x57d8('0x2f')],this[_0x57d8('0x1b')]=null,this[_0x57d8('0x36')]=0x0,this[_0x57d8('0x6')]=null,this[_0x57d8('0x22')]('getOperationAuthor');}['init'](){const _0x507149=this[_0x57d8('0x2d')];this[_0x57d8('0x16')]=_0x507149[_0x57d8('0x5')][_0x57d8('0x27')]('licenseKey');const _0x1da112=[_0x57d8('0x1a'),_0x57d8('0x0'),_0x57d8('0x2a'),_0x57d8('0x13'),_0x57d8('0x25'),'licenseKeyTrialLimit:revisions'];this[_0x57d8('0x1b')]=setInterval(()=>{let _0x5a596f;for(const _0xfab245 in _0x507149){const _0x5407b3=_0x507149[_0xfab245];if(_0x1da112[_0x57d8('0x2c')](_0x5407b3)){delete _0x507149[_0xfab245],_0x5a596f=_0x5407b3;break;}}if(_0x57d8('0x0')===_0x5a596f)throw clearInterval(this[_0x57d8('0x1b')]),new _0x3d6cea(_0x57d8('0xa'),null);if(_0x57d8('0x1a')===_0x5a596f&&console[_0x57d8('0x32')](_0x57d8('0x31')),'licenseKeyTrialLimit:operations'===_0x5a596f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3d6cea(_0x57d8('0x34'),null);if(_0x57d8('0x25')===_0x5a596f)throw clearInterval(this[_0x57d8('0x1b')]),new _0x3d6cea(_0x57d8('0x29'),null);if(_0x57d8('0x38')===_0x5a596f)throw clearInterval(this[_0x57d8('0x1b')]),new _0x3d6cea('trial-license-key-reached-limit-revisions',null);_0x57d8('0x2a')===_0x5a596f&&clearInterval(this[_0x57d8('0x1b')]);},0x3e8),this[_0x57d8('0x11')]();}get['me'](){return null==this['_myId']?null:this[_0x57d8('0xe')](this['_myId']);}[_0x57d8('0x2')]({id:_0x38e240,name:_0x4f5db9,..._0xab90a0}){if(!_0x38e240||_0x57d8('0x26')!=typeof _0x38e240)throw new _0x3d6cea(_0x57d8('0x18'));if(this[_0x57d8('0x30')][_0x57d8('0x4')](_0x38e240))throw new _0x3d6cea(_0x57d8('0x2e'),null,{'id':_0x38e240});const _0x2962af={..._0xab90a0,'id':_0x38e240,'name':a(this[_0x57d8('0x1f')],_0x4f5db9),'color':this['_getNextColor']()};_0x2962af[_0x57d8('0x33')]=a(this[_0x57d8('0x1f')],_0x2962af[_0x57d8('0x33')]);const _0x3133cf=new User(_0x2962af);return this['users'][_0x57d8('0x28')](_0x3133cf),_0x3133cf;}[_0x57d8('0xe')](_0x56a203){return this[_0x57d8('0x30')][_0x57d8('0x27')](_0x56a203);}[_0x57d8('0x14')](){const _0x203332=this['context'][_0x57d8('0x5')]['get'](_0x57d8('0x1d'));this['_myId']||this[_0x57d8('0x20')](_0x203332);}[_0x57d8('0x20')](_0x3d80b3){if(this['_myId'])throw new _0x3d6cea(_0x57d8('0x12'),null);if(!this['getUser'](_0x3d80b3))throw new _0x3d6cea(_0x57d8('0x35'),null);this[_0x57d8('0x6')]=_0x3d80b3;}['getOperationAuthor'](){return this['me'];}[_0x57d8('0xd')](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x2d9808=this['context'][_0x57d8('0x5')][_0x57d8('0x27')](_0x57d8('0x19'));return this[_0x57d8('0x36')]>=_0x2d9808&&(this['_lastColor']=0x0),new u(this[_0x57d8('0x36')]++);}[_0x57d8('0x11')](){const _0x1608cc=this[_0x57d8('0x2d')][_0x57d8('0x5')]['get'](_0x57d8('0x1d'));this[_0x57d8('0x2')]({'id':_0x1608cc,'name':_0xb27d(this['_locale'],_0x57d8('0x1'))})[_0x57d8('0x15')]=!0x0;}}export class User{constructor(_0x1c9478){this['id']=_0x1c9478['id'],this['color']=_0x1c9478[_0x57d8('0x9')],this[_0x57d8('0x33')]=_0x1c9478[_0x57d8('0x33')],this[_0x57d8('0xf')]=_0x1c9478[_0x57d8('0xf')],this[_0x57d8('0x15')]=!0x1;}get[_0x57d8('0x3')](){return this[_0x57d8('0x15')];}get['initials'](){const _0x5fdd93=this[_0x57d8('0x33')][_0x57d8('0x23')]('\x20');return 0x1===_0x5fdd93['length']?this[_0x57d8('0xb')](_0x5fdd93[0x0]):this[_0x57d8('0xb')](_0x5fdd93[0x0])+this[_0x57d8('0xb')](_0x5fdd93[_0x5fdd93[_0x57d8('0x21')]-0x1]);}[_0x57d8('0xb')](_0x48113f){return _0x48113f['charAt'](0x0)[_0x57d8('0xc')]();}}function a(_0x3b8b17,_0x1b5e69=''){return''==(_0x1b5e69=_0x1b5e69[_0x57d8('0x1e')]())?_0xb27d(_0x3b8b17,_0x57d8('0x1')):_0x1b5e69;}class u{constructor(_0x439401){this[_0x57d8('0x17')]=_0x439401;}[_0x57d8('0x8')](){return'ck-user__bg-color--'+this[_0x57d8('0x17')];}[_0x57d8('0x7')](){return _0x57d8('0x1c')+this[_0x57d8('0x17')];}[_0x57d8('0x37')](){return'ck-user__marker--'+this['_id'];}}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @module collaboration-core/utils/common-translations
3
+ */
4
+ import type { Locale } from 'ckeditor5/src/utils';
5
+ export declare function getTranslation(locale: Locale, id: string): string;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x2bab77,_0x8192c){const t=_0x2bab77['t'];switch(_0x8192c){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');}}
23
+ export function getTranslation(_0x391ede,_0x451bca){const t=_0x391ede['t'];switch(_0x451bca){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module comments/comments/ui/view/confirmmixin
3
+ */
4
+ import type { View } from 'ckeditor5/src/ui';
5
+ import type { Locale, Mixed } from 'ckeditor5/src/utils';
6
+ /**
7
+ * Adds interface for showing confirmation view in the specific for `CommentThreadView` and `CommentView` structure
8
+ * Confirm is always set to the `content` collection at the last position.
9
+ */
10
+ export default function ConfirmMixin<Base extends new (...args: Array<any>) => View>(base: Base): Mixed<Base, ConfirmApi>;
11
+ export interface ConfirmApi {
12
+ isConfirm: boolean;
13
+ locale: Locale;
14
+ showConfirm(message: string, element: Element): Promise<unknown>;
15
+ cancelConfirm(): void;
16
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x41c4=['destroy','element','deregisterChild','registerChild','confirmView','set','once','remove','cancel','render','_removeConfirm','locale','focus','submit','fire','message','isConfirm'];(function(_0x138aa6,_0x41c448){var _0x30b375=function(_0x22d376){while(--_0x22d376){_0x138aa6['push'](_0x138aa6['shift']());}};_0x30b375(++_0x41c448);}(_0x41c4,0xb6));var _0x30b3=function(_0x138aa6,_0x41c448){_0x138aa6=_0x138aa6-0x0;var _0x30b375=_0x41c4[_0x138aa6];return _0x30b375;};import _0x4aecb5 from'./confirmview';export default{'showConfirm'(_0x36e039,_0x14022d){return this[_0x30b3('0x9')]=new _0x4aecb5(this[_0x30b3('0x10')]),this['confirmView'][_0x30b3('0xe')](),this[_0x30b3('0x9')][_0x30b3('0x3')]=_0x36e039,this[_0x30b3('0x9')][_0x30b3('0xb')](_0x30b3('0xd'),()=>{this[_0x30b3('0xf')]();}),this[_0x30b3('0x9')][_0x30b3('0xb')](_0x30b3('0x1'),()=>{this[_0x30b3('0xf')]();}),_0x14022d['appendChild'](this[_0x30b3('0x9')]['element']),this[_0x30b3('0x8')](this[_0x30b3('0x9')]),this[_0x30b3('0xa')]('isConfirm',!0x0),new Promise(_0x1b4075=>this[_0x30b3('0x9')]['on'](_0x30b3('0x1'),_0x1b4075));},'cancelConfirm'(){this['isConfirm']&&this[_0x30b3('0x9')][_0x30b3('0x2')]('cancel');},'_removeConfirm'(){this[_0x30b3('0x6')][_0x30b3('0x0')](),this[_0x30b3('0x9')][_0x30b3('0x6')][_0x30b3('0xc')](),this[_0x30b3('0x7')](this[_0x30b3('0x9')]),this[_0x30b3('0x4')]=!0x1,this[_0x30b3('0x9')][_0x30b3('0x5')](),delete this['confirmView'];}};
23
+ var _0x193a=['once','appendChild','fire','focus','showConfirm','destroy','element','isConfirm','remove','submit','set','confirmView','_removeConfirm','cancel'];(function(_0x14fe0f,_0x193a83){var _0x23e247=function(_0x372238){while(--_0x372238){_0x14fe0f['push'](_0x14fe0f['shift']());}};_0x23e247(++_0x193a83);}(_0x193a,0xbc));var _0x23e2=function(_0x14fe0f,_0x193a83){_0x14fe0f=_0x14fe0f-0x0;var _0x23e247=_0x193a[_0x14fe0f];return _0x23e247;};import _0x36fe43 from'./confirmview';export default function m(_0x4c3848){return class extends _0x4c3848{[_0x23e2('0xc')](_0x490d16,_0x1f378a){return this[_0x23e2('0x5')]=new _0x36fe43(this['locale']),this[_0x23e2('0x5')]['render'](),this[_0x23e2('0x5')]['message']=_0x490d16,this['confirmView'][_0x23e2('0x8')](_0x23e2('0x7'),()=>{this[_0x23e2('0x6')]();}),this['confirmView'][_0x23e2('0x8')]('submit',()=>{this[_0x23e2('0x6')]();}),_0x1f378a[_0x23e2('0x9')](this['confirmView'][_0x23e2('0x0')]),this['registerChild'](this[_0x23e2('0x5')]),this[_0x23e2('0x0')]['focus'](),this[_0x23e2('0x4')](_0x23e2('0x1'),!0x0),new Promise(_0xee1cd0=>this[_0x23e2('0x5')]['on'](_0x23e2('0x3'),_0xee1cd0));}['cancelConfirm'](){this['isConfirm']&&this[_0x23e2('0x5')][_0x23e2('0xa')]('cancel');}['_removeConfirm'](){this['element']&&this[_0x23e2('0x5')]&&this[_0x23e2('0x5')]['element']&&(this[_0x23e2('0x0')][_0x23e2('0xb')](),this[_0x23e2('0x5')][_0x23e2('0x0')][_0x23e2('0x2')](),this['deregisterChild'](this[_0x23e2('0x5')]),this['isConfirm']=!0x1,this[_0x23e2('0x5')][_0x23e2('0xd')](),this[_0x23e2('0x5')]=void 0x0);}};}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @module comments/comments/ui/view/confirmview
3
+ */
4
+ import { View } from 'ckeditor5/src/ui';
5
+ import type { Locale } from 'ckeditor5/src/utils';
6
+ export default class ConfirmView extends View {
7
+ message: string;
8
+ constructor(locale: Locale);
9
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2d2d=['submitView','ck-thread__remove-confirm-','execute','check','bindTemplate','cancel','ck-thread__remove-confirm-actions','cancelView','extendTemplate','set','div','_createButtonView','fire','Yes','setTemplate','label','message','icon'];(function(_0x4c6ecf,_0x2d2d7e){const _0x18cf7e=function(_0x1fbaef){while(--_0x1fbaef){_0x4c6ecf['push'](_0x4c6ecf['shift']());}};_0x18cf7e(++_0x2d2d7e);}(_0x2d2d,0x1a5));const _0x18cf=function(_0x4c6ecf,_0x2d2d7e){_0x4c6ecf=_0x4c6ecf-0x0;let _0x18cf7e=_0x2d2d[_0x4c6ecf];return _0x18cf7e;};import{View as _0x53dbb7,ButtonView as _0x5db335}from'ckeditor5/src/ui';import{icons as _0x32fc37}from'ckeditor5/src/core';import{getTranslation as _0x203094}from'./common-translations';export default class h extends _0x53dbb7{constructor(_0x3c2064){super(_0x3c2064);const _0x35582a=this[_0x18cf('0xf')];this[_0x18cf('0xb')]=this['_createButtonView'](_0x3c2064,_0x203094(_0x3c2064,_0x18cf('0x6')),_0x32fc37[_0x18cf('0xe')],'submit'),this['cancelView']=this[_0x18cf('0x4')](_0x3c2064,_0x203094(_0x3c2064,'No'),_0x32fc37[_0x18cf('0x10')],_0x18cf('0x10')),this[_0x18cf('0x2')](_0x18cf('0x9'),_0x203094(_0x3c2064,'Are\x20you\x20sure?')),this[_0x18cf('0x7')]({'tag':_0x18cf('0x3'),'attributes':{'class':['ck-thread__remove-confirm']},'children':[{'tag':_0x18cf('0x3'),'attributes':{'class':'ck-thread__remove-confirm-inner'},'children':[{'tag':'p','children':[{'text':_0x35582a['to'](_0x18cf('0x9'))}]},{'tag':_0x18cf('0x3'),'attributes':{'class':_0x18cf('0x11')},'children':[this[_0x18cf('0xb')],this[_0x18cf('0x0')]]}]}]});}['_createButtonView'](_0x156b4a,_0xbcb255,_0x523700,_0x2d459c){const _0x102ee4=new _0x5db335(_0x156b4a);return _0x102ee4[_0x18cf('0x8')]=_0xbcb255,_0x102ee4[_0x18cf('0xa')]=_0x523700,_0x102ee4[_0x18cf('0x1')]({'attributes':{'class':_0x18cf('0xc')+_0x2d459c}}),_0x102ee4['on'](_0x18cf('0xd'),()=>this[_0x18cf('0x5')](_0x2d459c)),_0x102ee4;}}
23
+ const _0x35d2=['ck-thread__remove-confirm-inner','ck-thread__remove-confirm','check','label','set','submitView','extendTemplate','bindTemplate','fire','div','ck-thread__remove-confirm-','Are\x20you\x20sure?','_createButtonView','execute','setTemplate','cancel','Yes','icon','message'];(function(_0x3e06cf,_0x35d2a5){const _0xc5d96d=function(_0x2d99e7){while(--_0x2d99e7){_0x3e06cf['push'](_0x3e06cf['shift']());}};_0xc5d96d(++_0x35d2a5);}(_0x35d2,0x168));const _0xc5d9=function(_0x3e06cf,_0x35d2a5){_0x3e06cf=_0x3e06cf-0x0;let _0xc5d96d=_0x35d2[_0x3e06cf];return _0xc5d96d;};import{View as _0x2c2089,ButtonView as _0x59f22c}from'ckeditor5/src/ui';import{icons as _0x3f4032}from'ckeditor5/src/core';import{getTranslation as _0xfb1d0b}from'./common-translations';export default class h extends _0x2c2089{constructor(_0x18091a){super(_0x18091a);const _0x240b03=this[_0xc5d9('0x8')];this['submitView']=this[_0xc5d9('0xd')](_0x18091a,_0xfb1d0b(_0x18091a,_0xc5d9('0x11')),_0x3f4032[_0xc5d9('0x3')],'submit'),this['cancelView']=this['_createButtonView'](_0x18091a,_0xfb1d0b(_0x18091a,'No'),_0x3f4032[_0xc5d9('0x10')],_0xc5d9('0x10')),this[_0xc5d9('0x5')]('message',_0xfb1d0b(_0x18091a,_0xc5d9('0xc'))),this[_0xc5d9('0xf')]({'tag':'div','attributes':{'class':[_0xc5d9('0x2')]},'children':[{'tag':_0xc5d9('0xa'),'attributes':{'class':_0xc5d9('0x1')},'children':[{'tag':'p','children':[{'text':_0x240b03['to'](_0xc5d9('0x0'))}]},{'tag':_0xc5d9('0xa'),'attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this[_0xc5d9('0x6')],this['cancelView']]}]}]});}[_0xc5d9('0xd')](_0x546b78,_0x17cbd4,_0x1f2502,_0x15f199){const _0x3691eb=new _0x59f22c(_0x546b78);return _0x3691eb[_0xc5d9('0x4')]=_0x17cbd4,_0x3691eb[_0xc5d9('0x12')]=_0x1f2502,_0x3691eb[_0xc5d9('0x7')]({'attributes':{'class':_0xc5d9('0xb')+_0x15f199}}),_0x3691eb['on'](_0xc5d9('0xe'),()=>this[_0xc5d9('0x9')](_0x15f199)),_0x3691eb;}}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @module collaboration-core/utils/getdatetimeformatter
3
+ * @publicApi
4
+ */
5
+ import type { LocaleConfig } from '../config';
6
+ /**
7
+ * Returns a function that formats the date to the set format.
8
+ *
9
+ * The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
10
+ *
11
+ * ```ts
12
+ * import format from 'date-fns/format';
13
+ *
14
+ * ClassicEditor
15
+ * .create( document.querySelector( '#editor' ), {
16
+ * toolbar: {
17
+ * items: [ 'bold', 'italic', '|', 'comment' ]
18
+ * },
19
+ * sidebar: {
20
+ * container: document.querySelector( '#sidebar' )
21
+ * },
22
+ * locale: {
23
+ * dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
24
+ * }
25
+ * } )
26
+ * .catch( error => console.error( error ) );
27
+ * ```
28
+ */
29
+ export default function getDateTimeFormatter(localeConfig?: LocaleConfig): (date: Date | string) => string;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5493=['\x27Last\x27\x20EEEE\x20hh:mma','\x27Today\x27\x20hh:mma','\x27Yesterday\x27\x20hh:mma','function','invalid-date-time-format','dateTimeFormat'];(function(_0x31ac53,_0x549346){const _0x150080=function(_0x48178f){while(--_0x48178f){_0x31ac53['push'](_0x31ac53['shift']());}};_0x150080(++_0x549346);}(_0x5493,0x134));const _0x1500=function(_0x31ac53,_0x549346){_0x31ac53=_0x31ac53-0x0;let _0x150080=_0x5493[_0x31ac53];return _0x150080;};import _0x36f42e from'date-fns/format';import _0x4df3ae from'date-fns/parseISO';import _0x227c8e from'date-fns/differenceInCalendarDays';import{CKEditorError as _0x544ddc}from'ckeditor5/src/utils';export default function E(_0x1eb6ac={}){if(void 0x0!==_0x1eb6ac[_0x1500('0x3')]&&_0x1500('0x1')!=typeof _0x1eb6ac['dateTimeFormat'])throw new _0x544ddc(_0x1500('0x2'));return _0x497284=>{const _0x4104aa='string'==typeof _0x497284?_0x4df3ae(_0x497284):_0x497284,_0x114d26=new Date(),_0x594aac=_0x227c8e(_0x114d26,_0x4104aa);return _0x1eb6ac[_0x1500('0x3')]?_0x1eb6ac['dateTimeFormat'](_0x4104aa):_0x36f42e(_0x4104aa,0x0===_0x594aac?_0x1500('0x5'):0x1===_0x594aac?_0x1500('0x0'):_0x594aac<0x7?_0x1500('0x4'):'MM-dd-yyyy\x20hh:mma');};}
23
+ const _0x3d70=['function','string','invalid-date-time-format','\x27Today\x27\x20hh:mma','\x27Yesterday\x27\x20hh:mma','MM-dd-yyyy\x20hh:mma','dateTimeFormat'];(function(_0xd93470,_0x3d708a){const _0x203d72=function(_0x15e1e9){while(--_0x15e1e9){_0xd93470['push'](_0xd93470['shift']());}};_0x203d72(++_0x3d708a);}(_0x3d70,0x9d));const _0x203d=function(_0xd93470,_0x3d708a){_0xd93470=_0xd93470-0x0;let _0x203d72=_0x3d70[_0xd93470];return _0x203d72;};import _0x1ab64e from'date-fns/format';import _0x1d1e30 from'date-fns/parseISO';import _0xfc9b6b from'date-fns/differenceInCalendarDays';import{CKEditorError as _0x2b9930}from'ckeditor5/src/utils';export default function E(_0x2134da={}){if(void 0x0!==_0x2134da[_0x203d('0x3')]&&_0x203d('0x4')!=typeof _0x2134da['dateTimeFormat'])throw new _0x2b9930(_0x203d('0x6'));return _0x1a39b5=>{const _0xd7a7a8=_0x203d('0x5')==typeof _0x1a39b5?_0x1d1e30(_0x1a39b5):_0x1a39b5,_0x5f02bd=new Date(),_0x637533=_0xfc9b6b(_0x5f02bd,_0xd7a7a8);return _0x2134da[_0x203d('0x3')]?_0x2134da['dateTimeFormat'](_0xd7a7a8):_0x1ab64e(_0xd7a7a8,0x0===_0x637533?_0x203d('0x0'):0x1===_0x637533?_0x203d('0x1'):_0x637533<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':_0x203d('0x2'));};}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @module comments/utils/getmarkerdomelement
3
+ */
4
+ import type { EditingController, Marker } from 'ckeditor5/src/engine';
5
+ /**
6
+ * Returns a first DOM element mapped with the marker.
7
+ *
8
+ * @param editing Editing controller instance.
9
+ * @param marker Marker instance.
10
+ */
11
+ export default function getMarkerDomElement(editing: EditingController, marker: Marker): HTMLElement | null;
12
+ /**
13
+ * Returns all DOM elements mapped with all given markers. DOM elements are sorted by their client rects in top-most, left-most order.
14
+ * Returns `null` if `markers` is empty or there are no DOM elements bound with the markers.
15
+ *
16
+ * Note, that markers should not intersect.
17
+ *
18
+ * @param editing Editing controller instance.
19
+ * @param markers Markers instances.
20
+ */
21
+ export declare function getAllMarkersDomElementsSorted(editing: EditingController, markers: Array<Marker>): Array<HTMLElement> | null;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x345b=['push','length','item','name','domConverter','map','mapViewToDom','values','sort','view','mapper'];(function(_0x47ff8b,_0x345bf8){const _0x4eda6f=function(_0xe1d1c7){while(--_0xe1d1c7){_0x47ff8b['push'](_0x47ff8b['shift']());}};_0x4eda6f(++_0x345bf8);}(_0x345b,0x192));const _0x4eda=function(_0x47ff8b,_0x345bf8){_0x47ff8b=_0x47ff8b-0x0;let _0x4eda6f=_0x345b[_0x47ff8b];return _0x4eda6f;};import{first as _0x340d9d}from'ckeditor5/src/utils';export default function k(_0x4f702b,_0xcc39f7){const _0x138c78=_0x4f702b['mapper']['markerNameToElements'](_0xcc39f7['name']),_0x5bd339=_0x340d9d(_0x138c78[_0x4eda('0x1')]());return _0x4f702b[_0x4eda('0x3')][_0x4eda('0x9')][_0x4eda('0x0')](_0x5bd339);}export function getAllMarkersDomElementsSorted(_0x179fae,_0x5b25fd){if(0x0===_0x5b25fd[_0x4eda('0x6')])return null;const _0x4bf158=[],_0x5f13f5=_0x179fae[_0x4eda('0x3')][_0x4eda('0x9')];for(const _0x5cb810 of _0x5b25fd){const _0x37baf8=_0x179fae[_0x4eda('0x4')]['markerNameToElements'](_0x5cb810[_0x4eda('0x8')]);if(!_0x37baf8)continue;const _0xf61062=Array['from'](_0x37baf8)[_0x4eda('0xa')](_0x1d5d95=>_0x5f13f5['mapViewToDom'](_0x1d5d95));_0x4bf158[_0x4eda('0x5')](..._0xf61062);}if(0x0===_0x4bf158['length'])return null;const _0xdfe703=[];for(const _0x14505e of _0x4bf158){const _0x234079=_0x14505e['getClientRects']()[_0x4eda('0x7')](0x0);_0x234079&&_0xdfe703[_0x4eda('0x5')]({'x':_0x234079['x'],'y':_0x234079['y'],'domElement':_0x14505e});}return 0x0===_0xdfe703[_0x4eda('0x6')]?null:(_0xdfe703[_0x4eda('0x2')]((_0x194573,_0x1d470e)=>_0x194573['y']-_0x1d470e['y']||_0x194573['x']-_0x1d470e['x']),_0xdfe703['map'](_0x373998=>_0x373998['domElement']));}
23
+ const _0x2a17=['markerNameToElements','length','values','from','push','mapper','map','mapViewToDom','getClientRects','domConverter','item','view','name'];(function(_0x35cdf6,_0x2a1732){const _0x1fb927=function(_0x5ce35c){while(--_0x5ce35c){_0x35cdf6['push'](_0x35cdf6['shift']());}};_0x1fb927(++_0x2a1732);}(_0x2a17,0x146));const _0x1fb9=function(_0x35cdf6,_0x2a1732){_0x35cdf6=_0x35cdf6-0x0;let _0x1fb927=_0x2a17[_0x35cdf6];return _0x1fb927;};import{first as _0x38bef4}from'ckeditor5/src/utils';export default function k(_0x2bfed9,_0x38887c){const _0x5684f2=_0x2bfed9[_0x1fb9('0x4')][_0x1fb9('0xc')](_0x38887c[_0x1fb9('0xb')]);if(!_0x5684f2)return null;const _0x767dd9=_0x38bef4(_0x5684f2[_0x1fb9('0x1')]());return _0x2bfed9['view']['domConverter'][_0x1fb9('0x6')](_0x767dd9)||null;}export function getAllMarkersDomElementsSorted(_0x595404,_0x290529){if(0x0===_0x290529['length'])return null;const _0x5bd567=[],_0x4be18b=_0x595404[_0x1fb9('0xa')][_0x1fb9('0x8')];for(const _0x3a1325 of _0x290529){const _0x4906e3=_0x595404[_0x1fb9('0x4')]['markerNameToElements'](_0x3a1325['name']);if(!_0x4906e3)continue;const _0x548e43=Array[_0x1fb9('0x2')](_0x4906e3)[_0x1fb9('0x5')](_0x208a4e=>_0x4be18b[_0x1fb9('0x6')](_0x208a4e))['filter'](_0x3eddc9=>!!_0x3eddc9);_0x5bd567[_0x1fb9('0x3')](..._0x548e43);}if(0x0===_0x5bd567['length'])return null;const _0x283d2d=[];for(const _0x56c6b2 of _0x5bd567){const _0x22c7fc=_0x56c6b2[_0x1fb9('0x7')]()[_0x1fb9('0x9')](0x0);_0x22c7fc&&_0x283d2d['push']({'x':_0x22c7fc['x'],'y':_0x22c7fc['y'],'domElement':_0x56c6b2});}return 0x0===_0x283d2d[_0x1fb9('0x0')]?null:(_0x283d2d['sort']((_0x9b0fc4,_0x580f87)=>_0x9b0fc4['y']-_0x580f87['y']||_0x9b0fc4['x']-_0x580f87['x']),_0x283d2d['map'](_0x510bed=>_0x510bed['domElement']));}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @module track-changes/utils/hashobject
3
+ */
4
+ export default function hashObject(obj: Record<string, unknown>): string;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2b22=['object','isArray','sort','charCodeAt','boolean','string','keys'];(function(_0x56bbbd,_0x2b2266){const _0x127fba=function(_0xe43a95){while(--_0xe43a95){_0x56bbbd['push'](_0x56bbbd['shift']());}};_0x127fba(++_0x2b2266);}(_0x2b22,0x7a));const _0x127f=function(_0x56bbbd,_0x2b2266){_0x56bbbd=_0x56bbbd-0x0;let _0x127fba=_0x2b22[_0x56bbbd];return _0x127fba;};export default function b(_0x13e435){let _0x594eb3=0x0,_0x4cdf22=0x0;for(const _0x359837 of g(_0x13e435))_0x594eb3=(_0x594eb3<<0x5)-_0x594eb3+_0x359837,_0x594eb3&=_0x594eb3,[_0x594eb3,_0x4cdf22]=[_0x4cdf22,_0x594eb3];return O(_0x594eb3)+O(_0x4cdf22);}function*j(_0x116054){_0x116054?_0x127f('0x1')==typeof _0x116054?yield 0x1:Array[_0x127f('0x5')](_0x116054)?yield*function*(_0x5d8fb0){for(const _0x33cb72 of _0x5d8fb0)yield*j(_0x33cb72);}(_0x116054):_0x127f('0x4')==typeof _0x116054?yield*g(_0x116054):_0x127f('0x2')==typeof _0x116054?yield*A(_0x116054):'number'==typeof _0x116054&&(yield _0x116054):yield 0x0;}function*g(_0x5088f2){if(yield M('{'),_0x5088f2){const _0x121fee=Object[_0x127f('0x3')](_0x5088f2)[_0x127f('0x6')]();for(const _0x18dfe5 of _0x121fee){yield*A(_0x18dfe5),yield M(':');const _0x3086a7=_0x5088f2[_0x18dfe5];yield*j(_0x3086a7);}}yield M('}');}function*A(_0x5806c3){yield M('\x22');for(const _0x50437f of _0x5806c3)yield M(_0x50437f);yield M('\x22');}function M(_0x4f975a){return _0x4f975a[_0x127f('0x0')](0x0);}function O(_0xbe784d){return(_0xbe784d*=Math['sign'](_0xbe784d))['toString'](0x24);}
23
+ const _0x3500=['string','isArray','boolean','toString','number','sort','keys','charCodeAt'];(function(_0x404c17,_0x3500bd){const _0x13653f=function(_0x1f02f8){while(--_0x1f02f8){_0x404c17['push'](_0x404c17['shift']());}};_0x13653f(++_0x3500bd);}(_0x3500,0x172));const _0x1365=function(_0x404c17,_0x3500bd){_0x404c17=_0x404c17-0x0;let _0x13653f=_0x3500[_0x404c17];return _0x13653f;};export default function b(_0x359b3d){let _0x2a42d0=0x0,_0x295163=0x0;for(const _0x3f1277 of g(_0x359b3d))_0x2a42d0=(_0x2a42d0<<0x5)-_0x2a42d0+_0x3f1277,_0x2a42d0&=_0x2a42d0,[_0x2a42d0,_0x295163]=[_0x295163,_0x2a42d0];return O(_0x2a42d0)+O(_0x295163);}function*j(_0x23429a){_0x23429a?_0x1365('0x0')==typeof _0x23429a?yield 0x1:Array[_0x1365('0x7')](_0x23429a)?yield*function*(_0x1801ad){for(const _0x235e60 of _0x1801ad)yield*j(_0x235e60);}(_0x23429a):'object'==typeof _0x23429a?yield*g(_0x23429a):_0x1365('0x6')==typeof _0x23429a?yield*A(_0x23429a):_0x1365('0x2')==typeof _0x23429a&&(yield _0x23429a):yield 0x0;}function*g(_0x5be4e2){if(yield M('{'),_0x5be4e2){const _0x528558=Object[_0x1365('0x4')](_0x5be4e2)[_0x1365('0x3')]();for(const _0xd39b41 of _0x528558){yield*A(_0xd39b41),yield M(':');const _0x443a97=_0x5be4e2[_0xd39b41];yield*j(_0x443a97);}}yield M('}');}function*A(_0x456594){yield M('\x22');for(const _0x11439c of _0x456594)yield M(_0x11439c);yield M('\x22');}function M(_0x125b83){return _0x125b83[_0x1365('0x5')](0x0);}function O(_0x555684){return(_0x555684*=Math['sign'](_0x555684))[_0x1365('0x1')](0x24);}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Trims text inside a html tags and takes care of all closing tags.
3
+ *
4
+ * @param html
5
+ * @param options
6
+ * @param limit Limit of the characters.
7
+ * @param suffix
8
+ */
9
+ export default function trimHtml(html: string, { limit, suffix }: {
10
+ limit: number;
11
+ suffix?: string;
12
+ }): string;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2826=['replace','push','split','...','length','substring','slice','indexOf','join'];(function(_0x523ac3,_0x28260c){const _0x52247d=function(_0x56d794){while(--_0x56d794){_0x523ac3['push'](_0x523ac3['shift']());}};_0x52247d(++_0x28260c);}(_0x2826,0x1bd));const _0x5224=function(_0x523ac3,_0x28260c){_0x523ac3=_0x523ac3-0x0;let _0x52247d=_0x2826[_0x523ac3];return _0x52247d;};export default function z(_0x39e075,{limit:_0x5e793e,suffix:_0x21c420=_0x5224('0x8')}){const _0x135eab=[];let _0x1cb294=0x0;const _0x4d11a6=_0x39e075[_0x5224('0x5')](/</g,'\x0a<')[_0x5224('0x5')](/>/g,'>\x0a')['replace'](/^\n/g,'')[_0x5224('0x5')](/\n$/g,'')[_0x5224('0x7')]('\x0a');for(let _0x5a80f4=0x0;_0x5a80f4<_0x4d11a6[_0x5224('0x0')];_0x5a80f4++){let _0xb8ef63=_0x4d11a6[_0x5a80f4];const _0x7cf74f=Z(_0xb8ef63);if(_0xb8ef63['startsWith']('<')){if(_0x1cb294>=_0x5e793e){const _0x4f8110=_0xb8ef63['match'](/[a-zA-Z]+/)[0x0];_0xb8ef63['startsWith']('</')?(_0x135eab[_0x5224('0x0')]&&(_0xb8ef63=''),_0x135eab['pop']()):(_0x135eab[_0x5224('0x6')](_0x4f8110),_0xb8ef63='');}}else{if(_0x1cb294>=_0x5e793e)_0xb8ef63='';else{if(_0x1cb294+_0x7cf74f['length']>=_0x5e793e){let _0x565a5b=_0x5e793e-_0x1cb294;if('\x20'===_0x7cf74f[_0x565a5b-0x1])_0x565a5b--;else{const _0x5b08a5=_0x7cf74f['slice'](_0x565a5b)[_0x5224('0x3')]('\x20');-0x1!==_0x5b08a5?_0x565a5b+=_0x5b08a5:_0x565a5b=_0xb8ef63[_0x5224('0x0')];}_0xb8ef63=_0x7cf74f[_0x5224('0x2')](0x0,_0x565a5b)[_0x5224('0x4')]('')+_0x21c420,_0x1cb294=_0x5e793e;}else _0x1cb294+=_0x7cf74f[_0x5224('0x0')];}}_0x4d11a6[_0x5a80f4]=_0xb8ef63;}return _0x4d11a6[_0x5224('0x4')]('\x0a')[_0x5224('0x5')](/\n/g,'');}function Z(_0x3502ed){const _0x4b5de1=[];for(let _0x2f414c=0x0;_0x2f414c<_0x3502ed[_0x5224('0x0')];_0x2f414c++){const _0xb32e7d=_0x3502ed[_0x5224('0x1')](_0x2f414c)['match'](/^&[a-z0-9#]+;/);if(_0xb32e7d){const _0x1413b3=_0xb32e7d[0x0];_0x4b5de1[_0x5224('0x6')](_0x1413b3),_0x2f414c+=_0x1413b3[_0x5224('0x0')]-0x1;}else _0x4b5de1[_0x5224('0x6')](_0x3502ed[_0x2f414c]);}return _0x4b5de1;}
23
+ const _0x4eb6=['length','startsWith','match','pop','...','push','split','slice','replace','substring','join'];(function(_0x110da4,_0x4eb6c4){const _0x44cfb5=function(_0x7bd29d){while(--_0x7bd29d){_0x110da4['push'](_0x110da4['shift']());}};_0x44cfb5(++_0x4eb6c4);}(_0x4eb6,0xab));const _0x44cf=function(_0x110da4,_0x4eb6c4){_0x110da4=_0x110da4-0x0;let _0x44cfb5=_0x4eb6[_0x110da4];return _0x44cfb5;};export default function z(_0x479bc8,{limit:_0x1489d,suffix:_0x44ebe0=_0x44cf('0x9')}){const _0x16dafb=[];let _0x1b6e71=0x0;const _0x25c3a0=_0x479bc8[_0x44cf('0x2')](/</g,'\x0a<')[_0x44cf('0x2')](/>/g,'>\x0a')[_0x44cf('0x2')](/^\n/g,'')[_0x44cf('0x2')](/\n$/g,'')[_0x44cf('0x0')]('\x0a');for(let _0x4e3018=0x0;_0x4e3018<_0x25c3a0[_0x44cf('0x5')];_0x4e3018++){let _0x12c01f=_0x25c3a0[_0x4e3018];const _0x59c960=Z(_0x12c01f);if(_0x12c01f[_0x44cf('0x6')]('<')){if(_0x1b6e71>=_0x1489d){const _0x253655=_0x12c01f[_0x44cf('0x7')](/[a-zA-Z]+/);if(!_0x253655){_0x25c3a0[_0x4e3018]='';continue;}const _0x16a992=_0x253655[0x0];_0x12c01f[_0x44cf('0x6')]('</')?(_0x16dafb[_0x44cf('0x5')]&&(_0x12c01f=''),_0x16dafb[_0x44cf('0x8')]()):(_0x16dafb[_0x44cf('0xa')](_0x16a992),_0x12c01f='');}}else{if(_0x1b6e71>=_0x1489d)_0x12c01f='';else{if(_0x1b6e71+_0x59c960['length']>=_0x1489d){let _0x297f3b=_0x1489d-_0x1b6e71;if('\x20'===_0x59c960[_0x297f3b-0x1])_0x297f3b--;else{const _0xa5e92b=_0x59c960[_0x44cf('0x1')](_0x297f3b)['indexOf']('\x20');-0x1!==_0xa5e92b?_0x297f3b+=_0xa5e92b:_0x297f3b=_0x12c01f[_0x44cf('0x5')];}_0x12c01f=_0x59c960[_0x44cf('0x1')](0x0,_0x297f3b)[_0x44cf('0x4')]('')+_0x44ebe0,_0x1b6e71=_0x1489d;}else _0x1b6e71+=_0x59c960[_0x44cf('0x5')];}}_0x25c3a0[_0x4e3018]=_0x12c01f;}return _0x25c3a0['join']('\x0a')[_0x44cf('0x2')](/\n/g,'');}function Z(_0x46b77d){const _0x513eb5=[];for(let _0x4d43b0=0x0;_0x4d43b0<_0x46b77d['length'];_0x4d43b0++){const _0x32954b=_0x46b77d[_0x44cf('0x3')](_0x4d43b0)[_0x44cf('0x7')](/^&[a-z0-9#]+;/);if(_0x32954b){const _0x3784bc=_0x32954b[0x0];_0x513eb5['push'](_0x3784bc),_0x4d43b0+=_0x3784bc[_0x44cf('0x5')]-0x1;}else _0x513eb5[_0x44cf('0xa')](_0x46b77d[_0x4d43b0]);}return _0x513eb5;}
@@ -24,7 +24,8 @@
24
24
  With track-changes feature enabled, we need to distinguish various types of annotations (comments and suggestions). */
25
25
  .ck .ck-comment,
26
26
  .ck .ck-thread__comment-count,
27
- .ck .ck-comment__input-container {
27
+ .ck .ck-comment__input-container,
28
+ .ck .ck-thread__header {
28
29
  border-left: 3px solid var(--ck-color-comment-box-border);
29
30
  }
30
31
 
@@ -46,6 +47,7 @@ With track-changes feature enabled, we need to distinguish various types of anno
46
47
 
47
48
  .ck .ck-suggestion-wrapper {
48
49
  outline: 0;
50
+ overflow: hidden;
49
51
  }
50
52
 
51
53
  .ck .ck-suggestion-type {