@atlaskit/editor-plugin-toolbar 4.1.3 → 4.1.5

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,21 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 4.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`653c0c803b286`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/653c0c803b286) -
8
+ EDITOR-4620 Clean up platform_editor_toolbar_aifc_patch_6
9
+ - Updated dependencies
10
+
11
+ ## 4.1.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [`e00b363b9fa30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e00b363b9fa30) -
16
+ [ux] EDITOR-4481 Clean up platform_editor_toolbar_aifc_user_intent_fix
17
+ - Updated dependencies
18
+
3
19
  ## 4.1.3
4
20
 
5
21
  ### Patch Changes
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _toolbar = require("@atlaskit/editor-common/toolbar");
10
10
  var _editorToolbar = require("@atlaskit/editor-toolbar");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDocking, contextualFormattingEnabled) {
14
13
  if (editMode === 'view') {
15
14
  return false;
@@ -66,6 +65,6 @@ var Section = exports.Section = function Section(_ref) {
66
65
  var hasSeparator = showSeparatorInFullPagePrimaryToolbar && isFullPage;
67
66
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarSection, {
68
67
  testId: testId,
69
- hasSeparator: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && hasSeparator ? _editorToolbar.SeparatorPosition.START : hasSeparator
68
+ hasSeparator: hasSeparator ? _editorToolbar.SeparatorPosition.START : hasSeparator
70
69
  }, children);
71
70
  };
@@ -19,7 +19,6 @@ var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
20
  var _editorToolbar = require("@atlaskit/editor-toolbar");
21
21
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
22
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
22
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
23
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
25
24
  var _consts = require("../consts");
@@ -86,7 +85,6 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
86
85
  }, [editorView, intl, api]);
87
86
  var _useToolbarUI = (0, _editorToolbar.useToolbarUI)(),
88
87
  isDisabled = _useToolbarUI.isDisabled;
89
- var patch6Enabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
90
88
  var isOffline = (0, _editorPluginConnectivity.isOfflineMode)(connectivityStateMode);
91
89
  var isTextSelection = !editorView.state.selection.empty && editorView.state.selection instanceof _state.TextSelection;
92
90
  var isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof _state.AllSelection;
@@ -95,9 +93,9 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
95
93
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
96
94
  return null;
97
95
  }
98
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) || ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_user_intent_fix') ?
96
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ||
99
97
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
100
- currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) : currentUserIntent && currentUserIntent !== 'default') || (0, _coreUtils.isSSR)()) {
98
+ currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || (0, _coreUtils.isSSR)()) {
101
99
  return null;
102
100
  }
