@atlaskit/editor-plugin-text-color 12.4.1 → 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,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 12.4.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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
|
-
|
|
49
|
-
|
|
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)('
|
|
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, {
|
|
@@ -39,9 +39,11 @@ export const RemoveColorMenuItem = ({
|
|
|
39
39
|
tr
|
|
40
40
|
}) => {
|
|
41
41
|
var _api$highlight;
|
|
42
|
-
|
|
43
|
-
|
|
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('
|
|
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, {
|
|
@@ -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
|
-
|
|
40
|
-
|
|
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('
|
|
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, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "12.4.
|
|
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",
|
|
@@ -41,7 +41,7 @@
|
|
|
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.
|
|
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"
|
|
@@ -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
|
}
|