@ckeditor/ckeditor5-collaboration-core 40.0.0 → 40.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +5 -5
- package/package.json +2 -2
- package/src/augmentation.d.ts +38 -38
- package/src/collaborationhistory.d.ts +21 -21
- package/src/collaborationoperation.d.ts +28 -28
- package/src/config.d.ts +102 -102
- package/src/index.d.ts +19 -18
- package/src/index.js +1 -1
- package/src/permissions.d.ts +46 -45
- package/src/permissions.js +1 -1
- package/src/suggestionstyles.d.ts +12 -12
- package/src/users/view/userview.d.ts +16 -16
- package/src/users/view/userview.js +1 -1
- package/src/users.d.ts +161 -161
- package/src/users.js +1 -1
- package/src/utils/common-translations.d.ts +9 -9
- package/src/utils/common-translations.js +1 -1
- package/src/utils/confirmmixin.d.ts +20 -20
- package/src/utils/confirmmixin.js +1 -1
- package/src/utils/confirmview.d.ts +13 -13
- package/src/utils/confirmview.js +1 -1
- package/src/utils/getdatetimeformatter.d.ts +29 -29
- package/src/utils/getdatetimeformatter.js +1 -1
- package/src/utils/getmarkerdomelement.d.ts +22 -22
- package/src/utils/getmarkerdomelement.js +1 -1
- package/src/utils/hashobject.d.ts +8 -8
- package/src/utils/hashobject.js +1 -1
- package/src/utils/sanitizeEditorConfig.d.ts +15 -15
- package/src/utils/sanitizeEditorConfig.js +1 -1
- package/src/utils/surroundingmarkersdetector.d.ts +16 -0
- package/src/utils/surroundingmarkersdetector.js +23 -0
- package/src/utils/trim-html.d.ts +16 -16
- package/src/utils/trim-html.js +1 -1
- package/theme/suggestionmarker.css +2 -2
@@ -1,16 +1,16 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/users/view/userview
|
7
|
-
*/
|
8
|
-
import { View, type TemplateDefinition } from 'ckeditor5/src/ui';
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
-
import type { User } from '../../users';
|
11
|
-
import '../../../theme/users.css';
|
12
|
-
export default class UserView extends View {
|
13
|
-
name: string;
|
14
|
-
notificationView: TemplateDefinition | null;
|
15
|
-
constructor(locale: Locale, user: User, notificationText?: null | string);
|
16
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/users/view/userview
|
7
|
+
*/
|
8
|
+
import { View, type TemplateDefinition } from 'ckeditor5/src/ui';
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
+
import type { User } from '../../users';
|
11
|
+
import '../../../theme/users.css';
|
12
|
+
export default class UserView extends View {
|
13
|
+
name: string;
|
14
|
+
notificationView: TemplateDefinition | null;
|
15
|
+
constructor(locale: Locale, user: User, notificationText?: null | string);
|
16
|
+
}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x304b=['name','avatar','setTemplate','notificationView','ck-user__avatar','ck-user__anonymous','extendTemplate','ck\x20ck-user__name','push','initials','ck-user','url(\x27','ck\x20ck-user__name\x20ck-user__name--hidden','div'];(function(_0x5cb055,_0x304b8e){const _0x20477b=function(_0x30d817){while(--_0x30d817){_0x5cb055['push'](_0x5cb055['shift']());}};_0x20477b(++_0x304b8e);}(_0x304b,0x7c));const _0x2047=function(_0x5cb055,_0x304b8e){_0x5cb055=_0x5cb055-0x0;let _0x20477b=_0x304b[_0x5cb055];return _0x20477b;};import{View as _0x5d1bb6,IconView as _0x59d7b5}from'ckeditor5/src/ui';import _0x252157 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class C extends _0x5d1bb6{constructor(_0x53825e,_0x3ac28f,_0x46cd46){super(_0x53825e),this['name']=_0x3ac28f[_0x2047('0x2')],this[_0x2047('0x5')]=null;const _0x2c0367=['ck','ck-user__img'];if(_0x3ac28f['isAnonymous']&&_0x2c0367['push'](_0x2047('0x7')),_0x3ac28f[_0x2047('0x3')]&&_0x2c0367[_0x2047('0xa')](_0x2047('0x6')),_0x46cd46){const _0x700ec8=new _0x59d7b5();_0x700ec8[_0x2047('0x8')]({'attributes':{'class':['ck-user__icon']}}),_0x700ec8['content']=_0x252157,this[_0x2047('0x5')]={'tag':_0x2047('0x1'),'attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x46cd46},'children':[_0x700ec8]};}const _0x3d3baa=[{'tag':_0x2047('0x1'),'attributes':{'class':_0x2c0367,'style':{'background-image':_0x3ac28f['avatar']?_0x2047('0xd')+_0x3ac28f['avatar']+'\x27)':''}}},{'tag':_0x2047('0x1'),'attributes':{'class':_0x3ac28f[_0x2047('0x3')]?_0x2047('0x0'):_0x2047('0x9')},'children':[{'text':_0x3ac28f[_0x2047('0xb')]}]}];this['notificationView']&&_0x3d3baa[_0x2047('0xa')](this[_0x2047('0x5')]),this[_0x2047('0x4')]({'tag':_0x2047('0x1'),'attributes':{'class':['ck',_0x2047('0xc')],'data-user-id':_0x3ac28f['id']},'children':_0x3d3baa});}}
|
package/src/users.d.ts
CHANGED
@@ -1,161 +1,161 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/users
|
7
|
-
* @publicApi
|
8
|
-
*/
|
9
|
-
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
10
|
-
import { Collection } from 'ckeditor5/src/utils';
|
11
|
-
import Permissions from './permissions';
|
12
|
-
import '../theme/usercolors.css';
|
13
|
-
/**
|
14
|
-
* The `Users` plugin provides the basic interface for setting and getting users involved in the document editing process.
|
15
|
-
*/
|
16
|
-
export default class Users extends ContextPlugin {
|
17
|
-
licenseKey: string;
|
18
|
-
/**
|
19
|
-
* Holds all {@link module:collaboration-core/users~User users} added to the editor.
|
20
|
-
*
|
21
|
-
* Note, that the {@link module:collaboration-core/users~User#isAnonymous anonymous user} is always present in the editor.
|
22
|
-
* You may want to filter it out when processing the users lists.
|
23
|
-
*
|
24
|
-
* ```ts
|
25
|
-
* for ( const user of editor.plugins.get( 'Users' ).users ) {
|
26
|
-
* if ( !user.isAnonymous ) {
|
27
|
-
* console.log( user.name );
|
28
|
-
* }
|
29
|
-
* }
|
30
|
-
* ```
|
31
|
-
*
|
32
|
-
* Use {@link #addUser} to add a new user.
|
33
|
-
*/
|
34
|
-
readonly users: Collection<User>;
|
35
|
-
/**
|
36
|
-
* @inheritDoc
|
37
|
-
*/
|
38
|
-
static get pluginName(): "Users";
|
39
|
-
/**
|
40
|
-
* @inheritDoc
|
41
|
-
*/
|
42
|
-
static get requires(): readonly [typeof Permissions];
|
43
|
-
/**
|
44
|
-
* @inheritDoc
|
45
|
-
*/
|
46
|
-
constructor(context: Context | Editor);
|
47
|
-
/**
|
48
|
-
* @inheritDoc
|
49
|
-
*/
|
50
|
-
init(): void;
|
51
|
-
/**
|
52
|
-
* A reference to the local user or `null` if it has not been set.
|
53
|
-
*/
|
54
|
-
get me(): User | null;
|
55
|
-
/**
|
56
|
-
* Adds a new user to the list of users.
|
57
|
-
*/
|
58
|
-
addUser({ id, name, ...additionalData }: Partial<UserData>): User;
|
59
|
-
/**
|
60
|
-
* Returns the user with a given ID.
|
61
|
-
*/
|
62
|
-
getUser(id: string): User | null;
|
63
|
-
/**
|
64
|
-
* Sets an {@link module:collaboration-core/users~User#isAnonymous anonymous user} as {@link #me the local user}.
|
65
|
-
*
|
66
|
-
* The local user ID will be set to the value of `config.users.anonymousUserId` property. All actions performed by the local user
|
67
|
-
* will be contributed to the anonymous user.
|
68
|
-
*/
|
69
|
-
useAnonymousUser(): void;
|
70
|
-
/**
|
71
|
-
* Sets the user with the given ID as the local user ({@link #me}).
|
72
|
-
*
|
73
|
-
* The local user can be only set once (this includes setting anonymous as the local user).
|
74
|
-
*/
|
75
|
-
defineMe(userId: string): void;
|
76
|
-
/**
|
77
|
-
* Returns the author of the operation. It returns {@link #me} by default if it is not overwritten.
|
78
|
-
*/
|
79
|
-
getOperationAuthor(): User | null;
|
80
|
-
/**
|
81
|
-
* @inheritDoc
|
82
|
-
*/
|
83
|
-
destroy(): void;
|
84
|
-
}
|
85
|
-
/**
|
86
|
-
* The representation of a single user that is involved in document editing.
|
87
|
-
*/
|
88
|
-
export declare class User {
|
89
|
-
/**
|
90
|
-
* The ID of the user.
|
91
|
-
*/
|
92
|
-
id: string;
|
93
|
-
/**
|
94
|
-
* CSS colors classes object for the user.
|
95
|
-
*/
|
96
|
-
color: Color;
|
97
|
-
/**
|
98
|
-
* The name of the user.
|
99
|
-
*/
|
100
|
-
name: string;
|
101
|
-
/**
|
102
|
-
* The URL pointing to the image with the avatar of the user.
|
103
|
-
*
|
104
|
-
* If avatar is not set, default avatar is used.
|
105
|
-
*/
|
106
|
-
avatar: string | undefined;
|
107
|
-
/**
|
108
|
-
* @param data User data.
|
109
|
-
* @param data.id The ID of the user.
|
110
|
-
* @param data.color A helper object to generate CSS classes with the user color in the UI.
|
111
|
-
* @param data.name The name of the user.
|
112
|
-
* @param data.avatar The URL to the user avatar.
|
113
|
-
*/
|
114
|
-
constructor(data: UserData);
|
115
|
-
/**
|
116
|
-
* Is `true` for the anonymous user, `false` otherwise.
|
117
|
-
*
|
118
|
-
* The anonymous user is used when there is no defined user for given resource.
|
119
|
-
*
|
120
|
-
* The situations when the anonymous user is used will depend on your application. For example, it can be used when the editor can be
|
121
|
-
* used by "guest" users of your application, or when the original user's account was removed.
|
122
|
-
*/
|
123
|
-
get isAnonymous(): boolean;
|
124
|
-
/**
|
125
|
-
* The initials of the user.
|
126
|
-
*
|
127
|
-
* The initials are composed from the user name's first and last words:
|
128
|
-
*
|
129
|
-
* * for `Joe Doe`, the initials are `JD`,
|
130
|
-
* * for `Anonymous` the initials are `A`,
|
131
|
-
* * for `Katie John-Newman` the initials are `KJ`,
|
132
|
-
* * for `Adam Daniel Smith` the initials are `AS`.
|
133
|
-
*/
|
134
|
-
get initials(): string;
|
135
|
-
}
|
136
|
-
/**
|
137
|
-
* The color object used to generate specified CSS classes with an individual color number assigned to the user.
|
138
|
-
*/
|
139
|
-
declare class Color {
|
140
|
-
constructor(colorId: number);
|
141
|
-
/**
|
142
|
-
* Returns CSS class for user avatar background color.
|
143
|
-
*/
|
144
|
-
getBackgroundColorClass(): string;
|
145
|
-
/**
|
146
|
-
* Returns CSS class for user selection highlight (the selected range).
|
147
|
-
*/
|
148
|
-
getSelectionClass(): string;
|
149
|
-
/**
|
150
|
-
* Returns CSS class for user caret position element (the pipe).
|
151
|
-
*/
|
152
|
-
getMarkerClass(): string;
|
153
|
-
}
|
154
|
-
type UserData = {
|
155
|
-
id: string;
|
156
|
-
color: Color;
|
157
|
-
name: string;
|
158
|
-
avatar?: string;
|
159
|
-
_isAnonymous?: boolean;
|
160
|
-
};
|
161
|
-
export {};
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/users
|
7
|
+
* @publicApi
|
8
|
+
*/
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
|
10
|
+
import { Collection } from 'ckeditor5/src/utils';
|
11
|
+
import Permissions from './permissions';
|
12
|
+
import '../theme/usercolors.css';
|
13
|
+
/**
|
14
|
+
* The `Users` plugin provides the basic interface for setting and getting users involved in the document editing process.
|
15
|
+
*/
|
16
|
+
export default class Users extends ContextPlugin {
|
17
|
+
licenseKey: string;
|
18
|
+
/**
|
19
|
+
* Holds all {@link module:collaboration-core/users~User users} added to the editor.
|
20
|
+
*
|
21
|
+
* Note, that the {@link module:collaboration-core/users~User#isAnonymous anonymous user} is always present in the editor.
|
22
|
+
* You may want to filter it out when processing the users lists.
|
23
|
+
*
|
24
|
+
* ```ts
|
25
|
+
* for ( const user of editor.plugins.get( 'Users' ).users ) {
|
26
|
+
* if ( !user.isAnonymous ) {
|
27
|
+
* console.log( user.name );
|
28
|
+
* }
|
29
|
+
* }
|
30
|
+
* ```
|
31
|
+
*
|
32
|
+
* Use {@link #addUser} to add a new user.
|
33
|
+
*/
|
34
|
+
readonly users: Collection<User>;
|
35
|
+
/**
|
36
|
+
* @inheritDoc
|
37
|
+
*/
|
38
|
+
static get pluginName(): "Users";
|
39
|
+
/**
|
40
|
+
* @inheritDoc
|
41
|
+
*/
|
42
|
+
static get requires(): readonly [typeof Permissions];
|
43
|
+
/**
|
44
|
+
* @inheritDoc
|
45
|
+
*/
|
46
|
+
constructor(context: Context | Editor);
|
47
|
+
/**
|
48
|
+
* @inheritDoc
|
49
|
+
*/
|
50
|
+
init(): void;
|
51
|
+
/**
|
52
|
+
* A reference to the local user or `null` if it has not been set.
|
53
|
+
*/
|
54
|
+
get me(): User | null;
|
55
|
+
/**
|
56
|
+
* Adds a new user to the list of users.
|
57
|
+
*/
|
58
|
+
addUser({ id, name, ...additionalData }: Partial<UserData>): User;
|
59
|
+
/**
|
60
|
+
* Returns the user with a given ID.
|
61
|
+
*/
|
62
|
+
getUser(id: string): User | null;
|
63
|
+
/**
|
64
|
+
* Sets an {@link module:collaboration-core/users~User#isAnonymous anonymous user} as {@link #me the local user}.
|
65
|
+
*
|
66
|
+
* The local user ID will be set to the value of `config.users.anonymousUserId` property. All actions performed by the local user
|
67
|
+
* will be contributed to the anonymous user.
|
68
|
+
*/
|
69
|
+
useAnonymousUser(): void;
|
70
|
+
/**
|
71
|
+
* Sets the user with the given ID as the local user ({@link #me}).
|
72
|
+
*
|
73
|
+
* The local user can be only set once (this includes setting anonymous as the local user).
|
74
|
+
*/
|
75
|
+
defineMe(userId: string): void;
|
76
|
+
/**
|
77
|
+
* Returns the author of the operation. It returns {@link #me} by default if it is not overwritten.
|
78
|
+
*/
|
79
|
+
getOperationAuthor(): User | null;
|
80
|
+
/**
|
81
|
+
* @inheritDoc
|
82
|
+
*/
|
83
|
+
destroy(): void;
|
84
|
+
}
|
85
|
+
/**
|
86
|
+
* The representation of a single user that is involved in document editing.
|
87
|
+
*/
|
88
|
+
export declare class User {
|
89
|
+
/**
|
90
|
+
* The ID of the user.
|
91
|
+
*/
|
92
|
+
id: string;
|
93
|
+
/**
|
94
|
+
* CSS colors classes object for the user.
|
95
|
+
*/
|
96
|
+
color: Color;
|
97
|
+
/**
|
98
|
+
* The name of the user.
|
99
|
+
*/
|
100
|
+
name: string;
|
101
|
+
/**
|
102
|
+
* The URL pointing to the image with the avatar of the user.
|
103
|
+
*
|
104
|
+
* If avatar is not set, default avatar is used.
|
105
|
+
*/
|
106
|
+
avatar: string | undefined;
|
107
|
+
/**
|
108
|
+
* @param data User data.
|
109
|
+
* @param data.id The ID of the user.
|
110
|
+
* @param data.color A helper object to generate CSS classes with the user color in the UI.
|
111
|
+
* @param data.name The name of the user.
|
112
|
+
* @param data.avatar The URL to the user avatar.
|
113
|
+
*/
|
114
|
+
constructor(data: UserData);
|
115
|
+
/**
|
116
|
+
* Is `true` for the anonymous user, `false` otherwise.
|
117
|
+
*
|
118
|
+
* The anonymous user is used when there is no defined user for given resource.
|
119
|
+
*
|
120
|
+
* The situations when the anonymous user is used will depend on your application. For example, it can be used when the editor can be
|
121
|
+
* used by "guest" users of your application, or when the original user's account was removed.
|
122
|
+
*/
|
123
|
+
get isAnonymous(): boolean;
|
124
|
+
/**
|
125
|
+
* The initials of the user.
|
126
|
+
*
|
127
|
+
* The initials are composed from the user name's first and last words:
|
128
|
+
*
|
129
|
+
* * for `Joe Doe`, the initials are `JD`,
|
130
|
+
* * for `Anonymous` the initials are `A`,
|
131
|
+
* * for `Katie John-Newman` the initials are `KJ`,
|
132
|
+
* * for `Adam Daniel Smith` the initials are `AS`.
|
133
|
+
*/
|
134
|
+
get initials(): string;
|
135
|
+
}
|
136
|
+
/**
|
137
|
+
* The color object used to generate specified CSS classes with an individual color number assigned to the user.
|
138
|
+
*/
|
139
|
+
declare class Color {
|
140
|
+
constructor(colorId: number);
|
141
|
+
/**
|
142
|
+
* Returns CSS class for user avatar background color.
|
143
|
+
*/
|
144
|
+
getBackgroundColorClass(): string;
|
145
|
+
/**
|
146
|
+
* Returns CSS class for user selection highlight (the selected range).
|
147
|
+
*/
|
148
|
+
getSelectionClass(): string;
|
149
|
+
/**
|
150
|
+
* Returns CSS class for user caret position element (the pipe).
|
151
|
+
*/
|
152
|
+
getMarkerClass(): string;
|
153
|
+
}
|
154
|
+
type UserData = {
|
155
|
+
id: string;
|
156
|
+
color: Color;
|
157
|
+
name: string;
|
158
|
+
avatar?: string;
|
159
|
+
_isAnonymous?: boolean;
|
160
|
+
};
|
161
|
+
export {};
|
package/src/users.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x16de=['context','_locale','getUser','useAnonymousUser','pluginName','string','_addAnonymousUser','add','locale','defineMe','users.anonymousUserId','licenseKey','includes','licenseKeyTrialLimit:operations','users-me-missing-user','licenseKeyValid','avatar','users.colorsCount','info','getBackgroundColorClass','anonymous-user','config','requires','split','charAt','licenseKeyTrialLimit:time','init','ck-user__marker--','length','licenseKeyTrial','_getInitial','trial-license-key-reached-limit-revisions','users-add-invalid-id','trim','_id','_getNextColor','users-me-already-defined','getOperationAuthor','initials','name','color','destroy','licenseKeyTrialLimit:revisions','define','Users','decorate','users-add-duplicated-id','get','addUser','_myId','Anonymous','_lastColor','_licenseKeyCheckInterval','_isAnonymous','toUpperCase','licenseKeyInvalid','has','ck-user__selection--','getMarkerClass','isAnonymous','users','trial-license-key-reached-limit-changes'];(function(_0x55a658,_0x16de49){const _0x286f6a=function(_0x386cc5){while(--_0x386cc5){_0x55a658['push'](_0x55a658['shift']());}};_0x286f6a(++_0x16de49);}(_0x16de,0x1cc));const _0x286f=function(_0x55a658,_0x16de49){_0x55a658=_0x55a658-0x0;let _0x286f6a=_0x16de[_0x55a658];return _0x286f6a;};import{ContextPlugin as _0x4938a6}from'ckeditor5/src/core';import{Collection as _0x4e1d08,CKEditorError as _0x56dd20}from'ckeditor5/src/utils';import _0x26ea13 from'./permissions';import{getTranslation as _0x1e2661}from'./utils/common-translations';import'../theme/usercolors.css';export default class l extends _0x4938a6{static get[_0x286f('0x28')](){return _0x286f('0x12');}static get[_0x286f('0x3a')](){return[_0x26ea13];}constructor(_0x17a965){super(_0x17a965),this[_0x286f('0x24')]['config'][_0x286f('0x11')](_0x286f('0x2e'),_0x286f('0x38')),this['context']['config'][_0x286f('0x11')]('users.colorsCount',0x8),this['users']=new _0x4e1d08(),this[_0x286f('0x25')]=_0x17a965[_0x286f('0x2c')],this[_0x286f('0x1a')]=null,this[_0x286f('0x19')]=0x0,this[_0x286f('0x17')]=null,this[_0x286f('0x13')](_0x286f('0xb'));}[_0x286f('0x0')](){const _0x33a35e=this[_0x286f('0x24')];this[_0x286f('0x2f')]=_0x33a35e['config'][_0x286f('0x15')](_0x286f('0x2f'));const _0x28c235=[_0x286f('0x3'),'licenseKeyInvalid',_0x286f('0x33'),'licenseKeyTrialLimit:operations',_0x286f('0x3d'),_0x286f('0x10')];this[_0x286f('0x1a')]=setInterval(()=>{let _0x209f16;for(const _0x29da21 in _0x33a35e){const _0x4d483d=_0x33a35e[_0x29da21];if(_0x28c235[_0x286f('0x30')](_0x4d483d)){delete _0x33a35e[_0x29da21],_0x209f16=_0x4d483d;break;}}if(_0x286f('0x1d')===_0x209f16)throw clearInterval(this[_0x286f('0x1a')]),new _0x56dd20('invalid-license-key',null);if(_0x286f('0x3')===_0x209f16&&console[_0x286f('0x36')]('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.'),_0x286f('0x31')===_0x209f16)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x56dd20(_0x286f('0x23'),null);if(_0x286f('0x3d')===_0x209f16)throw clearInterval(this[_0x286f('0x1a')]),new _0x56dd20('trial-license-key-reached-limit-time',null);if(_0x286f('0x10')===_0x209f16)throw clearInterval(this[_0x286f('0x1a')]),new _0x56dd20(_0x286f('0x5'),null);_0x286f('0x33')===_0x209f16&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this[_0x286f('0x2a')]();}get['me'](){return null==this[_0x286f('0x17')]?null:this[_0x286f('0x26')](this['_myId']);}[_0x286f('0x16')]({id:_0x40ef6d,name:_0x44eef3,..._0x15d7ea}){if(!_0x40ef6d||_0x286f('0x29')!=typeof _0x40ef6d)throw new _0x56dd20(_0x286f('0x6'));if(this[_0x286f('0x22')][_0x286f('0x1e')](_0x40ef6d))throw new _0x56dd20(_0x286f('0x14'),null,{'id':_0x40ef6d});const _0x1dc794={..._0x15d7ea,'id':_0x40ef6d,'name':a(this['_locale'],_0x44eef3),'color':this[_0x286f('0x9')]()};_0x1dc794[_0x286f('0xd')]=a(this[_0x286f('0x25')],_0x1dc794[_0x286f('0xd')]);const _0x1ccb20=new User(_0x1dc794);return this[_0x286f('0x22')][_0x286f('0x2b')](_0x1ccb20),_0x1ccb20;}['getUser'](_0x386a47){return this[_0x286f('0x22')]['get'](_0x386a47);}[_0x286f('0x27')](){const _0x3b8d54=this[_0x286f('0x24')][_0x286f('0x39')][_0x286f('0x15')](_0x286f('0x2e'));this[_0x286f('0x17')]||this[_0x286f('0x2d')](_0x3b8d54);}['defineMe'](_0x402e61){if(this[_0x286f('0x17')])throw new _0x56dd20(_0x286f('0xa'),null);if(!this[_0x286f('0x26')](_0x402e61))throw new _0x56dd20(_0x286f('0x32'),null);this[_0x286f('0x17')]=_0x402e61;}['getOperationAuthor'](){return this['me'];}[_0x286f('0xf')](){super['destroy'](),clearInterval(this[_0x286f('0x1a')]);}[_0x286f('0x9')](){const _0x1aba40=this['context'][_0x286f('0x39')][_0x286f('0x15')](_0x286f('0x35'));return this[_0x286f('0x19')]>=_0x1aba40&&(this['_lastColor']=0x0),new u(this[_0x286f('0x19')]++);}[_0x286f('0x2a')](){const _0x41224a=this[_0x286f('0x24')]['config'][_0x286f('0x15')]('users.anonymousUserId');this[_0x286f('0x16')]({'id':_0x41224a,'name':_0x1e2661(this['_locale'],_0x286f('0x18'))})['_isAnonymous']=!0x0;}}export class User{constructor(_0x4ada04){this['id']=_0x4ada04['id'],this[_0x286f('0xe')]=_0x4ada04[_0x286f('0xe')],this[_0x286f('0xd')]=_0x4ada04['name'],this[_0x286f('0x34')]=_0x4ada04[_0x286f('0x34')],this[_0x286f('0x1b')]=!0x1;}get[_0x286f('0x21')](){return this[_0x286f('0x1b')];}get[_0x286f('0xc')](){const _0x2dffb5=this[_0x286f('0xd')][_0x286f('0x3b')]('\x20');return 0x1===_0x2dffb5[_0x286f('0x2')]?this[_0x286f('0x4')](_0x2dffb5[0x0]):this[_0x286f('0x4')](_0x2dffb5[0x0])+this['_getInitial'](_0x2dffb5[_0x2dffb5[_0x286f('0x2')]-0x1]);}[_0x286f('0x4')](_0x13fb5b){return _0x13fb5b[_0x286f('0x3c')](0x0)[_0x286f('0x1c')]();}}function a(_0x59881f,_0x5b291e=''){return''==(_0x5b291e=_0x5b291e[_0x286f('0x7')]())?_0x1e2661(_0x59881f,_0x286f('0x18')):_0x5b291e;}class u{constructor(_0x488494){this[_0x286f('0x8')]=_0x488494;}[_0x286f('0x37')](){return'ck-user__bg-color--'+this[_0x286f('0x8')];}['getSelectionClass'](){return _0x286f('0x1f')+this[_0x286f('0x8')];}[_0x286f('0x20')](){return _0x286f('0x1')+this[_0x286f('0x8')];}}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module collaboration-core/utils/common-translations
|
7
|
-
*/
|
8
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
9
|
-
export declare function getTranslation(locale: Locale, id: string): string;
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module collaboration-core/utils/common-translations
|
7
|
+
*/
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
9
|
+
export declare function getTranslation(locale: Locale, id: string): string;
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
export function getTranslation(
|
23
|
+
export function getTranslation(_0x2b4476,_0x44d6b3){const t=_0x2b4476['t'];switch(_0x44d6b3){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'';}}
|
@@ -1,20 +1,20 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module comments/comments/ui/view/confirmmixin
|
7
|
-
*/
|
8
|
-
import type { View } from 'ckeditor5/src/ui';
|
9
|
-
import type { Locale, Mixed } from 'ckeditor5/src/utils';
|
10
|
-
/**
|
11
|
-
* Adds interface for showing confirmation view in the specific for `CommentThreadView` and `CommentView` structure
|
12
|
-
* Confirm is always set to the `content` collection at the last position.
|
13
|
-
*/
|
14
|
-
export default function ConfirmMixin<Base extends new (...args: Array<any>) => View>(base: Base): Mixed<Base, ConfirmApi>;
|
15
|
-
export interface ConfirmApi {
|
16
|
-
isConfirm: boolean;
|
17
|
-
locale: Locale;
|
18
|
-
showConfirm(message: string, element: Element): Promise<unknown>;
|
19
|
-
cancelConfirm(): void;
|
20
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module comments/comments/ui/view/confirmmixin
|
7
|
+
*/
|
8
|
+
import type { View } from 'ckeditor5/src/ui';
|
9
|
+
import type { Locale, Mixed } from 'ckeditor5/src/utils';
|
10
|
+
/**
|
11
|
+
* Adds interface for showing confirmation view in the specific for `CommentThreadView` and `CommentView` structure
|
12
|
+
* Confirm is always set to the `content` collection at the last position.
|
13
|
+
*/
|
14
|
+
export default function ConfirmMixin<Base extends new (...args: Array<any>) => View>(base: Base): Mixed<Base, ConfirmApi>;
|
15
|
+
export interface ConfirmApi {
|
16
|
+
isConfirm: boolean;
|
17
|
+
locale: Locale;
|
18
|
+
showConfirm(message: string, element: Element): Promise<unknown>;
|
19
|
+
cancelConfirm(): void;
|
20
|
+
}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
var
|
23
|
+
var _0x37bd=['appendChild','set','destroy','_removeConfirm','deregisterChild','showConfirm','registerChild','isConfirm','focus','cancel','confirmView','once','element','render','locale','fire'];(function(_0x55eee5,_0x37bddb){var _0x5f2813=function(_0x3cdda4){while(--_0x3cdda4){_0x55eee5['push'](_0x55eee5['shift']());}};_0x5f2813(++_0x37bddb);}(_0x37bd,0x7a));var _0x5f28=function(_0x55eee5,_0x37bddb){_0x55eee5=_0x55eee5-0x0;var _0x5f2813=_0x37bd[_0x55eee5];return _0x5f2813;};import _0x529d28 from'./confirmview';export default function m(_0x1f11cf){return class extends _0x1f11cf{[_0x5f28('0xb')](_0x5c4253,_0x4568fd){return this['confirmView']=new _0x529d28(this[_0x5f28('0x4')]),this[_0x5f28('0x0')][_0x5f28('0x3')](),this[_0x5f28('0x0')]['message']=_0x5c4253,this[_0x5f28('0x0')][_0x5f28('0x1')](_0x5f28('0xf'),()=>{this[_0x5f28('0x9')]();}),this[_0x5f28('0x0')][_0x5f28('0x1')]('submit',()=>{this[_0x5f28('0x9')]();}),_0x4568fd[_0x5f28('0x6')](this['confirmView'][_0x5f28('0x2')]),this[_0x5f28('0xc')](this[_0x5f28('0x0')]),this[_0x5f28('0x2')][_0x5f28('0xe')](),this[_0x5f28('0x7')](_0x5f28('0xd'),!0x0),new Promise(_0x13933d=>this[_0x5f28('0x0')]['on']('submit',_0x13933d));}['cancelConfirm'](){this[_0x5f28('0xd')]&&this[_0x5f28('0x0')][_0x5f28('0x5')](_0x5f28('0xf'));}[_0x5f28('0x9')](){this[_0x5f28('0x2')]&&this[_0x5f28('0x0')]&&this[_0x5f28('0x0')][_0x5f28('0x2')]&&(this['element'][_0x5f28('0xe')](),this['confirmView'][_0x5f28('0x2')]['remove'](),this[_0x5f28('0xa')](this[_0x5f28('0x0')]),this[_0x5f28('0xd')]=!0x1,this[_0x5f28('0x0')][_0x5f28('0x8')](),this[_0x5f28('0x0')]=void 0x0);}};}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @module comments/comments/ui/view/confirmview
|
7
|
-
*/
|
8
|
-
import { View } from 'ckeditor5/src/ui';
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
-
export default class ConfirmView extends View {
|
11
|
-
message: string;
|
12
|
-
constructor(locale: Locale);
|
13
|
-
}
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module comments/comments/ui/view/confirmview
|
7
|
+
*/
|
8
|
+
import { View } from 'ckeditor5/src/ui';
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
10
|
+
export default class ConfirmView extends View {
|
11
|
+
message: string;
|
12
|
+
constructor(locale: Locale);
|
13
|
+
}
|
package/src/utils/confirmview.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const _0x2a94=['cancel','ck-thread__remove-confirm','bindTemplate','set','setTemplate','submit','icon','fire','cancelView','ck-thread__remove-confirm-','label','div','submitView','message','check','execute'];(function(_0x35cb57,_0x2a9457){const _0x39db85=function(_0x567752){while(--_0x567752){_0x35cb57['push'](_0x35cb57['shift']());}};_0x39db85(++_0x2a9457);}(_0x2a94,0x146));const _0x39db=function(_0x35cb57,_0x2a9457){_0x35cb57=_0x35cb57-0x0;let _0x39db85=_0x2a94[_0x35cb57];return _0x39db85;};import{View as _0x49fe4c,ButtonView as _0x1487e8}from'ckeditor5/src/ui';import{icons as _0x5a2ac7}from'ckeditor5/src/core';import{getTranslation as _0x395d31}from'./common-translations';export default class h extends _0x49fe4c{constructor(_0x10939e){super(_0x10939e);const _0xe0d727=this[_0x39db('0xc')];this['submitView']=this['_createButtonView'](_0x10939e,_0x395d31(_0x10939e,'Yes'),_0x5a2ac7[_0x39db('0x8')],_0x39db('0xf')),this[_0x39db('0x2')]=this['_createButtonView'](_0x10939e,_0x395d31(_0x10939e,'No'),_0x5a2ac7['cancel'],_0x39db('0xa')),this[_0x39db('0xd')]('message',_0x395d31(_0x10939e,'Are\x20you\x20sure?')),this[_0x39db('0xe')]({'tag':'div','attributes':{'class':[_0x39db('0xb')]},'children':[{'tag':_0x39db('0x5'),'attributes':{'class':'ck-thread__remove-confirm-inner'},'children':[{'tag':'p','children':[{'text':_0xe0d727['to'](_0x39db('0x7'))}]},{'tag':_0x39db('0x5'),'attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this[_0x39db('0x6')],this[_0x39db('0x2')]]}]}]});}['_createButtonView'](_0x35bc91,_0x32e301,_0x4b4aa3,_0x367c67){const _0x34c1f3=new _0x1487e8(_0x35bc91);return _0x34c1f3[_0x39db('0x4')]=_0x32e301,_0x34c1f3[_0x39db('0x0')]=_0x4b4aa3,_0x34c1f3['extendTemplate']({'attributes':{'class':_0x39db('0x3')+_0x367c67}}),_0x34c1f3['on'](_0x39db('0x9'),()=>this[_0x39db('0x1')](_0x367c67)),_0x34c1f3;}}
|