@atlaskit/editor-plugin-mentions 2.6.6 → 2.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 2.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#148601](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148601)
8
+ [`e11f6a141cfe5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e11f6a141cfe5) -
9
+ [ED-23460] **@atlaskit/editor-plugin-mentions**: Track when mention providers fail to resolve
10
+ **@atlaskit/editor-common**: Add enums for mention provider reporting
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 2.6.7
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 2.6.6
4
23
 
5
24
  ### Patch Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.createMentionPlugin = createMentionPlugin;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _analytics = require("@atlaskit/editor-common/analytics");
9
10
  var _reactNodeView = require("@atlaskit/editor-common/react-node-view");
10
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
12
  var _utils = require("@atlaskit/editor-prosemirror/utils");
@@ -105,6 +106,12 @@ function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
105
106
  setProvider(provider)(editorView.state, editorView.dispatch);
106
107
  provider.subscribe('mentionPlugin', undefined, undefined, undefined, undefined, sendAnalytics);
107
108
  }).catch(function () {
109
+ fireEvent({
110
+ action: _analytics.ACTION.ERRORED,
111
+ actionSubject: _analytics.ACTION_SUBJECT.MENTION,
112
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.MENTION_PROVIDER,
113
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL
114
+ });
108
115
  return setProvider(undefined)(editorView.state, editorView.dispatch);
109
116
  });
110
117
  break;
@@ -1,3 +1,4 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
1
2
  import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
2
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
4
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
@@ -95,7 +96,15 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
95
96
  mentionProvider = provider;
96
97
  setProvider(provider)(editorView.state, editorView.dispatch);
97
98
  provider.subscribe('mentionPlugin', undefined, undefined, undefined, undefined, sendAnalytics);
98
- }).catch(() => setProvider(undefined)(editorView.state, editorView.dispatch));
99
+ }).catch(() => {
100
+ fireEvent({
101
+ action: ACTION.ERRORED,
102
+ actionSubject: ACTION_SUBJECT.MENTION,
103
+ actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
104
+ eventType: EVENT_TYPE.OPERATIONAL
105
+ });
106
+ return setProvider(undefined)(editorView.state, editorView.dispatch);
107
+ });
99
108
  break;
100
109
  }
101
110
  return;
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
4
5
  import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
5
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
7
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
@@ -98,6 +99,12 @@ export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
98
99
  setProvider(provider)(editorView.state, editorView.dispatch);
99
100
  provider.subscribe('mentionPlugin', undefined, undefined, undefined, undefined, sendAnalytics);
100
101
  }).catch(function () {
102
+ fireEvent({
103
+ action: ACTION.ERRORED,
104
+ actionSubject: ACTION_SUBJECT.MENTION,
105
+ actionSubjectId: ACTION_SUBJECT_ID.MENTION_PROVIDER,
106
+ eventType: EVENT_TYPE.OPERATIONAL
107
+ });
101
108
  return setProvider(undefined)(editorView.state, editorView.dispatch);
102
109
  });
103
110
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "2.6.6",
3
+ "version": "2.7.0",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^40.9.0",
35
35
  "@atlaskit/analytics-gas-types": "^5.1.0",
36
- "@atlaskit/editor-common": "^92.0.0",
36
+ "@atlaskit/editor-common": "^93.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
38
38
  "@atlaskit/editor-plugin-context-identifier": "^1.3.0",
39
39
  "@atlaskit/editor-plugin-type-ahead": "^1.8.0",
40
40
  "@atlaskit/editor-prosemirror": "6.0.0",
41
- "@atlaskit/icon": "^22.19.0",
41
+ "@atlaskit/icon": "^22.20.0",
42
42
  "@atlaskit/mention": "^23.3.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
44
  "@atlaskit/theme": "^13.0.0",