@atlaskit/editor-plugin-toolbar 5.1.5 → 5.1.6

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-toolbar
2
2
 
3
+ ## 5.1.6
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
  ## 5.1.5
4
12
 
5
13
  ### Patch Changes
@@ -22,7 +22,7 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
22
22
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
23
23
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
24
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
25
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
25
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
26
26
  var _consts = require("../consts");
27
27
  var _keyboardConfig = require("./keyboard-config");
28
28
  var _utils2 = require("./utils");
@@ -95,7 +95,7 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
95
95
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
96
96
  return null;
97
97
  }
98
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
98
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ||
99
99
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
100
100
  currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || (0, _coreUtils.isSSR)()) {
101
101
  return null;
@@ -15,7 +15,7 @@ import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useTool
15
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
20
20
  import { getKeyboardNavigationConfig } from './keyboard-config';
21
21
  import { getDomRefFromSelection } from './utils';
@@ -88,7 +88,7 @@ export const SelectionToolbar = ({
88
88
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
89
89
  return null;
90
90
  }
91
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
91
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && editorExperiment('platform_editor_block_menu', true) ||
92
92
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
93
93
  currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
94
94
  return null;
@@ -15,7 +15,7 @@ import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useTool
15
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
20
20
  import { getKeyboardNavigationConfig } from './keyboard-config';
21
21
  import { getDomRefFromSelection } from './utils';
@@ -87,7 +87,7 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
87
87
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
88
88
  return null;
89
89
  }
90
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
90
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && editorExperiment('platform_editor_block_menu', true) ||
91
91
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
92
92
  currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
93
93
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "5.1.5",
3
+ "version": "5.1.6",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",