@atlaskit/editor-plugin-annotation 2.8.1 → 2.8.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,14 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 2.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#156246](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/156246)
8
+ [`66ad86018032f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/66ad86018032f) -
9
+ Expand types for selectInlineCommentExperience tracking
10
+ - Updated dependencies
11
+
3
12
  ## 2.8.1
4
13
 
5
14
  ### Patch Changes
@@ -228,25 +228,23 @@ var inlineCommentPlugin = exports.inlineCommentPlugin = function inlineCommentPl
228
228
  editorView.root.addEventListener('mouseup', mouseUp);
229
229
  return {
230
230
  update: function update(view, _prevState) {
231
- if ((0, _platformFeatureFlags.fg)('confluence_comments_select_comment_experience')) {
232
- var _prevSelectedAnnotati;
233
- var _ref4 = (0, _utils.getPluginState)(view.state) || {},
234
- selectedAnnotations = _ref4.selectedAnnotations,
235
- annotations = _ref4.annotations;
236
- var _ref5 = (0, _utils.getPluginState)(_prevState) || {},
237
- prevSelectedAnnotations = _ref5.selectedAnnotations;
238
- var selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
239
- // If the new state has an unresolved selected annotation, and it's different from
240
- // the previous one then we mark the select annotation experience as complete.
241
- if (
242
- //This checks the selected annotation is different from the previous one
243
- selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 || (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
244
- // This ensures that the selected annotation is unresolved
245
- annotations && annotations[selectedAnnotationId] === false) {
246
- var _options$selectCommen;
247
- // Under the confluence_comments_select_comment_experience feature flag, the selectComponentExperience is using a simplified object, which is why it's type asserted.
248
- (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 || _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
249
- }
231
+ var _prevSelectedAnnotati;
232
+ var _ref4 = (0, _utils.getPluginState)(view.state) || {},
233
+ selectedAnnotations = _ref4.selectedAnnotations,
234
+ annotations = _ref4.annotations;
235
+ var _ref5 = (0, _utils.getPluginState)(_prevState) || {},
236
+ prevSelectedAnnotations = _ref5.selectedAnnotations;
237
+ var selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
238
+ // If the new state has an unresolved selected annotation, and it's different from
239
+ // the previous one then we mark the select annotation experience as complete.
240
+ if (
241
+ //This checks the selected annotation is different from the previous one
242
+ selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 || (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
243
+ // This ensures that the selected annotation is unresolved
244
+ annotations && annotations[selectedAnnotationId] === false) {
245
+ var _options$selectCommen;
246
+ // The selectComponentExperience is using a simplified object, which is why it's type asserted.
247
+ (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 || _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
250
248
  }
251
249
  var _ref6 = (0, _utils.getPluginState)(view.state) || {},
252
250
  dirtyAnnotations = _ref6.dirtyAnnotations;
@@ -32,6 +32,10 @@ var getValidNodes = exports.getValidNodes = function getValidNodes(state) {
32
32
  * This only applies when the selection range exactly matches the bookmark range
33
33
  * which should be the case immediately after the comment button is clicked
34
34
  * if the user creates a different selection range, the floating toolbar should still be shown
35
+ * @param root0
36
+ * @param root0.state
37
+ * @param root0.bookmark
38
+ * @example
35
39
  */
36
40
  var shouldSuppressFloatingToolbar = exports.shouldSuppressFloatingToolbar = function shouldSuppressFloatingToolbar(_ref) {
37
41
  var state = _ref.state,
@@ -162,27 +162,25 @@ export const inlineCommentPlugin = options => {
162
162
  editorView.root.addEventListener('mouseup', mouseUp);
163
163
  return {
164
164
  update(view, _prevState) {
165
- if (fg('confluence_comments_select_comment_experience')) {
166
- var _prevSelectedAnnotati;
167
- const {
168
- selectedAnnotations,
169
- annotations
170
- } = getPluginState(view.state) || {};
171
- const {
172
- selectedAnnotations: prevSelectedAnnotations
173
- } = getPluginState(_prevState) || {};
174
- const selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
175
- // If the new state has an unresolved selected annotation, and it's different from
176
- // the previous one then we mark the select annotation experience as complete.
177
- if (
178
- //This checks the selected annotation is different from the previous one
179
- selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 ? void 0 : (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
180
- // This ensures that the selected annotation is unresolved
181
- annotations && annotations[selectedAnnotationId] === false) {
182
- var _options$selectCommen;
183
- // Under the confluence_comments_select_comment_experience feature flag, the selectComponentExperience is using a simplified object, which is why it's type asserted.
184
- (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 ? void 0 : _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
185
- }
165
+ var _prevSelectedAnnotati;
166
+ const {
167
+ selectedAnnotations,
168
+ annotations
169
+ } = getPluginState(view.state) || {};
170
+ const {
171
+ selectedAnnotations: prevSelectedAnnotations
172
+ } = getPluginState(_prevState) || {};
173
+ const selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
174
+ // If the new state has an unresolved selected annotation, and it's different from
175
+ // the previous one then we mark the select annotation experience as complete.
176
+ if (
177
+ //This checks the selected annotation is different from the previous one
178
+ selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 ? void 0 : (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
179
+ // This ensures that the selected annotation is unresolved
180
+ annotations && annotations[selectedAnnotationId] === false) {
181
+ var _options$selectCommen;
182
+ // The selectComponentExperience is using a simplified object, which is why it's type asserted.
183
+ (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 ? void 0 : _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
186
184
  }
187
185
  const {
188
186
  dirtyAnnotations
@@ -29,6 +29,10 @@ export const getValidNodes = state => {
29
29
  * This only applies when the selection range exactly matches the bookmark range
30
30
  * which should be the case immediately after the comment button is clicked
31
31
  * if the user creates a different selection range, the floating toolbar should still be shown
32
+ * @param root0
33
+ * @param root0.state
34
+ * @param root0.bookmark
35
+ * @example
32
36
  */
33
37
  export const shouldSuppressFloatingToolbar = ({
34
38
  state,
@@ -221,25 +221,23 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
221
221
  editorView.root.addEventListener('mouseup', mouseUp);
222
222
  return {
223
223
  update: function update(view, _prevState) {
224
- if (fg('confluence_comments_select_comment_experience')) {
225
- var _prevSelectedAnnotati;
226
- var _ref4 = getPluginState(view.state) || {},
227
- selectedAnnotations = _ref4.selectedAnnotations,
228
- annotations = _ref4.annotations;
229
- var _ref5 = getPluginState(_prevState) || {},
230
- prevSelectedAnnotations = _ref5.selectedAnnotations;
231
- var selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
232
- // If the new state has an unresolved selected annotation, and it's different from
233
- // the previous one then we mark the select annotation experience as complete.
234
- if (
235
- //This checks the selected annotation is different from the previous one
236
- selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 || (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
237
- // This ensures that the selected annotation is unresolved
238
- annotations && annotations[selectedAnnotationId] === false) {
239
- var _options$selectCommen;
240
- // Under the confluence_comments_select_comment_experience feature flag, the selectComponentExperience is using a simplified object, which is why it's type asserted.
241
- (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 || _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
242
- }
224
+ var _prevSelectedAnnotati;
225
+ var _ref4 = getPluginState(view.state) || {},
226
+ selectedAnnotations = _ref4.selectedAnnotations,
227
+ annotations = _ref4.annotations;
228
+ var _ref5 = getPluginState(_prevState) || {},
229
+ prevSelectedAnnotations = _ref5.selectedAnnotations;
230
+ var selectedAnnotationId = selectedAnnotations && selectedAnnotations.length !== 0 && selectedAnnotations[0].id ? selectedAnnotations[0].id : undefined;
231
+ // If the new state has an unresolved selected annotation, and it's different from
232
+ // the previous one then we mark the select annotation experience as complete.
233
+ if (
234
+ //This checks the selected annotation is different from the previous one
235
+ selectedAnnotationId && selectedAnnotationId !== (prevSelectedAnnotations === null || prevSelectedAnnotations === void 0 || (_prevSelectedAnnotati = prevSelectedAnnotations[0]) === null || _prevSelectedAnnotati === void 0 ? void 0 : _prevSelectedAnnotati.id) &&
236
+ // This ensures that the selected annotation is unresolved
237
+ annotations && annotations[selectedAnnotationId] === false) {
238
+ var _options$selectCommen;
239
+ // The selectComponentExperience is using a simplified object, which is why it's type asserted.
240
+ (_options$selectCommen = options.selectCommentExperience) === null || _options$selectCommen === void 0 || _options$selectCommen.selectAnnotation.complete(selectedAnnotationId);
243
241
  }
244
242
  var _ref6 = getPluginState(view.state) || {},
245
243
  dirtyAnnotations = _ref6.dirtyAnnotations;
@@ -25,6 +25,10 @@ export var getValidNodes = function getValidNodes(state) {
25
25
  * This only applies when the selection range exactly matches the bookmark range
26
26
  * which should be the case immediately after the comment button is clicked
27
27
  * if the user creates a different selection range, the floating toolbar should still be shown
28
+ * @param root0
29
+ * @param root0.state
30
+ * @param root0.bookmark
31
+ * @example
28
32
  */
29
33
  export var shouldSuppressFloatingToolbar = function shouldSuppressFloatingToolbar(_ref) {
30
34
  var state = _ref.state,
@@ -1,4 +1,4 @@
1
1
  export { annotationPlugin } from './annotationPlugin';
2
2
  export type { AnnotationPlugin, AnnotationPluginOptions } from './annotationPluginType';
3
- export type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCompoundExperience, InlineCommentCreateComponentProps, InlineCommentInputMethod, InlineCommentState, InlineCommentViewComponentProps, SelectInlineCommentCompoundExperience, SelectInlineCommentCompoundExperienceEntryPoint, SimpleSelectInlineCommentCompoundExperience, StartAttributes, TargetType, } from './types';
3
+ export type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCompoundExperience, InlineCommentCreateComponentProps, InlineCommentInputMethod, InlineCommentState, InlineCommentViewComponentProps, SelectAbortReasons, SelectParentAbortReasons, SelectInlineCommentCompoundExperience, SelectInlineCommentCompoundExperienceEntryPoint, SimpleSelectInlineCommentCompoundExperience, StartAttributes, TargetType, } from './types';
4
4
  export type { InlineCommentMap, InlineCommentPluginState, InlineCommentPluginOptions, InlineCommentAction, } from './pm-plugins/types';
@@ -1,7 +1,7 @@
1
1
  import { type AnnotationId } from '@atlaskit/adf-schema';
2
2
  import type { ApplyDraftResult, ClearDraftResult, GetDraftResult, StartDraftResult } from '@atlaskit/editor-common/annotation';
3
3
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import { InlineCommentPluginOptions } from './types';
4
+ import type { InlineCommentPluginOptions } from './types';
5
5
  export declare const allowAnnotation: (editorView: EditorView, options: InlineCommentPluginOptions) => () => boolean;
6
6
  export declare const startDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => StartDraftResult;
7
7
  export declare const clearDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => ClearDraftResult;
@@ -3,10 +3,10 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
4
4
  import type { PopupPosition } from '@atlaskit/editor-common/ui';
5
5
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
6
- import { SelectionBookmark, type EditorState } from '@atlaskit/editor-prosemirror/state';
6
+ import { type SelectionBookmark, type EditorState } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { AnnotationPlugin } from '../annotationPluginType';
9
- import { AnnotationProviders } from '../types';
9
+ import { type AnnotationProviders } from '../types';
10
10
  interface BuildToolbarOptions {
11
11
  state: EditorState;
12
12
  intl: IntlShape;
@@ -28,6 +28,10 @@ type ShouldSuppressFloatingToolbarOptions = {
28
28
  * This only applies when the selection range exactly matches the bookmark range
29
29
  * which should be the case immediately after the comment button is clicked
30
30
  * if the user creates a different selection range, the floating toolbar should still be shown
31
+ * @param root0
32
+ * @param root0.state
33
+ * @param root0.bookmark
34
+ * @example
31
35
  */
32
36
  export declare const shouldSuppressFloatingToolbar: ({ state, bookmark, }: ShouldSuppressFloatingToolbarOptions) => boolean;
33
37
  export declare const buildSuppressedToolbar: (state: EditorState) => {
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import type { AnnotationTypes } from '@atlaskit/adf-schema';
3
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
4
4
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import type { AnnotationUpdateEmitter, AnnotationManager } from '@atlaskit/editor-common/annotation';
6
6
  /**
@@ -171,7 +171,6 @@ export type StartAttributes = {
171
171
  blockType?: 'media';
172
172
  annotationId: string;
173
173
  entryPoint: Exclude<SelectInlineCommentCompoundExperienceEntryPoint, 'keyboard-navigation' | 'comment-navigation'>;
174
- linkedCompoundTaskId?: string;
175
174
  } | {
176
175
  pageClass: 'editor' | 'renderer';
177
176
  /**
@@ -181,7 +180,6 @@ export type StartAttributes = {
181
180
  commentType?: 'block' | 'inline';
182
181
  blockType?: 'media';
183
182
  entryPoint: 'keyboard-navigation' | 'comment-navigation';
184
- linkedCompoundTaskId?: string;
185
183
  };
186
184
  type ExperienceDebugFunction = (params: {
187
185
  createAnalyticsEvent: CreateUIAnalyticsEvent;
@@ -228,19 +226,22 @@ export type InlineCommentCompoundExperience = {
228
226
  debugPoint: (message: string, attributes?: ExperienceAttributes) => void;
229
227
  };
230
228
  };
229
+ export type SelectAbortReasons = 'test abort' | 'Comment being resolved';
230
+ export type SelectParentAbortReasons = 'Parent experience aborting with reason: test abort' | 'Parent experience aborting with reason: Comment being resolved';
231
231
  export type SelectInlineCommentCompoundExperience = {
232
232
  _start: (startAttributes: StartAttributes) => void;
233
233
  addCommonAttributes: (additionalCommonAttributes: {
234
- [key: string]: string | number | boolean;
234
+ [key: string]: boolean | null | number | string | undefined | Array<number | string>;
235
235
  }) => void;
236
236
  abort: (params: {
237
- abortReason: 'test abort';
237
+ abortReason: SelectAbortReasons;
238
+ abortSubexperiences?: boolean;
238
239
  }) => void;
239
240
  selectAnnotation: {
240
241
  debug: ExperienceDebugFunction;
241
242
  start: (startAttributes: StartAttributes) => void;
242
243
  abort: (params: {
243
- abortReason: 'Comment navigation when only one comment';
244
+ abortReason: 'Comment navigation when only one comment' | 'Navigating to general comment' | SelectParentAbortReasons;
244
245
  }) => void;
245
246
  complete: (startAttributes: StartAttributes) => void;
246
247
  };
@@ -253,7 +254,7 @@ export type SelectInlineCommentCompoundExperience = {
253
254
  annotationId: string;
254
255
  }) => void;
255
256
  abort: (params: {
256
- abortReason: 'Non inline comment being shown' | 'Comment sidebar dismissed';
257
+ abortReason: 'Non inline comment being shown' | 'Comment sidebar dismissed' | 'InlineComment component unmounted' | SelectParentAbortReasons;
257
258
  }) => void;
258
259
  fail: (error: Error, extraAttributes?: {
259
260
  misalignedBy: number;
@@ -1,4 +1,4 @@
1
1
  export { annotationPlugin } from './annotationPlugin';
2
2
  export type { AnnotationPlugin, AnnotationPluginOptions } from './annotationPluginType';
3
- export type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCompoundExperience, InlineCommentCreateComponentProps, InlineCommentInputMethod, InlineCommentState, InlineCommentViewComponentProps, SelectInlineCommentCompoundExperience, SelectInlineCommentCompoundExperienceEntryPoint, SimpleSelectInlineCommentCompoundExperience, StartAttributes, TargetType, } from './types';
3
+ export type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCompoundExperience, InlineCommentCreateComponentProps, InlineCommentInputMethod, InlineCommentState, InlineCommentViewComponentProps, SelectAbortReasons, SelectParentAbortReasons, SelectInlineCommentCompoundExperience, SelectInlineCommentCompoundExperienceEntryPoint, SimpleSelectInlineCommentCompoundExperience, StartAttributes, TargetType, } from './types';
4
4
  export type { InlineCommentMap, InlineCommentPluginState, InlineCommentPluginOptions, InlineCommentAction, } from './pm-plugins/types';
@@ -1,7 +1,7 @@
1
1
  import { type AnnotationId } from '@atlaskit/adf-schema';
2
2
  import type { ApplyDraftResult, ClearDraftResult, GetDraftResult, StartDraftResult } from '@atlaskit/editor-common/annotation';
3
3
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import { InlineCommentPluginOptions } from './types';
4
+ import type { InlineCommentPluginOptions } from './types';
5
5
  export declare const allowAnnotation: (editorView: EditorView, options: InlineCommentPluginOptions) => () => boolean;
6
6
  export declare const startDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => StartDraftResult;
7
7
  export declare const clearDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => ClearDraftResult;
@@ -3,10 +3,10 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
4
4
  import type { PopupPosition } from '@atlaskit/editor-common/ui';
5
5
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
6
- import { SelectionBookmark, type EditorState } from '@atlaskit/editor-prosemirror/state';
6
+ import { type SelectionBookmark, type EditorState } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { AnnotationPlugin } from '../annotationPluginType';
9
- import { AnnotationProviders } from '../types';
9
+ import { type AnnotationProviders } from '../types';
10
10
  interface BuildToolbarOptions {
11
11
  state: EditorState;
12
12
  intl: IntlShape;
@@ -28,6 +28,10 @@ type ShouldSuppressFloatingToolbarOptions = {
28
28
  * This only applies when the selection range exactly matches the bookmark range
29
29
  * which should be the case immediately after the comment button is clicked
30
30
  * if the user creates a different selection range, the floating toolbar should still be shown
31
+ * @param root0
32
+ * @param root0.state
33
+ * @param root0.bookmark
34
+ * @example
31
35
  */
32
36
  export declare const shouldSuppressFloatingToolbar: ({ state, bookmark, }: ShouldSuppressFloatingToolbarOptions) => boolean;
33
37
  export declare const buildSuppressedToolbar: (state: EditorState) => {
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import type { AnnotationTypes } from '@atlaskit/adf-schema';
3
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
4
4
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import type { AnnotationUpdateEmitter, AnnotationManager } from '@atlaskit/editor-common/annotation';
6
6
  /**
@@ -171,7 +171,6 @@ export type StartAttributes = {
171
171
  blockType?: 'media';
172
172
  annotationId: string;
173
173
  entryPoint: Exclude<SelectInlineCommentCompoundExperienceEntryPoint, 'keyboard-navigation' | 'comment-navigation'>;
174
- linkedCompoundTaskId?: string;
175
174
  } | {
176
175
  pageClass: 'editor' | 'renderer';
177
176
  /**
@@ -181,7 +180,6 @@ export type StartAttributes = {
181
180
  commentType?: 'block' | 'inline';
182
181
  blockType?: 'media';
183
182
  entryPoint: 'keyboard-navigation' | 'comment-navigation';
184
- linkedCompoundTaskId?: string;
185
183
  };
186
184
  type ExperienceDebugFunction = (params: {
187
185
  createAnalyticsEvent: CreateUIAnalyticsEvent;
@@ -228,19 +226,22 @@ export type InlineCommentCompoundExperience = {
228
226
  debugPoint: (message: string, attributes?: ExperienceAttributes) => void;
229
227
  };
230
228
  };
229
+ export type SelectAbortReasons = 'test abort' | 'Comment being resolved';
230
+ export type SelectParentAbortReasons = 'Parent experience aborting with reason: test abort' | 'Parent experience aborting with reason: Comment being resolved';
231
231
  export type SelectInlineCommentCompoundExperience = {
232
232
  _start: (startAttributes: StartAttributes) => void;
233
233
  addCommonAttributes: (additionalCommonAttributes: {
234
- [key: string]: string | number | boolean;
234
+ [key: string]: boolean | null | number | string | undefined | Array<number | string>;
235
235
  }) => void;
236
236
  abort: (params: {
237
- abortReason: 'test abort';
237
+ abortReason: SelectAbortReasons;
238
+ abortSubexperiences?: boolean;
238
239
  }) => void;
239
240
  selectAnnotation: {
240
241
  debug: ExperienceDebugFunction;
241
242
  start: (startAttributes: StartAttributes) => void;
242
243
  abort: (params: {
243
- abortReason: 'Comment navigation when only one comment';
244
+ abortReason: 'Comment navigation when only one comment' | 'Navigating to general comment' | SelectParentAbortReasons;
244
245
  }) => void;
245
246
  complete: (startAttributes: StartAttributes) => void;
246
247
  };
@@ -253,7 +254,7 @@ export type SelectInlineCommentCompoundExperience = {
253
254
  annotationId: string;
254
255
  }) => void;
255
256
  abort: (params: {
256
- abortReason: 'Non inline comment being shown' | 'Comment sidebar dismissed';
257
+ abortReason: 'Non inline comment being shown' | 'Comment sidebar dismissed' | 'InlineComment component unmounted' | SelectParentAbortReasons;
257
258
  }) => void;
258
259
  fail: (error: Error, extraAttributes?: {
259
260
  misalignedBy: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,16 +33,16 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.6.0",
35
35
  "@atlaskit/analytics-next": "^11.0.0",
36
- "@atlaskit/editor-common": "^105.0.0",
37
- "@atlaskit/editor-plugin-analytics": "^2.2.0",
36
+ "@atlaskit/editor-common": "^105.8.0",
37
+ "@atlaskit/editor-plugin-analytics": "^2.3.0",
38
38
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
41
41
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/icon": "^26.0.0",
43
- "@atlaskit/onboarding": "^14.0.0",
42
+ "@atlaskit/icon": "^26.1.0",
43
+ "@atlaskit/onboarding": "^14.1.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^4.19.0",
45
+ "@atlaskit/tmp-editor-statsig": "^4.24.0",
46
46
  "@babel/runtime": "^7.0.0"
47
47
  },
48
48
  "peerDependencies": {
@@ -115,9 +115,6 @@
115
115
  "platform_editor_listen_for_focussed_query_param": {
116
116
  "type": "boolean"
117
117
  },
118
- "confluence_comments_select_comment_experience": {
119
- "type": "boolean"
120
- },
121
118
  "confluence_frontend_handle_annotation_error": {
122
119
  "type": "boolean"
123
120
  },