@atlaskit/editor-plugin-selection-toolbar 9.0.9 → 9.0.10
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-toolbar
|
|
2
2
|
|
|
3
|
+
## 9.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
8
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 9.0.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
18
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _commands = require("./pm-plugins/commands");
|
|
20
19
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
@@ -154,7 +153,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
154
153
|
if (meta) {
|
|
155
154
|
return _objectSpread(_objectSpread({}, newPluginState), meta);
|
|
156
155
|
}
|
|
157
|
-
if ((0,
|
|
156
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
158
157
|
var _api$userIntent;
|
|
159
158
|
var isBlockMenuOpen = (api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent) === 'blockMenuOpen';
|
|
160
159
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
@@ -283,7 +282,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
283
282
|
return;
|
|
284
283
|
}
|
|
285
284
|
}
|
|
286
|
-
if (isBlockMenuOpen && isEditorControlsEnabled && (0,
|
|
285
|
+
if (isBlockMenuOpen && isEditorControlsEnabled && (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
287
286
|
// If the block menu is open, do not show the selection toolbar.
|
|
288
287
|
return;
|
|
289
288
|
}
|
|
@@ -5,7 +5,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
5
5
|
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
import { setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
|
|
11
10
|
import { selectionToolbarPluginKey } from './pm-plugins/plugin-key';
|
|
@@ -150,7 +149,7 @@ export const selectionToolbarPlugin = ({
|
|
|
150
149
|
...meta
|
|
151
150
|
};
|
|
152
151
|
}
|
|
153
|
-
if (
|
|
152
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
154
153
|
var _api$userIntent, _api$userIntent$share;
|
|
155
154
|
const isBlockMenuOpen = (api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : (_api$userIntent$share = _api$userIntent.sharedState.currentState()) === null || _api$userIntent$share === void 0 ? void 0 : _api$userIntent$share.currentUserIntent) === 'blockMenuOpen';
|
|
156
155
|
newPluginState = {
|
|
@@ -282,7 +281,7 @@ export const selectionToolbarPlugin = ({
|
|
|
282
281
|
return;
|
|
283
282
|
}
|
|
284
283
|
}
|
|
285
|
-
if (isBlockMenuOpen && isEditorControlsEnabled &&
|
|
284
|
+
if (isBlockMenuOpen && isEditorControlsEnabled && editorExperiment('platform_editor_block_menu', true)) {
|
|
286
285
|
// If the block menu is open, do not show the selection toolbar.
|
|
287
286
|
return;
|
|
288
287
|
}
|
|
@@ -9,7 +9,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
9
9
|
import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
13
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
13
|
import { setToolbarDocking as _setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics as _forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
|
|
15
14
|
import { selectionToolbarPluginKey } from './pm-plugins/plugin-key';
|
|
@@ -147,7 +146,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
147
146
|
if (meta) {
|
|
148
147
|
return _objectSpread(_objectSpread({}, newPluginState), meta);
|
|
149
148
|
}
|
|
150
|
-
if (
|
|
149
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
151
150
|
var _api$userIntent;
|
|
152
151
|
var isBlockMenuOpen = (api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent) === 'blockMenuOpen';
|
|
153
152
|
newPluginState = _objectSpread(_objectSpread({}, newPluginState), {}, {
|
|
@@ -276,7 +275,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
276
275
|
return;
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
|
-
if (isBlockMenuOpen && isEditorControlsEnabled &&
|
|
278
|
+
if (isBlockMenuOpen && isEditorControlsEnabled && editorExperiment('platform_editor_block_menu', true)) {
|
|
280
279
|
// If the block menu is open, do not show the selection toolbar.
|
|
281
280
|
return;
|
|
282
281
|
}
|
package/package.json
CHANGED