@atlaskit/editor-plugin-selection-extension 7.0.2 → 7.0.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-selection-extension
|
|
2
2
|
|
|
3
|
+
## 7.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`14159c94706dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/14159c94706dd) -
|
|
8
|
+
ED-29605: prevent selectionExtensionPLugin hydration errors
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.selectionExtensionPlugin = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
10
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
12
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
13
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
@@ -134,6 +135,9 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
|
|
|
134
135
|
usePluginHook: function usePluginHook() {
|
|
135
136
|
(0, _usePluginStateEffect.usePluginStateEffect)(api, ['userIntent', 'selection'], function (_ref6) {
|
|
136
137
|
var userIntentState = _ref6.userIntentState;
|
|
138
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) && (0, _coreUtils.isSSR)()) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
137
141
|
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
138
142
|
(0, _registerBlockMenuItems.registerBlockMenuItems)(extensionList, api);
|
|
139
143
|
}
|
|
@@ -149,7 +153,7 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
|
|
|
149
153
|
contentComponent: function contentComponent(_ref7) {
|
|
150
154
|
var _api$analytics;
|
|
151
155
|
var editorView = _ref7.editorView;
|
|
152
|
-
if (!editorView) {
|
|
156
|
+
if (!editorView || (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) && (0, _coreUtils.isSSR)()) {
|
|
153
157
|
return null;
|
|
154
158
|
}
|
|
155
159
|
return /*#__PURE__*/_react.default.createElement(_SelectionExtensionComponentWrapper.SelectionExtensionComponentWrapper, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
2
3
|
import { selectionExtensionMessages } from '@atlaskit/editor-common/messages';
|
|
3
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
5
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
@@ -130,6 +131,9 @@ export const selectionExtensionPlugin = ({
|
|
|
130
131
|
usePluginStateEffect(api, ['userIntent', 'selection'], ({
|
|
131
132
|
userIntentState
|
|
132
133
|
}) => {
|
|
134
|
+
if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
133
137
|
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
134
138
|
registerBlockMenuItems(extensionList, api);
|
|
135
139
|
}
|
|
@@ -146,7 +150,7 @@ export const selectionExtensionPlugin = ({
|
|
|
146
150
|
editorView
|
|
147
151
|
}) => {
|
|
148
152
|
var _api$analytics;
|
|
149
|
-
if (!editorView) {
|
|
153
|
+
if (!editorView || expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
|
|
150
154
|
return null;
|
|
151
155
|
}
|
|
152
156
|
return /*#__PURE__*/React.createElement(SelectionExtensionComponentWrapper, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
3
4
|
import { selectionExtensionMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
6
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
@@ -127,6 +128,9 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
|
|
|
127
128
|
usePluginHook: function usePluginHook() {
|
|
128
129
|
usePluginStateEffect(api, ['userIntent', 'selection'], function (_ref6) {
|
|
129
130
|
var userIntentState = _ref6.userIntentState;
|
|
131
|
+
if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
130
134
|
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
131
135
|
registerBlockMenuItems(extensionList, api);
|
|
132
136
|
}
|
|
@@ -142,7 +146,7 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
|
|
|
142
146
|
contentComponent: function contentComponent(_ref7) {
|
|
143
147
|
var _api$analytics;
|
|
144
148
|
var editorView = _ref7.editorView;
|
|
145
|
-
if (!editorView) {
|
|
149
|
+
if (!editorView || expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && isSSR()) {
|
|
146
150
|
return null;
|
|
147
151
|
}
|
|
148
152
|
return /*#__PURE__*/React.createElement(SelectionExtensionComponentWrapper, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-extension",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
51
51
|
"@atlaskit/primitives": "^16.1.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^13.23.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
56
56
|
"uuid": "^3.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^110.
|
|
59
|
+
"@atlaskit/editor-common": "^110.20.0",
|
|
60
60
|
"react": "^18.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|