@atlaskit/editor-plugin-status 2.6.1 → 2.6.2

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,13 @@
1
1
  # @atlaskit/editor-plugin-status
2
2
 
3
+ ## 2.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#176427](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/176427)
8
+ [`9c2bd03adeebd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9c2bd03adeebd) -
9
+ [ED-25999] adding analytic events for inline node of emoji,status and inlineCard
10
+
3
11
  ## 2.6.1
4
12
 
5
13
  ### Patch Changes
@@ -102,10 +102,22 @@ var statusPlugin = exports.statusPlugin = function statusPlugin(_ref) {
102
102
  });
103
103
  var showAnnotation = annotationState && isViewMode && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !hasActiveMark;
104
104
  var onCommentClick = function onCommentClick(stateFromClickEvent, dispatch) {
105
+ var _api$analytics4;
105
106
  if (!(api !== null && api !== void 0 && api.annotation)) {
106
107
  return true;
107
108
  }
108
109
  var command = api.annotation.actions.setInlineCommentDraftState(true, _analytics.INPUT_METHOD.TOOLBAR);
110
+ api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 || (_api$analytics4 = _api$analytics4.actions) === null || _api$analytics4 === void 0 || _api$analytics4.fireAnalyticsEvent({
111
+ action: _analytics.ACTION.CLICKED,
112
+ actionSubject: _analytics.ACTION_SUBJECT.BUTTON,
113
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
114
+ eventType: _analytics.EVENT_TYPE.UI,
115
+ attributes: {
116
+ source: 'highlightActionsMenu',
117
+ pageMode: 'edit',
118
+ sourceNode: 'status'
119
+ }
120
+ });
109
121
  return command(stateFromClickEvent, dispatch);
110
122
  };
111
123
  var createCommentMessage = intl.formatMessage(_messages.annotationMessages.createComment);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { status } from '@atlaskit/adf-schema';
3
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
5
5
  import { annotationMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { IconStatus } from '@atlaskit/editor-common/quick-insert';
@@ -91,10 +91,22 @@ export const statusPlugin = ({
91
91
  const hasActiveMark = node.marks.some(mark => mark.type.name === 'annotation' && (annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations[mark.attrs.id]) === false);
92
92
  const showAnnotation = annotationState && isViewMode && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !hasActiveMark;
93
93
  const onCommentClick = (stateFromClickEvent, dispatch) => {
94
+ var _api$analytics4, _api$analytics4$actio;
94
95
  if (!(api !== null && api !== void 0 && api.annotation)) {
95
96
  return true;
96
97
  }
97
98
  const command = api.annotation.actions.setInlineCommentDraftState(true, INPUT_METHOD.TOOLBAR);
99
+ api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : (_api$analytics4$actio = _api$analytics4.actions) === null || _api$analytics4$actio === void 0 ? void 0 : _api$analytics4$actio.fireAnalyticsEvent({
100
+ action: ACTION.CLICKED,
101
+ actionSubject: ACTION_SUBJECT.BUTTON,
102
+ actionSubjectId: ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
103
+ eventType: EVENT_TYPE.UI,
104
+ attributes: {
105
+ source: 'highlightActionsMenu',
106
+ pageMode: 'edit',
107
+ sourceNode: 'status'
108
+ }
109
+ });
98
110
  return command(stateFromClickEvent, dispatch);
99
111
  };
100
112
  const createCommentMessage = intl.formatMessage(annotationMessages.createComment);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { status } from '@atlaskit/adf-schema';
3
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { ACTION_SUBJECT_ID, ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { addInlineComment, ToolTipContent } from '@atlaskit/editor-common/keymaps';
5
5
  import { annotationMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { IconStatus } from '@atlaskit/editor-common/quick-insert';
@@ -95,10 +95,22 @@ export var statusPlugin = function statusPlugin(_ref) {
95
95
  });
96
96
  var showAnnotation = annotationState && isViewMode && annotationState.isVisible && !annotationState.bookmark && !annotationState.mouseData.isSelecting && !hasActiveMark;
97
97
  var onCommentClick = function onCommentClick(stateFromClickEvent, dispatch) {
98
+ var _api$analytics4;
98
99
  if (!(api !== null && api !== void 0 && api.annotation)) {
99
100
  return true;
100
101
  }
101
102
  var command = api.annotation.actions.setInlineCommentDraftState(true, INPUT_METHOD.TOOLBAR);
103
+ api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 || (_api$analytics4 = _api$analytics4.actions) === null || _api$analytics4 === void 0 || _api$analytics4.fireAnalyticsEvent({
104
+ action: ACTION.CLICKED,
105
+ actionSubject: ACTION_SUBJECT.BUTTON,
106
+ actionSubjectId: ACTION_SUBJECT_ID.CREATE_INLINE_COMMENT_FROM_HIGHLIGHT_ACTIONS_MENU,
107
+ eventType: EVENT_TYPE.UI,
108
+ attributes: {
109
+ source: 'highlightActionsMenu',
110
+ pageMode: 'edit',
111
+ sourceNode: 'status'
112
+ }
113
+ });
102
114
  return command(stateFromClickEvent, dispatch);
103
115
  };
104
116
  var createCommentMessage = intl.formatMessage(annotationMessages.createComment);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-status",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Status plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",