@atlaskit/editor-plugin-text-color 12.3.5 → 12.3.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,12 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 12.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`294e8295a274f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/294e8295a274f) -
8
+ [ux] [EDITOR-7863] Keep the color menu open when clicking inside the palette.
9
+
3
10
  ## 12.3.5
4
11
 
5
12
  ### Patch Changes
@@ -11,7 +11,9 @@ var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _toolbar = require("@atlaskit/editor-common/toolbar");
13
13
  var _editorToolbar = require("@atlaskit/editor-toolbar");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _compiled = require("@atlaskit/primitives/compiled");
16
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
17
  var styles = {
16
18
  menu: "_1rjcv77o _18zru2gc"
17
19
  };
@@ -21,9 +23,15 @@ var TextMenuSection = exports.TextMenuSection = function TextMenuSection(_ref) {
21
23
  var hasSeparator = parents.some(function (parent) {
22
24
  return parent.key === _toolbar.TEXT_COLLAPSED_MENU.key;
23
25
  });
26
+ var onMouseDown = function onMouseDown(event) {
27
+ if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
28
+ event.stopPropagation();
29
+ }
30
+ };
24
31
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
25
32
  hasSeparator: hasSeparator
26
33
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
27
- xcss: styles.menu
34
+ xcss: styles.menu,
35
+ onMouseDown: onMouseDown
28
36
  }, children));
29
37
  };
@@ -4,7 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
6
6
  import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
9
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
10
  const styles = {
9
11
  menu: "_1rjcv77o _18zru2gc"
10
12
  };
@@ -13,9 +15,15 @@ export const TextMenuSection = ({
13
15
  parents
14
16
  }) => {
15
17
  const hasSeparator = parents.some(parent => parent.key === TEXT_COLLAPSED_MENU.key);
18
+ const onMouseDown = event => {
19
+ if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_1')) {
20
+ event.stopPropagation();
21
+ }
22
+ };
16
23
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
17
24
  hasSeparator: hasSeparator
18
25
  }, /*#__PURE__*/React.createElement(Box, {
19
- xcss: styles.menu
26
+ xcss: styles.menu,
27
+ onMouseDown: onMouseDown
20
28
  }, children));
21
29
  };
@@ -4,7 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
6
6
  import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
9
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
10
  var styles = {
9
11
  menu: "_1rjcv77o _18zru2gc"
10
12
  };
@@ -14,9 +16,15 @@ export var TextMenuSection = function TextMenuSection(_ref) {
14
16
  var hasSeparator = parents.some(function (parent) {
15
17
  return parent.key === TEXT_COLLAPSED_MENU.key;
16
18
  });
19
+ var onMouseDown = function onMouseDown(event) {
20
+ if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_1')) {
21
+ event.stopPropagation();
22
+ }
23
+ };
17
24
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
18
25
  hasSeparator: hasSeparator
19
26
  }, /*#__PURE__*/React.createElement(Box, {
20
- xcss: styles.menu
27
+ xcss: styles.menu,
28
+ onMouseDown: onMouseDown
21
29
  }, children));
22
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "12.3.5",
3
+ "version": "12.3.6",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",