@atlaskit/editor-plugin-annotation 26.0.4 → 26.0.7
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 +18 -0
- package/dist/cjs/annotationPlugin.js +4 -4
- package/dist/cjs/editor-commands/index.js +4 -3
- package/dist/cjs/editor-commands/transform.js +32 -32
- package/dist/cjs/nodeviews/index.js +5 -5
- package/dist/cjs/pm-plugins/annotation-manager-hooks.js +21 -21
- package/dist/cjs/pm-plugins/inline-comment.js +27 -27
- package/dist/cjs/pm-plugins/keymap.js +2 -2
- package/dist/cjs/pm-plugins/plugin-factory.js +9 -9
- package/dist/cjs/pm-plugins/toolbar.js +35 -33
- package/dist/cjs/pm-plugins/utils.js +17 -16
- package/dist/cjs/ui/CommentButton/CommentButton.js +16 -14
- package/dist/cjs/ui/CommentButton/hooks.js +6 -6
- package/dist/cjs/ui/CommentButton/utils.js +18 -17
- package/dist/cjs/ui/InlineCommentView.js +26 -25
- package/dist/cjs/ui/toolbar-components.js +16 -15
- package/dist/es2019/annotationPlugin.js +2 -2
- package/dist/es2019/editor-commands/index.js +2 -1
- package/dist/es2019/editor-commands/transform.js +3 -3
- package/dist/es2019/nodeviews/index.js +1 -1
- package/dist/es2019/pm-plugins/annotation-manager-hooks.js +1 -1
- package/dist/es2019/pm-plugins/inline-comment.js +2 -2
- package/dist/es2019/pm-plugins/keymap.js +1 -1
- package/dist/es2019/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/toolbar.js +6 -4
- package/dist/es2019/pm-plugins/utils.js +4 -3
- package/dist/es2019/ui/CommentButton/CommentButton.js +6 -4
- package/dist/es2019/ui/CommentButton/hooks.js +1 -1
- package/dist/es2019/ui/CommentButton/utils.js +3 -2
- package/dist/es2019/ui/InlineCommentView.js +6 -5
- package/dist/es2019/ui/toolbar-components.js +2 -1
- package/dist/esm/annotationPlugin.js +2 -2
- package/dist/esm/editor-commands/index.js +2 -1
- package/dist/esm/editor-commands/transform.js +3 -3
- package/dist/esm/nodeviews/index.js +1 -1
- package/dist/esm/pm-plugins/annotation-manager-hooks.js +1 -1
- package/dist/esm/pm-plugins/inline-comment.js +2 -2
- package/dist/esm/pm-plugins/keymap.js +1 -1
- package/dist/esm/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/toolbar.js +6 -4
- package/dist/esm/pm-plugins/utils.js +4 -3
- package/dist/esm/ui/CommentButton/CommentButton.js +6 -4
- package/dist/esm/ui/CommentButton/hooks.js +1 -1
- package/dist/esm/ui/CommentButton/utils.js +3 -2
- package/dist/esm/ui/InlineCommentView.js +6 -5
- package/dist/esm/ui/toolbar-components.js +2 -1
- package/dist/types/annotationPluginType.d.ts +9 -8
- package/dist/types/editor-commands/index.d.ts +4 -3
- package/dist/types/editor-commands/transform.d.ts +3 -2
- package/dist/types/editor-commands/utils.d.ts +1 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/toolbar.d.ts +5 -3
- package/dist/types/pm-plugins/types.d.ts +3 -2
- package/dist/types/pm-plugins/utils.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/CommentButton/CommentButton.d.ts +1 -1
- package/dist/types/ui/CommentButton/hooks.d.ts +1 -1
- package/dist/types/ui/CommentButton/utils.d.ts +1 -1
- package/dist/types/ui/InlineCommentView.d.ts +3 -2
- package/dist/types/ui/toolbar-components.d.ts +2 -2
- package/package.json +3 -3
|
@@ -8,16 +8,17 @@ exports.InlineCommentView = InlineCommentView;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
+
var _inlineCommentEvents = require("@atlaskit/editor-common/analytics/types/inline-comment-events");
|
|
13
|
+
var _isOfflineMode = require("@atlaskit/editor-common/connectivity/isOfflineMode");
|
|
14
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/useSharedPluginStateSelector");
|
|
15
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
16
|
+
var _annotation2 = require("@atlaskit/editor-common/utils/annotation");
|
|
16
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
|
-
var
|
|
18
|
+
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
18
19
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
20
|
var _editorCommands = require("../editor-commands");
|
|
20
|
-
var
|
|
21
|
+
var _utils2 = require("../pm-plugins/utils");
|
|
21
22
|
var _types = require("../types");
|
|
22
23
|
var _AnnotationViewWrapper = require("./AnnotationViewWrapper");
|
|
23
24
|
var findPosForDOM = function findPosForDOM(sel) {
|
|
@@ -60,7 +61,7 @@ function InlineCommentView(_ref) {
|
|
|
60
61
|
dispatch = editorView.dispatch;
|
|
61
62
|
var CreateComponent = inlineCommentProvider.createComponent,
|
|
62
63
|
ViewComponent = inlineCommentProvider.viewComponent;
|
|
63
|
-
var _useSharedPluginState = (0,
|
|
64
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(editorAPI, ['annotation'], selector),
|
|
64
65
|
annotations = _useSharedPluginState.annotations,
|
|
65
66
|
bookmark = _useSharedPluginState.bookmark,
|
|
66
67
|
isInlineCommentViewClosed = _useSharedPluginState.isInlineCommentViewClosed,
|
|
@@ -68,14 +69,14 @@ function InlineCommentView(_ref) {
|
|
|
68
69
|
selectAnnotationMethod = _useSharedPluginState.selectAnnotationMethod,
|
|
69
70
|
selectedAnnotations = _useSharedPluginState.selectedAnnotations,
|
|
70
71
|
isAnnotationManagerEnabled = _useSharedPluginState.isAnnotationManagerEnabled;
|
|
71
|
-
var annotationsList = (0,
|
|
72
|
-
var selection = (0,
|
|
72
|
+
var annotationsList = (0, _utils2.getAllAnnotations)(editorView.state.doc);
|
|
73
|
+
var selection = (0, _utils2.getSelectionPositions)(state, bookmark);
|
|
73
74
|
var position = findPosForDOM(selection);
|
|
74
75
|
var isExtensionSelection = selection instanceof _state.NodeSelection && selection.node.type.name === 'extension';
|
|
75
76
|
var dom;
|
|
76
77
|
var domLookupError;
|
|
77
78
|
try {
|
|
78
|
-
var domRef = (0,
|
|
79
|
+
var domRef = (0, _utils.findDomRefAtPos)(position, editorView.domAtPos.bind(editorView));
|
|
79
80
|
if ((0, _fg.fg)('cc_maui_annotations_on_extensions') && isExtensionSelection) {
|
|
80
81
|
if (domRef instanceof HTMLElement) {
|
|
81
82
|
dom = domRef;
|
|
@@ -103,11 +104,11 @@ function InlineCommentView(_ref) {
|
|
|
103
104
|
console.warn(domLookupError);
|
|
104
105
|
if (dispatchAnalyticsEvent) {
|
|
105
106
|
var payload = {
|
|
106
|
-
action:
|
|
107
|
-
actionSubject:
|
|
108
|
-
eventType:
|
|
107
|
+
action: _enums.ACTION.ERRORED,
|
|
108
|
+
actionSubject: _enums.ACTION_SUBJECT.CONTENT_COMPONENT,
|
|
109
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL,
|
|
109
110
|
attributes: {
|
|
110
|
-
component:
|
|
111
|
+
component: _enums.CONTENT_COMPONENT.INLINE_COMMENT,
|
|
111
112
|
selection: selection.toJSON(),
|
|
112
113
|
position: position,
|
|
113
114
|
docSize: editorView.state.doc.nodeSize,
|
|
@@ -129,7 +130,7 @@ function InlineCommentView(_ref) {
|
|
|
129
130
|
if (!CreateComponent) {
|
|
130
131
|
return null;
|
|
131
132
|
}
|
|
132
|
-
var inlineNodeTypes = (0,
|
|
133
|
+
var inlineNodeTypes = (0, _annotation2.getRangeInlineNodeNames)({
|
|
133
134
|
doc: state.doc,
|
|
134
135
|
pos: selection
|
|
135
136
|
});
|
|
@@ -172,7 +173,7 @@ function InlineCommentView(_ref) {
|
|
|
172
173
|
},
|
|
173
174
|
inlineNodeTypes: inlineNodeTypes,
|
|
174
175
|
isOpeningMediaCommentFromToolbar: isOpeningMediaCommentFromToolbar,
|
|
175
|
-
isOffline: (0,
|
|
176
|
+
isOffline: (0, _isOfflineMode.isOfflineMode)(networkStatusSelector)
|
|
176
177
|
}));
|
|
177
178
|
}
|
|
178
179
|
|
|
@@ -193,10 +194,10 @@ function InlineCommentView(_ref) {
|
|
|
193
194
|
|
|
194
195
|
// fire analytics
|
|
195
196
|
var payload = {
|
|
196
|
-
action:
|
|
197
|
-
actionSubject:
|
|
198
|
-
actionSubjectId:
|
|
199
|
-
eventType:
|
|
197
|
+
action: _enums.ACTION.VIEWED,
|
|
198
|
+
actionSubject: _enums.ACTION_SUBJECT.ANNOTATION,
|
|
199
|
+
actionSubjectId: _enums.ACTION_SUBJECT_ID.INLINE_COMMENT,
|
|
200
|
+
eventType: _enums.EVENT_TYPE.TRACK,
|
|
200
201
|
attributes: {
|
|
201
202
|
overlap: activeAnnotations.length ? activeAnnotations.length - 1 : 0,
|
|
202
203
|
targetNodeType: (_editorView$state$doc = editorView.state.doc.nodeAt(position)) === null || _editorView$state$doc === void 0 ? void 0 : _editorView$state$doc.type.name,
|
|
@@ -213,12 +214,12 @@ function InlineCommentView(_ref) {
|
|
|
213
214
|
// that's why we will not provide it as a `inlineNodeTypes` props to the view component,
|
|
214
215
|
// to speed up the rendering process.
|
|
215
216
|
var getInlineNodeTypes = function getInlineNodeTypes(annotationId) {
|
|
216
|
-
return (0,
|
|
217
|
+
return (0, _annotation2.getAnnotationInlineNodeTypes)(editorView.state, annotationId);
|
|
217
218
|
};
|
|
218
219
|
return /*#__PURE__*/_react.default.createElement(_AnnotationViewWrapper.AnnotationViewWrapper, {
|
|
219
220
|
"data-editor-popup": "true",
|
|
220
221
|
"data-testid": _types.AnnotationTestIds.floatingComponent,
|
|
221
|
-
key: (0,
|
|
222
|
+
key: (0, _utils2.getAnnotationViewKey)(activeAnnotations),
|
|
222
223
|
onViewed: onAnnotationViewed
|
|
223
224
|
}, /*#__PURE__*/_react.default.createElement(ViewComponent, {
|
|
224
225
|
annotationsList: annotationsList,
|
|
@@ -233,7 +234,7 @@ function InlineCommentView(_ref) {
|
|
|
233
234
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
234
235
|
,
|
|
235
236
|
onResolve: function onResolve(id) {
|
|
236
|
-
return (0, _editorCommands.updateInlineCommentResolvedState)(editorAnalyticsAPI)((0, _defineProperty2.default)({}, id, true),
|
|
237
|
+
return (0, _editorCommands.updateInlineCommentResolvedState)(editorAnalyticsAPI)((0, _defineProperty2.default)({}, id, true), _inlineCommentEvents.RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch);
|
|
237
238
|
}
|
|
238
239
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
239
240
|
,
|
|
@@ -241,6 +242,6 @@ function InlineCommentView(_ref) {
|
|
|
241
242
|
(0, _editorCommands.closeComponent)()(editorView.state, editorView.dispatch);
|
|
242
243
|
},
|
|
243
244
|
isOpeningMediaCommentFromToolbar: isOpeningMediaCommentFromToolbar,
|
|
244
|
-
isOffline: (0,
|
|
245
|
+
isOffline: (0, _isOfflineMode.isOfflineMode)(networkStatusSelector)
|
|
245
246
|
}));
|
|
246
247
|
}
|
|
@@ -6,32 +6,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getToolbarComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _keys = require("@atlaskit/editor-common/toolbar/keys");
|
|
10
|
+
var _rank = require("@atlaskit/editor-common/toolbar/rank");
|
|
10
11
|
var _CommentButton = require("./CommentButton/CommentButton");
|
|
11
12
|
var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api, annotationProviders) {
|
|
12
13
|
return [{
|
|
13
|
-
type:
|
|
14
|
-
key:
|
|
14
|
+
type: _keys.COLLAB_SECTION.type,
|
|
15
|
+
key: _keys.COLLAB_SECTION.key,
|
|
15
16
|
parents: [{
|
|
16
17
|
type: 'toolbar',
|
|
17
|
-
key:
|
|
18
|
-
rank:
|
|
18
|
+
key: _keys.TOOLBARS.INLINE_TEXT_TOOLBAR,
|
|
19
|
+
rank: _rank.TOOLBAR_RANK[_keys.COLLAB_SECTION.key]
|
|
19
20
|
}]
|
|
20
21
|
}, {
|
|
21
|
-
type:
|
|
22
|
-
key:
|
|
22
|
+
type: _keys.COMMENT_GROUP.type,
|
|
23
|
+
key: _keys.COMMENT_GROUP.key,
|
|
23
24
|
parents: [{
|
|
24
|
-
type:
|
|
25
|
-
key:
|
|
26
|
-
rank:
|
|
25
|
+
type: _keys.COLLAB_SECTION.type,
|
|
26
|
+
key: _keys.COLLAB_SECTION.key,
|
|
27
|
+
rank: _rank.TOOLBAR_RANK[_keys.COLLAB_SECTION.key]
|
|
27
28
|
}]
|
|
28
29
|
}, {
|
|
29
|
-
type:
|
|
30
|
-
key:
|
|
30
|
+
type: _keys.COMMENT_HERO_BUTTON.type,
|
|
31
|
+
key: _keys.COMMENT_HERO_BUTTON.key,
|
|
31
32
|
parents: [{
|
|
32
|
-
type:
|
|
33
|
-
key:
|
|
34
|
-
rank:
|
|
33
|
+
type: _keys.COMMENT_GROUP.type,
|
|
34
|
+
key: _keys.COMMENT_GROUP.key,
|
|
35
|
+
rank: _rank.COLLAB_SECTION_RANK[_keys.COMMENT_GROUP.key]
|
|
35
36
|
}],
|
|
36
37
|
component: function component() {
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement(_CommentButton.CommentButton, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
4
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { createAnnotation, removeInlineCommentFromDoc, setInlineCommentDraftState, setSelectedAnnotation, setPendingSelectedAnnotation, showInlineCommentForBlockNode } from './editor-commands';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
// oxlint-disable-next-line import/no-duplicates
|
|
3
3
|
|
|
4
|
-
import { INPUT_METHOD
|
|
4
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
5
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
7
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
7
8
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
|
|
4
|
-
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { applyMarkOnRange } from '@atlaskit/editor-common/mark/commands';
|
|
4
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
1
|
+
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles/annotation';
|
|
2
2
|
export const getAnnotationViewClassname = (isUnresolved, hasFocus, isHovered) => {
|
|
3
3
|
if (!isUnresolved) {
|
|
4
4
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { setInlineCommentDraftState, createAnnotation, setSelectedAnnotation, closeComponent, setHoveredAnnotation, removeInlineCommentFromDoc } from '../editor-commands';
|
|
5
5
|
import { AnnotationSelectionType } from '../types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils/annotation';
|
|
5
5
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { clearDirtyMark, closeComponent, setHoveredAnnotation, setInlineCommentsVisibility, setSelectedAnnotation, flushPendingSelections, updateInlineCommentResolvedState, updateMouseState, setPendingSelectedAnnotation, setInlineCommentDraftState, setInlineCommentsFetched } from '../editor-commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { addInlineComment, bindKeymapWithCommand } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
4
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import reducer from './reducer';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { MODE } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
4
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
3
5
|
import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
|
|
4
6
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
5
|
-
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
8
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
9
|
+
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils/calculate-toolbar-position';
|
|
8
10
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
9
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
12
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
3
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
4
|
-
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection
|
|
4
|
+
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles/annotation';
|
|
5
|
+
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection } from '@atlaskit/editor-common/utils/annotation';
|
|
6
|
+
import { isParagraph, isText } from '@atlaskit/editor-common/utils/nodes';
|
|
6
7
|
import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
3
|
import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
|
|
5
|
-
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
7
|
-
import {
|
|
4
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
5
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
7
|
+
import { CommentIcon as NewCommentIcon } from '@atlaskit/editor-toolbar/comment-icon';
|
|
8
|
+
import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
|
|
9
|
+
import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
11
|
import { isSelectionValid } from '../../pm-plugins/utils';
|
|
10
12
|
import { AnnotationSelectionType, AnnotationTestIds } from '../../types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
3
3
|
import { resolveDraftBookmark } from '../../pm-plugins/utils';
|
|
4
4
|
// oxlint-disable-next-line import/no-duplicates
|
|
5
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { MODE } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
2
4
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
3
|
-
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
4
5
|
import { setInlineCommentDraftState } from '../../editor-commands';
|
|
5
6
|
import { inlineCommentPluginKey, isSelectionValid } from '../../pm-plugins/utils';
|
|
6
7
|
import { AnnotationSelectionType } from '../../types';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
5
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
6
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
|
|
7
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
8
|
+
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
8
9
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
10
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TOOLBARS, COLLAB_SECTION,
|
|
2
|
+
import { TOOLBARS, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON } from '@atlaskit/editor-common/toolbar/keys';
|
|
3
|
+
import { TOOLBAR_RANK, COLLAB_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
|
|
3
4
|
import { CommentButton } from './CommentButton/CommentButton';
|
|
4
5
|
export const getToolbarComponents = (api, annotationProviders) => {
|
|
5
6
|
return [{
|
|
@@ -5,8 +5,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
8
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
9
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
8
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
9
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
12
12
|
import { createAnnotation, removeInlineCommentFromDoc, setInlineCommentDraftState, setSelectedAnnotation, setPendingSelectedAnnotation, showInlineCommentForBlockNode } from './editor-commands';
|
|
@@ -2,7 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
// oxlint-disable-next-line import/no-duplicates
|
|
4
4
|
|
|
5
|
-
import { INPUT_METHOD
|
|
5
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
6
7
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
8
9
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
|
|
4
|
-
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { applyMarkOnRange } from '@atlaskit/editor-common/mark/commands';
|
|
4
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
1
|
+
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles/annotation';
|
|
2
2
|
export var getAnnotationViewClassname = function getAnnotationViewClassname(isUnresolved, hasFocus, isHovered) {
|
|
3
3
|
if (!isUnresolved) {
|
|
4
4
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { setInlineCommentDraftState, createAnnotation, setSelectedAnnotation, closeComponent, setHoveredAnnotation, removeInlineCommentFromDoc } from '../editor-commands';
|
|
5
5
|
import { AnnotationSelectionType } from '../types';
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
5
|
-
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils/annotation';
|
|
8
8
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { clearDirtyMark, closeComponent, setHoveredAnnotation, setInlineCommentsVisibility, setSelectedAnnotation, flushPendingSelections, updateInlineCommentResolvedState, updateMouseState, setPendingSelectedAnnotation, setInlineCommentDraftState, setInlineCommentsFetched } from '../editor-commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { addInlineComment, bindKeymapWithCommand } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
4
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import reducer from './reducer';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { MODE } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
4
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
3
5
|
import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
|
|
4
6
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
5
|
-
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
8
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
9
|
+
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils/calculate-toolbar-position';
|
|
8
10
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
9
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
12
|
import { setInlineCommentDraftState } from '../editor-commands';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
4
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
5
|
-
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
6
|
-
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection
|
|
5
|
+
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles/annotation';
|
|
6
|
+
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection } from '@atlaskit/editor-common/utils/annotation';
|
|
7
|
+
import { isParagraph, isText } from '@atlaskit/editor-common/utils/nodes';
|
|
7
8
|
import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
3
|
import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
|
|
5
|
-
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
7
|
-
import {
|
|
4
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
5
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
7
|
+
import { CommentIcon as NewCommentIcon } from '@atlaskit/editor-toolbar/comment-icon';
|
|
8
|
+
import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
|
|
9
|
+
import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
11
|
import { isSelectionValid } from '../../pm-plugins/utils';
|
|
10
12
|
import { AnnotationSelectionType, AnnotationTestIds } from '../../types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
3
3
|
import { resolveDraftBookmark } from '../../pm-plugins/utils';
|
|
4
4
|
// oxlint-disable-next-line import/no-duplicates
|
|
5
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { MODE } from '@atlaskit/editor-common/analytics/types/general-events';
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
2
4
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
3
|
-
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
4
5
|
import { setInlineCommentDraftState } from '../../editor-commands';
|
|
5
6
|
import { inlineCommentPluginKey, isSelectionValid } from '../../pm-plugins/utils';
|
|
6
7
|
import { AnnotationSelectionType } from '../../types';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
6
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
7
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
9
|
+
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils/annotation';
|
|
9
10
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
11
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TOOLBARS, COLLAB_SECTION,
|
|
2
|
+
import { TOOLBARS, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON } from '@atlaskit/editor-common/toolbar/keys';
|
|
3
|
+
import { TOOLBAR_RANK, COLLAB_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
|
|
3
4
|
import { CommentButton } from './CommentButton/CommentButton';
|
|
4
5
|
export var getToolbarComponents = function getToolbarComponents(api, annotationProviders) {
|
|
5
6
|
return [{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { Command
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
2
|
+
import type { ExtractInjectionAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
4
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity/connectivityPluginType';
|
|
5
|
+
import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects/editorViewmodeEffectsPluginType';
|
|
6
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
7
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags/featureFlagsPluginType';
|
|
8
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar/toolbar-plugin-type';
|
|
9
|
+
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent/user-intent-plugin-type';
|
|
9
10
|
import type { Node, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
10
11
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
12
|
import type { showInlineCommentForBlockNode } from './editor-commands';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { RESOLVE_METHOD, type VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { Command
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
3
|
+
import { RESOLVE_METHOD, type VIEW_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
4
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
5
6
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
7
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
7
8
|
import type { InlineCommentMap, InlineCommentMouseData } from '../pm-plugins/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI
|
|
2
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import type { AnnotationPlugin } from '../annotationPluginType';
|
|
5
6
|
import type { InlineCommentAnnotationProvider, InlineCommentInputMethod } from '../types';
|