@atlaskit/editor-plugin-floating-toolbar 3.5.0 → 3.6.0

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,18 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 3.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#139053](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139053)
8
+ [`c1c6278a78c4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1c6278a78c4a) -
9
+ [ux] Adds a new temporary floating toolbar's config option to hide any toolbars when any table's
10
+ menu is opend.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 3.5.0
4
17
 
5
18
  ### Minor Changes
@@ -478,6 +478,10 @@ function floatingToolbarPluginFactory(options) {
478
478
  var handler = floatingToolbarHandlers[index];
479
479
  var config = handler(editorState, intl, providerFactory, activeConfigs);
480
480
  if (config) {
481
+ if (config.__suppressAllToolbars && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
482
+ activeConfigs = undefined;
483
+ break;
484
+ }
481
485
  activeConfigs.push(sanitizeFloatingToolbarConfig(config));
482
486
  }
483
487
  }
@@ -447,11 +447,15 @@ export function floatingToolbarPluginFactory(options) {
447
447
  } = options;
448
448
  const intl = getIntl();
449
449
  const getConfigWithNodeInfo = editorState => {
450
- const activeConfigs = [];
450
+ let activeConfigs = [];
451
451
  for (let index = 0; index < floatingToolbarHandlers.length; index++) {
452
452
  const handler = floatingToolbarHandlers[index];
453
453
  const config = handler(editorState, intl, providerFactory, activeConfigs);
454
454
  if (config) {
455
+ if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
456
+ activeConfigs = undefined;
457
+ break;
458
+ }
455
459
  activeConfigs.push(sanitizeFloatingToolbarConfig(config));
456
460
  }
457
461
  }
@@ -466,6 +466,10 @@ export function floatingToolbarPluginFactory(options) {
466
466
  var handler = floatingToolbarHandlers[index];
467
467
  var config = handler(editorState, intl, providerFactory, activeConfigs);
468
468
  if (config) {
469
+ if (config.__suppressAllToolbars && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
470
+ activeConfigs = undefined;
471
+ break;
472
+ }
469
473
  activeConfigs.push(sanitizeFloatingToolbarConfig(config));
470
474
  }
471
475
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  "@atlaskit/adf-utils": "^19.19.0",
29
29
  "@atlaskit/button": "^23.0.0",
30
30
  "@atlaskit/checkbox": "^17.0.0",
31
- "@atlaskit/editor-common": "^103.1.0",
31
+ "@atlaskit/editor-common": "^103.2.0",
32
32
  "@atlaskit/editor-palette": "^2.1.0",
33
33
  "@atlaskit/editor-plugin-block-controls": "^3.8.0",
34
34
  "@atlaskit/editor-plugin-context-panel": "^4.0.0",
@@ -137,6 +137,9 @@
137
137
  },
138
138
  "platform_editor_controls_patch_2": {
139
139
  "type": "boolean"
140
+ },
141
+ "platform_editor_controls_patch_4": {
142
+ "type": "boolean"
140
143
  }
141
144
  }
142
145
  }