@atlaskit/editor-plugin-annotation 16.0.12 → 16.0.14
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 +15 -0
- package/dist/cjs/editor-commands/index.js +9 -9
- package/dist/cjs/editor-commands/transform.js +2 -2
- package/dist/cjs/nodeviews/annotationMark.js +2 -2
- package/dist/cjs/pm-plugins/annotation-manager-hooks.js +2 -2
- package/dist/cjs/pm-plugins/inline-comment.js +3 -3
- package/dist/cjs/pm-plugins/utils.js +2 -2
- package/dist/cjs/ui/InlineCommentView.js +2 -2
- package/dist/es2019/editor-commands/index.js +1 -1
- package/dist/es2019/editor-commands/transform.js +1 -1
- package/dist/es2019/nodeviews/annotationMark.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/utils.js +1 -1
- package/dist/es2019/ui/InlineCommentView.js +1 -1
- package/dist/esm/editor-commands/index.js +1 -1
- package/dist/esm/editor-commands/transform.js +1 -1
- package/dist/esm/nodeviews/annotationMark.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/utils.js +1 -1
- package/dist/esm/ui/InlineCommentView.js +1 -1
- package/dist/types/editor-commands/index.d.ts +1 -1
- package/dist/types/pm-plugins/annotation-manager-hooks.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 16.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`12871125421d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12871125421d2) -
|
|
8
|
+
Remove `confluence_frontend_new_dangling_comments_ux` feature gate check. The
|
|
9
|
+
`setInlineCommentsFetched` call when annotations return empty is now unconditional.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 16.0.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 16.0.12
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.updateMouseState = exports.updateInlineCommentResolvedState = exports.showInlineCommentForBlockNode = exports.setSelectedAnnotation = exports.setPendingSelectedAnnotation = exports.setInlineCommentsVisibility = exports.setInlineCommentsFetched = exports.setInlineCommentDraftState = exports.setHoveredAnnotation = exports.removeInlineCommentNearSelection = exports.removeInlineCommentFromDoc = exports.flushPendingSelections = exports.createAnnotation = exports.closeComponent = exports.clearDirtyMark = exports.addInlineComment = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
@@ -81,7 +81,7 @@ var setPendingSelectedAnnotation = exports.setPendingSelectedAnnotation = functi
|
|
|
81
81
|
data: {
|
|
82
82
|
selectedAnnotations: [{
|
|
83
83
|
id: id,
|
|
84
|
-
type:
|
|
84
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
85
85
|
}]
|
|
86
86
|
}
|
|
87
87
|
});
|
|
@@ -111,7 +111,7 @@ var removeInlineCommentFromNode = function removeInlineCommentFromNode(id) {
|
|
|
111
111
|
}
|
|
112
112
|
tr.removeNodeMark(from, annotationMarkType.create({
|
|
113
113
|
id: id,
|
|
114
|
-
type:
|
|
114
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
115
115
|
}));
|
|
116
116
|
if (dispatch) {
|
|
117
117
|
dispatch(tr);
|
|
@@ -139,7 +139,7 @@ var removeInlineCommentNearSelection = exports.removeInlineCommentNearSelection
|
|
|
139
139
|
// just remove entire mark from around the node
|
|
140
140
|
tr.removeMark($from.start(), $from.end(), annotationMarkType.create({
|
|
141
141
|
id: id,
|
|
142
|
-
type:
|
|
142
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
143
143
|
}));
|
|
144
144
|
if (dispatch) {
|
|
145
145
|
dispatch(tr);
|
|
@@ -284,7 +284,7 @@ var addInlineComment = exports.addInlineComment = function addInlineComment(edit
|
|
|
284
284
|
// We move the selection to the head of the comment selection.
|
|
285
285
|
selectedAnnotations: [{
|
|
286
286
|
id: id,
|
|
287
|
-
type:
|
|
287
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
288
288
|
}],
|
|
289
289
|
editorState: editorState
|
|
290
290
|
}
|
|
@@ -320,7 +320,7 @@ var setSelectedAnnotation = exports.setSelectedAnnotation = function setSelected
|
|
|
320
320
|
data: {
|
|
321
321
|
selectedAnnotations: [{
|
|
322
322
|
id: id,
|
|
323
|
-
type:
|
|
323
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
324
324
|
}]
|
|
325
325
|
}
|
|
326
326
|
});
|
|
@@ -331,14 +331,14 @@ var setHoveredAnnotation = exports.setHoveredAnnotation = function setHoveredAnn
|
|
|
331
331
|
data: {
|
|
332
332
|
hoveredAnnotations: [{
|
|
333
333
|
id: id,
|
|
334
|
-
type:
|
|
334
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
335
335
|
}]
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
};
|
|
339
339
|
var createAnnotation = exports.createAnnotation = function createAnnotation(editorAnalyticsAPI, editorAPI) {
|
|
340
340
|
return function (id) {
|
|
341
|
-
var annotationType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
341
|
+
var annotationType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _annotation.AnnotationTypes.INLINE_COMMENT;
|
|
342
342
|
var supportedBlockNodes = arguments.length > 2 ? arguments[2] : undefined;
|
|
343
343
|
return function (state, dispatch) {
|
|
344
344
|
// don't try to add if there are is no temp highlight bookmarked
|
|
@@ -347,7 +347,7 @@ var createAnnotation = exports.createAnnotation = function createAnnotation(edit
|
|
|
347
347
|
if (!bookmark || !dispatch) {
|
|
348
348
|
return false;
|
|
349
349
|
}
|
|
350
|
-
if (annotationType ===
|
|
350
|
+
if (annotationType === _annotation.AnnotationTypes.INLINE_COMMENT) {
|
|
351
351
|
return addInlineComment(editorAnalyticsAPI, editorAPI)(id, supportedBlockNodes)(state, dispatch);
|
|
352
352
|
}
|
|
353
353
|
return false;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
8
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
9
|
var _mark = require("@atlaskit/editor-common/mark");
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -22,7 +22,7 @@ var addAnnotationMark = function addAnnotationMark(id, supportedBlockNodes) {
|
|
|
22
22
|
bookmark = _ref.bookmark;
|
|
23
23
|
var annotationMark = state.schema.marks.annotation.create({
|
|
24
24
|
id: id,
|
|
25
|
-
type:
|
|
25
|
+
type: _annotation.AnnotationTypes.INLINE_COMMENT
|
|
26
26
|
});
|
|
27
27
|
var _resolveDraftBookmark = (0, _utils2.resolveDraftBookmark)(state, bookmark, supportedBlockNodes),
|
|
28
28
|
from = _resolveDraftBookmark.from,
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.annotationWithToDOMFix = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var
|
|
9
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
/**
|
|
13
13
|
* Annotation mark lifted from adf-schema with modified `toDOM` to work with
|
|
14
14
|
* existing nodeview
|
|
15
15
|
*/
|
|
16
|
-
var annotationWithToDOMFix = exports.annotationWithToDOMFix = _objectSpread(_objectSpread({},
|
|
16
|
+
var annotationWithToDOMFix = exports.annotationWithToDOMFix = _objectSpread(_objectSpread({}, _annotation.annotation), {}, {
|
|
17
17
|
toDOM: function toDOM(node) {
|
|
18
18
|
return ['span', {
|
|
19
19
|
// Needs id as a reference point
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.startDraft = exports.setIsAnnotationSelected = exports.setIsAnnotationHovered = exports.getDraft = exports.clearDraft = exports.clearAnnotation = exports.applyDraft = exports.allowAnnotation = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
10
10
|
var _editorCommands = require("../editor-commands");
|
|
@@ -159,7 +159,7 @@ var applyDraft = exports.applyDraft = function applyDraft(editorView, options) {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
var from = decorations[0].from;
|
|
162
|
-
(0, _editorCommands.createAnnotation)(options.editorAnalyticsAPI, options.api)(id,
|
|
162
|
+
(0, _editorCommands.createAnnotation)(options.editorAnalyticsAPI, options.api)(id, _annotation.AnnotationTypes.INLINE_COMMENT, options.provider.supportedBlockNodes)(editorView.state, editorView.dispatch);
|
|
163
163
|
!editorView.hasFocus() && editorView.focus();
|
|
164
164
|
|
|
165
165
|
// Using the original decoration from position we should be able to locate the new target element.
|
|
@@ -8,7 +8,7 @@ exports.inlineCommentPlugin = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
var
|
|
11
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
13
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -39,7 +39,7 @@ var fetchProviderStates = /*#__PURE__*/function () {
|
|
|
39
39
|
data = _context.sent;
|
|
40
40
|
result = {};
|
|
41
41
|
data.forEach(function (annotation) {
|
|
42
|
-
if (annotation.annotationType ===
|
|
42
|
+
if (annotation.annotationType === _annotation.AnnotationTypes.INLINE_COMMENT) {
|
|
43
43
|
result[annotation.id] = annotation.state.resolved;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
@@ -72,7 +72,7 @@ var fetchState = /*#__PURE__*/function () {
|
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
_ref3 = (0, _utils3.getPluginState)(editorView.state) || {}, annotationsLoaded = _ref3.annotationsLoaded;
|
|
75
|
-
if (!annotationsLoaded
|
|
75
|
+
if (!annotationsLoaded) {
|
|
76
76
|
(0, _editorCommands.setInlineCommentsFetched)()(editorView.state, editorView.dispatch);
|
|
77
77
|
}
|
|
78
78
|
return _context2.abrupt("return");
|
|
@@ -16,7 +16,7 @@ exports.resolveDraftBookmark = exports.isSupportedBlockNode = exports.isSelectio
|
|
|
16
16
|
exports.stripNonExistingAnnotations = stripNonExistingAnnotations;
|
|
17
17
|
exports.surroundingMarks = void 0;
|
|
18
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
19
|
-
var
|
|
19
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
20
20
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
21
21
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
22
22
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
@@ -112,7 +112,7 @@ var validateAnnotationMark = function validateAnnotationMark(annotationMark) {
|
|
|
112
112
|
if (!type || typeof type !== 'string') {
|
|
113
113
|
return false;
|
|
114
114
|
}
|
|
115
|
-
var allowedTypes = Object.values(
|
|
115
|
+
var allowedTypes = Object.values(_annotation.AnnotationTypes);
|
|
116
116
|
return allowedTypes.includes(type);
|
|
117
117
|
}
|
|
118
118
|
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.InlineCommentView = InlineCommentView;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
13
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
@@ -125,7 +125,7 @@ function InlineCommentView(_ref) {
|
|
|
125
125
|
,
|
|
126
126
|
onCreate: function onCreate(id) {
|
|
127
127
|
if (!isAnnotationManagerEnabled) {
|
|
128
|
-
var createAnnotationResult = (0, _editorCommands.createAnnotation)(editorAnalyticsAPI, editorAPI)(id,
|
|
128
|
+
var createAnnotationResult = (0, _editorCommands.createAnnotation)(editorAnalyticsAPI, editorAPI)(id, _annotation.AnnotationTypes.INLINE_COMMENT, inlineCommentProvider.supportedBlockNodes)(editorView.state, editorView.dispatch);
|
|
129
129
|
!editorView.hasFocus() && editorView.focus();
|
|
130
130
|
if (!createAnnotationResult) {
|
|
131
131
|
throw new Error('Failed to create annotation');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
|
|
4
4
|
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { setInlineCommentDraftState, createAnnotation, setSelectedAnnotation, closeComponent, setHoveredAnnotation, removeInlineCommentFromDoc } from '../editor-commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
@@ -33,7 +33,7 @@ const fetchState = async (provider, annotationIds, editorView, editorAnalyticsAP
|
|
|
33
33
|
const {
|
|
34
34
|
annotationsLoaded
|
|
35
35
|
} = getPluginState(editorView.state) || {};
|
|
36
|
-
if (!annotationsLoaded
|
|
36
|
+
if (!annotationsLoaded) {
|
|
37
37
|
setInlineCommentsFetched()(editorView.state, editorView.dispatch);
|
|
38
38
|
}
|
|
39
39
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
4
4
|
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
5
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
// oxlint-disable-next-line import/no-duplicates
|
|
4
4
|
|
|
5
5
|
import { INPUT_METHOD, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
|
|
4
4
|
import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
@@ -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 { annotation } from '@atlaskit/adf-schema';
|
|
4
|
+
import { annotation } from '@atlaskit/adf-schema/annotation';
|
|
5
5
|
/**
|
|
6
6
|
* Annotation mark lifted from adf-schema with modified `toDOM` to work with
|
|
7
7
|
* existing nodeview
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { setInlineCommentDraftState, createAnnotation, setSelectedAnnotation, closeComponent, setHoveredAnnotation, removeInlineCommentFromDoc } from '../editor-commands';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
5
5
|
import { RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
@@ -65,7 +65,7 @@ var fetchState = /*#__PURE__*/function () {
|
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
_ref3 = getPluginState(editorView.state) || {}, annotationsLoaded = _ref3.annotationsLoaded;
|
|
68
|
-
if (!annotationsLoaded
|
|
68
|
+
if (!annotationsLoaded) {
|
|
69
69
|
setInlineCommentsFetched()(editorView.state, editorView.dispatch);
|
|
70
70
|
}
|
|
71
71
|
return _context2.abrupt("return");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
5
5
|
import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, EVENT_TYPE, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
1
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { RESOLVE_METHOD, type VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnnotationId } from '@atlaskit/adf-schema';
|
|
1
|
+
import { type AnnotationId } from '@atlaskit/adf-schema/annotation';
|
|
2
2
|
import type { ApplyDraftResult, ClearAnnotationResult, ClearDraftResult, GetDraftResult, HoverAnnotationResult, SelectAnnotationResult, StartDraftResult } from '@atlaskit/editor-common/annotation';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { InlineCommentPluginOptions } from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
3
3
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { AnnotationUpdateEmitter, AnnotationManager } from '@atlaskit/editor-common/annotation';
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.14",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
32
32
|
"@atlaskit/icon": "^37.6.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
34
|
+
"@atlaskit/tmp-editor-statsig": "^174.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@atlaskit/editor-common": "^120.
|
|
38
|
+
"@atlaskit/editor-common": "^120.12.0",
|
|
39
39
|
"react": "^18.2.0 || ^19.2.0",
|
|
40
40
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
41
41
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -54,9 +54,6 @@
|
|
|
54
54
|
},
|
|
55
55
|
"editor_inline_comments_on_inline_nodes": {
|
|
56
56
|
"type": "boolean"
|
|
57
|
-
},
|
|
58
|
-
"confluence_frontend_new_dangling_comments_ux": {
|
|
59
|
-
"type": "boolean"
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
59
|
}
|