@atlaskit/editor-plugin-annotation 1.26.6 → 1.26.8

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,22 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 1.26.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#98661](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98661)
8
+ [`9a4b50703ea36`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9a4b50703ea36) -
9
+ Clean up inline comment spotlight experiment
10
+ - Updated dependencies
11
+
12
+ ## 1.26.7
13
+
14
+ ### Patch Changes
15
+
16
+ - [#181574](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181574)
17
+ [`8645daab34a55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8645daab34a55) -
18
+ Add missing dom attributes to annotation mark in AnnotaitonNodeView, hot-114046
19
+
3
20
  ## 1.26.6
4
21
 
5
22
  ### Patch Changes
@@ -54,7 +54,10 @@ var clearDirtyMark = exports.clearDirtyMark = function clearDirtyMark() {
54
54
  var removeInlineCommentFromNode = function removeInlineCommentFromNode(id) {
55
55
  var supportedBlockNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
56
56
  var state = arguments.length > 2 ? arguments[2] : undefined;
57
- var dispatch = arguments.length > 3 ? arguments[3] : undefined;
57
+ var dispatch
58
+ // Ignored via go/ees005
59
+ // eslint-disable-next-line @typescript-eslint/max-params
60
+ = arguments.length > 3 ? arguments[3] : undefined;
58
61
  var tr = state.tr,
59
62
  selection = state.selection;
60
63
  if (selection instanceof _state.NodeSelection && (0, _utils.isSupportedBlockNode)(selection.node, supportedBlockNodes)) {
@@ -112,7 +115,10 @@ var removeInlineCommentNearSelection = exports.removeInlineCommentNearSelection
112
115
  return true;
113
116
  };
114
117
  };
115
- var getDraftCommandAction = function getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar) {
118
+ var getDraftCommandAction = function getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar
119
+ // Ignored via go/ees005
120
+ // eslint-disable-next-line @typescript-eslint/max-params
121
+ ) {
116
122
  return function (editorState) {
117
123
  // validate selection only when entering draft mode
118
124
  if (drafting && (0, _utils.isSelectionValid)(editorState) !== _types2.AnnotationSelectionType.VALID) {
@@ -178,7 +184,10 @@ var setInlineCommentDraftState = exports.setInlineCommentDraftState = function s
178
184
  var inputMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _analytics.INPUT_METHOD.TOOLBAR;
179
185
  var targetType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'inline';
180
186
  var targetNodeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
181
- var isOpeningMediaCommentFromToolbar = arguments.length > 4 ? arguments[4] : undefined;
187
+ var isOpeningMediaCommentFromToolbar
188
+ // Ignored via go/ees005
189
+ // eslint-disable-next-line @typescript-eslint/max-params
190
+ = arguments.length > 4 ? arguments[4] : undefined;
182
191
  var commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
183
192
  return (0, _pluginFactory.createCommand)(commandAction, _transform.default.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod));
184
193
  };
@@ -43,6 +43,8 @@ var AnnotationNodeView = exports.AnnotationNodeView = /*#__PURE__*/function (_Re
43
43
  // all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
44
44
  _react.default.createElement("span", {
45
45
  "data-mark-type": "annotation",
46
+ "data-id": this.node.attrs.id,
47
+ "data-mark-annotation-type": this.node.attrs.annotationType,
46
48
  ref: forwardRef
47
49
  })
48
50
  );
@@ -10,6 +10,9 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
10
10
  var _editorCommands = require("../editor-commands");
11
11
  function keymapPlugin(editorAnalyticsAPI) {
12
12
  var list = {};
13
- (0, _keymaps.bindKeymapWithCommand)(_keymaps.addInlineComment.common, (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI)(true, _analytics.INPUT_METHOD.SHORTCUT), list);
13
+ (0, _keymaps.bindKeymapWithCommand)(
14
+ // Ignored via go/ees005
15
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
16
+ _keymaps.addInlineComment.common, (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI)(true, _analytics.INPUT_METHOD.SHORTCUT), list);
14
17
  return (0, _keymap.keymap)(list);
15
18
  }
@@ -69,7 +69,8 @@ var _default = exports.default = function _default(pluginState, action) {
69
69
  default:
70
70
  return pluginState;
71
71
  }
72
- };
72
+ }; // Ignored via go/ees005
73
+ // eslint-disable-next-line @typescript-eslint/max-params
73
74
  function getNewDraftState(pluginState, drafting, editorState, targetType, supportedBlockNodes, targetNodeId, isOpeningMediaCommentFromToolbar) {
74
75
  var draftDecorationSet = pluginState.draftDecorationSet;
75
76
  if (!draftDecorationSet || !drafting) {
@@ -18,47 +18,16 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
18
  var _editorCommands = require("../editor-commands");
19
19
  var _types = require("../types");
20
20
  var _utils2 = require("./utils");
21
- var INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID = 'inline-comments-on-inline-node-spotlight';
22
- var createSpotlightConfig = function createSpotlightConfig(_ref) {
23
- var _api$engagementPlatfo;
24
- var api = _ref.api,
25
- intl = _ref.intl;
26
- var isUserEnrolledInEpAudience = !!(api !== null && api !== void 0 && (_api$engagementPlatfo = api.engagementPlatform) !== null && _api$engagementPlatfo !== void 0 && (_api$engagementPlatfo = _api$engagementPlatfo.sharedState.currentState()) !== null && _api$engagementPlatfo !== void 0 && _api$engagementPlatfo.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]);
27
- // Ensure experiment is only ran on users who are in the EP audience
28
- var isSpotlightOpen = isUserEnrolledInEpAudience && (0, _experiments.editorExperiment)('comment_on_inline_node_spotlight', true, {
29
- exposure: true
30
- });
31
- var stopSpotlight = function stopSpotlight() {
32
- var _api$engagementPlatfo2;
33
- return api === null || api === void 0 || (_api$engagementPlatfo2 = api.engagementPlatform) === null || _api$engagementPlatfo2 === void 0 ? void 0 : _api$engagementPlatfo2.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
34
- };
35
- return {
36
- isSpotlightOpen: isSpotlightOpen,
37
- pulse: isSpotlightOpen,
38
- onTargetClick: stopSpotlight,
39
- spotlightCardOptions: {
40
- children: intl.formatMessage(_messages.annotationMessages.createCommentOnInlineNodeSpotlightBody),
41
- actions: [{
42
- text: intl.formatMessage(_messages.annotationMessages.createCommentOnInlineNodeSpotlightAction),
43
- onClick: function onClick() {
44
- return stopSpotlight();
45
- }
46
- }],
47
- placement: 'top-start',
48
- width: 275
49
- }
50
- };
51
- };
52
21
  var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsAPI) {
53
- return function (_ref2) {
22
+ return function (_ref) {
54
23
  var _api$editorViewMode, _api$connectivity;
55
- var state = _ref2.state,
56
- intl = _ref2.intl,
57
- _ref2$isToolbarAbove = _ref2.isToolbarAbove,
58
- isToolbarAbove = _ref2$isToolbarAbove === void 0 ? false : _ref2$isToolbarAbove,
59
- _ref2$_supportedNodes = _ref2._supportedNodes,
60
- _supportedNodes = _ref2$_supportedNodes === void 0 ? [] : _ref2$_supportedNodes,
61
- api = _ref2.api;
24
+ var state = _ref.state,
25
+ intl = _ref.intl,
26
+ _ref$isToolbarAbove = _ref.isToolbarAbove,
27
+ isToolbarAbove = _ref$isToolbarAbove === void 0 ? false : _ref$isToolbarAbove,
28
+ _ref$_supportedNodes = _ref._supportedNodes,
29
+ _supportedNodes = _ref$_supportedNodes === void 0 ? [] : _ref$_supportedNodes,
30
+ api = _ref.api;
62
31
  var schema = state.schema;
63
32
  var selectionValid = (0, _utils2.isSelectionValid)(state);
64
33
  var isMediaSelected = (0, _mediaSingle.currentMediaNodeWithPos)(state);
@@ -109,23 +78,6 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
109
78
  }
110
79
  });
111
80
  }
112
-
113
- /* When a user selects a valid range of content that includes non-text inline node (e.g. media, mention, emoji, etc.)
114
- * Attempt to fire a spotlight to guide the user to create an inline comment on the inline node.
115
- * The spotlight will only be displayed if the user is a valid EP audience and the feature flag is enabled.
116
- */
117
- if (isNonTextInlineNodeInludedInComment && selectionValid === _types.AnnotationSelectionType.VALID && (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes_spotlight')) {
118
- var _api$engagementPlatfo3;
119
- api === null || api === void 0 || (_api$engagementPlatfo3 = api.engagementPlatform) === null || _api$engagementPlatfo3 === void 0 || _api$engagementPlatfo3.actions.startMessage('inline-comments-on-inline-node-spotlight');
120
- }
121
- },
122
- onUnmount: function onUnmount() {
123
- var _api$engagementPlatfo4;
124
- // if enagement spotlight is still active, stop it
125
- if (api !== null && api !== void 0 && (_api$engagementPlatfo4 = api.engagementPlatform) !== null && _api$engagementPlatfo4 !== void 0 && (_api$engagementPlatfo4 = _api$engagementPlatfo4.sharedState.currentState()) !== null && _api$engagementPlatfo4 !== void 0 && _api$engagementPlatfo4.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]) {
126
- var _api$engagementPlatfo5;
127
- api === null || api === void 0 || (_api$engagementPlatfo5 = api.engagementPlatform) === null || _api$engagementPlatfo5 === void 0 || _api$engagementPlatfo5.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
128
- }
129
81
  },
130
82
  onClick: function onClick(state, dispatch) {
131
83
  if (editorAnalyticsAPI) {
@@ -142,12 +94,7 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
142
94
  }
143
95
  return (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI)(true)(state, dispatch);
144
96
  },
145
- supportsViewMode: true,
146
- // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
147
- spotlightConfig: createSpotlightConfig({
148
- api: api,
149
- intl: intl
150
- })
97
+ supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
151
98
  };
152
99
  var annotation = schema.marks.annotation;
153
100
  var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
@@ -389,8 +389,12 @@ function hasInvalidWhitespaceNode(selection, schema) {
389
389
  // whitespace nodes.
390
390
  var nodeIsTrailingNewLine =
391
391
  // it is the final node
392
+ // Ignored via go/ees005
393
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
392
394
  node.eq(content.lastChild) &&
393
395
  // and there are multiple nodes
396
+ // Ignored via go/ees005
397
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
394
398
  !node.eq(content.firstChild) &&
395
399
  // and it is a paragraph node
396
400
  (0, _utils.isParagraph)(node, schema);
@@ -55,6 +55,8 @@ function InlineCommentView(_ref) {
55
55
  var position = findPosForDOM(selection);
56
56
  var dom;
57
57
  try {
58
+ // Ignored via go/ees005
59
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
58
60
  dom = (0, _utils2.findDomRefAtPos)(position, editorView.domAtPos.bind(editorView));
59
61
  } catch (error) {
60
62
  // eslint-disable-next-line no-console
@@ -31,7 +31,10 @@ export const closeComponent = () => createCommand({
31
31
  export const clearDirtyMark = () => createCommand({
32
32
  type: ACTIONS.INLINE_COMMENT_CLEAR_DIRTY_MARK
33
33
  });
34
- const removeInlineCommentFromNode = (id, supportedBlockNodes = [], state, dispatch) => {
34
+ const removeInlineCommentFromNode = (id, supportedBlockNodes = [], state, dispatch
35
+ // Ignored via go/ees005
36
+ // eslint-disable-next-line @typescript-eslint/max-params
37
+ ) => {
35
38
  const {
36
39
  tr,
37
40
  selection
@@ -94,7 +97,10 @@ export const removeInlineCommentNearSelection = (id, supportedNodes = []) => (st
94
97
  }
95
98
  return true;
96
99
  };
97
- const getDraftCommandAction = (drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar) => {
100
+ const getDraftCommandAction = (drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar
101
+ // Ignored via go/ees005
102
+ // eslint-disable-next-line @typescript-eslint/max-params
103
+ ) => {
98
104
  return editorState => {
99
105
  // validate selection only when entering draft mode
100
106
  if (drafting && isSelectionValid(editorState) !== AnnotationSelectionType.VALID) {
@@ -147,7 +153,10 @@ export const showInlineCommentForBlockNode = (supportedBlockNodes = []) => (node
147
153
  }
148
154
  return false;
149
155
  };
150
- export const setInlineCommentDraftState = (editorAnalyticsAPI, supportedBlockNodes = []) => (drafting, inputMethod = INPUT_METHOD.TOOLBAR, targetType = 'inline', targetNodeId = undefined, isOpeningMediaCommentFromToolbar) => {
156
+ export const setInlineCommentDraftState = (editorAnalyticsAPI, supportedBlockNodes = []) => (drafting, inputMethod = INPUT_METHOD.TOOLBAR, targetType = 'inline', targetNodeId = undefined, isOpeningMediaCommentFromToolbar
157
+ // Ignored via go/ees005
158
+ // eslint-disable-next-line @typescript-eslint/max-params
159
+ ) => {
151
160
  const commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
152
161
  return createCommand(commandAction, transform.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod));
153
162
  };
@@ -18,6 +18,8 @@ export class AnnotationNodeView extends ReactNodeView {
18
18
  // all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
19
19
  React.createElement("span", {
20
20
  "data-mark-type": "annotation",
21
+ "data-id": this.node.attrs.id,
22
+ "data-mark-annotation-type": this.node.attrs.annotationType,
21
23
  ref: forwardRef
22
24
  })
23
25
  );
@@ -4,6 +4,9 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { setInlineCommentDraftState } from '../editor-commands';
5
5
  export function keymapPlugin(editorAnalyticsAPI) {
6
6
  const list = {};
7
- bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
7
+ bindKeymapWithCommand(
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10
+ addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
8
11
  return keymap(list);
9
12
  }
@@ -75,6 +75,9 @@ export default ((pluginState, action) => {
75
75
  return pluginState;
76
76
  }
77
77
  });
78
+
79
+ // Ignored via go/ees005
80
+ // eslint-disable-next-line @typescript-eslint/max-params
78
81
  function getNewDraftState(pluginState, drafting, editorState, targetType, supportedBlockNodes, targetNodeId, isOpeningMediaCommentFromToolbar) {
79
82
  let {
80
83
  draftDecorationSet
@@ -11,36 +11,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
11
  import { setInlineCommentDraftState } from '../editor-commands';
12
12
  import { AnnotationSelectionType, AnnotationTestIds } from '../types';
13
13
  import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
14
- const INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID = 'inline-comments-on-inline-node-spotlight';
15
- const createSpotlightConfig = ({
16
- api,
17
- intl
18
- }) => {
19
- var _api$engagementPlatfo, _api$engagementPlatfo2;
20
- const isUserEnrolledInEpAudience = !!(api !== null && api !== void 0 && (_api$engagementPlatfo = api.engagementPlatform) !== null && _api$engagementPlatfo !== void 0 && (_api$engagementPlatfo2 = _api$engagementPlatfo.sharedState.currentState()) !== null && _api$engagementPlatfo2 !== void 0 && _api$engagementPlatfo2.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]);
21
- // Ensure experiment is only ran on users who are in the EP audience
22
- const isSpotlightOpen = isUserEnrolledInEpAudience && editorExperiment('comment_on_inline_node_spotlight', true, {
23
- exposure: true
24
- });
25
- const stopSpotlight = () => {
26
- var _api$engagementPlatfo3;
27
- return api === null || api === void 0 ? void 0 : (_api$engagementPlatfo3 = api.engagementPlatform) === null || _api$engagementPlatfo3 === void 0 ? void 0 : _api$engagementPlatfo3.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
28
- };
29
- return {
30
- isSpotlightOpen,
31
- pulse: isSpotlightOpen,
32
- onTargetClick: stopSpotlight,
33
- spotlightCardOptions: {
34
- children: intl.formatMessage(annotationMessages.createCommentOnInlineNodeSpotlightBody),
35
- actions: [{
36
- text: intl.formatMessage(annotationMessages.createCommentOnInlineNodeSpotlightAction),
37
- onClick: () => stopSpotlight()
38
- }],
39
- placement: 'top-start',
40
- width: 275
41
- }
42
- };
43
- };
44
14
  export const buildToolbar = editorAnalyticsAPI => ({
45
15
  state,
46
16
  intl,
@@ -99,23 +69,6 @@ export const buildToolbar = editorAnalyticsAPI => ({
99
69
  }
100
70
  });
101
71
  }
102
-
103
- /* When a user selects a valid range of content that includes non-text inline node (e.g. media, mention, emoji, etc.)
104
- * Attempt to fire a spotlight to guide the user to create an inline comment on the inline node.
105
- * The spotlight will only be displayed if the user is a valid EP audience and the feature flag is enabled.
106
- */
107
- if (isNonTextInlineNodeInludedInComment && selectionValid === AnnotationSelectionType.VALID && fg('editor_inline_comments_on_inline_nodes_spotlight')) {
108
- var _api$engagementPlatfo4;
109
- api === null || api === void 0 ? void 0 : (_api$engagementPlatfo4 = api.engagementPlatform) === null || _api$engagementPlatfo4 === void 0 ? void 0 : _api$engagementPlatfo4.actions.startMessage('inline-comments-on-inline-node-spotlight');
110
- }
111
- },
112
- onUnmount: () => {
113
- var _api$engagementPlatfo5, _api$engagementPlatfo6;
114
- // if enagement spotlight is still active, stop it
115
- if (api !== null && api !== void 0 && (_api$engagementPlatfo5 = api.engagementPlatform) !== null && _api$engagementPlatfo5 !== void 0 && (_api$engagementPlatfo6 = _api$engagementPlatfo5.sharedState.currentState()) !== null && _api$engagementPlatfo6 !== void 0 && _api$engagementPlatfo6.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]) {
116
- var _api$engagementPlatfo7;
117
- api === null || api === void 0 ? void 0 : (_api$engagementPlatfo7 = api.engagementPlatform) === null || _api$engagementPlatfo7 === void 0 ? void 0 : _api$engagementPlatfo7.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
118
- }
119
72
  },
120
73
  onClick: (state, dispatch) => {
121
74
  if (editorAnalyticsAPI) {
@@ -132,12 +85,7 @@ export const buildToolbar = editorAnalyticsAPI => ({
132
85
  }
133
86
  return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
134
87
  },
135
- supportsViewMode: true,
136
- // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
137
- spotlightConfig: createSpotlightConfig({
138
- api,
139
- intl
140
- })
88
+ supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
141
89
  };
142
90
  const {
143
91
  annotation
@@ -366,8 +366,12 @@ export function hasInvalidWhitespaceNode(selection, schema) {
366
366
  // whitespace nodes.
367
367
  const nodeIsTrailingNewLine =
368
368
  // it is the final node
369
+ // Ignored via go/ees005
370
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
369
371
  node.eq(content.lastChild) &&
370
372
  // and there are multiple nodes
373
+ // Ignored via go/ees005
374
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
371
375
  !node.eq(content.firstChild) &&
372
376
  // and it is a paragraph node
373
377
  isParagraph(node, schema);
@@ -55,6 +55,8 @@ export function InlineCommentView({
55
55
  const position = findPosForDOM(selection);
56
56
  let dom;
57
57
  try {
58
+ // Ignored via go/ees005
59
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
58
60
  dom = findDomRefAtPos(position, editorView.domAtPos.bind(editorView));
59
61
  } catch (error) {
60
62
  // eslint-disable-next-line no-console
@@ -47,7 +47,10 @@ export var clearDirtyMark = function clearDirtyMark() {
47
47
  var removeInlineCommentFromNode = function removeInlineCommentFromNode(id) {
48
48
  var supportedBlockNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
49
49
  var state = arguments.length > 2 ? arguments[2] : undefined;
50
- var dispatch = arguments.length > 3 ? arguments[3] : undefined;
50
+ var dispatch
51
+ // Ignored via go/ees005
52
+ // eslint-disable-next-line @typescript-eslint/max-params
53
+ = arguments.length > 3 ? arguments[3] : undefined;
51
54
  var tr = state.tr,
52
55
  selection = state.selection;
53
56
  if (selection instanceof NodeSelection && isSupportedBlockNode(selection.node, supportedBlockNodes)) {
@@ -105,7 +108,10 @@ export var removeInlineCommentNearSelection = function removeInlineCommentNearSe
105
108
  return true;
106
109
  };
107
110
  };
108
- var getDraftCommandAction = function getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar) {
111
+ var getDraftCommandAction = function getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar
112
+ // Ignored via go/ees005
113
+ // eslint-disable-next-line @typescript-eslint/max-params
114
+ ) {
109
115
  return function (editorState) {
110
116
  // validate selection only when entering draft mode
111
117
  if (drafting && isSelectionValid(editorState) !== AnnotationSelectionType.VALID) {
@@ -171,7 +177,10 @@ export var setInlineCommentDraftState = function setInlineCommentDraftState(edit
171
177
  var inputMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
172
178
  var targetType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'inline';
173
179
  var targetNodeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
174
- var isOpeningMediaCommentFromToolbar = arguments.length > 4 ? arguments[4] : undefined;
180
+ var isOpeningMediaCommentFromToolbar
181
+ // Ignored via go/ees005
182
+ // eslint-disable-next-line @typescript-eslint/max-params
183
+ = arguments.length > 4 ? arguments[4] : undefined;
175
184
  var commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
176
185
  return createCommand(commandAction, transform.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod));
177
186
  };
@@ -36,6 +36,8 @@ export var AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
36
36
  // all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
37
37
  React.createElement("span", {
38
38
  "data-mark-type": "annotation",
39
+ "data-id": this.node.attrs.id,
40
+ "data-mark-annotation-type": this.node.attrs.annotationType,
39
41
  ref: forwardRef
40
42
  })
41
43
  );
@@ -4,6 +4,9 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { setInlineCommentDraftState } from '../editor-commands';
5
5
  export function keymapPlugin(editorAnalyticsAPI) {
6
6
  var list = {};
7
- bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
7
+ bindKeymapWithCommand(
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10
+ addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
8
11
  return keymap(list);
9
12
  }
@@ -63,6 +63,9 @@ export default (function (pluginState, action) {
63
63
  return pluginState;
64
64
  }
65
65
  });
66
+
67
+ // Ignored via go/ees005
68
+ // eslint-disable-next-line @typescript-eslint/max-params
66
69
  function getNewDraftState(pluginState, drafting, editorState, targetType, supportedBlockNodes, targetNodeId, isOpeningMediaCommentFromToolbar) {
67
70
  var draftDecorationSet = pluginState.draftDecorationSet;
68
71
  if (!draftDecorationSet || !drafting) {
@@ -11,47 +11,16 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
11
  import { setInlineCommentDraftState } from '../editor-commands';
12
12
  import { AnnotationSelectionType, AnnotationTestIds } from '../types';
13
13
  import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
14
- var INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID = 'inline-comments-on-inline-node-spotlight';
15
- var createSpotlightConfig = function createSpotlightConfig(_ref) {
16
- var _api$engagementPlatfo;
17
- var api = _ref.api,
18
- intl = _ref.intl;
19
- var isUserEnrolledInEpAudience = !!(api !== null && api !== void 0 && (_api$engagementPlatfo = api.engagementPlatform) !== null && _api$engagementPlatfo !== void 0 && (_api$engagementPlatfo = _api$engagementPlatfo.sharedState.currentState()) !== null && _api$engagementPlatfo !== void 0 && _api$engagementPlatfo.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]);
20
- // Ensure experiment is only ran on users who are in the EP audience
21
- var isSpotlightOpen = isUserEnrolledInEpAudience && editorExperiment('comment_on_inline_node_spotlight', true, {
22
- exposure: true
23
- });
24
- var stopSpotlight = function stopSpotlight() {
25
- var _api$engagementPlatfo2;
26
- return api === null || api === void 0 || (_api$engagementPlatfo2 = api.engagementPlatform) === null || _api$engagementPlatfo2 === void 0 ? void 0 : _api$engagementPlatfo2.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
27
- };
28
- return {
29
- isSpotlightOpen: isSpotlightOpen,
30
- pulse: isSpotlightOpen,
31
- onTargetClick: stopSpotlight,
32
- spotlightCardOptions: {
33
- children: intl.formatMessage(annotationMessages.createCommentOnInlineNodeSpotlightBody),
34
- actions: [{
35
- text: intl.formatMessage(annotationMessages.createCommentOnInlineNodeSpotlightAction),
36
- onClick: function onClick() {
37
- return stopSpotlight();
38
- }
39
- }],
40
- placement: 'top-start',
41
- width: 275
42
- }
43
- };
44
- };
45
14
  export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
46
- return function (_ref2) {
15
+ return function (_ref) {
47
16
  var _api$editorViewMode, _api$connectivity;
48
- var state = _ref2.state,
49
- intl = _ref2.intl,
50
- _ref2$isToolbarAbove = _ref2.isToolbarAbove,
51
- isToolbarAbove = _ref2$isToolbarAbove === void 0 ? false : _ref2$isToolbarAbove,
52
- _ref2$_supportedNodes = _ref2._supportedNodes,
53
- _supportedNodes = _ref2$_supportedNodes === void 0 ? [] : _ref2$_supportedNodes,
54
- api = _ref2.api;
17
+ var state = _ref.state,
18
+ intl = _ref.intl,
19
+ _ref$isToolbarAbove = _ref.isToolbarAbove,
20
+ isToolbarAbove = _ref$isToolbarAbove === void 0 ? false : _ref$isToolbarAbove,
21
+ _ref$_supportedNodes = _ref._supportedNodes,
22
+ _supportedNodes = _ref$_supportedNodes === void 0 ? [] : _ref$_supportedNodes,
23
+ api = _ref.api;
55
24
  var schema = state.schema;
56
25
  var selectionValid = isSelectionValid(state);
57
26
  var isMediaSelected = currentMediaNodeWithPos(state);
@@ -102,23 +71,6 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
102
71
  }
103
72
  });
104
73
  }
105
-
106
- /* When a user selects a valid range of content that includes non-text inline node (e.g. media, mention, emoji, etc.)
107
- * Attempt to fire a spotlight to guide the user to create an inline comment on the inline node.
108
- * The spotlight will only be displayed if the user is a valid EP audience and the feature flag is enabled.
109
- */
110
- if (isNonTextInlineNodeInludedInComment && selectionValid === AnnotationSelectionType.VALID && fg('editor_inline_comments_on_inline_nodes_spotlight')) {
111
- var _api$engagementPlatfo3;
112
- api === null || api === void 0 || (_api$engagementPlatfo3 = api.engagementPlatform) === null || _api$engagementPlatfo3 === void 0 || _api$engagementPlatfo3.actions.startMessage('inline-comments-on-inline-node-spotlight');
113
- }
114
- },
115
- onUnmount: function onUnmount() {
116
- var _api$engagementPlatfo4;
117
- // if enagement spotlight is still active, stop it
118
- if (api !== null && api !== void 0 && (_api$engagementPlatfo4 = api.engagementPlatform) !== null && _api$engagementPlatfo4 !== void 0 && (_api$engagementPlatfo4 = _api$engagementPlatfo4.sharedState.currentState()) !== null && _api$engagementPlatfo4 !== void 0 && _api$engagementPlatfo4.messageStates[INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID]) {
119
- var _api$engagementPlatfo5;
120
- api === null || api === void 0 || (_api$engagementPlatfo5 = api.engagementPlatform) === null || _api$engagementPlatfo5 === void 0 || _api$engagementPlatfo5.actions.stopMessage(INLINE_COMMENT_ON_INLINE_NODE_SPOTLIGHT_EP_MESSAGE_ID);
121
- }
122
74
  },
123
75
  onClick: function onClick(state, dispatch) {
124
76
  if (editorAnalyticsAPI) {
@@ -135,12 +87,7 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
135
87
  }
136
88
  return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
137
89
  },
138
- supportsViewMode: true,
139
- // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
140
- spotlightConfig: createSpotlightConfig({
141
- api: api,
142
- intl: intl
143
- })
90
+ supportsViewMode: true // TODO: MODES-3950 Clean up this floating toolbar view mode logic,
144
91
  };
145
92
  var annotation = schema.marks.annotation;
146
93
  var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
@@ -373,8 +373,12 @@ export function hasInvalidWhitespaceNode(selection, schema) {
373
373
  // whitespace nodes.
374
374
  var nodeIsTrailingNewLine =
375
375
  // it is the final node
376
+ // Ignored via go/ees005
377
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
376
378
  node.eq(content.lastChild) &&
377
379
  // and there are multiple nodes
380
+ // Ignored via go/ees005
381
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
378
382
  !node.eq(content.firstChild) &&
379
383
  // and it is a paragraph node
380
384
  isParagraph(node, schema);
@@ -48,6 +48,8 @@ export function InlineCommentView(_ref) {
48
48
  var position = findPosForDOM(selection);
49
49
  var dom;
50
50
  try {
51
+ // Ignored via go/ees005
52
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
51
53
  dom = findDomRefAtPos(position, editorView.domAtPos.bind(editorView));
52
54
  } catch (error) {
53
55
  // eslint-disable-next-line no-console
@@ -3,7 +3,6 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
4
4
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
5
5
  import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
6
- import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
7
6
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
7
  import type { Slice } from '@atlaskit/editor-prosemirror/model';
9
8
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
@@ -22,7 +21,6 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
22
21
  OptionalPlugin<EditorViewModeEffectsPlugin>,
23
22
  OptionalPlugin<EditorViewModePlugin>,
24
23
  OptionalPlugin<FeatureFlagsPlugin>,
25
- OptionalPlugin<EngagementPlatformPlugin>,
26
24
  OptionalPlugin<ConnectivityPlugin>
27
25
  ];
28
26
  actions: {
@@ -9,7 +9,7 @@ declare const _default: {
9
9
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
10
10
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
11
11
  sharedState: {
12
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
12
+ createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
13
13
  attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
14
14
  performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
15
15
  };
@@ -20,14 +20,14 @@ declare const _default: {
20
20
  actions: EditorAnalyticsAPI;
21
21
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewModeEffects", {
22
22
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
23
- pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
23
+ pluginConfiguration: import("packages/editor/editor-plugin-collab-edit/dist/types").PrivateCollabEditOptions;
24
24
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
25
25
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
26
26
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
27
27
  }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
28
28
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
29
29
  sharedState: {
30
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
30
+ createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
31
31
  attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
32
32
  performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
33
33
  };
@@ -37,18 +37,18 @@ declare const _default: {
37
37
  }, import("@atlaskit/editor-common/types").FeatureFlags>>];
38
38
  actions: EditorAnalyticsAPI;
39
39
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
40
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
40
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
41
41
  dependencies: [];
42
42
  pluginConfiguration?: {
43
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
43
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
44
44
  } | undefined;
45
45
  commands: {
46
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
46
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
47
47
  };
48
48
  }, {
49
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
49
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
50
50
  } | undefined>>];
51
- sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
51
+ sharedState: import("packages/editor/editor-plugin-collab-edit/dist/types").CollabEditPluginSharedState;
52
52
  actions: {
53
53
  getAvatarColor: (str: string) => {
54
54
  index: number;
@@ -66,61 +66,41 @@ declare const _default: {
66
66
  isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
67
67
  getCurrentCollabState: () => {
68
68
  version: number | undefined;
69
- sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
70
- content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
69
+ sendableSteps: import("packages/editor/editor-plugin-collab-edit/dist/types").CollabSendableSteps | null | undefined;
70
+ content: import("packages/editor/editor-json-transformer/dist/types").JSONNode | undefined;
71
71
  };
72
72
  validatePMJSONDocument: (doc: any) => boolean;
73
73
  };
74
- }, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
75
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
74
+ }, import("packages/editor/editor-plugin-collab-edit/dist/types").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
75
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
76
76
  dependencies: [];
77
77
  pluginConfiguration?: {
78
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
78
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
79
79
  } | undefined;
80
80
  commands: {
81
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
81
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
82
82
  };
83
83
  }, {
84
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
84
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
85
85
  } | undefined>];
86
86
  actions: {
87
87
  applyViewModeStepAt: (tr: Transaction) => boolean;
88
88
  };
89
89
  }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
90
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
90
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
91
91
  dependencies: [];
92
92
  pluginConfiguration?: {
93
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
93
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
94
94
  } | undefined;
95
95
  commands: {
96
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
96
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
97
97
  };
98
98
  }, {
99
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
99
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
100
100
  } | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
101
101
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
102
102
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
103
- }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"engagementPlatform", {
104
- actions: {
105
- startMessage: (messageId: string, variationId?: string | undefined) => Promise<boolean>;
106
- stopMessage: (messageId: string) => Promise<boolean>;
107
- };
108
- pluginConfiguration: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig;
109
- dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
110
- pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
111
- sharedState: {
112
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
113
- attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
114
- performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
115
- };
116
- dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
117
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
118
- sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
119
- }, import("@atlaskit/editor-common/types").FeatureFlags>>];
120
- actions: EditorAnalyticsAPI;
121
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
122
- sharedState: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginState;
123
- }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
103
+ }, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
124
104
  sharedState: {
125
105
  mode: "offline" | "online";
126
106
  };
@@ -6,7 +6,7 @@ export declare class AnnotationNodeView extends ReactNodeView {
6
6
  getContentDOM(): {
7
7
  dom: HTMLSpanElement;
8
8
  };
9
- render(_props: {}, forwardRef: ForwardRef): JSX.Element;
9
+ render(_props: Object, forwardRef: ForwardRef): JSX.Element;
10
10
  }
11
11
  export declare const getAnnotationViewClassname: (isUnresolved: boolean, hasFocus: boolean, isHovered: boolean) => string | undefined;
12
12
  export declare const getBlockAnnotationViewClassname: (isUnresolved: boolean, hasFocus: boolean) => string | undefined;
@@ -3,7 +3,6 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
4
4
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
5
5
  import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
6
- import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
7
6
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
7
  import type { Slice } from '@atlaskit/editor-prosemirror/model';
9
8
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
@@ -22,7 +21,6 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
22
21
  OptionalPlugin<EditorViewModeEffectsPlugin>,
23
22
  OptionalPlugin<EditorViewModePlugin>,
24
23
  OptionalPlugin<FeatureFlagsPlugin>,
25
- OptionalPlugin<EngagementPlatformPlugin>,
26
24
  OptionalPlugin<ConnectivityPlugin>
27
25
  ];
28
26
  actions: {
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
11
11
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
12
12
  sharedState: {
13
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
13
+ createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
14
14
  attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
15
15
  performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
16
16
  };
@@ -25,7 +25,7 @@ declare const _default: {
25
25
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewModeEffects", {
26
26
  dependencies: [
27
27
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
28
- pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
28
+ pluginConfiguration: import("packages/editor/editor-plugin-collab-edit/dist/types").PrivateCollabEditOptions;
29
29
  dependencies: [
30
30
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
31
31
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
@@ -34,7 +34,7 @@ declare const _default: {
34
34
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
35
35
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
36
36
  sharedState: {
37
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
37
+ createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
38
38
  attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
39
39
  performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
40
40
  };
@@ -47,20 +47,20 @@ declare const _default: {
47
47
  actions: EditorAnalyticsAPI;
48
48
  }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>,
49
49
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
50
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
50
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
51
51
  dependencies: [
52
52
  ];
53
53
  pluginConfiguration?: {
54
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
54
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
55
55
  } | undefined;
56
56
  commands: {
57
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
57
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
58
58
  };
59
59
  }, {
60
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
60
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
61
61
  } | undefined>>
62
62
  ];
63
- sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
63
+ sharedState: import("packages/editor/editor-plugin-collab-edit/dist/types").CollabEditPluginSharedState;
64
64
  actions: {
65
65
  getAvatarColor: (str: string) => {
66
66
  index: number;
@@ -78,24 +78,24 @@ declare const _default: {
78
78
  isRemoteReplaceDocumentTransaction: (tr: Transaction) => boolean;
79
79
  getCurrentCollabState: () => {
80
80
  version: number | undefined;
81
- sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
82
- content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
81
+ sendableSteps: import("packages/editor/editor-plugin-collab-edit/dist/types").CollabSendableSteps | null | undefined;
82
+ content: import("packages/editor/editor-json-transformer/dist/types").JSONNode | undefined;
83
83
  };
84
84
  validatePMJSONDocument: (doc: any) => boolean;
85
85
  };
86
- }, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>,
86
+ }, import("packages/editor/editor-plugin-collab-edit/dist/types").PrivateCollabEditOptions>,
87
87
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
88
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
88
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
89
89
  dependencies: [
90
90
  ];
91
91
  pluginConfiguration?: {
92
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
92
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
93
93
  } | undefined;
94
94
  commands: {
95
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
95
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
96
96
  };
97
97
  }, {
98
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
98
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
99
99
  } | undefined>
100
100
  ];
101
101
  actions: {
@@ -103,47 +103,22 @@ declare const _default: {
103
103
  };
104
104
  }, undefined>>,
105
105
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
106
- sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
106
+ sharedState: import("packages/editor/editor-plugin-editor-viewmode/dist/types").EditorViewModePluginState | null;
107
107
  dependencies: [
108
108
  ];
109
109
  pluginConfiguration?: {
110
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
110
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
111
111
  } | undefined;
112
112
  commands: {
113
- updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
113
+ updateViewMode: (mode: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
114
114
  };
115
115
  }, {
116
- mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
116
+ mode?: import("packages/editor/editor-plugin-editor-viewmode/dist/types").ViewMode | undefined;
117
117
  } | undefined>>,
118
118
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
119
119
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
120
120
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
121
121
  }, import("@atlaskit/editor-common/types").FeatureFlags>>,
122
- import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"engagementPlatform", {
123
- actions: {
124
- startMessage: (messageId: string, variationId?: string | undefined) => Promise<boolean>;
125
- stopMessage: (messageId: string) => Promise<boolean>;
126
- };
127
- pluginConfiguration: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig;
128
- dependencies: [
129
- import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
130
- pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
131
- sharedState: {
132
- createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
133
- attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
134
- performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
135
- };
136
- dependencies: [
137
- import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
138
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
139
- sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
140
- }, import("@atlaskit/editor-common/types").FeatureFlags>>
141
- ];
142
- actions: EditorAnalyticsAPI;
143
- }, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
144
- ];
145
- sharedState: import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginState;
146
- }, import("@atlaskit/editor-plugin-engagement-platform").EngagementPlatformPluginConfig>>,
147
122
  import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"connectivity", {
148
123
  sharedState: {
149
124
  mode: "offline" | "online";
@@ -6,7 +6,7 @@ export declare class AnnotationNodeView extends ReactNodeView {
6
6
  getContentDOM(): {
7
7
  dom: HTMLSpanElement;
8
8
  };
9
- render(_props: {}, forwardRef: ForwardRef): JSX.Element;
9
+ render(_props: Object, forwardRef: ForwardRef): JSX.Element;
10
10
  }
11
11
  export declare const getAnnotationViewClassname: (isUnresolved: boolean, hasFocus: boolean, isHovered: boolean) => string | undefined;
12
12
  export declare const getBlockAnnotationViewClassname: (isUnresolved: boolean, hasFocus: boolean) => string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "1.26.6",
3
+ "version": "1.26.8",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,17 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^97.0.0",
35
+ "@atlaskit/editor-common": "^97.2.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-connectivity": "^1.1.0",
38
38
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^1.1.0",
39
- "@atlaskit/editor-plugin-engagement-platform": "^2.1.0",
40
39
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
41
40
  "@atlaskit/editor-prosemirror": "6.2.1",
42
41
  "@atlaskit/icon": "^23.1.0",
43
42
  "@atlaskit/onboarding": "^12.2.0",
44
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
- "@atlaskit/tmp-editor-statsig": "^2.29.0",
44
+ "@atlaskit/tmp-editor-statsig": "^2.30.0",
46
45
  "@babel/runtime": "^7.0.0"
47
46
  },
48
47
  "peerDependencies": {
@@ -98,9 +97,6 @@
98
97
  "editor_inline_comments_on_inline_nodes": {
99
98
  "type": "boolean"
100
99
  },
101
- "editor_inline_comments_on_inline_nodes_spotlight": {
102
- "type": "boolean"
103
- },
104
100
  "platform_inline_node_as_valid_annotation_selection": {
105
101
  "type": "boolean"
106
102
  }