@atlaskit/editor-plugin-annotation 3.1.0 → 3.1.2
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 +19 -0
- package/dist/cjs/annotationPlugin.js +3 -2
- package/dist/cjs/pm-plugins/utils.js +1 -1
- package/dist/es2019/annotationPlugin.js +3 -2
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/annotationPlugin.js +3 -2
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 3.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#191913](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/191913)
|
|
8
|
+
[`6d1e56695e91d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d1e56695e91d) -
|
|
9
|
+
EDITOR-1131 Bump adf-schema package to 50.0.0
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#190588](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/190588)
|
|
17
|
+
[`b22e308cfd320`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b22e308cfd320) -
|
|
18
|
+
Replace experiment key platform_editor_useSharedPluginStateSelector with
|
|
19
|
+
platform_editor_useSharedPluginStateWithSelector
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 3.1.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -8,6 +8,7 @@ exports.annotationPlugin = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
13
|
var _editorCommands = require("./editor-commands");
|
|
13
14
|
var _annotationMark = require("./nodeviews/annotationMark");
|
|
@@ -155,12 +156,12 @@ function AnnotationContentComponent(_ref4) {
|
|
|
155
156
|
annotationProviders = _ref4.annotationProviders,
|
|
156
157
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
|
|
157
158
|
var annotationState = useAnnotationContentComponentPluginState(api);
|
|
158
|
-
if (annotationState && !annotationState.isVisible && (0,
|
|
159
|
+
if (annotationState && !annotationState.isVisible && (0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
159
160
|
return null;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
// need to explicitly check for false as undefined is also a valid value to continue
|
|
163
|
-
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false && (0,
|
|
164
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false && (0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstatewithselector', 'isEnabled', true)) {
|
|
164
165
|
return null;
|
|
165
166
|
}
|
|
166
167
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -254,7 +254,7 @@ var resolveDraftBookmark = exports.resolveDraftBookmark = function resolveDraftB
|
|
|
254
254
|
* @return bookmarked positions if they exists, otherwise current selection positions
|
|
255
255
|
*/
|
|
256
256
|
function getSelectionPositions(editorState,
|
|
257
|
-
// when cleaning up
|
|
257
|
+
// when cleaning up platform_editor_usesharedpluginstatewithselector, can change this prop to bookmark
|
|
258
258
|
inlineCommentState) {
|
|
259
259
|
var _ref2 = inlineCommentState || {},
|
|
260
260
|
bookmark = _ref2.bookmark;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
5
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
5
6
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -150,12 +151,12 @@ function AnnotationContentComponent({
|
|
|
150
151
|
}) {
|
|
151
152
|
var _api$analytics5;
|
|
152
153
|
const annotationState = useAnnotationContentComponentPluginState(api);
|
|
153
|
-
if (annotationState && !annotationState.isVisible &&
|
|
154
|
+
if (annotationState && !annotationState.isVisible && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
154
155
|
return null;
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
// need to explicitly check for false as undefined is also a valid value to continue
|
|
158
|
-
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false &&
|
|
159
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', true)) {
|
|
159
160
|
return null;
|
|
160
161
|
}
|
|
161
162
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -218,7 +218,7 @@ export const resolveDraftBookmark = (editorState, bookmark, supportedBlockNodes
|
|
|
218
218
|
* @return bookmarked positions if they exists, otherwise current selection positions
|
|
219
219
|
*/
|
|
220
220
|
export function getSelectionPositions(editorState,
|
|
221
|
-
// when cleaning up
|
|
221
|
+
// when cleaning up platform_editor_usesharedpluginstatewithselector, can change this prop to bookmark
|
|
222
222
|
inlineCommentState) {
|
|
223
223
|
const {
|
|
224
224
|
bookmark
|
|
@@ -3,6 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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
5
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
8
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
8
9
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -148,12 +149,12 @@ function AnnotationContentComponent(_ref4) {
|
|
|
148
149
|
annotationProviders = _ref4.annotationProviders,
|
|
149
150
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
|
|
150
151
|
var annotationState = useAnnotationContentComponentPluginState(api);
|
|
151
|
-
if (annotationState && !annotationState.isVisible &&
|
|
152
|
+
if (annotationState && !annotationState.isVisible && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
152
153
|
return null;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
// need to explicitly check for false as undefined is also a valid value to continue
|
|
156
|
-
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false &&
|
|
157
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', true)) {
|
|
157
158
|
return null;
|
|
158
159
|
}
|
|
159
160
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -237,7 +237,7 @@ export var resolveDraftBookmark = function resolveDraftBookmark(editorState, boo
|
|
|
237
237
|
* @return bookmarked positions if they exists, otherwise current selection positions
|
|
238
238
|
*/
|
|
239
239
|
export function getSelectionPositions(editorState,
|
|
240
|
-
// when cleaning up
|
|
240
|
+
// when cleaning up platform_editor_usesharedpluginstatewithselector, can change this prop to bookmark
|
|
241
241
|
inlineCommentState) {
|
|
242
242
|
var _ref2 = inlineCommentState || {},
|
|
243
243
|
bookmark = _ref2.bookmark;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
".": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^
|
|
33
|
+
"@atlaskit/adf-schema": "^50.0.1",
|
|
34
34
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-connectivity": "^3.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-viewmode-effects": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
|
-
"@atlaskit/icon": "^27.
|
|
40
|
+
"@atlaskit/icon": "^27.7.0",
|
|
41
41
|
"@atlaskit/onboarding": "^14.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^9.17.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/editor-common": "^107.
|
|
47
|
+
"@atlaskit/editor-common": "^107.12.0",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-dom": "^18.2.0"
|
|
50
50
|
},
|