@atlaskit/editor-plugin-annotation 1.14.2 → 1.14.3
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.14.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#118402](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118402)
|
|
8
|
+
[`efc9db93eefe8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/efc9db93eefe8) -
|
|
9
|
+
Cleanup flag to fix comments on media draft bug
|
|
10
|
+
|
|
3
11
|
## 1.14.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _utils2 = require("../utils");
|
|
14
13
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
15
14
|
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; }
|
|
@@ -29,11 +28,6 @@ var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
|
|
|
29
28
|
* 2. if the current selection and bookmark selection are different
|
|
30
29
|
*/
|
|
31
30
|
var shouldClearBookMarkCheck = exports.shouldClearBookMarkCheck = function shouldClearBookMarkCheck(tr, editorState, bookmark) {
|
|
32
|
-
// https://switcheroo.atlassian.com/changes/confluence/platform.editor.comments-on-media.bug.preserve-draft_i3vqb
|
|
33
|
-
// the existing log will always clear bookmark
|
|
34
|
-
if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.comments-on-media.bug.preserve-draft_i3vqb')) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
31
|
if (editorState.selection.empty || !bookmark) {
|
|
38
32
|
return true;
|
|
39
33
|
} else if (editorState.selection instanceof _state.NodeSelection) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { decorationKey, findAnnotationsInSelection, inlineCommentPluginKey, isBlockNodeAnnotationsSelected, isSelectedAnnotationsChanged } from '../utils';
|
|
6
5
|
import reducer from './reducer';
|
|
7
6
|
const handleDocChanged = (tr, prevPluginState) => {
|
|
@@ -20,11 +19,6 @@ const handleDocChanged = (tr, prevPluginState) => {
|
|
|
20
19
|
* 2. if the current selection and bookmark selection are different
|
|
21
20
|
*/
|
|
22
21
|
export const shouldClearBookMarkCheck = (tr, editorState, bookmark) => {
|
|
23
|
-
// https://switcheroo.atlassian.com/changes/confluence/platform.editor.comments-on-media.bug.preserve-draft_i3vqb
|
|
24
|
-
// the existing log will always clear bookmark
|
|
25
|
-
if (!getBooleanFF('platform.editor.comments-on-media.bug.preserve-draft_i3vqb')) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
22
|
if (editorState.selection.empty || !bookmark) {
|
|
29
23
|
return true;
|
|
30
24
|
} else if (editorState.selection instanceof NodeSelection) {
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { decorationKey, findAnnotationsInSelection, inlineCommentPluginKey, isBlockNodeAnnotationsSelected, isSelectedAnnotationsChanged } from '../utils';
|
|
9
8
|
import reducer from './reducer';
|
|
10
9
|
var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
|
|
@@ -22,11 +21,6 @@ var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
|
|
|
22
21
|
* 2. if the current selection and bookmark selection are different
|
|
23
22
|
*/
|
|
24
23
|
export var shouldClearBookMarkCheck = function shouldClearBookMarkCheck(tr, editorState, bookmark) {
|
|
25
|
-
// https://switcheroo.atlassian.com/changes/confluence/platform.editor.comments-on-media.bug.preserve-draft_i3vqb
|
|
26
|
-
// the existing log will always clear bookmark
|
|
27
|
-
if (!getBooleanFF('platform.editor.comments-on-media.bug.preserve-draft_i3vqb')) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
24
|
if (editorState.selection.empty || !bookmark) {
|
|
31
25
|
return true;
|
|
32
26
|
} else if (editorState.selection instanceof NodeSelection) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.3",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^39.0.3",
|
|
36
|
-
"@atlaskit/editor-common": "^84.
|
|
36
|
+
"@atlaskit/editor-common": "^84.5.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode-effects": "^1.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
@@ -95,9 +95,6 @@
|
|
|
95
95
|
},
|
|
96
96
|
"editor_inline_comments_on_inline_nodes": {
|
|
97
97
|
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"platform.editor.comments-on-media.bug.preserve-draft_i3vqb": {
|
|
100
|
-
"type": "boolean"
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
}
|