@atlaskit/editor-plugin-toolbar 4.0.5 → 4.0.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
+ ## 4.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c9c11b2544f4e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c9c11b2544f4e) -
8
+ Remove platform_editor_toolbar_aifc_template_editor feature flag
9
+ - Updated dependencies
10
+
3
11
  ## 4.0.5
4
12
 
5
13
  ### Patch Changes
@@ -100,8 +100,7 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
100
100
  editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
101
101
  currentUserIntent = _usePluginState.currentUserIntent,
102
102
  shouldShowToolbar = _usePluginState.shouldShowToolbar,
103
- editorViewMode = _usePluginState.editorViewMode,
104
- _selection = _usePluginState.selection;
103
+ editorViewMode = _usePluginState.editorViewMode;
105
104
  var contextualFormattingEnabled = (_api$toolbar$actions$ = api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.contextualFormattingMode()) !== null && _api$toolbar$actions$ !== void 0 ? _api$toolbar$actions$ : 'always-pinned';
106
105
  var selectionToolbarConfigEnabled = (0, _toolbar.shouldShowSelectionToolbar)(contextualFormattingEnabled, editorToolbarDockingPreference);
107
106
  var intl = (0, _reactIntlNext.useIntl)();
@@ -120,7 +119,7 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
120
119
  var isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof _state.AllSelection;
121
120
  var isCellSelection = !editorView.state.selection.empty && '$anchorCell' in editorView.state.selection;
122
121
  var onPositionCalculated = useOnPositionCalculated(editorView);
123
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_template_editor', 'isEnabled', true) && selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
122
+ if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
124
123
  return null;
125
124
  }
126
125
  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') ?
@@ -92,9 +92,7 @@ export const SelectionToolbar = ({
92
92
  editorToolbarDockingPreference,
93
93
  currentUserIntent,
94
94
  shouldShowToolbar,
95
- editorViewMode,
96
- // @ts-ignore
97
- selection: _selection
95
+ editorViewMode
98
96
  } = usePluginState(api);
99
97
  const contextualFormattingEnabled = (_api$toolbar$actions$ = api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.contextualFormattingMode()) !== null && _api$toolbar$actions$ !== void 0 ? _api$toolbar$actions$ : 'always-pinned';
100
98
  const selectionToolbarConfigEnabled = shouldShowSelectionToolbar(contextualFormattingEnabled, editorToolbarDockingPreference);
@@ -113,7 +111,7 @@ export const SelectionToolbar = ({
113
111
  const isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof AllSelection;
114
112
  const isCellSelection = !editorView.state.selection.empty && '$anchorCell' in editorView.state.selection;
115
113
  const onPositionCalculated = useOnPositionCalculated(editorView);
116
- if (expValEquals('platform_editor_toolbar_aifc_template_editor', 'isEnabled', true) && selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
114
+ if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
117
115
  return null;
118
116
  }
119
117
  if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || (fg('platform_editor_toolbar_aifc_user_intent_fix') ?
@@ -92,8 +92,7 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
92
92
  editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference,
93
93
  currentUserIntent = _usePluginState.currentUserIntent,
94
94
  shouldShowToolbar = _usePluginState.shouldShowToolbar,
95
- editorViewMode = _usePluginState.editorViewMode,
96
- _selection = _usePluginState.selection;
95
+ editorViewMode = _usePluginState.editorViewMode;
97
96
  var contextualFormattingEnabled = (_api$toolbar$actions$ = api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.contextualFormattingMode()) !== null && _api$toolbar$actions$ !== void 0 ? _api$toolbar$actions$ : 'always-pinned';
98
97
  var selectionToolbarConfigEnabled = shouldShowSelectionToolbar(contextualFormattingEnabled, editorToolbarDockingPreference);
99
98
  var intl = useIntl();
@@ -112,7 +111,7 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
112
111
  var isAllSelection = !editorView.state.selection.empty && editorView.state.selection instanceof AllSelection;
113
112
  var isCellSelection = !editorView.state.selection.empty && '$anchorCell' in editorView.state.selection;
114
113
  var onPositionCalculated = useOnPositionCalculated(editorView);
115
- if (expValEquals('platform_editor_toolbar_aifc_template_editor', 'isEnabled', true) && selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
114
+ if (selectionToolbarConfigEnabled && disableSelectionToolbarWhenPinned || !components || !toolbar) {
116
115
  return null;
117
116
  }
118
117
  if (!(isTextSelection || isCellSelection || isAllSelection) || currentUserIntent === 'dragging' || !shouldShowToolbar || currentUserIntent === 'blockMenuOpen' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) || (fg('platform_editor_toolbar_aifc_user_intent_fix') ?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/editor-toolbar-model": "^0.2.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
42
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
43
- "@atlaskit/tmp-editor-statsig": "^16.19.0",
43
+ "@atlaskit/tmp-editor-statsig": "^16.20.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "bind-event-listener": "^3.0.0",
46
46
  "react-intl-next": "npm:react-intl@^5.18.1"