@atlaskit/editor-plugin-text-color 12.4.0 → 12.4.2

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,19 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 12.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca816d97f5b74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca816d97f5b74) -
8
+ [ux] [EDITOR-8376] Update remove color button to remove highlight.
9
+ - Updated dependencies
10
+
11
+ ## 12.4.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 12.4.0
4
18
 
5
19
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -45,9 +45,11 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
45
45
  api.core.actions.execute(function (_ref2) {
46
46
  var _api$highlight;
47
47
  var tr = _ref2.tr;
48
- api.textColor.commands.changeColor(defaultColor, (0, _toolbar.getInputMethodFromParentKeys)(parents))({
49
- tr: tr
50
- });
48
+ if (!(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) || !(0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_2')) {
49
+ api.textColor.commands.changeColor(defaultColor, (0, _toolbar.getInputMethodFromParentKeys)(parents))({
50
+ tr: tr
51
+ });
52
+ }
51
53
  (_api$highlight = api.highlight) === null || _api$highlight === void 0 || _api$highlight.commands.changeColor({
52
54
  color: _uiColor.REMOVE_HIGHLIGHT_COLOR,
53
55
  inputMethod: (0, _toolbar.getInputMethodFromParentKeys)(parents)
@@ -61,7 +63,22 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
61
63
  }
62
64
  };
63
65
  if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
64
- if ((0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
66
+ if ((0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_2')) {
67
+ return /*#__PURE__*/React.createElement("div", {
68
+ className: (0, _runtime.ax)([styles.removeColorButton, styles.removeColorButtonPatch])
69
+ }, /*#__PURE__*/React.createElement(_new.default, {
70
+ shouldFitContainer: true,
71
+ appearance: "subtle",
72
+ onClick: onClick
73
+ }, /*#__PURE__*/React.createElement("span", {
74
+ className: (0, _runtime.ax)([styles.iconContainer])
75
+ }, /*#__PURE__*/React.createElement(_colourNone.default, {
76
+ size: "medium",
77
+ label: ""
78
+ }), /*#__PURE__*/React.createElement(_compiled.Text, {
79
+ color: "color.text.subtle"
80
+ }, formatMessage(_messages.highlightMessages.removeHighlight)))));
81
+ } else if ((0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
65
82
  return /*#__PURE__*/React.createElement("div", {
66
83
  className: (0, _runtime.ax)([styles.removeColorButton, styles.removeColorButtonPatch])
67
84
  }, /*#__PURE__*/React.createElement(_new.default, {
@@ -1,4 +1,4 @@
1
- /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* TextMenuSection.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextMenuSection.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ColorAccessibilityMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./RemoveColorMenuItem.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -39,9 +39,11 @@ export const RemoveColorMenuItem = ({
39
39
  tr
40
40
  }) => {
41
41
  var _api$highlight;
42
- api.textColor.commands.changeColor(defaultColor, getInputMethodFromParentKeys(parents))({
43
- tr
44
- });
42
+ if (!expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) || !fg('platform_editor_lovability_text_bg_color_patch_2')) {
43
+ api.textColor.commands.changeColor(defaultColor, getInputMethodFromParentKeys(parents))({
44
+ tr
45
+ });
46
+ }
45
47
  (_api$highlight = api.highlight) === null || _api$highlight === void 0 ? void 0 : _api$highlight.commands.changeColor({
46
48
  color: REMOVE_HIGHLIGHT_COLOR,
47
49
  inputMethod: getInputMethodFromParentKeys(parents)
@@ -55,7 +57,22 @@ export const RemoveColorMenuItem = ({
55
57
  }
56
58
  };
57
59
  if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
58
- if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
60
+ if (fg('platform_editor_lovability_text_bg_color_patch_2')) {
61
+ return /*#__PURE__*/React.createElement("div", {
62
+ className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
63
+ }, /*#__PURE__*/React.createElement(Button, {
64
+ shouldFitContainer: true,
65
+ appearance: "subtle",
66
+ onClick: onClick
67
+ }, /*#__PURE__*/React.createElement("span", {
68
+ className: ax([styles.iconContainer])
69
+ }, /*#__PURE__*/React.createElement(ColourNoneIcon, {
70
+ size: "medium",
71
+ label: ""
72
+ }), /*#__PURE__*/React.createElement(Text, {
73
+ color: "color.text.subtle"
74
+ }, formatMessage(messages.removeHighlight)))));
75
+ } else if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
59
76
  return /*#__PURE__*/React.createElement("div", {
60
77
  className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
61
78
  }, /*#__PURE__*/React.createElement(Button, {
@@ -1,4 +1,4 @@
1
- /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./TextColorMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* TextMenuSection.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextMenuSection.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./TextMenuSection.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ColorAccessibilityMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ColorAccessibilityMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -1,4 +1,4 @@
1
- /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* RemoveColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./RemoveColorMenuItem.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -36,9 +36,11 @@ export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
36
36
  api.core.actions.execute(function (_ref2) {
37
37
  var _api$highlight;
38
38
  var tr = _ref2.tr;
39
- api.textColor.commands.changeColor(defaultColor, getInputMethodFromParentKeys(parents))({
40
- tr: tr
41
- });
39
+ if (!expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) || !fg('platform_editor_lovability_text_bg_color_patch_2')) {
40
+ api.textColor.commands.changeColor(defaultColor, getInputMethodFromParentKeys(parents))({
41
+ tr: tr
42
+ });
43
+ }
42
44
  (_api$highlight = api.highlight) === null || _api$highlight === void 0 || _api$highlight.commands.changeColor({
43
45
  color: REMOVE_HIGHLIGHT_COLOR,
44
46
  inputMethod: getInputMethodFromParentKeys(parents)
@@ -52,7 +54,22 @@ export var RemoveColorMenuItem = function RemoveColorMenuItem(_ref) {
52
54
  }
53
55
  };
54
56
  if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
55
- if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
57
+ if (fg('platform_editor_lovability_text_bg_color_patch_2')) {
58
+ return /*#__PURE__*/React.createElement("div", {
59
+ className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
60
+ }, /*#__PURE__*/React.createElement(Button, {
61
+ shouldFitContainer: true,
62
+ appearance: "subtle",
63
+ onClick: onClick
64
+ }, /*#__PURE__*/React.createElement("span", {
65
+ className: ax([styles.iconContainer])
66
+ }, /*#__PURE__*/React.createElement(ColourNoneIcon, {
67
+ size: "medium",
68
+ label: ""
69
+ }), /*#__PURE__*/React.createElement(Text, {
70
+ color: "color.text.subtle"
71
+ }, formatMessage(messages.removeHighlight)))));
72
+ } else if (fg('platform_editor_lovability_text_bg_color_patch_1')) {
56
73
  return /*#__PURE__*/React.createElement("div", {
57
74
  className: ax([styles.removeColorButton, styles.removeColorButtonPatch])
58
75
  }, /*#__PURE__*/React.createElement(Button, {
@@ -1,4 +1,4 @@
1
- /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextColorMenuItem.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./TextColorMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* TextMenuSection.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* TextMenuSection.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./TextMenuSection.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "12.4.0",
3
+ "version": "12.4.2",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,10 +21,10 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^56.2.0",
25
- "@atlaskit/button": "^24.3.0",
24
+ "@atlaskit/adf-schema": "^56.4.0",
25
+ "@atlaskit/button": "^25.0.0",
26
26
  "@atlaskit/css": "^1.0.0",
27
- "@atlaskit/editor-palette": "^3.2.0",
27
+ "@atlaskit/editor-palette": "^3.4.0",
28
28
  "@atlaskit/editor-plugin-analytics": "^12.1.0",
29
29
  "@atlaskit/editor-plugin-highlight": "^12.2.0",
30
30
  "@atlaskit/editor-plugin-interaction": "^23.1.0",
@@ -41,13 +41,13 @@
41
41
  "@atlaskit/platform-feature-flags": "^2.1.0",
42
42
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
43
43
  "@atlaskit/primitives": "^22.2.0",
44
- "@atlaskit/tmp-editor-statsig": "^135.7.0",
44
+ "@atlaskit/tmp-editor-statsig": "^135.11.0",
45
45
  "@atlaskit/tokens": "^16.3.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@emotion/react": "^11.7.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^116.45.0",
50
+ "@atlaskit/editor-common": "^116.48.0",
51
51
  "react": "^18.2.0 || ^19.2.0",
52
52
  "react-dom": "^18.2.0 || ^19.2.0",
53
53
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -102,6 +102,9 @@
102
102
  },
103
103
  "platform_editor_lovability_text_bg_color_patch_1": {
104
104
  "type": "boolean"
105
+ },
106
+ "platform_editor_lovability_text_bg_color_patch_2": {
107
+ "type": "boolean"
105
108
  }
106
109
  }
107
110
  }