@atlaskit/editor-plugin-annotation 4.0.5 → 5.0.0
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,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0d0fe7a300841`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d0fe7a300841) -
|
|
8
|
+
Cleanup platform_editor_usesharedpluginstatewithselector experiment
|
|
9
|
+
|
|
10
|
+
- BREAKING CHANGE: sharedPluginStateHookMigratorFactory is deleted from @atlaskit/editor-common
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 4.0.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`c0113eeccb2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0113eeccb2df) -
|
|
19
|
+
[ux] ED-29120 add a new config option for default editor preset
|
|
20
|
+
(`toolbar.enableNewToolbarExperience`) which allows the new toolbar to be disabled. This is needed
|
|
21
|
+
for editors that can't be excluded at the experiment level.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 4.0.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -8,7 +8,6 @@ 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");
|
|
12
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _editorCommands = require("./editor-commands");
|
|
14
13
|
var _annotationMark = require("./nodeviews/annotationMark");
|
|
@@ -25,7 +24,7 @@ var annotationPlugin = exports.annotationPlugin = function annotationPlugin(_ref
|
|
|
25
24
|
var annotationProviders = _ref.config,
|
|
26
25
|
api = _ref.api;
|
|
27
26
|
var featureFlags = api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
|
|
28
|
-
var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
27
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
29
28
|
exposure: true
|
|
30
29
|
});
|
|
31
30
|
if (isToolbarAIFCEnabled) {
|
|
@@ -162,12 +161,9 @@ function AnnotationContentComponent(_ref4) {
|
|
|
162
161
|
annotationProviders = _ref4.annotationProviders,
|
|
163
162
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
|
|
164
163
|
var annotationState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['annotation'], selector);
|
|
165
|
-
if (annotationState && !annotationState.isVisible && (0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
164
|
|
|
169
165
|
// need to explicitly check for false as undefined is also a valid value to continue
|
|
170
|
-
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false
|
|
166
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false) {
|
|
171
167
|
return null;
|
|
172
168
|
}
|
|
173
169
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
4
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
6
5
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -16,7 +15,7 @@ export const annotationPlugin = ({
|
|
|
16
15
|
}) => {
|
|
17
16
|
var _api$featureFlags, _api$analytics;
|
|
18
17
|
const featureFlags = api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
|
|
19
|
-
const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
18
|
+
const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
20
19
|
exposure: true
|
|
21
20
|
});
|
|
22
21
|
if (isToolbarAIFCEnabled) {
|
|
@@ -156,12 +155,9 @@ function AnnotationContentComponent({
|
|
|
156
155
|
}) {
|
|
157
156
|
var _api$analytics4;
|
|
158
157
|
const annotationState = useSharedPluginStateWithSelector(api, ['annotation'], selector);
|
|
159
|
-
if (annotationState && !annotationState.isVisible && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
158
|
|
|
163
159
|
// need to explicitly check for false as undefined is also a valid value to continue
|
|
164
|
-
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false
|
|
160
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false) {
|
|
165
161
|
return null;
|
|
166
162
|
}
|
|
167
163
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,7 +3,6 @@ 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 { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
|
|
9
8
|
import { annotationWithToDOMFix } from './nodeviews/annotationMark';
|
|
@@ -18,7 +17,7 @@ export var annotationPlugin = function annotationPlugin(_ref) {
|
|
|
18
17
|
var annotationProviders = _ref.config,
|
|
19
18
|
api = _ref.api;
|
|
20
19
|
var featureFlags = api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState();
|
|
21
|
-
var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
20
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
22
21
|
exposure: true
|
|
23
22
|
});
|
|
24
23
|
if (isToolbarAIFCEnabled) {
|
|
@@ -155,12 +154,9 @@ function AnnotationContentComponent(_ref4) {
|
|
|
155
154
|
annotationProviders = _ref4.annotationProviders,
|
|
156
155
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
|
|
157
156
|
var annotationState = useSharedPluginStateWithSelector(api, ['annotation'], selector);
|
|
158
|
-
if (annotationState && !annotationState.isVisible && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
157
|
|
|
162
158
|
// 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
|
|
159
|
+
if ((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isVisible) === false) {
|
|
164
160
|
return null;
|
|
165
161
|
}
|
|
166
162
|
return /*#__PURE__*/React.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,26 +27,26 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^
|
|
30
|
+
"@atlaskit/adf-schema": "^51.0.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
32
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
33
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
34
|
-
"@atlaskit/editor-plugin-editor-viewmode-effects": "^
|
|
35
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
36
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
37
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
32
|
+
"@atlaskit/editor-plugin-analytics": "^5.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-connectivity": "^5.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-editor-viewmode-effects": "^5.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-feature-flags": "^4.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-toolbar": "^2.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-user-intent": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
39
|
"@atlaskit/editor-toolbar": "^0.8.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/icon": "^28.1.0",
|
|
42
42
|
"@atlaskit/onboarding": "^14.4.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^12.9.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": "^
|
|
49
|
+
"@atlaskit/editor-common": "^109.0.0",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|