103
101
  return /*#__PURE__*/_react.default.createElement(_ui.Popup, {
@@ -112,7 +110,7 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
112
110
  isOffline: isOffline
113
111
  }, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
114
112
  api: api,
115
- isDisabled: patch6Enabled ? isDisabled : isOffline,
113
+ isDisabled: isDisabled,
116
114
  fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
117
115
  var _api$analytics;
118
116
  api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent(payload);
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { TOOLBARS, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
3
3
  import { ToolbarSection, SeparatorPosition } from '@atlaskit/editor-toolbar';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  const shouldShowSection = (editMode, toolbar, toolbarDocking, contextualFormattingEnabled) => {
7
6
  if (editMode === 'view') {
8
7
  return false;
@@ -59,6 +58,6 @@ export const Section = ({
59
58
  const hasSeparator = showSeparatorInFullPagePrimaryToolbar && isFullPage;
60
59
  return /*#__PURE__*/React.createElement(ToolbarSection, {
61
60
  testId: testId,
62
- hasSeparator: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && hasSeparator ? SeparatorPosition.START : hasSeparator
61
+ hasSeparator: hasSeparator ? SeparatorPosition.START : hasSeparator
63
62
  }, children);
64
63
  };
@@ -12,7 +12,6 @@ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
14
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
17
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -79,7 +78,6 @@ export const SelectionToolbar = ({
79
78
  const {
80
79
  isDisabled
81
80
  } = useToolbarUI();
82
- const patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
83
81
  const isOffline = isOfflineMode(connectivityStateMode);
84
82
  const isTextSelection = !editorView.state.selection.empty && editorView.state.selection instanceof TextSelection;
85
83
  const isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof AllSelection;
@@ -88,9 +86,9 @@ export const SelectionToolbar = ({
88
86
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
89
87
  return null;
90
88
  }
91
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || (fg('platform_editor_toolbar_aifc_user_intent_fix') ?
89
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
92
90
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
93
- currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) : currentUserIntent && currentUserIntent !== 'default') || isSSR()) {
91
+ currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
94
92
  return null;
95
93
  }
96
94
  return /*#__PURE__*/React.createElement(Popup, {
@@ -105,7 +103,7 @@ export const SelectionToolbar = ({
105
103
  isOffline: isOffline
106
104
  }, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
107
105
  api: api,
108
- isDisabled: patch6Enabled ? isDisabled : isOffline,
106
+ isDisabled: isDisabled,
109
107
  fireAnalyticsEvent: payload => {
110
108
  var _api$analytics;
111
109
  api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions.fireAnalyticsEvent(payload);
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { TOOLBARS, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
3
3
  import { ToolbarSection, SeparatorPosition } from '@atlaskit/editor-toolbar';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDocking, contextualFormattingEnabled) {
7
6
  if (editMode === 'view') {
8
7
  return false;
@@ -59,6 +58,6 @@ export var Section = function Section(_ref) {
59
58
  var hasSeparator = showSeparatorInFullPagePrimaryToolbar && isFullPage;
60
59
  return /*#__PURE__*/React.createElement(ToolbarSection, {
61
60
  testId: testId,
62
- hasSeparator: expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && hasSeparator ? SeparatorPosition.START : hasSeparator
61
+ hasSeparator: hasSeparator ? SeparatorPosition.START : hasSeparator
63
62
  }, children);
64
63
  };
@@ -12,7 +12,6 @@ import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
14
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
17
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -78,7 +77,6 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
78
77
  }, [editorView, intl, api]);
79
78
  var _useToolbarUI = useToolbarUI(),
80
79
  isDisabled = _useToolbarUI.isDisabled;
81
- var patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
82
80
  var isOffline = isOfflineMode(connectivityStateMode);
83
81
  var isTextSelection = !editorView.state.selection.empty && editorView.state.selection instanceof TextSelection;
84
82
  var isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof AllSelection;
@@ -87,9 +85,9 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
87
85
  if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
88
86
  return null;
89
87
  }
90
- if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || (fg('platform_editor_toolbar_aifc_user_intent_fix') ?
88
+ if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ||
91
89
  // hide toolbar when user intent is not default, except when it's dragHandleSelected without cell selection
92
- currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) : currentUserIntent && currentUserIntent !== 'default') || isSSR()) {
90
+ currentUserIntent && currentUserIntent !== 'default' && !(currentUserIntent === 'dragHandleSelected' && !isCellSelection) || isSSR()) {
93
91
  return null;
94
92
  }
95
93
  return /*#__PURE__*/React.createElement(Popup, {
@@ -104,7 +102,7 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
104
102
  isOffline: isOffline
105
103
  }, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
106
104
  api: api,
107
- isDisabled: patch6Enabled ? isDisabled : isOffline,
105
+ isDisabled: isDisabled,
108
106
  fireAnalyticsEvent: function fireAnalyticsEvent(payload) {
109
107
  var _api$analytics;
110
108
  api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent(payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/editor-toolbar": "^0.19.0",
40
40
  "@atlaskit/editor-toolbar-model": "^0.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^16.35.0",
42
+ "@atlaskit/tmp-editor-statsig": "^17.1.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "bind-event-listener": "^3.0.0",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -49,9 +49,6 @@
49
49
  "react": "^18.2.0"
50
50
  },
51
51
  "platform-feature-flags": {
52
- "platform_editor_toolbar_aifc_user_intent_fix": {
53
- "type": "boolean"
54
- },
55
52
  "platform_editor_toolbar_aifc_placement_overridden": {
56
53
  "type": "boolean"
57
54
  },