@atlaskit/editor-plugin-annotation 0.3.2 → 0.3.4

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,17 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 0.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572) [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) - Upgrading @atlaskit/editor-prosemirror dependency
8
+
9
+ ## 0.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#65713](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65713) [`7a7d83f8e361`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7a7d83f8e361) - Analytics for create inline comment button in highlight actions menu
14
+
3
15
  ## 0.3.2
4
16
 
5
17
  ### Patch Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.buildToolbar = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _analytics = require("@atlaskit/editor-common/analytics");
9
10
  var _keymaps = require("@atlaskit/editor-common/keymaps");
10
11
  var _messages = require("@atlaskit/editor-common/messages");
11
12
  var _utils = require("@atlaskit/editor-common/utils");
@@ -35,6 +36,18 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
35
36
  }),
36
37
  title: createCommentMessage,
37
38
  onClick: function onClick(state, dispatch) {
39
+ if (editorAnalyticsAPI) {
40
+ editorAnalyticsAPI.fireAnalyticsEvent({
41
+ action: _analytics.ACTION.CLICKED,
42
+ actionSubject: _analytics.ACTION_SUBJECT.BUTTON,
43
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
44
+ eventType: _analytics.EVENT_TYPE.UI,
45
+ attributes: {
46
+ source: 'highlightActionsMenu',
47
+ pageMode: 'edit'
48
+ }
49
+ });
50
+ }
38
51
  return (0, _commands.setInlineCommentDraftState)(editorAnalyticsAPI)(true)(state, dispatch);
39
52
  },
40
53
  supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
3
  import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
3
4
  import { annotationMessages } from '@atlaskit/editor-common/messages';
4
5
  import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
@@ -28,6 +29,18 @@ export const buildToolbar = editorAnalyticsAPI => (state, intl, isToolbarAbove =
28
29
  }),
29
30
  title: createCommentMessage,
30
31
  onClick: (state, dispatch) => {
32
+ if (editorAnalyticsAPI) {
33
+ editorAnalyticsAPI.fireAnalyticsEvent({
34
+ action: ACTION.CLICKED,
35
+ actionSubject: ACTION_SUBJECT.BUTTON,
36
+ actionSubjectId: ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
37
+ eventType: EVENT_TYPE.UI,
38
+ attributes: {
39
+ source: 'highlightActionsMenu',
40
+ pageMode: 'edit'
41
+ }
42
+ });
43
+ }
31
44
  return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
32
45
  },
33
46
  supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
3
  import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
3
4
  import { annotationMessages } from '@atlaskit/editor-common/messages';
4
5
  import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
@@ -28,6 +29,18 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
28
29
  }),
29
30
  title: createCommentMessage,
30
31
  onClick: function onClick(state, dispatch) {
32
+ if (editorAnalyticsAPI) {
33
+ editorAnalyticsAPI.fireAnalyticsEvent({
34
+ action: ACTION.CLICKED,
35
+ actionSubject: ACTION_SUBJECT.BUTTON,
36
+ actionSubjectId: ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
37
+ eventType: EVENT_TYPE.UI,
38
+ attributes: {
39
+ source: 'highlightActionsMenu',
40
+ pageMode: 'edit'
41
+ }
42
+ });
43
+ }
31
44
  return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
32
45
  },
33
46
  supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,10 +33,10 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^35.5.1",
36
- "@atlaskit/editor-common": "^77.2.0",
36
+ "@atlaskit/editor-common": "^77.3.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
38
38
  "@atlaskit/editor-plugin-editor-viewmode": "^0.1.0",
39
- "@atlaskit/editor-prosemirror": "1.1.0",
39
+ "@atlaskit/editor-prosemirror": "3.0.0",
40
40
  "@atlaskit/icon": "^22.0.0",
41
41
  "@atlaskit/platform-feature-flags": "^0.2.0",
42
42
  "@babel/runtime": "^7.0.0"