@ckeditor/ckeditor5-mention 44.3.0 → 45.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/build/mention.js +1 -1
- package/dist/index-editor.css +5 -1
- package/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/mentionui.d.ts +1 -1
- package/src/mentionui.js +21 -3
- package/src/ui/domwrapperview.js +4 -0
- package/src/ui/mentionlistitemview.js +2 -0
- package/src/ui/mentionsview.js +2 -0
- package/theme/mentionui.css +4 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-mention",
|
3
|
-
"version": "
|
3
|
+
"version": "45.0.0-alpha.1",
|
4
4
|
"description": "Mention feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -13,12 +13,12 @@
|
|
13
13
|
"type": "module",
|
14
14
|
"main": "src/index.js",
|
15
15
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-core": "
|
17
|
-
"@ckeditor/ckeditor5-typing": "
|
18
|
-
"@ckeditor/ckeditor5-ui": "
|
19
|
-
"@ckeditor/ckeditor5-utils": "
|
20
|
-
"ckeditor5": "
|
21
|
-
"
|
16
|
+
"@ckeditor/ckeditor5-core": "45.0.0-alpha.1",
|
17
|
+
"@ckeditor/ckeditor5-typing": "45.0.0-alpha.1",
|
18
|
+
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.1",
|
19
|
+
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.1",
|
20
|
+
"ckeditor5": "45.0.0-alpha.1",
|
21
|
+
"es-toolkit": "1.32.0"
|
22
22
|
},
|
23
23
|
"author": "CKSource (http://cksource.com/)",
|
24
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/mentionui.d.ts
CHANGED
@@ -26,7 +26,7 @@ export default class MentionUI extends Plugin {
|
|
26
26
|
private _items;
|
27
27
|
private _lastRequested?;
|
28
28
|
/**
|
29
|
-
* Debounced feed requester. It uses `
|
29
|
+
* Debounced feed requester. It uses `es-toolkit#debounce` method to delay function call.
|
30
30
|
*/
|
31
31
|
private _requestFeedDebounced;
|
32
32
|
/**
|
package/src/mentionui.js
CHANGED
@@ -9,7 +9,7 @@ import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { ButtonView, ContextualBalloon, clickOutsideHandler } from 'ckeditor5/src/ui.js';
|
10
10
|
import { CKEditorError, Collection, Rect, env, keyCodes, logWarning } from 'ckeditor5/src/utils.js';
|
11
11
|
import { TextWatcher } from 'ckeditor5/src/typing.js';
|
12
|
-
import { debounce } from '
|
12
|
+
import { debounce } from 'es-toolkit/compat';
|
13
13
|
import MentionsView from './ui/mentionsview.js';
|
14
14
|
import DomWrapperView from './ui/domwrapperview.js';
|
15
15
|
import MentionListItemView from './ui/mentionlistitemview.js';
|
@@ -29,6 +29,24 @@ const defaultCommitKeyCodes = [
|
|
29
29
|
* The mention UI feature.
|
30
30
|
*/
|
31
31
|
export default class MentionUI extends Plugin {
|
32
|
+
/**
|
33
|
+
* The mention view.
|
34
|
+
*/
|
35
|
+
_mentionsView;
|
36
|
+
/**
|
37
|
+
* Stores mention feeds configurations.
|
38
|
+
*/
|
39
|
+
_mentionsConfigurations;
|
40
|
+
/**
|
41
|
+
* The contextual balloon plugin instance.
|
42
|
+
*/
|
43
|
+
_balloon;
|
44
|
+
_items = new Collection();
|
45
|
+
_lastRequested;
|
46
|
+
/**
|
47
|
+
* Debounced feed requester. It uses `es-toolkit#debounce` method to delay function call.
|
48
|
+
*/
|
49
|
+
_requestFeedDebounced;
|
32
50
|
/**
|
33
51
|
* @inheritDoc
|
34
52
|
*/
|
@@ -52,7 +70,6 @@ export default class MentionUI extends Plugin {
|
|
52
70
|
*/
|
53
71
|
constructor(editor) {
|
54
72
|
super(editor);
|
55
|
-
this._items = new Collection();
|
56
73
|
this._mentionsView = this._createMentionView();
|
57
74
|
this._mentionsConfigurations = new Map();
|
58
75
|
this._requestFeedDebounced = debounce(this._requestFeed, 100);
|
@@ -332,7 +349,8 @@ export default class MentionUI extends Plugin {
|
|
332
349
|
this._balloon.add({
|
333
350
|
view: this._mentionsView,
|
334
351
|
position: this._getBalloonPanelPositionData(markerMarker, this._mentionsView.position),
|
335
|
-
singleViewMode: true
|
352
|
+
singleViewMode: true,
|
353
|
+
balloonClassName: 'ck-mention-balloon'
|
336
354
|
});
|
337
355
|
}
|
338
356
|
this._mentionsView.position = this._balloon.view.position;
|
package/src/ui/domwrapperview.js
CHANGED
@@ -12,6 +12,10 @@ import { View } from 'ckeditor5/src/ui.js';
|
|
12
12
|
* It allows to render any DOM element and use it in mentions list.
|
13
13
|
*/
|
14
14
|
export default class DomWrapperView extends View {
|
15
|
+
/**
|
16
|
+
* The DOM element for which wrapper was created.
|
17
|
+
*/
|
18
|
+
domElement;
|
15
19
|
/**
|
16
20
|
* Creates an instance of {@link module:mention/ui/domwrapperview~DomWrapperView} class.
|
17
21
|
*
|
package/src/ui/mentionsview.js
CHANGED