@atlaskit/editor-plugin-annotation 6.2.7 → 6.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 6.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.2.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`fecf1d10a2282`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fecf1d10a2282) -
|
|
14
|
+
ED-29579 Cleaned up platform_editor_fix_inline_comment_reopen
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.2.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
14
14
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _editorCommands = require("../editor-commands");
|
|
20
19
|
var _utils3 = require("../pm-plugins/utils");
|
|
@@ -50,7 +49,6 @@ var selector = function selector(states) {
|
|
|
50
49
|
};
|
|
51
50
|
};
|
|
52
51
|
function InlineCommentView(_ref) {
|
|
53
|
-
var _getPluginState;
|
|
54
52
|
var providers = _ref.providers,
|
|
55
53
|
editorView = _ref.editorView,
|
|
56
54
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
@@ -65,13 +63,12 @@ function InlineCommentView(_ref) {
|
|
|
65
63
|
ViewComponent = inlineCommentProvider.viewComponent;
|
|
66
64
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['annotation'], selector),
|
|
67
65
|
annotations = _useSharedPluginState.annotations,
|
|
68
|
-
|
|
66
|
+
bookmark = _useSharedPluginState.bookmark,
|
|
69
67
|
isInlineCommentViewClosed = _useSharedPluginState.isInlineCommentViewClosed,
|
|
70
68
|
isOpeningMediaCommentFromToolbar = _useSharedPluginState.isOpeningMediaCommentFromToolbar,
|
|
71
69
|
selectAnnotationMethod = _useSharedPluginState.selectAnnotationMethod,
|
|
72
70
|
selectedAnnotations = _useSharedPluginState.selectedAnnotations,
|
|
73
71
|
isAnnotationManagerEnabled = _useSharedPluginState.isAnnotationManagerEnabled;
|
|
74
|
-
var bookmark = (0, _platformFeatureFlags.fg)('platform_editor_fix_inline_comment_reopen') ? (_getPluginState = (0, _utils3.getPluginState)(state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.bookmark : _bookmark;
|
|
75
72
|
var annotationsList = (0, _utils3.getAllAnnotations)(editorView.state.doc);
|
|
76
73
|
var selection = (0, _utils3.getSelectionPositions)(state, bookmark);
|
|
77
74
|
var position = findPosForDOM(selection);
|
|
@@ -5,10 +5,9 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
5
5
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
6
|
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
import { closeComponent, createAnnotation, removeInlineCommentNearSelection, setInlineCommentDraftState, updateInlineCommentResolvedState } from '../editor-commands';
|
|
11
|
-
import { getAllAnnotations, getAnnotationViewKey,
|
|
10
|
+
import { getAllAnnotations, getAnnotationViewKey, getSelectionPositions } from '../pm-plugins/utils';
|
|
12
11
|
import { AnnotationTestIds } from '../types';
|
|
13
12
|
import { AnnotationViewWrapper } from './AnnotationViewWrapper';
|
|
14
13
|
const findPosForDOM = sel => {
|
|
@@ -46,7 +45,6 @@ export function InlineCommentView({
|
|
|
46
45
|
editorAPI,
|
|
47
46
|
dispatchAnalyticsEvent
|
|
48
47
|
}) {
|
|
49
|
-
var _getPluginState;
|
|
50
48
|
// As inlineComment is the only annotation present, this function is not generic
|
|
51
49
|
const {
|
|
52
50
|
inlineComment: inlineCommentProvider
|
|
@@ -62,14 +60,13 @@ export function InlineCommentView({
|
|
|
62
60
|
} = inlineCommentProvider;
|
|
63
61
|
const {
|
|
64
62
|
annotations,
|
|
65
|
-
bookmark
|
|
63
|
+
bookmark,
|
|
66
64
|
isInlineCommentViewClosed,
|
|
67
65
|
isOpeningMediaCommentFromToolbar,
|
|
68
66
|
selectAnnotationMethod,
|
|
69
67
|
selectedAnnotations,
|
|
70
68
|
isAnnotationManagerEnabled
|
|
71
69
|
} = useSharedPluginStateWithSelector(editorAPI, ['annotation'], selector);
|
|
72
|
-
const bookmark = fg('platform_editor_fix_inline_comment_reopen') ? (_getPluginState = getPluginState(state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.bookmark : _bookmark;
|
|
73
70
|
const annotationsList = getAllAnnotations(editorView.state.doc);
|
|
74
71
|
const selection = getSelectionPositions(state, bookmark);
|
|
75
72
|
const position = findPosForDOM(selection);
|
|
@@ -6,10 +6,9 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
6
6
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
7
7
|
import { getAnnotationInlineNodeTypes, getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
10
|
import { closeComponent, createAnnotation, removeInlineCommentNearSelection, setInlineCommentDraftState, updateInlineCommentResolvedState } from '../editor-commands';
|
|
12
|
-
import { getAllAnnotations, getAnnotationViewKey,
|
|
11
|
+
import { getAllAnnotations, getAnnotationViewKey, getSelectionPositions } from '../pm-plugins/utils';
|
|
13
12
|
import { AnnotationTestIds } from '../types';
|
|
14
13
|
import { AnnotationViewWrapper } from './AnnotationViewWrapper';
|
|
15
14
|
var findPosForDOM = function findPosForDOM(sel) {
|
|
@@ -41,7 +40,6 @@ var selector = function selector(states) {
|
|
|
41
40
|
};
|
|
42
41
|
};
|
|
43
42
|
export function InlineCommentView(_ref) {
|
|
44
|
-
var _getPluginState;
|
|
45
43
|
var providers = _ref.providers,
|
|
46
44
|
editorView = _ref.editorView,
|
|
47
45
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
@@ -56,13 +54,12 @@ export function InlineCommentView(_ref) {
|
|
|
56
54
|
ViewComponent = inlineCommentProvider.viewComponent;
|
|
57
55
|
var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['annotation'], selector),
|
|
58
56
|
annotations = _useSharedPluginState.annotations,
|
|
59
|
-
|
|
57
|
+
bookmark = _useSharedPluginState.bookmark,
|
|
60
58
|
isInlineCommentViewClosed = _useSharedPluginState.isInlineCommentViewClosed,
|
|
61
59
|
isOpeningMediaCommentFromToolbar = _useSharedPluginState.isOpeningMediaCommentFromToolbar,
|
|
62
60
|
selectAnnotationMethod = _useSharedPluginState.selectAnnotationMethod,
|
|
63
61
|
selectedAnnotations = _useSharedPluginState.selectedAnnotations,
|
|
64
62
|
isAnnotationManagerEnabled = _useSharedPluginState.isAnnotationManagerEnabled;
|
|
65
|
-
var bookmark = fg('platform_editor_fix_inline_comment_reopen') ? (_getPluginState = getPluginState(state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.bookmark : _bookmark;
|
|
66
63
|
var annotationsList = getAllAnnotations(editorView.state.doc);
|
|
67
64
|
var selection = getSelectionPositions(state, bookmark);
|
|
68
65
|
var position = findPosForDOM(selection);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.9",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
39
|
"@atlaskit/editor-toolbar": "^0.17.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
|
-
"@atlaskit/icon": "^
|
|
41
|
+
"@atlaskit/icon": "^29.0.0",
|
|
42
42
|
"@atlaskit/onboarding": "^14.4.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^13.35.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^110.
|
|
49
|
+
"@atlaskit/editor-common": "^110.27.0",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|
|
@@ -106,9 +106,6 @@
|
|
|
106
106
|
"confluence_frontend_preload_inline_comment_editor": {
|
|
107
107
|
"type": "boolean"
|
|
108
108
|
},
|
|
109
|
-
"platform_editor_fix_inline_comment_reopen": {
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
},
|
|
112
109
|
"confluence_frontend_new_dangling_comments_ux": {
|
|
113
110
|
"type": "boolean"
|
|
114
111
|
}
|