@ckeditor/ckeditor5-collaboration-core 36.0.0 → 37.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-collaboration-core",
3
- "version": "36.0.0",
3
+ "version": "37.0.0-rc.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.0",
31
+ "ckeditor5": "^37.0.0-rc.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,
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 _0x255d=['find','noPermissions','commands','config','comment:admin','addCommentThread','Permissions','get','forceDisabled','clearForceDisabled','collaboration.channelId','editors','enableReadOnlyMode','context','includes','permissions-set-permissions-invalid-channel-id','document:write','CommentsRepository','setPermissions','CommentsOnly','no-permissions','isEnabled'];(function(_0x314c05,_0x255ddd){const _0x598960=function(_0x187644){while(--_0x187644){_0x314c05['push'](_0x314c05['shift']());}};_0x598960(++_0x255ddd);}(_0x255d,0x133));const _0x5989=function(_0x314c05,_0x255ddd){_0x314c05=_0x314c05-0x0;let _0x598960=_0x255d[_0x314c05];return _0x598960;};import{ContextPlugin as _0x4c6a38,Editor as _0x49b05e}from'ckeditor5/src/core';import{CKEditorError as _0x156d05}from'ckeditor5/src/utils';export default class i extends _0x4c6a38{static get['pluginName'](){return _0x5989('0x7');}[_0x5989('0x13')](_0x95256d,_0x544d6c){let _0x47f121;if(_0x544d6c||(_0x544d6c=this['context'][_0x5989('0x4')][_0x5989('0x8')](_0x5989('0xb'))),this['context'][_0x5989('0x4')][_0x5989('0x8')]('collaboration.channelId')==_0x544d6c?_0x47f121=this[_0x5989('0xe')]:this[_0x5989('0xe')][_0x5989('0xc')]&&(_0x47f121=this[_0x5989('0xe')]['editors'][_0x5989('0x1')](_0x33e152=>_0x33e152[_0x5989('0x4')]['get'](_0x5989('0xb'))==_0x544d6c)),!_0x47f121)throw new _0x156d05(_0x5989('0x10'),null);const _0x3cd72a=_0x47f121['plugins'],_0x5b89ca=_0x47f121 instanceof _0x49b05e,_0x4dc555=_0x3cd72a['has'](_0x5989('0x12'))&&_0x3cd72a[_0x5989('0x8')](_0x5989('0x12')),_0x1e4eac=_0x3cd72a['has'](_0x5989('0x14'))&&_0x3cd72a[_0x5989('0x8')]('CommentsOnly'),_0x521714=_0x95256d[_0x5989('0xf')](_0x5989('0x11')),_0x385725=_0x95256d[_0x5989('0xf')](_0x5989('0x5')),_0x534c16=_0x95256d[_0x5989('0xf')]('comment:write')||_0x385725;(_0x1e4eac&&(_0x1e4eac[_0x5989('0x0')]=!_0x521714&&_0x534c16),_0x5b89ca)&&(!(_0x521714||_0x534c16&&_0x4dc555)?_0x47f121[_0x5989('0xd')](_0x5989('0x15')):_0x47f121['disableReadOnlyMode']('no-permissions'));if(_0x4dc555){_0x4dc555['switchReadOnly'](!_0x534c16,_0x544d6c),_0x4dc555['setAdminPermissions'](_0x385725,_0x544d6c);const _0x3cbefd=_0x5b89ca&&_0x47f121[_0x5989('0x3')]['get'](_0x5989('0x6'));_0x3cbefd&&(_0x534c16?_0x3cbefd[_0x5989('0xa')]('noPermissions'):_0x3cbefd[_0x5989('0x9')](_0x5989('0x2')));}}}
23
+ const _0x180a=['permissions-set-permissions-invalid-channel-id','clearForceDisabled','collaboration.channelId','Permissions','comment:admin','comment:modify_all','editors','document:write','CommentsOnly','comment:write','no-permissions','commands','noPermissions','disableReadOnlyMode','CommentsRepository','pluginName','includes','setPermissions','isEnabled','config','context','find','get','enableReadOnlyMode'];(function(_0x21b1df,_0x180a06){const _0xe785be=function(_0x132d84){while(--_0x132d84){_0x21b1df['push'](_0x21b1df['shift']());}};_0xe785be(++_0x180a06);}(_0x180a,0x6c));const _0xe785=function(_0x21b1df,_0x180a06){_0x21b1df=_0x21b1df-0x0;let _0xe785be=_0x180a[_0x21b1df];return _0xe785be;};import{ContextPlugin as _0x51b776,Editor as _0x5423d4}from'ckeditor5/src/core';import{CKEditorError as _0xdaeca0}from'ckeditor5/src/utils';export default class n extends _0x51b776{static get[_0xe785('0x3')](){return _0xe785('0xf');}['setPermissions'](_0x57f96e,_0x46bfc3){let _0x19f987;if(_0x46bfc3||(_0x46bfc3=this[_0xe785('0x8')]['config'][_0xe785('0xa')](_0xe785('0xe'))),this[_0xe785('0x8')][_0xe785('0x7')][_0xe785('0xa')](_0xe785('0xe'))==_0x46bfc3?_0x19f987=this[_0xe785('0x8')]:'editors'in this[_0xe785('0x8')]&&this['context'][_0xe785('0x12')]&&(_0x19f987=this[_0xe785('0x8')][_0xe785('0x12')][_0xe785('0x9')](_0x416fd3=>_0x416fd3['config'][_0xe785('0xa')](_0xe785('0xe'))==_0x46bfc3)),!_0x19f987)throw new _0xdaeca0(_0xe785('0xc'),null);const _0x5dd890=_0x19f987['plugins'],_0x20c5b3=_0x5dd890['has'](_0xe785('0x2'))?_0x5dd890[_0xe785('0xa')](_0xe785('0x2')):void 0x0,_0x5b9916=_0x5dd890['has'](_0xe785('0x14'))&&_0x5dd890[_0xe785('0xa')]('CommentsOnly'),_0x13618d=_0x57f96e[_0xe785('0x4')](_0xe785('0x13')),_0x9106d7=_0x57f96e['includes'](_0xe785('0x11')),_0x2ba3a0=_0x57f96e['includes'](_0xe785('0x10')),_0x59a42d=_0x57f96e[_0xe785('0x4')](_0xe785('0x15')),_0x4f69e8=_0x59a42d||_0x2ba3a0;(_0x5b9916&&(_0x5b9916[_0xe785('0x6')]=!_0x13618d&&_0x4f69e8),_0x19f987 instanceof _0x5423d4)&&(!(_0x13618d||_0x4f69e8&&_0x20c5b3)?_0x19f987[_0xe785('0xb')](_0xe785('0x16')):_0x19f987[_0xe785('0x1')](_0xe785('0x16')));if(_0x20c5b3){_0x20c5b3[_0xe785('0x5')]({'admin':_0x2ba3a0,'modifyAll':_0x9106d7,'write':_0x59a42d},_0x46bfc3);const _0x2db527=_0x19f987 instanceof _0x5423d4&&_0x19f987[_0xe785('0x17')][_0xe785('0xa')]('addCommentThread');_0x2db527&&(_0x4f69e8?_0x2db527[_0xe785('0xd')](_0xe785('0x0')):_0x2db527['forceDisabled'](_0xe785('0x0')));}}}
@@ -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 _0x2a43=['ck-user__notification','ck-user__avatar','setTemplate','isAnonymous','push','notificationView','ck-user__icon','ck\x20ck-user__name','content','avatar','div','initials','url(\x27','ck-user__img','name'];(function(_0x3956cc,_0x2a43be){const _0x131060=function(_0x428c1f){while(--_0x428c1f){_0x3956cc['push'](_0x3956cc['shift']());}};_0x131060(++_0x2a43be);}(_0x2a43,0x155));const _0x1310=function(_0x3956cc,_0x2a43be){_0x3956cc=_0x3956cc-0x0;let _0x131060=_0x2a43[_0x3956cc];return _0x131060;};import{View as _0x3f6726,IconView as _0x1b7c4d}from'ckeditor5/src/ui';import _0x932106 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class w extends _0x3f6726{constructor(_0x222ef3,_0x41d9ba,_0x4ef572){super(_0x222ef3),this[_0x1310('0x3')]=_0x41d9ba['name'],this[_0x1310('0x9')]=null;const _0x32e45c=['ck',_0x1310('0x2')];if(_0x41d9ba[_0x1310('0x7')]&&_0x32e45c[_0x1310('0x8')]('ck-user__anonymous'),_0x41d9ba['avatar']&&_0x32e45c[_0x1310('0x8')](_0x1310('0x5')),_0x4ef572){const _0x57093c=new _0x1b7c4d();_0x57093c['extendTemplate']({'attributes':{'class':[_0x1310('0xa')]}}),_0x57093c[_0x1310('0xc')]=_0x932106,this[_0x1310('0x9')]={'tag':_0x1310('0xe'),'attributes':{'class':['ck',_0x1310('0x4')],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x4ef572},'children':[_0x57093c]};}const _0x5c8d83=[{'tag':_0x1310('0xe'),'attributes':{'class':_0x32e45c,'style':{'background-image':_0x41d9ba[_0x1310('0xd')]?_0x1310('0x1')+_0x41d9ba[_0x1310('0xd')]+'\x27)':''}}},{'tag':_0x1310('0xe'),'attributes':{'class':_0x41d9ba[_0x1310('0xd')]?'ck\x20ck-user__name\x20ck-user__name--hidden':_0x1310('0xb')},'children':[{'text':_0x41d9ba[_0x1310('0x0')]}]}];this[_0x1310('0x9')]&&_0x5c8d83[_0x1310('0x8')](this[_0x1310('0x9')]),this[_0x1310('0x6')]({'tag':_0x1310('0xe'),'attributes':{'class':['ck','ck-user'],'data-user-id':_0x41d9ba['id']},'children':_0x5c8d83});}}
23
+ const _0x4a77=['url(\x27','ck-user__icon','div','setTemplate','ck-user__anonymous','push','avatar','ck-user__notification','ck-user','name','notificationView'];(function(_0x11d2e8,_0x4a77e2){const _0x41eaa4=function(_0x218d64){while(--_0x218d64){_0x11d2e8['push'](_0x11d2e8['shift']());}};_0x41eaa4(++_0x4a77e2);}(_0x4a77,0xae));const _0x41ea=function(_0x11d2e8,_0x4a77e2){_0x11d2e8=_0x11d2e8-0x0;let _0x41eaa4=_0x4a77[_0x11d2e8];return _0x41eaa4;};import{View as _0x49f6a2,IconView as _0x55709e}from'ckeditor5/src/ui';import _0x224950 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class $ extends _0x49f6a2{constructor(_0x3e13fe,_0x4cbb5a,_0x421f63){super(_0x3e13fe),this[_0x41ea('0x0')]=_0x4cbb5a[_0x41ea('0x0')],this[_0x41ea('0x1')]=null;const _0x3ab2b4=['ck','ck-user__img'];if(_0x4cbb5a['isAnonymous']&&_0x3ab2b4[_0x41ea('0x7')](_0x41ea('0x6')),_0x4cbb5a['avatar']&&_0x3ab2b4['push']('ck-user__avatar'),_0x421f63){const _0x191a93=new _0x55709e();_0x191a93['extendTemplate']({'attributes':{'class':[_0x41ea('0x3')]}}),_0x191a93['content']=_0x224950,this[_0x41ea('0x1')]={'tag':_0x41ea('0x4'),'attributes':{'class':['ck',_0x41ea('0x9')],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x421f63},'children':[_0x191a93]};}const _0x3ca967=[{'tag':_0x41ea('0x4'),'attributes':{'class':_0x3ab2b4,'style':{'background-image':_0x4cbb5a[_0x41ea('0x8')]?_0x41ea('0x2')+_0x4cbb5a[_0x41ea('0x8')]+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x4cbb5a[_0x41ea('0x8')]?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name'},'children':[{'text':_0x4cbb5a['initials']}]}];this[_0x41ea('0x1')]&&_0x3ca967[_0x41ea('0x7')](this[_0x41ea('0x1')]),this[_0x41ea('0x5')]({'tag':_0x41ea('0x4'),'attributes':{'class':['ck',_0x41ea('0xa')],'data-user-id':_0x4cbb5a['id']},'children':_0x3ca967});}}
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 _0x4cd7=['getOperationAuthor','addUser','color','users.anonymousUserId','_locale','includes','ck-user__marker--','requires','users-add-duplicated-id','invalid-license-key','_getInitial','avatar','has','decorate','_lastColor','ck-user__bg-color--','getBackgroundColorClass','getUser','licenseKeyTrial','licenseKey','licenseKeyValid','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.','_id','Users','toUpperCase','assign','_isAnonymous','trial-license-key-reached-limit-time','length','locale','_addAnonymousUser','users-add-invalid-id','licenseKeyTrialLimit:revisions','add','destroy','string','trial-license-key-reached-limit-changes','licenseKeyTrialLimit:time','users-me-already-defined','users','ck-user__selection--','config','context','getSelectionClass','init','define','users.colorsCount','_licenseKeyCheckInterval','licenseKeyTrialLimit:operations','get','pluginName','users-me-missing-user','licenseKeyInvalid','anonymous-user','defineMe','name','_myId','_getNextColor'];(function(_0x31af7e,_0x4cd75d){const _0x2a6d53=function(_0xb495d8){while(--_0xb495d8){_0x31af7e['push'](_0x31af7e['shift']());}};_0x2a6d53(++_0x4cd75d);}(_0x4cd7,0x134));const _0x2a6d=function(_0x31af7e,_0x4cd75d){_0x31af7e=_0x31af7e-0x0;let _0x2a6d53=_0x4cd7[_0x31af7e];return _0x2a6d53;};import{ContextPlugin as _0x2ce95a}from'ckeditor5/src/core';import{Collection as _0x14ef1d,CKEditorError as _0x1c8188}from'ckeditor5/src/utils';import _0x4aea21 from'./permissions';import{getTranslation as _0x580761}from'./utils/common-translations';import'../theme/usercolors.css';export default class l extends _0x2ce95a{static get[_0x2a6d('0x20')](){return _0x2a6d('0x5');}static get[_0x2a6d('0x2f')](){return[_0x4aea21];}constructor(_0x351cf6){super(_0x351cf6),_0x351cf6['config'][_0x2a6d('0x1b')](_0x2a6d('0x2b'),_0x2a6d('0x23')),_0x351cf6[_0x2a6d('0x17')][_0x2a6d('0x1b')](_0x2a6d('0x1c'),0x8),this['users']=new _0x14ef1d(),this[_0x2a6d('0x2c')]=_0x351cf6[_0x2a6d('0xb')],this['_licenseKeyCheckInterval']=null,this[_0x2a6d('0x36')]=0x0,this[_0x2a6d('0x26')]=null,this[_0x2a6d('0x35')](_0x2a6d('0x28'));}[_0x2a6d('0x1a')](){const _0x1c9b2a=this[_0x2a6d('0x18')];this[_0x2a6d('0x1')]=_0x1c9b2a[_0x2a6d('0x17')][_0x2a6d('0x1f')](_0x2a6d('0x1'));const _0x1a498b=['licenseKeyTrial',_0x2a6d('0x22'),_0x2a6d('0x2'),_0x2a6d('0x1e'),'licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this[_0x2a6d('0x1d')]=setInterval(()=>{let _0x380ad8;for(const _0x26347b in _0x1c9b2a){const _0x5251f7=_0x1c9b2a[_0x26347b];if(_0x1a498b[_0x2a6d('0x2d')](_0x5251f7)){delete _0x1c9b2a[_0x26347b],_0x380ad8=_0x5251f7;break;}}if(_0x2a6d('0x22')===_0x380ad8)throw clearInterval(this[_0x2a6d('0x1d')]),new _0x1c8188(_0x2a6d('0x31'),null);if(_0x2a6d('0x0')===_0x380ad8&&console['info'](_0x2a6d('0x3')),_0x2a6d('0x1e')===_0x380ad8)throw clearInterval(this[_0x2a6d('0x1d')]),new _0x1c8188(_0x2a6d('0x12'),null);if(_0x2a6d('0x13')===_0x380ad8)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1c8188(_0x2a6d('0x9'),null);if(_0x2a6d('0xe')===_0x380ad8)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1c8188('trial-license-key-reached-limit-revisions',null);_0x2a6d('0x2')===_0x380ad8&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this[_0x2a6d('0xc')]();}get['me'](){return null==this[_0x2a6d('0x26')]?null:this[_0x2a6d('0x39')](this[_0x2a6d('0x26')]);}[_0x2a6d('0x29')](_0x488143){if(!(_0x488143=Object[_0x2a6d('0x7')]({},_0x488143,{'color':this[_0x2a6d('0x27')]()}))['id']||_0x2a6d('0x11')!=typeof _0x488143['id'])throw new _0x1c8188(_0x2a6d('0xd'));if(this[_0x2a6d('0x15')][_0x2a6d('0x34')](_0x488143['id']))throw new _0x1c8188(_0x2a6d('0x30'),null,{'id':_0x488143['id']});_0x488143[_0x2a6d('0x25')]=function(_0x724481,_0x204ebc=''){return''==(_0x204ebc=_0x204ebc['trim']())?_0x580761(_0x724481,'Anonymous'):_0x204ebc;}(this[_0x2a6d('0x2c')],_0x488143['name']);const _0x5f12da=new u(_0x488143);return this[_0x2a6d('0x15')][_0x2a6d('0xf')](_0x5f12da),_0x5f12da;}[_0x2a6d('0x39')](_0x23e074){return this[_0x2a6d('0x15')][_0x2a6d('0x1f')](_0x23e074);}['useAnonymousUser'](){const _0x573a7b=this[_0x2a6d('0x18')][_0x2a6d('0x17')]['get'](_0x2a6d('0x2b'));this['_myId']||this[_0x2a6d('0x24')](_0x573a7b);}['defineMe'](_0x23b4ff){if(this[_0x2a6d('0x26')])throw new _0x1c8188(_0x2a6d('0x14'),null);if(!this['getUser'](_0x23b4ff))throw new _0x1c8188(_0x2a6d('0x21'),null);this[_0x2a6d('0x26')]=_0x23b4ff;}[_0x2a6d('0x28')](){return this['me'];}[_0x2a6d('0x10')](){super[_0x2a6d('0x10')](),clearInterval(this[_0x2a6d('0x1d')]);}[_0x2a6d('0x27')](){const _0x584576=this[_0x2a6d('0x18')][_0x2a6d('0x17')][_0x2a6d('0x1f')](_0x2a6d('0x1c'));return this[_0x2a6d('0x36')]>=_0x584576&&(this['_lastColor']=0x0),new a(this[_0x2a6d('0x36')]++);}[_0x2a6d('0xc')](){const _0x4cb966=this[_0x2a6d('0x18')]['config']['get'](_0x2a6d('0x2b'));this[_0x2a6d('0x29')]({'id':_0x4cb966,'name':_0x580761(this[_0x2a6d('0x2c')],'Anonymous')})['_isAnonymous']=!0x0;}}class u{constructor(_0x5e87f4){this['id']=_0x5e87f4['id'],this[_0x2a6d('0x2a')]=_0x5e87f4['color'],this['name']=_0x5e87f4[_0x2a6d('0x25')],this[_0x2a6d('0x33')]=_0x5e87f4[_0x2a6d('0x33')],this[_0x2a6d('0x8')]=!0x1;}get['isAnonymous'](){return this[_0x2a6d('0x8')];}get['initials'](){const _0x1531fc=this[_0x2a6d('0x25')]['split']('\x20');return 0x1===_0x1531fc['length']?this[_0x2a6d('0x32')](_0x1531fc[0x0]):this[_0x2a6d('0x32')](_0x1531fc[0x0])+this[_0x2a6d('0x32')](_0x1531fc[_0x1531fc[_0x2a6d('0xa')]-0x1]);}[_0x2a6d('0x32')](_0x12a24e){return _0x12a24e['charAt'](0x0)[_0x2a6d('0x6')]();}}class a{constructor(_0x2b23ad){this[_0x2a6d('0x4')]=_0x2b23ad;}[_0x2a6d('0x38')](){return _0x2a6d('0x37')+this[_0x2a6d('0x4')];}[_0x2a6d('0x19')](){return _0x2a6d('0x16')+this[_0x2a6d('0x4')];}['getMarkerClass'](){return _0x2a6d('0x2e')+this[_0x2a6d('0x4')];}}
23
+ const _0x350d=['info','pluginName','context','defineMe','color','decorate','_lastColor','users-me-missing-user','getMarkerClass','charAt','ck-user__selection--','add','trial-license-key-reached-limit-revisions','addUser','invalid-license-key','licenseKeyTrialLimit:operations','split','define','has','_id','destroy','_licenseKeyCheckInterval','_getInitial','isAnonymous','ck-user__marker--','licenseKeyValid','locale','initials','users-add-invalid-id','trial-license-key-reached-limit-time','licenseKeyTrialLimit:time','Anonymous','users','_isAnonymous','_getNextColor','trial-license-key-reached-limit-changes','requires','_addAnonymousUser','getUser','get','includes','licenseKeyTrial','licenseKeyTrialLimit:revisions','users.anonymousUserId','users.colorsCount','_locale','length','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.','avatar','name','toUpperCase','useAnonymousUser','getOperationAuthor','users-add-duplicated-id','ck-user__bg-color--','licenseKeyInvalid','_myId','config','trim'];(function(_0x1fe587,_0x350dd0){const _0x241b17=function(_0x1dbf02){while(--_0x1dbf02){_0x1fe587['push'](_0x1fe587['shift']());}};_0x241b17(++_0x350dd0);}(_0x350d,0xea));const _0x241b=function(_0x1fe587,_0x350dd0){_0x1fe587=_0x1fe587-0x0;let _0x241b17=_0x350d[_0x1fe587];return _0x241b17;};import{ContextPlugin as _0x3152e0}from'ckeditor5/src/core';import{Collection as _0x5e3a39,CKEditorError as _0x14c657}from'ckeditor5/src/utils';import _0x5270e5 from'./permissions';import{getTranslation as _0x1da2ec}from'./utils/common-translations';import'../theme/usercolors.css';export default class l extends _0x3152e0{static get[_0x241b('0x3')](){return'Users';}static get[_0x241b('0x26')](){return[_0x5270e5];}constructor(_0x574ae7){super(_0x574ae7),this[_0x241b('0x4')][_0x241b('0x0')][_0x241b('0x13')]('users.anonymousUserId','anonymous-user'),this[_0x241b('0x4')][_0x241b('0x0')][_0x241b('0x13')](_0x241b('0x2e'),0x8),this['users']=new _0x5e3a39(),this['_locale']=_0x574ae7[_0x241b('0x1c')],this[_0x241b('0x17')]=null,this[_0x241b('0x8')]=0x0,this['_myId']=null,this[_0x241b('0x7')](_0x241b('0x36'));}['init'](){const _0x25d784=this['context'];this['licenseKey']=_0x25d784['config'][_0x241b('0x29')]('licenseKey');const _0x423372=[_0x241b('0x2b'),_0x241b('0x39'),'licenseKeyValid',_0x241b('0x11'),_0x241b('0x20'),_0x241b('0x2c')];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x19e609;for(const _0x2f70ab in _0x25d784){const _0x1982aa=_0x25d784[_0x2f70ab];if(_0x423372[_0x241b('0x2a')](_0x1982aa)){delete _0x25d784[_0x2f70ab],_0x19e609=_0x1982aa;break;}}if('licenseKeyInvalid'===_0x19e609)throw clearInterval(this[_0x241b('0x17')]),new _0x14c657(_0x241b('0x10'),null);if(_0x241b('0x2b')===_0x19e609&&console[_0x241b('0x2')](_0x241b('0x31')),_0x241b('0x11')===_0x19e609)throw clearInterval(this[_0x241b('0x17')]),new _0x14c657(_0x241b('0x25'),null);if('licenseKeyTrialLimit:time'===_0x19e609)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x14c657(_0x241b('0x1f'),null);if(_0x241b('0x2c')===_0x19e609)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x14c657(_0x241b('0xe'),null);_0x241b('0x1b')===_0x19e609&&clearInterval(this[_0x241b('0x17')]);},0x3e8),this[_0x241b('0x27')]();}get['me'](){return null==this[_0x241b('0x3a')]?null:this[_0x241b('0x28')](this[_0x241b('0x3a')]);}['addUser']({id:_0x2fc6d6,name:_0x454b4b,..._0x425aef}){if(!_0x2fc6d6||'string'!=typeof _0x2fc6d6)throw new _0x14c657(_0x241b('0x1e'));if(this['users'][_0x241b('0x14')](_0x2fc6d6))throw new _0x14c657(_0x241b('0x37'),null,{'id':_0x2fc6d6});const _0x297f1f={..._0x425aef,'id':_0x2fc6d6,'name':a(this['_locale'],_0x454b4b),'color':this[_0x241b('0x24')]()};_0x297f1f[_0x241b('0x33')]=a(this[_0x241b('0x2f')],_0x297f1f[_0x241b('0x33')]);const _0x401f56=new User(_0x297f1f);return this[_0x241b('0x22')][_0x241b('0xd')](_0x401f56),_0x401f56;}['getUser'](_0x3cabc3){return this[_0x241b('0x22')][_0x241b('0x29')](_0x3cabc3);}[_0x241b('0x35')](){const _0x28b562=this[_0x241b('0x4')][_0x241b('0x0')][_0x241b('0x29')]('users.anonymousUserId');this[_0x241b('0x3a')]||this[_0x241b('0x5')](_0x28b562);}[_0x241b('0x5')](_0x1bde85){if(this['_myId'])throw new _0x14c657('users-me-already-defined',null);if(!this[_0x241b('0x28')](_0x1bde85))throw new _0x14c657(_0x241b('0x9'),null);this['_myId']=_0x1bde85;}['getOperationAuthor'](){return this['me'];}[_0x241b('0x16')](){super[_0x241b('0x16')](),clearInterval(this['_licenseKeyCheckInterval']);}[_0x241b('0x24')](){const _0x3e76a5=this[_0x241b('0x4')][_0x241b('0x0')][_0x241b('0x29')](_0x241b('0x2e'));return this[_0x241b('0x8')]>=_0x3e76a5&&(this[_0x241b('0x8')]=0x0),new u(this[_0x241b('0x8')]++);}[_0x241b('0x27')](){const _0x4a4684=this[_0x241b('0x4')][_0x241b('0x0')][_0x241b('0x29')](_0x241b('0x2d'));this[_0x241b('0xf')]({'id':_0x4a4684,'name':_0x1da2ec(this[_0x241b('0x2f')],_0x241b('0x21'))})['_isAnonymous']=!0x0;}}export class User{constructor(_0xd0f552){this['id']=_0xd0f552['id'],this[_0x241b('0x6')]=_0xd0f552[_0x241b('0x6')],this[_0x241b('0x33')]=_0xd0f552[_0x241b('0x33')],this[_0x241b('0x32')]=_0xd0f552[_0x241b('0x32')],this[_0x241b('0x23')]=!0x1;}get[_0x241b('0x19')](){return this[_0x241b('0x23')];}get[_0x241b('0x1d')](){const _0x6e42cc=this[_0x241b('0x33')][_0x241b('0x12')]('\x20');return 0x1===_0x6e42cc[_0x241b('0x30')]?this[_0x241b('0x18')](_0x6e42cc[0x0]):this['_getInitial'](_0x6e42cc[0x0])+this[_0x241b('0x18')](_0x6e42cc[_0x6e42cc[_0x241b('0x30')]-0x1]);}[_0x241b('0x18')](_0xcc14d3){return _0xcc14d3[_0x241b('0xb')](0x0)[_0x241b('0x34')]();}}function a(_0x120f6e,_0x46c4f4=''){return''==(_0x46c4f4=_0x46c4f4[_0x241b('0x1')]())?_0x1da2ec(_0x120f6e,_0x241b('0x21')):_0x46c4f4;}class u{constructor(_0xbe0037){this[_0x241b('0x15')]=_0xbe0037;}['getBackgroundColorClass'](){return _0x241b('0x38')+this[_0x241b('0x15')];}['getSelectionClass'](){return _0x241b('0xc')+this['_id'];}[_0x241b('0xa')](){return _0x241b('0x1a')+this[_0x241b('0x15')];}}
@@ -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(_0x3dbdc1,_0x36d8fa){const t=_0x3dbdc1['t'];switch(_0x36d8fa){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(_0x452229,_0x31c329){const t=_0x452229['t'];switch(_0x31c329){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 _0x47bc=['focus','locale','registerChild','deregisterChild','element','once','isConfirm','confirmView','appendChild','set','fire','message','submit','cancel'];(function(_0x4e0396,_0x47bcd4){var _0x29498a=function(_0x514ca8){while(--_0x514ca8){_0x4e0396['push'](_0x4e0396['shift']());}};_0x29498a(++_0x47bcd4);}(_0x47bc,0x1ac));var _0x2949=function(_0x4e0396,_0x47bcd4){_0x4e0396=_0x4e0396-0x0;var _0x29498a=_0x47bc[_0x4e0396];return _0x29498a;};import _0x5bc25e from'./confirmview';export default{'showConfirm'(_0x34c5df,_0x49cf91){return this[_0x2949('0xd')]=new _0x5bc25e(this[_0x2949('0x7')]),this['confirmView']['render'](),this['confirmView'][_0x2949('0x3')]=_0x34c5df,this[_0x2949('0xd')][_0x2949('0xb')](_0x2949('0x5'),()=>{this['_removeConfirm']();}),this[_0x2949('0xd')][_0x2949('0xb')](_0x2949('0x4'),()=>{this['_removeConfirm']();}),_0x49cf91[_0x2949('0x0')](this[_0x2949('0xd')][_0x2949('0xa')]),this[_0x2949('0x8')](this['confirmView']),this[_0x2949('0x1')](_0x2949('0xc'),!0x0),new Promise(_0x564170=>this[_0x2949('0xd')]['on']('submit',_0x564170));},'cancelConfirm'(){this[_0x2949('0xc')]&&this[_0x2949('0xd')][_0x2949('0x2')](_0x2949('0x5'));},'_removeConfirm'(){this[_0x2949('0xa')][_0x2949('0x6')](),this[_0x2949('0xd')][_0x2949('0xa')]['remove'](),this[_0x2949('0x9')](this[_0x2949('0xd')]),this[_0x2949('0xc')]=!0x1,this['confirmView']['destroy'](),delete this[_0x2949('0xd')];}};
23
+ var _0x5bc0=['message','submit','locale','element','_removeConfirm','cancel','focus','render','registerChild','cancelConfirm','isConfirm','appendChild','once','destroy','remove','set','confirmView','fire'];(function(_0xa1ba4e,_0x5bc09b){var _0x2f04f0=function(_0x535b54){while(--_0x535b54){_0xa1ba4e['push'](_0xa1ba4e['shift']());}};_0x2f04f0(++_0x5bc09b);}(_0x5bc0,0x8e));var _0x2f04=function(_0xa1ba4e,_0x5bc09b){_0xa1ba4e=_0xa1ba4e-0x0;var _0x2f04f0=_0x5bc0[_0xa1ba4e];return _0x2f04f0;};import _0xc07ce1 from'./confirmview';export default function m(_0xe04acc){return class extends _0xe04acc{['showConfirm'](_0x35d19e,_0x3d2dbd){return this[_0x2f04('0x0')]=new _0xc07ce1(this[_0x2f04('0x4')]),this[_0x2f04('0x0')][_0x2f04('0x9')](),this[_0x2f04('0x0')][_0x2f04('0x2')]=_0x35d19e,this[_0x2f04('0x0')]['once'](_0x2f04('0x7'),()=>{this[_0x2f04('0x6')]();}),this[_0x2f04('0x0')][_0x2f04('0xe')](_0x2f04('0x3'),()=>{this['_removeConfirm']();}),_0x3d2dbd[_0x2f04('0xd')](this[_0x2f04('0x0')]['element']),this[_0x2f04('0xa')](this[_0x2f04('0x0')]),this[_0x2f04('0x5')][_0x2f04('0x8')](),this[_0x2f04('0x11')](_0x2f04('0xc'),!0x0),new Promise(_0x2a00e7=>this['confirmView']['on']('submit',_0x2a00e7));}[_0x2f04('0xb')](){this[_0x2f04('0xc')]&&this[_0x2f04('0x0')][_0x2f04('0x1')](_0x2f04('0x7'));}[_0x2f04('0x6')](){this[_0x2f04('0x5')]&&this['confirmView']&&this['confirmView'][_0x2f04('0x5')]&&(this[_0x2f04('0x5')][_0x2f04('0x8')](),this[_0x2f04('0x0')][_0x2f04('0x5')][_0x2f04('0x10')](),this['deregisterChild'](this[_0x2f04('0x0')]),this['isConfirm']=!0x1,this[_0x2f04('0x0')][_0x2f04('0xf')](),this[_0x2f04('0x0')]=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 _0xd4e4=['_createButtonView','div','cancelView','fire','ck-thread__remove-confirm-inner','Are\x20you\x20sure?','ck-thread__remove-confirm-actions','set','check','setTemplate','cancel','message','label','icon','execute','ck-thread__remove-confirm-'];(function(_0x2ad2cb,_0xd4e48e){const _0x2d1c2d=function(_0x5acd05){while(--_0x5acd05){_0x2ad2cb['push'](_0x2ad2cb['shift']());}};_0x2d1c2d(++_0xd4e48e);}(_0xd4e4,0x118));const _0x2d1c=function(_0x2ad2cb,_0xd4e48e){_0x2ad2cb=_0x2ad2cb-0x0;let _0x2d1c2d=_0xd4e4[_0x2ad2cb];return _0x2d1c2d;};import{View as _0x2f9fcf,ButtonView as _0xea57b1}from'ckeditor5/src/ui';import{icons as _0x32c1a6}from'ckeditor5/src/core';import{getTranslation as _0x11dc43}from'./common-translations';export default class h extends _0x2f9fcf{constructor(_0x1b165a){super(_0x1b165a);const _0x3a7af6=this['bindTemplate'];this['submitView']=this[_0x2d1c('0x8')](_0x1b165a,_0x11dc43(_0x1b165a,'Yes'),_0x32c1a6[_0x2d1c('0x0')],'submit'),this[_0x2d1c('0xa')]=this[_0x2d1c('0x8')](_0x1b165a,_0x11dc43(_0x1b165a,'No'),_0x32c1a6['cancel'],_0x2d1c('0x2')),this[_0x2d1c('0xf')](_0x2d1c('0x3'),_0x11dc43(_0x1b165a,_0x2d1c('0xd'))),this[_0x2d1c('0x1')]({'tag':_0x2d1c('0x9'),'attributes':{'class':['ck-thread__remove-confirm']},'children':[{'tag':_0x2d1c('0x9'),'attributes':{'class':_0x2d1c('0xc')},'children':[{'tag':'p','children':[{'text':_0x3a7af6['to'](_0x2d1c('0x3'))}]},{'tag':_0x2d1c('0x9'),'attributes':{'class':_0x2d1c('0xe')},'children':[this['submitView'],this[_0x2d1c('0xa')]]}]}]});}['_createButtonView'](_0x387c8f,_0x5bb8a3,_0x4caa7e,_0x213a9b){const _0x3b6096=new _0xea57b1(_0x387c8f);return _0x3b6096[_0x2d1c('0x4')]=_0x5bb8a3,_0x3b6096[_0x2d1c('0x5')]=_0x4caa7e,_0x3b6096['extendTemplate']({'attributes':{'class':_0x2d1c('0x7')+_0x213a9b}}),_0x3b6096['on'](_0x2d1c('0x6'),()=>this[_0x2d1c('0xb')](_0x213a9b)),_0x3b6096;}}
23
+ const _0x1415=['submit','Are\x20you\x20sure?','execute','ck-thread__remove-confirm-actions','_createButtonView','Yes','label','div','check','cancel','ck-thread__remove-confirm','extendTemplate','set','ck-thread__remove-confirm-','submitView','message','bindTemplate','cancelView'];(function(_0x17c8b3,_0x1415f1){const _0x538ce3=function(_0x421705){while(--_0x421705){_0x17c8b3['push'](_0x17c8b3['shift']());}};_0x538ce3(++_0x1415f1);}(_0x1415,0xc7));const _0x538c=function(_0x17c8b3,_0x1415f1){_0x17c8b3=_0x17c8b3-0x0;let _0x538ce3=_0x1415[_0x17c8b3];return _0x538ce3;};import{View as _0x4878eb,ButtonView as _0x2e5cef}from'ckeditor5/src/ui';import{icons as _0x30317f}from'ckeditor5/src/core';import{getTranslation as _0x7ffd67}from'./common-translations';export default class h extends _0x4878eb{constructor(_0xd9fc8){super(_0xd9fc8);const _0x5b91b9=this[_0x538c('0xf')];this['submitView']=this[_0x538c('0x3')](_0xd9fc8,_0x7ffd67(_0xd9fc8,_0x538c('0x4')),_0x30317f[_0x538c('0x7')],_0x538c('0x11')),this[_0x538c('0x10')]=this[_0x538c('0x3')](_0xd9fc8,_0x7ffd67(_0xd9fc8,'No'),_0x30317f[_0x538c('0x8')],'cancel'),this[_0x538c('0xb')](_0x538c('0xe'),_0x7ffd67(_0xd9fc8,_0x538c('0x0'))),this['setTemplate']({'tag':'div','attributes':{'class':[_0x538c('0x9')]},'children':[{'tag':_0x538c('0x6'),'attributes':{'class':'ck-thread__remove-confirm-inner'},'children':[{'tag':'p','children':[{'text':_0x5b91b9['to'](_0x538c('0xe'))}]},{'tag':_0x538c('0x6'),'attributes':{'class':_0x538c('0x2')},'children':[this[_0x538c('0xd')],this[_0x538c('0x10')]]}]}]});}[_0x538c('0x3')](_0x5ad06b,_0x3087c7,_0xbd49b5,_0xfdb8eb){const _0x476861=new _0x2e5cef(_0x5ad06b);return _0x476861[_0x538c('0x5')]=_0x3087c7,_0x476861['icon']=_0xbd49b5,_0x476861[_0x538c('0xa')]({'attributes':{'class':_0x538c('0xc')+_0xfdb8eb}}),_0x476861['on'](_0x538c('0x1'),()=>this['fire'](_0xfdb8eb)),_0x476861;}}
@@ -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 _0x441e=['invalid-date-time-format','function','\x27Last\x27\x20EEEE\x20hh:mma','string','\x27Yesterday\x27\x20hh:mma','MM-dd-yyyy\x20hh:mma','dateTimeFormat'];(function(_0x58437e,_0x441e59){const _0x3e650d=function(_0x265079){while(--_0x265079){_0x58437e['push'](_0x58437e['shift']());}};_0x3e650d(++_0x441e59);}(_0x441e,0x1d7));const _0x3e65=function(_0x58437e,_0x441e59){_0x58437e=_0x58437e-0x0;let _0x3e650d=_0x441e[_0x58437e];return _0x3e650d;};import _0x3ae965 from'date-fns/format';import _0x5bbfed from'date-fns/parseISO';import _0x348c5a from'date-fns/differenceInCalendarDays';import{CKEditorError as _0x28ef83}from'ckeditor5/src/utils';export default function E(_0x44ca20={}){if(void 0x0!==_0x44ca20[_0x3e65('0x4')]&&_0x3e65('0x6')!=typeof _0x44ca20[_0x3e65('0x4')])throw new _0x28ef83(_0x3e65('0x5'));return _0x17fb62=>{const _0x3ff9d6=_0x3e65('0x1')==typeof _0x17fb62?_0x5bbfed(_0x17fb62):_0x17fb62,_0x352fe6=new Date(),_0x3db89d=_0x348c5a(_0x352fe6,_0x3ff9d6);return _0x44ca20[_0x3e65('0x4')]?_0x44ca20[_0x3e65('0x4')](_0x3ff9d6):_0x3ae965(_0x3ff9d6,0x0===_0x3db89d?'\x27Today\x27\x20hh:mma':0x1===_0x3db89d?_0x3e65('0x2'):_0x3db89d<0x7?_0x3e65('0x0'):_0x3e65('0x3'));};}
23
+ const _0xd975=['string','\x27Yesterday\x27\x20hh:mma','invalid-date-time-format','\x27Today\x27\x20hh:mma','\x27Last\x27\x20EEEE\x20hh:mma','MM-dd-yyyy\x20hh:mma','dateTimeFormat'];(function(_0x26faac,_0xd975a1){const _0x5135c8=function(_0x2deb21){while(--_0x2deb21){_0x26faac['push'](_0x26faac['shift']());}};_0x5135c8(++_0xd975a1);}(_0xd975,0x107));const _0x5135=function(_0x26faac,_0xd975a1){_0x26faac=_0x26faac-0x0;let _0x5135c8=_0xd975[_0x26faac];return _0x5135c8;};import _0x2befe5 from'date-fns/format';import _0x163784 from'date-fns/parseISO';import _0x1c387f from'date-fns/differenceInCalendarDays';import{CKEditorError as _0x17402a}from'ckeditor5/src/utils';export default function E(_0x5cea87={}){if(void 0x0!==_0x5cea87[_0x5135('0x2')]&&'function'!=typeof _0x5cea87[_0x5135('0x2')])throw new _0x17402a(_0x5135('0x5'));return _0x591bc7=>{const _0x463119=_0x5135('0x3')==typeof _0x591bc7?_0x163784(_0x591bc7):_0x591bc7,_0x2a9f2f=new Date(),_0x514120=_0x1c387f(_0x2a9f2f,_0x463119);return _0x5cea87['dateTimeFormat']?_0x5cea87[_0x5135('0x2')](_0x463119):_0x2befe5(_0x463119,0x0===_0x514120?_0x5135('0x6'):0x1===_0x514120?_0x5135('0x4'):_0x514120<0x7?_0x5135('0x0'):_0x5135('0x1'));};}
@@ -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 _0x5b85=['item','length','values','markerNameToElements','getClientRects','map','from','domElement','domConverter','sort','mapper','view','push','name','mapViewToDom'];(function(_0x4c77bc,_0x5b85b0){const _0x3980a1=function(_0x3f6c9d){while(--_0x3f6c9d){_0x4c77bc['push'](_0x4c77bc['shift']());}};_0x3980a1(++_0x5b85b0);}(_0x5b85,0x1a5));const _0x3980=function(_0x4c77bc,_0x5b85b0){_0x4c77bc=_0x4c77bc-0x0;let _0x3980a1=_0x5b85[_0x4c77bc];return _0x3980a1;};import{first as _0x181480}from'ckeditor5/src/utils';export default function k(_0x47c781,_0x2f2c2a){const _0x17d2f0=_0x47c781[_0x3980('0x9')][_0x3980('0x2')](_0x2f2c2a[_0x3980('0xc')]),_0x581514=_0x181480(_0x17d2f0[_0x3980('0x1')]());return _0x47c781['view']['domConverter']['mapViewToDom'](_0x581514);}export function getAllMarkersDomElementsSorted(_0x3d4a56,_0x47c777){if(0x0===_0x47c777[_0x3980('0x0')])return null;const _0x3fa071=[],_0x3a7ac8=_0x3d4a56[_0x3980('0xa')][_0x3980('0x7')];for(const _0xec0e13 of _0x47c777){const _0x23a049=_0x3d4a56[_0x3980('0x9')][_0x3980('0x2')](_0xec0e13[_0x3980('0xc')]);if(!_0x23a049)continue;const _0x33845f=Array[_0x3980('0x5')](_0x23a049)['map'](_0x59b4d3=>_0x3a7ac8[_0x3980('0xd')](_0x59b4d3));_0x3fa071[_0x3980('0xb')](..._0x33845f);}if(0x0===_0x3fa071[_0x3980('0x0')])return null;const _0x11990b=[];for(const _0x3187a6 of _0x3fa071){const _0x4bacb2=_0x3187a6[_0x3980('0x3')]()[_0x3980('0xe')](0x0);_0x4bacb2&&_0x11990b[_0x3980('0xb')]({'x':_0x4bacb2['x'],'y':_0x4bacb2['y'],'domElement':_0x3187a6});}return 0x0===_0x11990b[_0x3980('0x0')]?null:(_0x11990b[_0x3980('0x8')]((_0x120030,_0x252d2c)=>_0x120030['y']-_0x252d2c['y']||_0x120030['x']-_0x252d2c['x']),_0x11990b[_0x3980('0x4')](_0x4418e1=>_0x4418e1[_0x3980('0x6')]));}
23
+ const _0x1b2c=['domConverter','mapper','getClientRects','filter','map','values','from','markerNameToElements','mapViewToDom','name','view','push','length'];(function(_0xe35fcf,_0x1b2c70){const _0x3f6d4b=function(_0x1a646b){while(--_0x1a646b){_0xe35fcf['push'](_0xe35fcf['shift']());}};_0x3f6d4b(++_0x1b2c70);}(_0x1b2c,0x9f));const _0x3f6d=function(_0xe35fcf,_0x1b2c70){_0xe35fcf=_0xe35fcf-0x0;let _0x3f6d4b=_0x1b2c[_0xe35fcf];return _0x3f6d4b;};import{first as _0x726890}from'ckeditor5/src/utils';export default function k(_0x1299ed,_0x1d1c10){const _0x519bec=_0x1299ed[_0x3f6d('0xb')]['markerNameToElements'](_0x1d1c10[_0x3f6d('0x6')]);if(!_0x519bec)return null;const _0x4af494=_0x726890(_0x519bec[_0x3f6d('0x2')]());return _0x1299ed[_0x3f6d('0x7')][_0x3f6d('0xa')]['mapViewToDom'](_0x4af494)||null;}export function getAllMarkersDomElementsSorted(_0x3b9300,_0x14247c){if(0x0===_0x14247c['length'])return null;const _0x2b4290=[],_0x5ea68d=_0x3b9300[_0x3f6d('0x7')][_0x3f6d('0xa')];for(const _0x14bc9f of _0x14247c){const _0x230d0a=_0x3b9300['mapper'][_0x3f6d('0x4')](_0x14bc9f[_0x3f6d('0x6')]);if(!_0x230d0a)continue;const _0x387d69=Array[_0x3f6d('0x3')](_0x230d0a)[_0x3f6d('0x1')](_0x2645ab=>_0x5ea68d[_0x3f6d('0x5')](_0x2645ab))[_0x3f6d('0x0')](_0x4f414f=>!!_0x4f414f);_0x2b4290[_0x3f6d('0x8')](..._0x387d69);}if(0x0===_0x2b4290[_0x3f6d('0x9')])return null;const _0x2eabe5=[];for(const _0x17c369 of _0x2b4290){const _0x25c16d=_0x17c369[_0x3f6d('0xc')]()['item'](0x0);_0x25c16d&&_0x2eabe5[_0x3f6d('0x8')]({'x':_0x25c16d['x'],'y':_0x25c16d['y'],'domElement':_0x17c369});}return 0x0===_0x2eabe5['length']?null:(_0x2eabe5['sort']((_0x368af0,_0x537063)=>_0x368af0['y']-_0x537063['y']||_0x368af0['x']-_0x537063['x']),_0x2eabe5[_0x3f6d('0x1')](_0x5c0ed9=>_0x5c0ed9['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 _0x465d=['string','sign','object','boolean','sort','number'];(function(_0xf9ee72,_0x465dd4){const _0x420a95=function(_0x352766){while(--_0x352766){_0xf9ee72['push'](_0xf9ee72['shift']());}};_0x420a95(++_0x465dd4);}(_0x465d,0xa5));const _0x420a=function(_0xf9ee72,_0x465dd4){_0xf9ee72=_0xf9ee72-0x0;let _0x420a95=_0x465d[_0xf9ee72];return _0x420a95;};export default function b(_0x305071){let _0x5a3c4d=0x0,_0xb31da8=0x0;for(const _0xa2ab8f of g(_0x305071))_0x5a3c4d=(_0x5a3c4d<<0x5)-_0x5a3c4d+_0xa2ab8f,_0x5a3c4d&=_0x5a3c4d,[_0x5a3c4d,_0xb31da8]=[_0xb31da8,_0x5a3c4d];return O(_0x5a3c4d)+O(_0xb31da8);}function*j(_0x4f6f4f){_0x4f6f4f?_0x420a('0x0')==typeof _0x4f6f4f?yield 0x1:Array['isArray'](_0x4f6f4f)?yield*function*(_0x4c6fbc){for(const _0x2a22cb of _0x4c6fbc)yield*j(_0x2a22cb);}(_0x4f6f4f):_0x420a('0x5')==typeof _0x4f6f4f?yield*g(_0x4f6f4f):_0x420a('0x3')==typeof _0x4f6f4f?yield*A(_0x4f6f4f):_0x420a('0x2')==typeof _0x4f6f4f&&(yield _0x4f6f4f):yield 0x0;}function*g(_0x11124c){if(yield M('{'),_0x11124c){const _0x385b73=Object['keys'](_0x11124c)[_0x420a('0x1')]();for(const _0x58a602 of _0x385b73){yield*A(_0x58a602),yield M(':');const _0x160aad=_0x11124c[_0x58a602];yield*j(_0x160aad);}}yield M('}');}function*A(_0x512d95){yield M('\x22');for(const _0x2938b0 of _0x512d95)yield M(_0x2938b0);yield M('\x22');}function M(_0x5a5ce6){return _0x5a5ce6['charCodeAt'](0x0);}function O(_0x3c2a7d){return(_0x3c2a7d*=Math[_0x420a('0x4')](_0x3c2a7d))['toString'](0x24);}
23
+ const _0x222b=['number','sort','sign','charCodeAt','keys','toString','object','string','boolean'];(function(_0x24b01b,_0x222bd4){const _0x5e8542=function(_0x117b14){while(--_0x117b14){_0x24b01b['push'](_0x24b01b['shift']());}};_0x5e8542(++_0x222bd4);}(_0x222b,0xfe));const _0x5e85=function(_0x24b01b,_0x222bd4){_0x24b01b=_0x24b01b-0x0;let _0x5e8542=_0x222b[_0x24b01b];return _0x5e8542;};export default function b(_0x34e73a){let _0x539055=0x0,_0xce663d=0x0;for(const _0x3e9177 of g(_0x34e73a))_0x539055=(_0x539055<<0x5)-_0x539055+_0x3e9177,_0x539055&=_0x539055,[_0x539055,_0xce663d]=[_0xce663d,_0x539055];return O(_0x539055)+O(_0xce663d);}function*j(_0x8f13cf){_0x8f13cf?_0x5e85('0x6')==typeof _0x8f13cf?yield 0x1:Array['isArray'](_0x8f13cf)?yield*function*(_0xd703e9){for(const _0x52be73 of _0xd703e9)yield*j(_0x52be73);}(_0x8f13cf):_0x5e85('0x4')==typeof _0x8f13cf?yield*g(_0x8f13cf):_0x5e85('0x5')==typeof _0x8f13cf?yield*A(_0x8f13cf):_0x5e85('0x7')==typeof _0x8f13cf&&(yield _0x8f13cf):yield 0x0;}function*g(_0x59f74d){if(yield M('{'),_0x59f74d){const _0x3a74b8=Object[_0x5e85('0x2')](_0x59f74d)[_0x5e85('0x8')]();for(const _0x4c367f of _0x3a74b8){yield*A(_0x4c367f),yield M(':');const _0x4d1945=_0x59f74d[_0x4c367f];yield*j(_0x4d1945);}}yield M('}');}function*A(_0x21c094){yield M('\x22');for(const _0xca744a of _0x21c094)yield M(_0xca744a);yield M('\x22');}function M(_0x212897){return _0x212897[_0x5e85('0x1')](0x0);}function O(_0x571621){return(_0x571621*=Math[_0x5e85('0x0')](_0x571621))[_0x5e85('0x3')](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 _0x3775=['replace','slice','join','length','substring','pop','indexOf','split','startsWith','match','push'];(function(_0x4bac38,_0x3775ba){const _0x19a663=function(_0x3abf0e){while(--_0x3abf0e){_0x4bac38['push'](_0x4bac38['shift']());}};_0x19a663(++_0x3775ba);}(_0x3775,0x1a2));const _0x19a6=function(_0x4bac38,_0x3775ba){_0x4bac38=_0x4bac38-0x0;let _0x19a663=_0x3775[_0x4bac38];return _0x19a663;};export default function z(_0x5e2c52,{limit:_0x4ace25,suffix:_0xb961d6='...'}){const _0x239f0a=[];let _0x15aab5=0x0;const _0x283310=_0x5e2c52[_0x19a6('0x0')](/</g,'\x0a<')[_0x19a6('0x0')](/>/g,'>\x0a')[_0x19a6('0x0')](/^\n/g,'')[_0x19a6('0x0')](/\n$/g,'')[_0x19a6('0x7')]('\x0a');for(let _0x5e0d26=0x0;_0x5e0d26<_0x283310['length'];_0x5e0d26++){let _0x361367=_0x283310[_0x5e0d26];const _0x41c714=Z(_0x361367);if(_0x361367[_0x19a6('0x8')]('<')){if(_0x15aab5>=_0x4ace25){const _0x27f548=_0x361367[_0x19a6('0x9')](/[a-zA-Z]+/)[0x0];_0x361367['startsWith']('</')?(_0x239f0a[_0x19a6('0x3')]&&(_0x361367=''),_0x239f0a[_0x19a6('0x5')]()):(_0x239f0a[_0x19a6('0xa')](_0x27f548),_0x361367='');}}else{if(_0x15aab5>=_0x4ace25)_0x361367='';else{if(_0x15aab5+_0x41c714['length']>=_0x4ace25){let _0x4bd27c=_0x4ace25-_0x15aab5;if('\x20'===_0x41c714[_0x4bd27c-0x1])_0x4bd27c--;else{const _0x4a6c8a=_0x41c714[_0x19a6('0x1')](_0x4bd27c)[_0x19a6('0x6')]('\x20');-0x1!==_0x4a6c8a?_0x4bd27c+=_0x4a6c8a:_0x4bd27c=_0x361367[_0x19a6('0x3')];}_0x361367=_0x41c714[_0x19a6('0x1')](0x0,_0x4bd27c)[_0x19a6('0x2')]('')+_0xb961d6,_0x15aab5=_0x4ace25;}else _0x15aab5+=_0x41c714[_0x19a6('0x3')];}}_0x283310[_0x5e0d26]=_0x361367;}return _0x283310[_0x19a6('0x2')]('\x0a')[_0x19a6('0x0')](/\n/g,'');}function Z(_0x4560ca){const _0x143774=[];for(let _0x1ff6fb=0x0;_0x1ff6fb<_0x4560ca[_0x19a6('0x3')];_0x1ff6fb++){const _0x3c4e2e=_0x4560ca[_0x19a6('0x4')](_0x1ff6fb)[_0x19a6('0x9')](/^&[a-z0-9#]+;/);if(_0x3c4e2e){const _0x4c5322=_0x3c4e2e[0x0];_0x143774[_0x19a6('0xa')](_0x4c5322),_0x1ff6fb+=_0x4c5322[_0x19a6('0x3')]-0x1;}else _0x143774[_0x19a6('0xa')](_0x4560ca[_0x1ff6fb]);}return _0x143774;}
23
+ const _0x5980=['substring','match','push','replace','length','pop','startsWith','indexOf','slice','split','join'];(function(_0x2b8432,_0x598061){const _0x11f752=function(_0x25db62){while(--_0x25db62){_0x2b8432['push'](_0x2b8432['shift']());}};_0x11f752(++_0x598061);}(_0x5980,0x11a));const _0x11f7=function(_0x2b8432,_0x598061){_0x2b8432=_0x2b8432-0x0;let _0x11f752=_0x5980[_0x2b8432];return _0x11f752;};export default function z(_0x2ef4da,{limit:_0x2afa93,suffix:_0x40b6e1='...'}){const _0x5c0684=[];let _0x1854b4=0x0;const _0x55e81f=_0x2ef4da[_0x11f7('0x7')](/</g,'\x0a<')[_0x11f7('0x7')](/>/g,'>\x0a')[_0x11f7('0x7')](/^\n/g,'')[_0x11f7('0x7')](/\n$/g,'')[_0x11f7('0x2')]('\x0a');for(let _0x13c75d=0x0;_0x13c75d<_0x55e81f['length'];_0x13c75d++){let _0x4d40ce=_0x55e81f[_0x13c75d];const _0x14aebd=Z(_0x4d40ce);if(_0x4d40ce[_0x11f7('0xa')]('<')){if(_0x1854b4>=_0x2afa93){const _0xe51ef6=_0x4d40ce[_0x11f7('0x5')](/[a-zA-Z]+/);if(!_0xe51ef6){_0x55e81f[_0x13c75d]='';continue;}const _0x1c6985=_0xe51ef6[0x0];_0x4d40ce[_0x11f7('0xa')]('</')?(_0x5c0684[_0x11f7('0x8')]&&(_0x4d40ce=''),_0x5c0684[_0x11f7('0x9')]()):(_0x5c0684[_0x11f7('0x6')](_0x1c6985),_0x4d40ce='');}}else{if(_0x1854b4>=_0x2afa93)_0x4d40ce='';else{if(_0x1854b4+_0x14aebd[_0x11f7('0x8')]>=_0x2afa93){let _0x4702c9=_0x2afa93-_0x1854b4;if('\x20'===_0x14aebd[_0x4702c9-0x1])_0x4702c9--;else{const _0x4cf715=_0x14aebd[_0x11f7('0x1')](_0x4702c9)[_0x11f7('0x0')]('\x20');-0x1!==_0x4cf715?_0x4702c9+=_0x4cf715:_0x4702c9=_0x4d40ce['length'];}_0x4d40ce=_0x14aebd[_0x11f7('0x1')](0x0,_0x4702c9)[_0x11f7('0x3')]('')+_0x40b6e1,_0x1854b4=_0x2afa93;}else _0x1854b4+=_0x14aebd[_0x11f7('0x8')];}}_0x55e81f[_0x13c75d]=_0x4d40ce;}return _0x55e81f['join']('\x0a')[_0x11f7('0x7')](/\n/g,'');}function Z(_0x36c494){const _0x477cca=[];for(let _0x24dfc4=0x0;_0x24dfc4<_0x36c494['length'];_0x24dfc4++){const _0x2d60ef=_0x36c494[_0x11f7('0x4')](_0x24dfc4)['match'](/^&[a-z0-9#]+;/);if(_0x2d60ef){const _0x20d8c6=_0x2d60ef[0x0];_0x477cca[_0x11f7('0x6')](_0x20d8c6),_0x24dfc4+=_0x20d8c6[_0x11f7('0x8')]-0x1;}else _0x477cca[_0x11f7('0x6')](_0x36c494[_0x24dfc4]);}return _0x477cca;}
@@ -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 {