@atlaskit/editor-plugin-annotation 3.3.8 → 3.3.10
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 +14 -0
- package/dist/cjs/pm-plugins/toolbar.js +2 -2
- package/dist/cjs/pm-plugins/utils.js +1 -13
- package/dist/cjs/ui/CommentButton/utils.js +2 -2
- package/dist/es2019/pm-plugins/toolbar.js +1 -1
- package/dist/es2019/pm-plugins/utils.js +0 -14
- package/dist/es2019/ui/CommentButton/utils.js +1 -1
- package/dist/esm/pm-plugins/toolbar.js +1 -1
- package/dist/esm/pm-plugins/utils.js +0 -12
- package/dist/esm/ui/CommentButton/utils.js +1 -1
- package/dist/types/annotationPluginType.d.ts +5 -5
- package/dist/types/pm-plugins/toolbar.d.ts +10 -11
- package/dist/types/pm-plugins/types.d.ts +36 -36
- package/dist/types/pm-plugins/utils.d.ts +0 -1
- package/dist/types/types/index.d.ts +35 -35
- package/dist/types/ui/AnnotationViewWrapper.d.ts +3 -2
- package/dist/types/ui/CommentButton/CommentButton.d.ts +1 -1
- package/dist/types/ui/CommentButton/hooks.d.ts +2 -2
- package/dist/types/ui/CommentButton/utils.d.ts +5 -9
- package/dist/types/ui/InlineCommentView.d.ts +3 -3
- package/dist/types-ts4.5/annotationPluginType.d.ts +5 -5
- package/dist/types-ts4.5/pm-plugins/toolbar.d.ts +10 -11
- package/dist/types-ts4.5/pm-plugins/types.d.ts +36 -36
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -1
- package/dist/types-ts4.5/types/index.d.ts +35 -35
- package/dist/types-ts4.5/ui/AnnotationViewWrapper.d.ts +3 -2
- package/dist/types-ts4.5/ui/CommentButton/CommentButton.d.ts +1 -1
- package/dist/types-ts4.5/ui/CommentButton/hooks.d.ts +2 -2
- package/dist/types-ts4.5/ui/CommentButton/utils.d.ts +5 -9
- package/dist/types-ts4.5/ui/InlineCommentView.d.ts +3 -3
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 3.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 3.3.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 3.3.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.shouldSuppressFloatingToolbar = exports.
|
|
7
|
+
exports.shouldSuppressFloatingToolbar = exports.buildToolbar = exports.buildSuppressedToolbar = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -19,7 +19,7 @@ var _types = require("../types");
|
|
|
19
19
|
var _utils2 = require("./utils");
|
|
20
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
var getValidNodes =
|
|
22
|
+
var getValidNodes = function getValidNodes(state) {
|
|
23
23
|
var schema = state.schema;
|
|
24
24
|
var annotation = schema.marks.annotation;
|
|
25
25
|
return Object.keys(schema.nodes).reduce(function (acc, current) {
|
|
@@ -10,7 +10,7 @@ exports.getPluginState = exports.getDraftCommandAnalyticsPayload = exports.getAn
|
|
|
10
10
|
exports.getSelectionPositions = getSelectionPositions;
|
|
11
11
|
exports.hasInvalidNodes = exports.hasAnyUnResolvedAnnotationInPage = void 0;
|
|
12
12
|
exports.hasInvalidWhitespaceNode = hasInvalidWhitespaceNode;
|
|
13
|
-
exports.
|
|
13
|
+
exports.isBlockNodeAnnotationsSelected = exports.inlineCommentPluginKey = void 0;
|
|
14
14
|
exports.isSelectedAnnotationsChanged = isSelectedAnnotationsChanged;
|
|
15
15
|
exports.resolveDraftBookmark = exports.isSupportedBlockNode = exports.isSelectionValid = void 0;
|
|
16
16
|
exports.stripNonExistingAnnotations = stripNonExistingAnnotations;
|
|
@@ -145,18 +145,6 @@ var getAnnotationViewKey = exports.getAnnotationViewKey = function getAnnotation
|
|
|
145
145
|
}).join('_');
|
|
146
146
|
return "view-annotation-wrapper_".concat(keys);
|
|
147
147
|
};
|
|
148
|
-
var isCurrentBlockNodeSelected = exports.isCurrentBlockNodeSelected = function isCurrentBlockNodeSelected(state, node) {
|
|
149
|
-
var selection = state.selection;
|
|
150
|
-
if (selection instanceof _state.NodeSelection) {
|
|
151
|
-
if (selection.node === node) {
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
if (node.type.name === 'media' && selection.node.firstChild === node) {
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return false;
|
|
159
|
-
};
|
|
160
148
|
var findAnnotationsInSelection = exports.findAnnotationsInSelection = function findAnnotationsInSelection(selection, doc) {
|
|
161
149
|
var empty = selection.empty,
|
|
162
150
|
$anchor = selection.$anchor,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.startCommentExperience = exports.shouldShowCommentButton = exports.isButtonDisabled = exports.fireOnClickAnalyticsEvent = exports.fireCommentButtonViewedAnalyticsEvent =
|
|
6
|
+
exports.startCommentExperience = exports.shouldShowCommentButton = exports.isButtonDisabled = exports.fireOnClickAnalyticsEvent = exports.fireCommentButtonViewedAnalyticsEvent = void 0;
|
|
7
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
8
8
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
9
9
|
var _editorCommands = require("../../editor-commands");
|
|
@@ -42,7 +42,7 @@ var fireOnClickAnalyticsEvent = exports.fireOnClickAnalyticsEvent = function fir
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
var fireAnnotationErrorAnalyticsEvent =
|
|
45
|
+
var fireAnnotationErrorAnalyticsEvent = function fireAnnotationErrorAnalyticsEvent(_ref4) {
|
|
46
46
|
var _api$analytics2;
|
|
47
47
|
var api = _ref4.api,
|
|
48
48
|
errorReason = _ref4.errorReason;
|
|
@@ -9,7 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
10
10
|
import { AnnotationSelectionType, AnnotationTestIds } from '../types';
|
|
11
11
|
import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
|
|
12
|
-
|
|
12
|
+
const getValidNodes = state => {
|
|
13
13
|
const {
|
|
14
14
|
schema
|
|
15
15
|
} = state;
|
|
@@ -113,20 +113,6 @@ export const getAnnotationViewKey = annotations => {
|
|
|
113
113
|
const keys = annotations.map(mark => mark.id).join('_');
|
|
114
114
|
return `view-annotation-wrapper_${keys}`;
|
|
115
115
|
};
|
|
116
|
-
export const isCurrentBlockNodeSelected = (state, node) => {
|
|
117
|
-
const {
|
|
118
|
-
selection
|
|
119
|
-
} = state;
|
|
120
|
-
if (selection instanceof NodeSelection) {
|
|
121
|
-
if (selection.node === node) {
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
if (node.type.name === 'media' && selection.node.firstChild === node) {
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return false;
|
|
129
|
-
};
|
|
130
116
|
export const findAnnotationsInSelection = (selection, doc) => {
|
|
131
117
|
const {
|
|
132
118
|
empty,
|
|
@@ -12,7 +12,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
12
12
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
13
13
|
import { AnnotationSelectionType, AnnotationTestIds } from '../types';
|
|
14
14
|
import { getPluginState, isSelectionValid, resolveDraftBookmark } from './utils';
|
|
15
|
-
|
|
15
|
+
var getValidNodes = function getValidNodes(state) {
|
|
16
16
|
var schema = state.schema;
|
|
17
17
|
var annotation = schema.marks.annotation;
|
|
18
18
|
return Object.keys(schema.nodes).reduce(function (acc, current) {
|
|
@@ -128,18 +128,6 @@ export var getAnnotationViewKey = function getAnnotationViewKey(annotations) {
|
|
|
128
128
|
}).join('_');
|
|
129
129
|
return "view-annotation-wrapper_".concat(keys);
|
|
130
130
|
};
|
|
131
|
-
export var isCurrentBlockNodeSelected = function isCurrentBlockNodeSelected(state, node) {
|
|
132
|
-
var selection = state.selection;
|
|
133
|
-
if (selection instanceof NodeSelection) {
|
|
134
|
-
if (selection.node === node) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
if (node.type.name === 'media' && selection.node.firstChild === node) {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return false;
|
|
142
|
-
};
|
|
143
131
|
export var findAnnotationsInSelection = function findAnnotationsInSelection(selection, doc) {
|
|
144
132
|
var empty = selection.empty,
|
|
145
133
|
$anchor = selection.$anchor,
|
|
@@ -36,7 +36,7 @@ export var fireOnClickAnalyticsEvent = function fireOnClickAnalyticsEvent(_ref3)
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
var fireAnnotationErrorAnalyticsEvent = function fireAnnotationErrorAnalyticsEvent(_ref4) {
|
|
40
40
|
var _api$analytics2;
|
|
41
41
|
var api = _ref4.api,
|
|
42
42
|
errorReason = _ref4.errorReason;
|
|
@@ -24,11 +24,8 @@ export type AnnotationPluginDependencies = [
|
|
|
24
24
|
];
|
|
25
25
|
export type AnnotationPluginOptions = AnnotationProviders;
|
|
26
26
|
export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
27
|
-
pluginConfiguration: AnnotationPluginOptions | undefined;
|
|
28
|
-
sharedState: InlineCommentPluginState | undefined;
|
|
29
|
-
dependencies: AnnotationPluginDependencies;
|
|
30
27
|
actions: {
|
|
31
|
-
|
|
28
|
+
hasAnyUnResolvedAnnotationInPage: (state: EditorState) => boolean;
|
|
32
29
|
setInlineCommentDraftState: SetInlineCommentDraftState;
|
|
33
30
|
/**
|
|
34
31
|
* This function attempts to display the inline comment popup for a given node.
|
|
@@ -36,8 +33,11 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
|
36
33
|
* otherwise, it will return false.
|
|
37
34
|
*/
|
|
38
35
|
showCommentForBlockNode: ReturnType<typeof showInlineCommentForBlockNode>;
|
|
39
|
-
|
|
36
|
+
stripNonExistingAnnotations: StripNonExistingAnnotations;
|
|
40
37
|
};
|
|
38
|
+
dependencies: AnnotationPluginDependencies;
|
|
39
|
+
pluginConfiguration: AnnotationPluginOptions | undefined;
|
|
40
|
+
sharedState: InlineCommentPluginState | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
export type AnnotationPluginInjectionAPI = ExtractInjectionAPI<AnnotationPlugin> | undefined;
|
|
43
43
|
export {};
|
|
@@ -8,22 +8,21 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
8
8
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
9
9
|
import { type AnnotationProviders } from '../types';
|
|
10
10
|
interface BuildToolbarOptions {
|
|
11
|
-
state: EditorState;
|
|
12
|
-
intl: IntlShape;
|
|
13
|
-
isToolbarAbove?: boolean;
|
|
14
|
-
isCommentOnMediaOn?: boolean;
|
|
15
11
|
_supportedNodes?: string[];
|
|
12
|
+
annotationManager?: AnnotationProviders['annotationManager'];
|
|
16
13
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
14
|
+
contentType?: string;
|
|
17
15
|
createCommentExperience?: AnnotationProviders['createCommentExperience'];
|
|
18
|
-
annotationManager?: AnnotationProviders['annotationManager'];
|
|
19
|
-
onCommentButtonMount?: () => void;
|
|
20
16
|
getCanAddComments?: () => boolean;
|
|
21
|
-
|
|
17
|
+
intl: IntlShape;
|
|
18
|
+
isCommentOnMediaOn?: boolean;
|
|
19
|
+
isToolbarAbove?: boolean;
|
|
20
|
+
onCommentButtonMount?: () => void;
|
|
21
|
+
state: EditorState;
|
|
22
22
|
}
|
|
23
|
-
export declare const getValidNodes: (state: EditorState) => NodeType[];
|
|
24
23
|
type ShouldSuppressFloatingToolbarOptions = {
|
|
25
|
-
state: EditorState;
|
|
26
24
|
bookmark?: SelectionBookmark;
|
|
25
|
+
state: EditorState;
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
28
|
* Should suppress toolbars when the user is creating an inline comment
|
|
@@ -43,9 +42,9 @@ export declare const buildSuppressedToolbar: (state: EditorState) => {
|
|
|
43
42
|
__suppressAllToolbars: boolean;
|
|
44
43
|
};
|
|
45
44
|
export declare const buildToolbar: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ state, intl, isToolbarAbove, _supportedNodes, api, createCommentExperience, annotationManager, onCommentButtonMount, getCanAddComments, contentType, }: BuildToolbarOptions) => {
|
|
46
|
-
title: string;
|
|
47
|
-
nodeType: NodeType[];
|
|
48
45
|
items: FloatingToolbarButton<Command>[];
|
|
46
|
+
nodeType: NodeType[];
|
|
49
47
|
onPositionCalculated: (editorView: EditorView, nextPos: PopupPosition) => PopupPosition;
|
|
48
|
+
title: string;
|
|
50
49
|
} | undefined;
|
|
51
50
|
export {};
|
|
@@ -20,14 +20,14 @@ export declare enum ACTIONS {
|
|
|
20
20
|
SET_PENDING_SELECTIONS = 10
|
|
21
21
|
}
|
|
22
22
|
export interface InlineCommentPluginOptions {
|
|
23
|
+
annotationManager?: AnnotationManager;
|
|
24
|
+
api?: AnnotationPluginInjectionAPI;
|
|
23
25
|
dispatch: Dispatch;
|
|
24
|
-
provider: InlineCommentAnnotationProvider;
|
|
25
26
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
26
27
|
featureFlagsPluginState?: FeatureFlags;
|
|
28
|
+
provider: InlineCommentAnnotationProvider;
|
|
27
29
|
selectCommentExperience?: AnnotationProviders['selectCommentExperience'];
|
|
28
30
|
viewInlineCommentTraceUFOPress?: AnnotationProviders['viewInlineCommentTraceUFOPress'];
|
|
29
|
-
annotationManager?: AnnotationManager;
|
|
30
|
-
api?: AnnotationPluginInjectionAPI;
|
|
31
31
|
}
|
|
32
32
|
export interface InlineCommentMouseData {
|
|
33
33
|
isSelecting: boolean;
|
|
@@ -36,63 +36,63 @@ export type InlineCommentMap = {
|
|
|
36
36
|
[key: string]: boolean;
|
|
37
37
|
};
|
|
38
38
|
export type InlineCommentAction = {
|
|
39
|
-
type: ACTIONS.UPDATE_INLINE_COMMENT_STATE;
|
|
40
39
|
data: InlineCommentMap;
|
|
40
|
+
type: ACTIONS.UPDATE_INLINE_COMMENT_STATE;
|
|
41
41
|
} | {
|
|
42
|
-
type: ACTIONS.SET_INLINE_COMMENT_DRAFT_STATE;
|
|
43
42
|
data: {
|
|
44
43
|
drafting: boolean;
|
|
45
44
|
editorState: EditorState;
|
|
46
|
-
|
|
45
|
+
isOpeningMediaCommentFromToolbar?: boolean;
|
|
47
46
|
supportedBlockNodes?: string[];
|
|
48
47
|
targetNodeId?: string;
|
|
49
|
-
|
|
48
|
+
targetType?: TargetType;
|
|
50
49
|
};
|
|
50
|
+
type: ACTIONS.SET_INLINE_COMMENT_DRAFT_STATE;
|
|
51
51
|
} | {
|
|
52
|
-
type: ACTIONS.INLINE_COMMENT_UPDATE_MOUSE_STATE;
|
|
53
52
|
data: {
|
|
54
53
|
mouseData: InlineCommentMouseData;
|
|
55
54
|
};
|
|
55
|
+
type: ACTIONS.INLINE_COMMENT_UPDATE_MOUSE_STATE;
|
|
56
56
|
} | {
|
|
57
57
|
type: ACTIONS.INLINE_COMMENT_CLEAR_DIRTY_MARK;
|
|
58
58
|
} | {
|
|
59
59
|
type: ACTIONS.CLOSE_COMPONENT;
|
|
60
60
|
} | {
|
|
61
|
-
type: ACTIONS.ADD_INLINE_COMMENT;
|
|
62
61
|
data: {
|
|
63
62
|
drafting: boolean;
|
|
64
|
-
inlineComments: InlineCommentMap;
|
|
65
63
|
editorState: EditorState;
|
|
64
|
+
inlineComments: InlineCommentMap;
|
|
66
65
|
selectedAnnotations: AnnotationInfo[];
|
|
67
66
|
};
|
|
67
|
+
type: ACTIONS.ADD_INLINE_COMMENT;
|
|
68
68
|
} | {
|
|
69
|
-
type: ACTIONS.INLINE_COMMENT_SET_VISIBLE;
|
|
70
69
|
data: {
|
|
71
70
|
isVisible: boolean;
|
|
72
71
|
};
|
|
72
|
+
type: ACTIONS.INLINE_COMMENT_SET_VISIBLE;
|
|
73
73
|
} | {
|
|
74
|
-
type: ACTIONS.SET_SELECTED_ANNOTATION;
|
|
75
74
|
data: {
|
|
76
|
-
selectedAnnotations: AnnotationInfo[];
|
|
77
|
-
selectAnnotationMethod?: VIEW_METHOD;
|
|
78
75
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
76
|
+
selectAnnotationMethod?: VIEW_METHOD;
|
|
77
|
+
selectedAnnotations: AnnotationInfo[];
|
|
79
78
|
};
|
|
79
|
+
type: ACTIONS.SET_SELECTED_ANNOTATION;
|
|
80
80
|
} | {
|
|
81
|
-
type: ACTIONS.SET_HOVERED_ANNOTATION;
|
|
82
81
|
data: {
|
|
83
82
|
hoveredAnnotations: AnnotationInfo[];
|
|
84
83
|
selectAnnotationMethod?: VIEW_METHOD;
|
|
85
84
|
};
|
|
85
|
+
type: ACTIONS.SET_HOVERED_ANNOTATION;
|
|
86
86
|
} | {
|
|
87
|
-
type: ACTIONS.FLUSH_PENDING_SELECTIONS;
|
|
88
87
|
data: {
|
|
89
88
|
canSetAsSelectedAnnotations: boolean;
|
|
90
89
|
};
|
|
90
|
+
type: ACTIONS.FLUSH_PENDING_SELECTIONS;
|
|
91
91
|
} | {
|
|
92
|
-
type: ACTIONS.SET_PENDING_SELECTIONS;
|
|
93
92
|
data: {
|
|
94
93
|
selectedAnnotations: AnnotationInfo[];
|
|
95
94
|
};
|
|
95
|
+
type: ACTIONS.SET_PENDING_SELECTIONS;
|
|
96
96
|
};
|
|
97
97
|
export type InlineCommentPluginState = {
|
|
98
98
|
/**
|
|
@@ -116,22 +116,16 @@ export type InlineCommentPluginState = {
|
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
118
|
annotations: InlineCommentMap;
|
|
119
|
-
|
|
120
|
-
* A list of the annotations at the current selection.
|
|
121
|
-
*
|
|
122
|
-
* While this is a list, consumers only make use of the first element, and from the
|
|
123
|
-
* user perspective, there is only one annotation selected at a time.
|
|
124
|
-
*/
|
|
125
|
-
selectedAnnotations: AnnotationInfo[];
|
|
119
|
+
bookmark?: SelectionBookmark;
|
|
126
120
|
/**
|
|
127
121
|
* Indicates the document has annotations which it does not currently know the resolved state of.
|
|
128
122
|
* This can happen when the annotations are loaded via ncs, and the editor has not received the
|
|
129
123
|
* resolved state of the annotations yet (as the resolved state comes from a separate service).
|
|
130
124
|
*/
|
|
131
125
|
dirtyAnnotations?: boolean;
|
|
132
|
-
|
|
126
|
+
disallowOnWhitespace: boolean;
|
|
133
127
|
draftDecorationSet?: DecorationSet;
|
|
134
|
-
|
|
128
|
+
featureFlagsPluginState?: FeatureFlags;
|
|
135
129
|
/**
|
|
136
130
|
* Warning: This is not the state of annotations which are currently being hovered over,
|
|
137
131
|
* but rather the annotations which have been given a selected like visual state from an
|
|
@@ -140,16 +134,15 @@ export type InlineCommentPluginState = {
|
|
|
140
134
|
* a "hovered" state on the annotation, while the comment is hovered in the sidebar.
|
|
141
135
|
*/
|
|
142
136
|
hoveredAnnotations?: AnnotationInfo[];
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
featureFlagsPluginState?: FeatureFlags;
|
|
137
|
+
/**
|
|
138
|
+
* A simple toggle to indicate if the annotation manager is enabled.
|
|
139
|
+
*/
|
|
140
|
+
isAnnotationManagerEnabled: boolean;
|
|
148
141
|
isDrafting: boolean;
|
|
149
|
-
|
|
150
|
-
selectAnnotationMethod?: VIEW_METHOD;
|
|
142
|
+
isInlineCommentViewClosed: boolean;
|
|
151
143
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
152
|
-
|
|
144
|
+
isVisible: boolean;
|
|
145
|
+
mouseData: InlineCommentMouseData;
|
|
153
146
|
/**
|
|
154
147
|
* This is a list of annotations which are to be selected. This is updated all the time when the selection changes, and
|
|
155
148
|
* are periodically flushed to selectedAnnotations. This flush event results in the annotations being selected in the editor.
|
|
@@ -163,8 +156,15 @@ export type InlineCommentPluginState = {
|
|
|
163
156
|
* if the pendingSelectedAnnotations has been updated since the last time it was flushed to selectedAnnotations.
|
|
164
157
|
*/
|
|
165
158
|
pendingSelectedAnnotationsUpdateCount: number;
|
|
159
|
+
selectAnnotationMethod?: VIEW_METHOD;
|
|
160
|
+
selectCommentExperience?: AnnotationProviders['selectCommentExperience'];
|
|
166
161
|
/**
|
|
167
|
-
* A
|
|
162
|
+
* A list of the annotations at the current selection.
|
|
163
|
+
*
|
|
164
|
+
* While this is a list, consumers only make use of the first element, and from the
|
|
165
|
+
* user perspective, there is only one annotation selected at a time.
|
|
168
166
|
*/
|
|
169
|
-
|
|
167
|
+
selectedAnnotations: AnnotationInfo[];
|
|
168
|
+
skipSelectionHandling: boolean;
|
|
169
|
+
targetNodeId?: string;
|
|
170
170
|
};
|
|
@@ -18,7 +18,6 @@ export declare const decorationKey: {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const addDraftDecoration: (start: number, end: number, targetType?: TargetType) => Decoration;
|
|
20
20
|
export declare const getAnnotationViewKey: (annotations: AnnotationInfo[]) => string;
|
|
21
|
-
export declare const isCurrentBlockNodeSelected: (state: EditorState, node: Node) => boolean;
|
|
22
21
|
export declare const findAnnotationsInSelection: (selection: Selection, doc: Node) => AnnotationInfo[];
|
|
23
22
|
export declare const resolveDraftBookmark: (editorState: EditorState, bookmark?: SelectionBookmark, supportedBlockNodes?: string[]) => DraftBookmark;
|
|
24
23
|
/**
|
|
@@ -16,34 +16,34 @@ export type AnnotationInfo = {
|
|
|
16
16
|
type: AnnotationTypes.INLINE_COMMENT;
|
|
17
17
|
};
|
|
18
18
|
type AnnotationComponentProps = {
|
|
19
|
-
/**
|
|
20
|
-
* Selected text (can be used when creating a comment)
|
|
21
|
-
*/
|
|
22
|
-
textSelection?: string;
|
|
23
19
|
/**
|
|
24
20
|
* DOM element around selected text (for positioning)
|
|
25
21
|
*/
|
|
26
22
|
dom?: HTMLElement;
|
|
23
|
+
/**
|
|
24
|
+
* Indicates whether the comment UI is offline and should be disabled
|
|
25
|
+
*/
|
|
26
|
+
isOffline?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Indicates that a draft comment was discarded/cancelled
|
|
29
29
|
*/
|
|
30
30
|
onClose?: () => void;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Selected text (can be used when creating a comment)
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
textSelection?: string;
|
|
35
35
|
};
|
|
36
36
|
export type InlineCommentCreateComponentProps = AnnotationComponentProps & {
|
|
37
|
-
/**
|
|
38
|
-
* Creates an annotation mark in the document with the given id.
|
|
39
|
-
*/
|
|
40
|
-
onCreate: (id: string) => void;
|
|
41
37
|
/** List of inline node types, which are wrapped by the annotation. */
|
|
42
38
|
inlineNodeTypes: string[] | undefined;
|
|
43
39
|
/**
|
|
44
40
|
* Indicates whether we're opening the media comment box from the media toolbar so we can scroll the media into view
|
|
45
41
|
*/
|
|
46
42
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Creates an annotation mark in the document with the given id.
|
|
45
|
+
*/
|
|
46
|
+
onCreate: (id: string) => void;
|
|
47
47
|
wasNewAnnotationSelected?: boolean;
|
|
48
48
|
};
|
|
49
49
|
export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
@@ -52,14 +52,6 @@ export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
|
52
52
|
* These are provided in order, inner-most first.
|
|
53
53
|
*/
|
|
54
54
|
annotations: Array<AnnotationInfo>;
|
|
55
|
-
/**
|
|
56
|
-
* Resolves an annotation with the given ID around the selection.
|
|
57
|
-
*/
|
|
58
|
-
onResolve: (id: string) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Removes the annotation from the document
|
|
61
|
-
*/
|
|
62
|
-
onDelete?: (id: string) => void;
|
|
63
55
|
/**
|
|
64
56
|
* Ordered list of annotation ids as shown in the document
|
|
65
57
|
*/
|
|
@@ -78,6 +70,14 @@ export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
|
78
70
|
* Indicates whether we're opening the media comment box from the media toolbar so we can scroll the media into view
|
|
79
71
|
*/
|
|
80
72
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Removes the annotation from the document
|
|
75
|
+
*/
|
|
76
|
+
onDelete?: (id: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Resolves an annotation with the given ID around the selection.
|
|
79
|
+
*/
|
|
80
|
+
onResolve: (id: string) => void;
|
|
81
81
|
};
|
|
82
82
|
export interface AnnotationState<Type, State> {
|
|
83
83
|
annotationType: Type;
|
|
@@ -85,17 +85,19 @@ export interface AnnotationState<Type, State> {
|
|
|
85
85
|
state: State;
|
|
86
86
|
}
|
|
87
87
|
export interface AnnotationTypeProvider<Type, State> {
|
|
88
|
+
disallowOnWhitespace?: boolean;
|
|
88
89
|
getState: (annotationIds: string[]) => Promise<AnnotationState<Type, State>[]>;
|
|
89
90
|
updateSubscriber?: AnnotationUpdateEmitter;
|
|
90
|
-
disallowOnWhitespace?: boolean;
|
|
91
91
|
}
|
|
92
92
|
export type InlineCommentState = {
|
|
93
93
|
resolved: boolean;
|
|
94
94
|
};
|
|
95
95
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
|
|
96
|
+
contentType?: string;
|
|
96
97
|
createComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentCreateComponentProps>>;
|
|
97
|
-
|
|
98
|
+
getCanAddComments?: () => boolean;
|
|
98
99
|
isToolbarAbove?: boolean;
|
|
100
|
+
onCommentButtonMount?: () => void;
|
|
99
101
|
/**
|
|
100
102
|
* @experimental Still under development. Do not use.
|
|
101
103
|
*
|
|
@@ -106,38 +108,36 @@ export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationT
|
|
|
106
108
|
* Note 2: text is supported by default.
|
|
107
109
|
*/
|
|
108
110
|
supportedBlockNodes?: string[];
|
|
109
|
-
|
|
110
|
-
getCanAddComments?: () => boolean;
|
|
111
|
-
contentType?: string;
|
|
111
|
+
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
112
112
|
};
|
|
113
113
|
export interface AnnotationProviders {
|
|
114
|
-
|
|
114
|
+
annotationManager?: AnnotationManager;
|
|
115
115
|
createCommentExperience?: {
|
|
116
|
+
initExperience: {
|
|
117
|
+
start: () => void;
|
|
118
|
+
};
|
|
116
119
|
start: (_: {
|
|
117
120
|
attributes: {
|
|
118
|
-
pageClass: 'editor';
|
|
119
|
-
commentType: 'inline';
|
|
120
121
|
annotationId?: undefined;
|
|
122
|
+
commentType: 'inline';
|
|
121
123
|
entryPoint?: 'highlightActions';
|
|
122
|
-
} | {
|
|
123
124
|
pageClass: 'editor';
|
|
124
|
-
|
|
125
|
-
blockType: 'media';
|
|
125
|
+
} | {
|
|
126
126
|
annotationId?: undefined;
|
|
127
|
+
blockType: 'media';
|
|
128
|
+
commentType: 'block';
|
|
127
129
|
entryPoint?: 'highlightActions';
|
|
130
|
+
pageClass: 'editor';
|
|
128
131
|
};
|
|
129
132
|
}) => void;
|
|
130
|
-
initExperience: {
|
|
131
|
-
start: () => void;
|
|
132
|
-
};
|
|
133
133
|
};
|
|
134
|
+
inlineComment: InlineCommentAnnotationProvider;
|
|
134
135
|
selectCommentExperience?: {
|
|
135
136
|
selectAnnotation: {
|
|
136
137
|
complete: (annotationId: string) => void;
|
|
137
138
|
};
|
|
138
139
|
};
|
|
139
140
|
viewInlineCommentTraceUFOPress?: () => void;
|
|
140
|
-
annotationManager?: AnnotationManager;
|
|
141
141
|
}
|
|
142
142
|
export declare enum AnnotationSelectionType {
|
|
143
143
|
INVALID = "invalid",// Annotation should not be created, toolbar should not be shown
|
|
@@ -152,15 +152,15 @@ export declare const AnnotationTestIds: {
|
|
|
152
152
|
componentClose: string;
|
|
153
153
|
};
|
|
154
154
|
export type CoordsAtPos = {
|
|
155
|
-
top: number;
|
|
156
155
|
bottom: number;
|
|
157
156
|
left: number;
|
|
158
157
|
right: number;
|
|
158
|
+
top: number;
|
|
159
159
|
};
|
|
160
160
|
export type DraftBookmark = {
|
|
161
161
|
from: number;
|
|
162
|
-
to: number;
|
|
163
162
|
head: number;
|
|
164
163
|
isBlockNode?: boolean;
|
|
164
|
+
to: number;
|
|
165
165
|
};
|
|
166
166
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type AnnotationViewWrapperProps = {
|
|
3
|
+
annotationText?: string;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
onViewed?: () => void;
|
|
5
|
-
annotationText?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class AnnotationViewWrapper extends React.PureComponent<AnnotationViewWrapperProps> {
|
|
8
8
|
componentDidMount(): void;
|
|
9
9
|
render(): React.ReactNode;
|
|
10
10
|
}
|
|
11
|
+
export {};
|
|
@@ -3,8 +3,8 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
4
4
|
import { type AnnotationProviders } from '../../types';
|
|
5
5
|
type CommentButtonProps = {
|
|
6
|
-
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
7
6
|
annotationProviders?: AnnotationProviders;
|
|
7
|
+
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
8
8
|
};
|
|
9
9
|
export declare const CommentButton: ({ api, annotationProviders }: CommentButtonProps) => React.JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -4,9 +4,9 @@ import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
|
4
4
|
import type { AnnotationSelectionType } from '../../types';
|
|
5
5
|
import { type AnnotationProviders } from '../../types';
|
|
6
6
|
export declare const useCommentButtonMount: ({ state, annotationProviders, api, annotationSelectionType, bookmark, }: {
|
|
7
|
-
state: EditorState | null;
|
|
8
7
|
annotationProviders?: AnnotationProviders;
|
|
9
|
-
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
10
8
|
annotationSelectionType: AnnotationSelectionType;
|
|
9
|
+
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
11
10
|
bookmark?: SelectionBookmark;
|
|
11
|
+
state: EditorState | null;
|
|
12
12
|
}) => void;
|
|
@@ -4,29 +4,25 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
5
5
|
import { AnnotationSelectionType, type AnnotationProviders } from '../../types';
|
|
6
6
|
export declare const isButtonDisabled: ({ state, api, }: {
|
|
7
|
-
state: EditorState | null;
|
|
8
7
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
8
|
+
state: EditorState | null;
|
|
9
9
|
}) => boolean;
|
|
10
10
|
export declare const shouldShowCommentButton: ({ state, isVisible, annotationSelectionType, }: {
|
|
11
|
-
state: EditorState | null;
|
|
12
|
-
isVisible?: boolean;
|
|
13
11
|
annotationSelectionType: AnnotationSelectionType;
|
|
12
|
+
isVisible?: boolean;
|
|
13
|
+
state: EditorState | null;
|
|
14
14
|
}) => boolean;
|
|
15
15
|
export declare const fireOnClickAnalyticsEvent: ({ api, }: {
|
|
16
16
|
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
17
17
|
}) => void;
|
|
18
|
-
export declare const fireAnnotationErrorAnalyticsEvent: ({ api, errorReason, }: {
|
|
19
|
-
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
20
|
-
errorReason: string;
|
|
21
|
-
}) => void;
|
|
22
18
|
export declare const fireCommentButtonViewedAnalyticsEvent: ({ api, isNonTextInlineNodeInludedInComment, annotationSelectionType, }: {
|
|
19
|
+
annotationSelectionType: AnnotationSelectionType;
|
|
23
20
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
24
21
|
isNonTextInlineNodeInludedInComment: boolean;
|
|
25
|
-
annotationSelectionType: AnnotationSelectionType;
|
|
26
22
|
}) => void;
|
|
27
23
|
export declare const startCommentExperience: ({ annotationProviders, api, state, dispatch, }: {
|
|
28
24
|
annotationProviders: AnnotationProviders;
|
|
29
25
|
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
30
|
-
state: EditorState;
|
|
31
26
|
dispatch: EditorView["dispatch"];
|
|
27
|
+
state: EditorState;
|
|
32
28
|
}) => boolean;
|
|
@@ -5,11 +5,11 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
6
6
|
import { type AnnotationProviders } from '../types';
|
|
7
7
|
interface InlineCommentViewProps {
|
|
8
|
-
|
|
9
|
-
editorView: EditorView;
|
|
8
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
10
9
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
11
10
|
editorAPI: ExtractInjectionAPI<AnnotationPlugin> | undefined;
|
|
12
|
-
|
|
11
|
+
editorView: EditorView;
|
|
12
|
+
providers: AnnotationProviders;
|
|
13
13
|
}
|
|
14
14
|
export declare function InlineCommentView({ providers, editorView, editorAnalyticsAPI, editorAPI, dispatchAnalyticsEvent, }: InlineCommentViewProps): React.JSX.Element | null;
|
|
15
15
|
export {};
|
|
@@ -24,11 +24,8 @@ export type AnnotationPluginDependencies = [
|
|
|
24
24
|
];
|
|
25
25
|
export type AnnotationPluginOptions = AnnotationProviders;
|
|
26
26
|
export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
27
|
-
pluginConfiguration: AnnotationPluginOptions | undefined;
|
|
28
|
-
sharedState: InlineCommentPluginState | undefined;
|
|
29
|
-
dependencies: AnnotationPluginDependencies;
|
|
30
27
|
actions: {
|
|
31
|
-
|
|
28
|
+
hasAnyUnResolvedAnnotationInPage: (state: EditorState) => boolean;
|
|
32
29
|
setInlineCommentDraftState: SetInlineCommentDraftState;
|
|
33
30
|
/**
|
|
34
31
|
* This function attempts to display the inline comment popup for a given node.
|
|
@@ -36,8 +33,11 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
|
36
33
|
* otherwise, it will return false.
|
|
37
34
|
*/
|
|
38
35
|
showCommentForBlockNode: ReturnType<typeof showInlineCommentForBlockNode>;
|
|
39
|
-
|
|
36
|
+
stripNonExistingAnnotations: StripNonExistingAnnotations;
|
|
40
37
|
};
|
|
38
|
+
dependencies: AnnotationPluginDependencies;
|
|
39
|
+
pluginConfiguration: AnnotationPluginOptions | undefined;
|
|
40
|
+
sharedState: InlineCommentPluginState | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
export type AnnotationPluginInjectionAPI = ExtractInjectionAPI<AnnotationPlugin> | undefined;
|
|
43
43
|
export {};
|
|
@@ -8,22 +8,21 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
8
8
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
9
9
|
import { type AnnotationProviders } from '../types';
|
|
10
10
|
interface BuildToolbarOptions {
|
|
11
|
-
state: EditorState;
|
|
12
|
-
intl: IntlShape;
|
|
13
|
-
isToolbarAbove?: boolean;
|
|
14
|
-
isCommentOnMediaOn?: boolean;
|
|
15
11
|
_supportedNodes?: string[];
|
|
12
|
+
annotationManager?: AnnotationProviders['annotationManager'];
|
|
16
13
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
14
|
+
contentType?: string;
|
|
17
15
|
createCommentExperience?: AnnotationProviders['createCommentExperience'];
|
|
18
|
-
annotationManager?: AnnotationProviders['annotationManager'];
|
|
19
|
-
onCommentButtonMount?: () => void;
|
|
20
16
|
getCanAddComments?: () => boolean;
|
|
21
|
-
|
|
17
|
+
intl: IntlShape;
|
|
18
|
+
isCommentOnMediaOn?: boolean;
|
|
19
|
+
isToolbarAbove?: boolean;
|
|
20
|
+
onCommentButtonMount?: () => void;
|
|
21
|
+
state: EditorState;
|
|
22
22
|
}
|
|
23
|
-
export declare const getValidNodes: (state: EditorState) => NodeType[];
|
|
24
23
|
type ShouldSuppressFloatingToolbarOptions = {
|
|
25
|
-
state: EditorState;
|
|
26
24
|
bookmark?: SelectionBookmark;
|
|
25
|
+
state: EditorState;
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
28
|
* Should suppress toolbars when the user is creating an inline comment
|
|
@@ -43,9 +42,9 @@ export declare const buildSuppressedToolbar: (state: EditorState) => {
|
|
|
43
42
|
__suppressAllToolbars: boolean;
|
|
44
43
|
};
|
|
45
44
|
export declare const buildToolbar: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ state, intl, isToolbarAbove, _supportedNodes, api, createCommentExperience, annotationManager, onCommentButtonMount, getCanAddComments, contentType, }: BuildToolbarOptions) => {
|
|
46
|
-
title: string;
|
|
47
|
-
nodeType: NodeType[];
|
|
48
45
|
items: FloatingToolbarButton<Command>[];
|
|
46
|
+
nodeType: NodeType[];
|
|
49
47
|
onPositionCalculated: (editorView: EditorView, nextPos: PopupPosition) => PopupPosition;
|
|
48
|
+
title: string;
|
|
50
49
|
} | undefined;
|
|
51
50
|
export {};
|
|
@@ -20,14 +20,14 @@ export declare enum ACTIONS {
|
|
|
20
20
|
SET_PENDING_SELECTIONS = 10
|
|
21
21
|
}
|
|
22
22
|
export interface InlineCommentPluginOptions {
|
|
23
|
+
annotationManager?: AnnotationManager;
|
|
24
|
+
api?: AnnotationPluginInjectionAPI;
|
|
23
25
|
dispatch: Dispatch;
|
|
24
|
-
provider: InlineCommentAnnotationProvider;
|
|
25
26
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
26
27
|
featureFlagsPluginState?: FeatureFlags;
|
|
28
|
+
provider: InlineCommentAnnotationProvider;
|
|
27
29
|
selectCommentExperience?: AnnotationProviders['selectCommentExperience'];
|
|
28
30
|
viewInlineCommentTraceUFOPress?: AnnotationProviders['viewInlineCommentTraceUFOPress'];
|
|
29
|
-
annotationManager?: AnnotationManager;
|
|
30
|
-
api?: AnnotationPluginInjectionAPI;
|
|
31
31
|
}
|
|
32
32
|
export interface InlineCommentMouseData {
|
|
33
33
|
isSelecting: boolean;
|
|
@@ -36,63 +36,63 @@ export type InlineCommentMap = {
|
|
|
36
36
|
[key: string]: boolean;
|
|
37
37
|
};
|
|
38
38
|
export type InlineCommentAction = {
|
|
39
|
-
type: ACTIONS.UPDATE_INLINE_COMMENT_STATE;
|
|
40
39
|
data: InlineCommentMap;
|
|
40
|
+
type: ACTIONS.UPDATE_INLINE_COMMENT_STATE;
|
|
41
41
|
} | {
|
|
42
|
-
type: ACTIONS.SET_INLINE_COMMENT_DRAFT_STATE;
|
|
43
42
|
data: {
|
|
44
43
|
drafting: boolean;
|
|
45
44
|
editorState: EditorState;
|
|
46
|
-
|
|
45
|
+
isOpeningMediaCommentFromToolbar?: boolean;
|
|
47
46
|
supportedBlockNodes?: string[];
|
|
48
47
|
targetNodeId?: string;
|
|
49
|
-
|
|
48
|
+
targetType?: TargetType;
|
|
50
49
|
};
|
|
50
|
+
type: ACTIONS.SET_INLINE_COMMENT_DRAFT_STATE;
|
|
51
51
|
} | {
|
|
52
|
-
type: ACTIONS.INLINE_COMMENT_UPDATE_MOUSE_STATE;
|
|
53
52
|
data: {
|
|
54
53
|
mouseData: InlineCommentMouseData;
|
|
55
54
|
};
|
|
55
|
+
type: ACTIONS.INLINE_COMMENT_UPDATE_MOUSE_STATE;
|
|
56
56
|
} | {
|
|
57
57
|
type: ACTIONS.INLINE_COMMENT_CLEAR_DIRTY_MARK;
|
|
58
58
|
} | {
|
|
59
59
|
type: ACTIONS.CLOSE_COMPONENT;
|
|
60
60
|
} | {
|
|
61
|
-
type: ACTIONS.ADD_INLINE_COMMENT;
|
|
62
61
|
data: {
|
|
63
62
|
drafting: boolean;
|
|
64
|
-
inlineComments: InlineCommentMap;
|
|
65
63
|
editorState: EditorState;
|
|
64
|
+
inlineComments: InlineCommentMap;
|
|
66
65
|
selectedAnnotations: AnnotationInfo[];
|
|
67
66
|
};
|
|
67
|
+
type: ACTIONS.ADD_INLINE_COMMENT;
|
|
68
68
|
} | {
|
|
69
|
-
type: ACTIONS.INLINE_COMMENT_SET_VISIBLE;
|
|
70
69
|
data: {
|
|
71
70
|
isVisible: boolean;
|
|
72
71
|
};
|
|
72
|
+
type: ACTIONS.INLINE_COMMENT_SET_VISIBLE;
|
|
73
73
|
} | {
|
|
74
|
-
type: ACTIONS.SET_SELECTED_ANNOTATION;
|
|
75
74
|
data: {
|
|
76
|
-
selectedAnnotations: AnnotationInfo[];
|
|
77
|
-
selectAnnotationMethod?: VIEW_METHOD;
|
|
78
75
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
76
|
+
selectAnnotationMethod?: VIEW_METHOD;
|
|
77
|
+
selectedAnnotations: AnnotationInfo[];
|
|
79
78
|
};
|
|
79
|
+
type: ACTIONS.SET_SELECTED_ANNOTATION;
|
|
80
80
|
} | {
|
|
81
|
-
type: ACTIONS.SET_HOVERED_ANNOTATION;
|
|
82
81
|
data: {
|
|
83
82
|
hoveredAnnotations: AnnotationInfo[];
|
|
84
83
|
selectAnnotationMethod?: VIEW_METHOD;
|
|
85
84
|
};
|
|
85
|
+
type: ACTIONS.SET_HOVERED_ANNOTATION;
|
|
86
86
|
} | {
|
|
87
|
-
type: ACTIONS.FLUSH_PENDING_SELECTIONS;
|
|
88
87
|
data: {
|
|
89
88
|
canSetAsSelectedAnnotations: boolean;
|
|
90
89
|
};
|
|
90
|
+
type: ACTIONS.FLUSH_PENDING_SELECTIONS;
|
|
91
91
|
} | {
|
|
92
|
-
type: ACTIONS.SET_PENDING_SELECTIONS;
|
|
93
92
|
data: {
|
|
94
93
|
selectedAnnotations: AnnotationInfo[];
|
|
95
94
|
};
|
|
95
|
+
type: ACTIONS.SET_PENDING_SELECTIONS;
|
|
96
96
|
};
|
|
97
97
|
export type InlineCommentPluginState = {
|
|
98
98
|
/**
|
|
@@ -116,22 +116,16 @@ export type InlineCommentPluginState = {
|
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
118
|
annotations: InlineCommentMap;
|
|
119
|
-
|
|
120
|
-
* A list of the annotations at the current selection.
|
|
121
|
-
*
|
|
122
|
-
* While this is a list, consumers only make use of the first element, and from the
|
|
123
|
-
* user perspective, there is only one annotation selected at a time.
|
|
124
|
-
*/
|
|
125
|
-
selectedAnnotations: AnnotationInfo[];
|
|
119
|
+
bookmark?: SelectionBookmark;
|
|
126
120
|
/**
|
|
127
121
|
* Indicates the document has annotations which it does not currently know the resolved state of.
|
|
128
122
|
* This can happen when the annotations are loaded via ncs, and the editor has not received the
|
|
129
123
|
* resolved state of the annotations yet (as the resolved state comes from a separate service).
|
|
130
124
|
*/
|
|
131
125
|
dirtyAnnotations?: boolean;
|
|
132
|
-
|
|
126
|
+
disallowOnWhitespace: boolean;
|
|
133
127
|
draftDecorationSet?: DecorationSet;
|
|
134
|
-
|
|
128
|
+
featureFlagsPluginState?: FeatureFlags;
|
|
135
129
|
/**
|
|
136
130
|
* Warning: This is not the state of annotations which are currently being hovered over,
|
|
137
131
|
* but rather the annotations which have been given a selected like visual state from an
|
|
@@ -140,16 +134,15 @@ export type InlineCommentPluginState = {
|
|
|
140
134
|
* a "hovered" state on the annotation, while the comment is hovered in the sidebar.
|
|
141
135
|
*/
|
|
142
136
|
hoveredAnnotations?: AnnotationInfo[];
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
featureFlagsPluginState?: FeatureFlags;
|
|
137
|
+
/**
|
|
138
|
+
* A simple toggle to indicate if the annotation manager is enabled.
|
|
139
|
+
*/
|
|
140
|
+
isAnnotationManagerEnabled: boolean;
|
|
148
141
|
isDrafting: boolean;
|
|
149
|
-
|
|
150
|
-
selectAnnotationMethod?: VIEW_METHOD;
|
|
142
|
+
isInlineCommentViewClosed: boolean;
|
|
151
143
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
152
|
-
|
|
144
|
+
isVisible: boolean;
|
|
145
|
+
mouseData: InlineCommentMouseData;
|
|
153
146
|
/**
|
|
154
147
|
* This is a list of annotations which are to be selected. This is updated all the time when the selection changes, and
|
|
155
148
|
* are periodically flushed to selectedAnnotations. This flush event results in the annotations being selected in the editor.
|
|
@@ -163,8 +156,15 @@ export type InlineCommentPluginState = {
|
|
|
163
156
|
* if the pendingSelectedAnnotations has been updated since the last time it was flushed to selectedAnnotations.
|
|
164
157
|
*/
|
|
165
158
|
pendingSelectedAnnotationsUpdateCount: number;
|
|
159
|
+
selectAnnotationMethod?: VIEW_METHOD;
|
|
160
|
+
selectCommentExperience?: AnnotationProviders['selectCommentExperience'];
|
|
166
161
|
/**
|
|
167
|
-
* A
|
|
162
|
+
* A list of the annotations at the current selection.
|
|
163
|
+
*
|
|
164
|
+
* While this is a list, consumers only make use of the first element, and from the
|
|
165
|
+
* user perspective, there is only one annotation selected at a time.
|
|
168
166
|
*/
|
|
169
|
-
|
|
167
|
+
selectedAnnotations: AnnotationInfo[];
|
|
168
|
+
skipSelectionHandling: boolean;
|
|
169
|
+
targetNodeId?: string;
|
|
170
170
|
};
|
|
@@ -18,7 +18,6 @@ export declare const decorationKey: {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const addDraftDecoration: (start: number, end: number, targetType?: TargetType) => Decoration;
|
|
20
20
|
export declare const getAnnotationViewKey: (annotations: AnnotationInfo[]) => string;
|
|
21
|
-
export declare const isCurrentBlockNodeSelected: (state: EditorState, node: Node) => boolean;
|
|
22
21
|
export declare const findAnnotationsInSelection: (selection: Selection, doc: Node) => AnnotationInfo[];
|
|
23
22
|
export declare const resolveDraftBookmark: (editorState: EditorState, bookmark?: SelectionBookmark, supportedBlockNodes?: string[]) => DraftBookmark;
|
|
24
23
|
/**
|
|
@@ -16,34 +16,34 @@ export type AnnotationInfo = {
|
|
|
16
16
|
type: AnnotationTypes.INLINE_COMMENT;
|
|
17
17
|
};
|
|
18
18
|
type AnnotationComponentProps = {
|
|
19
|
-
/**
|
|
20
|
-
* Selected text (can be used when creating a comment)
|
|
21
|
-
*/
|
|
22
|
-
textSelection?: string;
|
|
23
19
|
/**
|
|
24
20
|
* DOM element around selected text (for positioning)
|
|
25
21
|
*/
|
|
26
22
|
dom?: HTMLElement;
|
|
23
|
+
/**
|
|
24
|
+
* Indicates whether the comment UI is offline and should be disabled
|
|
25
|
+
*/
|
|
26
|
+
isOffline?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Indicates that a draft comment was discarded/cancelled
|
|
29
29
|
*/
|
|
30
30
|
onClose?: () => void;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Selected text (can be used when creating a comment)
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
textSelection?: string;
|
|
35
35
|
};
|
|
36
36
|
export type InlineCommentCreateComponentProps = AnnotationComponentProps & {
|
|
37
|
-
/**
|
|
38
|
-
* Creates an annotation mark in the document with the given id.
|
|
39
|
-
*/
|
|
40
|
-
onCreate: (id: string) => void;
|
|
41
37
|
/** List of inline node types, which are wrapped by the annotation. */
|
|
42
38
|
inlineNodeTypes: string[] | undefined;
|
|
43
39
|
/**
|
|
44
40
|
* Indicates whether we're opening the media comment box from the media toolbar so we can scroll the media into view
|
|
45
41
|
*/
|
|
46
42
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Creates an annotation mark in the document with the given id.
|
|
45
|
+
*/
|
|
46
|
+
onCreate: (id: string) => void;
|
|
47
47
|
wasNewAnnotationSelected?: boolean;
|
|
48
48
|
};
|
|
49
49
|
export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
@@ -52,14 +52,6 @@ export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
|
52
52
|
* These are provided in order, inner-most first.
|
|
53
53
|
*/
|
|
54
54
|
annotations: Array<AnnotationInfo>;
|
|
55
|
-
/**
|
|
56
|
-
* Resolves an annotation with the given ID around the selection.
|
|
57
|
-
*/
|
|
58
|
-
onResolve: (id: string) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Removes the annotation from the document
|
|
61
|
-
*/
|
|
62
|
-
onDelete?: (id: string) => void;
|
|
63
55
|
/**
|
|
64
56
|
* Ordered list of annotation ids as shown in the document
|
|
65
57
|
*/
|
|
@@ -78,6 +70,14 @@ export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
|
78
70
|
* Indicates whether we're opening the media comment box from the media toolbar so we can scroll the media into view
|
|
79
71
|
*/
|
|
80
72
|
isOpeningMediaCommentFromToolbar?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Removes the annotation from the document
|
|
75
|
+
*/
|
|
76
|
+
onDelete?: (id: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Resolves an annotation with the given ID around the selection.
|
|
79
|
+
*/
|
|
80
|
+
onResolve: (id: string) => void;
|
|
81
81
|
};
|
|
82
82
|
export interface AnnotationState<Type, State> {
|
|
83
83
|
annotationType: Type;
|
|
@@ -85,17 +85,19 @@ export interface AnnotationState<Type, State> {
|
|
|
85
85
|
state: State;
|
|
86
86
|
}
|
|
87
87
|
export interface AnnotationTypeProvider<Type, State> {
|
|
88
|
+
disallowOnWhitespace?: boolean;
|
|
88
89
|
getState: (annotationIds: string[]) => Promise<AnnotationState<Type, State>[]>;
|
|
89
90
|
updateSubscriber?: AnnotationUpdateEmitter;
|
|
90
|
-
disallowOnWhitespace?: boolean;
|
|
91
91
|
}
|
|
92
92
|
export type InlineCommentState = {
|
|
93
93
|
resolved: boolean;
|
|
94
94
|
};
|
|
95
95
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
|
|
96
|
+
contentType?: string;
|
|
96
97
|
createComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentCreateComponentProps>>;
|
|
97
|
-
|
|
98
|
+
getCanAddComments?: () => boolean;
|
|
98
99
|
isToolbarAbove?: boolean;
|
|
100
|
+
onCommentButtonMount?: () => void;
|
|
99
101
|
/**
|
|
100
102
|
* @experimental Still under development. Do not use.
|
|
101
103
|
*
|
|
@@ -106,38 +108,36 @@ export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationT
|
|
|
106
108
|
* Note 2: text is supported by default.
|
|
107
109
|
*/
|
|
108
110
|
supportedBlockNodes?: string[];
|
|
109
|
-
|
|
110
|
-
getCanAddComments?: () => boolean;
|
|
111
|
-
contentType?: string;
|
|
111
|
+
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
112
112
|
};
|
|
113
113
|
export interface AnnotationProviders {
|
|
114
|
-
|
|
114
|
+
annotationManager?: AnnotationManager;
|
|
115
115
|
createCommentExperience?: {
|
|
116
|
+
initExperience: {
|
|
117
|
+
start: () => void;
|
|
118
|
+
};
|
|
116
119
|
start: (_: {
|
|
117
120
|
attributes: {
|
|
118
|
-
pageClass: 'editor';
|
|
119
|
-
commentType: 'inline';
|
|
120
121
|
annotationId?: undefined;
|
|
122
|
+
commentType: 'inline';
|
|
121
123
|
entryPoint?: 'highlightActions';
|
|
122
|
-
} | {
|
|
123
124
|
pageClass: 'editor';
|
|
124
|
-
|
|
125
|
-
blockType: 'media';
|
|
125
|
+
} | {
|
|
126
126
|
annotationId?: undefined;
|
|
127
|
+
blockType: 'media';
|
|
128
|
+
commentType: 'block';
|
|
127
129
|
entryPoint?: 'highlightActions';
|
|
130
|
+
pageClass: 'editor';
|
|
128
131
|
};
|
|
129
132
|
}) => void;
|
|
130
|
-
initExperience: {
|
|
131
|
-
start: () => void;
|
|
132
|
-
};
|
|
133
133
|
};
|
|
134
|
+
inlineComment: InlineCommentAnnotationProvider;
|
|
134
135
|
selectCommentExperience?: {
|
|
135
136
|
selectAnnotation: {
|
|
136
137
|
complete: (annotationId: string) => void;
|
|
137
138
|
};
|
|
138
139
|
};
|
|
139
140
|
viewInlineCommentTraceUFOPress?: () => void;
|
|
140
|
-
annotationManager?: AnnotationManager;
|
|
141
141
|
}
|
|
142
142
|
export declare enum AnnotationSelectionType {
|
|
143
143
|
INVALID = "invalid",// Annotation should not be created, toolbar should not be shown
|
|
@@ -152,15 +152,15 @@ export declare const AnnotationTestIds: {
|
|
|
152
152
|
componentClose: string;
|
|
153
153
|
};
|
|
154
154
|
export type CoordsAtPos = {
|
|
155
|
-
top: number;
|
|
156
155
|
bottom: number;
|
|
157
156
|
left: number;
|
|
158
157
|
right: number;
|
|
158
|
+
top: number;
|
|
159
159
|
};
|
|
160
160
|
export type DraftBookmark = {
|
|
161
161
|
from: number;
|
|
162
|
-
to: number;
|
|
163
162
|
head: number;
|
|
164
163
|
isBlockNode?: boolean;
|
|
164
|
+
to: number;
|
|
165
165
|
};
|
|
166
166
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type AnnotationViewWrapperProps = {
|
|
3
|
+
annotationText?: string;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
onViewed?: () => void;
|
|
5
|
-
annotationText?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class AnnotationViewWrapper extends React.PureComponent<AnnotationViewWrapperProps> {
|
|
8
8
|
componentDidMount(): void;
|
|
9
9
|
render(): React.ReactNode;
|
|
10
10
|
}
|
|
11
|
+
export {};
|
|
@@ -3,8 +3,8 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
4
4
|
import { type AnnotationProviders } from '../../types';
|
|
5
5
|
type CommentButtonProps = {
|
|
6
|
-
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
7
6
|
annotationProviders?: AnnotationProviders;
|
|
7
|
+
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
8
8
|
};
|
|
9
9
|
export declare const CommentButton: ({ api, annotationProviders }: CommentButtonProps) => React.JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -4,9 +4,9 @@ import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
|
4
4
|
import type { AnnotationSelectionType } from '../../types';
|
|
5
5
|
import { type AnnotationProviders } from '../../types';
|
|
6
6
|
export declare const useCommentButtonMount: ({ state, annotationProviders, api, annotationSelectionType, bookmark, }: {
|
|
7
|
-
state: EditorState | null;
|
|
8
7
|
annotationProviders?: AnnotationProviders;
|
|
9
|
-
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
10
8
|
annotationSelectionType: AnnotationSelectionType;
|
|
9
|
+
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
11
10
|
bookmark?: SelectionBookmark;
|
|
11
|
+
state: EditorState | null;
|
|
12
12
|
}) => void;
|
|
@@ -4,29 +4,25 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { AnnotationPlugin } from '../../annotationPluginType';
|
|
5
5
|
import { AnnotationSelectionType, type AnnotationProviders } from '../../types';
|
|
6
6
|
export declare const isButtonDisabled: ({ state, api, }: {
|
|
7
|
-
state: EditorState | null;
|
|
8
7
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
8
|
+
state: EditorState | null;
|
|
9
9
|
}) => boolean;
|
|
10
10
|
export declare const shouldShowCommentButton: ({ state, isVisible, annotationSelectionType, }: {
|
|
11
|
-
state: EditorState | null;
|
|
12
|
-
isVisible?: boolean;
|
|
13
11
|
annotationSelectionType: AnnotationSelectionType;
|
|
12
|
+
isVisible?: boolean;
|
|
13
|
+
state: EditorState | null;
|
|
14
14
|
}) => boolean;
|
|
15
15
|
export declare const fireOnClickAnalyticsEvent: ({ api, }: {
|
|
16
16
|
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
17
17
|
}) => void;
|
|
18
|
-
export declare const fireAnnotationErrorAnalyticsEvent: ({ api, errorReason, }: {
|
|
19
|
-
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
20
|
-
errorReason: string;
|
|
21
|
-
}) => void;
|
|
22
18
|
export declare const fireCommentButtonViewedAnalyticsEvent: ({ api, isNonTextInlineNodeInludedInComment, annotationSelectionType, }: {
|
|
19
|
+
annotationSelectionType: AnnotationSelectionType;
|
|
23
20
|
api?: ExtractInjectionAPI<AnnotationPlugin>;
|
|
24
21
|
isNonTextInlineNodeInludedInComment: boolean;
|
|
25
|
-
annotationSelectionType: AnnotationSelectionType;
|
|
26
22
|
}) => void;
|
|
27
23
|
export declare const startCommentExperience: ({ annotationProviders, api, state, dispatch, }: {
|
|
28
24
|
annotationProviders: AnnotationProviders;
|
|
29
25
|
api: ExtractInjectionAPI<AnnotationPlugin>;
|
|
30
|
-
state: EditorState;
|
|
31
26
|
dispatch: EditorView["dispatch"];
|
|
27
|
+
state: EditorState;
|
|
32
28
|
}) => boolean;
|
|
@@ -5,11 +5,11 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
6
6
|
import { type AnnotationProviders } from '../types';
|
|
7
7
|
interface InlineCommentViewProps {
|
|
8
|
-
|
|
9
|
-
editorView: EditorView;
|
|
8
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
10
9
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
11
10
|
editorAPI: ExtractInjectionAPI<AnnotationPlugin> | undefined;
|
|
12
|
-
|
|
11
|
+
editorView: EditorView;
|
|
12
|
+
providers: AnnotationProviders;
|
|
13
13
|
}
|
|
14
14
|
export declare function InlineCommentView({ providers, editorView, editorAnalyticsAPI, editorAPI, dispatchAnalyticsEvent, }: InlineCommentViewProps): React.JSX.Element | null;
|
|
15
15
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.10",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-connectivity": "^3.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-viewmode-effects": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-toolbar": "^0.
|
|
39
|
+
"@atlaskit/editor-plugin-toolbar": "^0.4.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-toolbar": "^0.3.0",
|
|
42
42
|
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
43
43
|
"@atlaskit/icon": "^28.0.0",
|
|
44
44
|
"@atlaskit/onboarding": "^14.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
49
|
},
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"@af/integration-testing": "workspace:^",
|
|
57
57
|
"@af/visual-regression": "workspace:^",
|
|
58
58
|
"@atlaskit/ssr": "workspace:^",
|
|
59
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
60
59
|
"@testing-library/react": "^13.4.0",
|
|
61
60
|
"wait-for-expect": "^1.2.0"
|
|
62
61
|
},
|