@atlaskit/editor-plugin-annotation 6.2.5 → 6.2.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 +14 -0
- package/dist/cjs/annotationPlugin.js +3 -1
- package/dist/cjs/pm-plugins/inline-comment.js +0 -3
- package/dist/es2019/annotationPlugin.js +3 -1
- package/dist/es2019/pm-plugins/inline-comment.js +0 -3
- package/dist/esm/annotationPlugin.js +3 -1
- package/dist/esm/pm-plugins/inline-comment.js +0 -3
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 6.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`749a0f6a088b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/749a0f6a088b9) -
|
|
8
|
+
ED-29602 - stop annotationplugin breaking hydration
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.2.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.2.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,7 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.annotationPlugin = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
10
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
14
|
var _editorCommands = require("./editor-commands");
|
|
13
15
|
var _annotationMark = require("./nodeviews/annotationMark");
|
|
@@ -132,7 +134,7 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
|
|
|
132
134
|
contentComponent: function contentComponent(_ref3) {
|
|
133
135
|
var editorView = _ref3.editorView,
|
|
134
136
|
dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
|
|
135
|
-
if (!annotationProviders || !editorView) {
|
|
137
|
+
if (!annotationProviders || !editorView || (0, _coreUtils.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true)) {
|
|
136
138
|
return null;
|
|
137
139
|
}
|
|
138
140
|
return /*#__PURE__*/_react.default.createElement(AnnotationContentComponent, {
|
|
@@ -406,9 +406,6 @@ var inlineCommentPlugin = exports.inlineCommentPlugin = function inlineCommentPl
|
|
|
406
406
|
},
|
|
407
407
|
click: function click(view, event) {
|
|
408
408
|
var _event$target$closest, _pluginState$selected;
|
|
409
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_listen_for_annotation_clicks')) {
|
|
410
|
-
return false;
|
|
411
|
-
}
|
|
412
409
|
if (!(event.target instanceof HTMLElement)) {
|
|
413
410
|
return false;
|
|
414
411
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
2
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
6
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
5
7
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -125,7 +127,7 @@ export const annotationPlugin = ({
|
|
|
125
127
|
editorView,
|
|
126
128
|
dispatchAnalyticsEvent
|
|
127
129
|
}) {
|
|
128
|
-
if (!annotationProviders || !editorView) {
|
|
130
|
+
if (!annotationProviders || !editorView || isSSR() && expValEquals('platform_editor_hydratable_ui', 'isEnabled', true)) {
|
|
129
131
|
return null;
|
|
130
132
|
}
|
|
131
133
|
return /*#__PURE__*/React.createElement(AnnotationContentComponent, {
|
|
@@ -350,9 +350,6 @@ export const inlineCommentPlugin = options => {
|
|
|
350
350
|
},
|
|
351
351
|
click: (view, event) => {
|
|
352
352
|
var _event$target$closest, _pluginState$selected;
|
|
353
|
-
if (!fg('platform_editor_listen_for_annotation_clicks')) {
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
353
|
if (!(event.target instanceof HTMLElement)) {
|
|
357
354
|
return false;
|
|
358
355
|
}
|
|
@@ -2,7 +2,9 @@ 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
4
|
import React from 'react';
|
|
5
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
5
6
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
9
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
8
10
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -125,7 +127,7 @@ export var annotationPlugin = function annotationPlugin(_ref) {
|
|
|
125
127
|
contentComponent: function contentComponent(_ref3) {
|
|
126
128
|
var editorView = _ref3.editorView,
|
|
127
129
|
dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
|
|
128
|
-
if (!annotationProviders || !editorView) {
|
|
130
|
+
if (!annotationProviders || !editorView || isSSR() && expValEquals('platform_editor_hydratable_ui', 'isEnabled', true)) {
|
|
129
131
|
return null;
|
|
130
132
|
}
|
|
131
133
|
return /*#__PURE__*/React.createElement(AnnotationContentComponent, {
|
|
@@ -399,9 +399,6 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
|
|
|
399
399
|
},
|
|
400
400
|
click: function click(view, event) {
|
|
401
401
|
var _event$target$closest, _pluginState$selected;
|
|
402
|
-
if (!fg('platform_editor_listen_for_annotation_clicks')) {
|
|
403
|
-
return false;
|
|
404
|
-
}
|
|
405
402
|
if (!(event.target instanceof HTMLElement)) {
|
|
406
403
|
return false;
|
|
407
404
|
}
|
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.7",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-toolbar": "^3.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-user-intent": "^4.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
39
|
+
"@atlaskit/editor-toolbar": "^0.17.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/icon": "^28.5.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.23.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.20.0",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"editor_inline_comments_on_inline_nodes": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_editor_listen_for_annotation_clicks": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_annotation_selected_annotation": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
},
|