@ckeditor/ckeditor5-mention 44.3.0-alpha.7 → 45.0.0-alpha.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-mention",
3
- "version": "44.3.0-alpha.7",
3
+ "version": "45.0.0-alpha.0",
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": "44.3.0-alpha.7",
17
- "@ckeditor/ckeditor5-typing": "44.3.0-alpha.7",
18
- "@ckeditor/ckeditor5-ui": "44.3.0-alpha.7",
19
- "@ckeditor/ckeditor5-utils": "44.3.0-alpha.7",
20
- "ckeditor5": "44.3.0-alpha.7",
21
- "lodash-es": "4.17.21"
16
+ "@ckeditor/ckeditor5-core": "45.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-typing": "45.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-utils": "45.0.0-alpha.0",
20
+ "ckeditor5": "45.0.0-alpha.0",
21
+ "es-toolkit": "1.32.0"
22
22
  },
23
23
  "author": "CKSource (http://cksource.com/)",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
@@ -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 `lodash#debounce` method to delay function call.
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 'lodash-es';
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;
@@ -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
  *
@@ -7,6 +7,8 @@
7
7
  */
8
8
  import { ListItemView } from 'ckeditor5/src/ui.js';
9
9
  export default class MentionListItemView extends ListItemView {
10
+ item;
11
+ marker;
10
12
  highlight() {
11
13
  const child = this.children.first;
12
14
  child.isOn = true;
@@ -12,6 +12,8 @@ import '../../theme/mentionui.css';
12
12
  * The mention ui view.
13
13
  */
14
14
  export default class MentionsView extends ListView {
15
+ selected;
16
+ position;
15
17
  /**
16
18
  * @inheritDoc
17
19
  */
@@ -25,3 +25,7 @@
25
25
  flex-shrink: 0;
26
26
  }
27
27
  }
28
+
29
+ div.ck.ck-balloon-panel.ck-mention-balloon {
30
+ z-index: calc( var( --ck-z-dialog ) + 1 );
31
+ }