@atlaskit/editor-plugin-text-color 6.2.2 → 6.2.3
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 +10 -0
- package/dist/cjs/textColorPlugin.js +2 -4
- package/dist/cjs/ui/ToolbarTextColor/index.js +2 -2
- package/dist/es2019/textColorPlugin.js +2 -4
- package/dist/es2019/ui/ToolbarTextColor/index.js +2 -2
- package/dist/esm/textColorPlugin.js +2 -4
- package/dist/esm/ui/ToolbarTextColor/index.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 6.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef001bf65d48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef001bf65d48f) -
|
|
8
|
+
Remove usage of `platform_editor_toolbar_aifc` inside editor packages - instead rely on checking
|
|
9
|
+
for new toolbar plugin option, make `enableNewToolbarExperience` mandatory for consumers to opt in
|
|
10
|
+
to new toolbar experience
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 6.2.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -27,9 +27,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
27
27
|
var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
28
28
|
var textColorConfig = _ref.config,
|
|
29
29
|
api = _ref.api;
|
|
30
|
-
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar)
|
|
31
|
-
exposure: true
|
|
32
|
-
});
|
|
30
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
33
31
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
34
32
|
var editorView = _ref2.editorView,
|
|
35
33
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
@@ -73,7 +71,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
73
71
|
}];
|
|
74
72
|
},
|
|
75
73
|
pmPlugins: function pmPlugins() {
|
|
76
|
-
return
|
|
74
|
+
return isToolbarAIFCEnabled && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
77
75
|
name: 'textColor',
|
|
78
76
|
plugin: function plugin(_ref3) {
|
|
79
77
|
var dispatch = _ref3.dispatch;
|
|
@@ -169,7 +169,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
169
169
|
var reducedSpacing = this.props.toolbarType === _types.ToolbarType.FLOATING ? 'compact' : 'none';
|
|
170
170
|
return (0, _react2.jsx)("span", {
|
|
171
171
|
css:
|
|
172
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
172
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
173
173
|
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? [_styles.wrapperStyle, addMarginToWrapper] : _styles.wrapperStyle
|
|
174
174
|
}, (0, _react2.jsx)(_uiMenu.DropdownContainer, {
|
|
175
175
|
mountTo: popupsMountPoint,
|
|
@@ -202,7 +202,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
202
202
|
ref: this.toolbarItemRef,
|
|
203
203
|
iconBefore: (0, _react2.jsx)("div", {
|
|
204
204
|
css:
|
|
205
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
205
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
206
206
|
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ?
|
|
207
207
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
208
208
|
_styles.triggerWrapperStylesWithPadding :
|
|
@@ -21,9 +21,7 @@ export const textColorPlugin = ({
|
|
|
21
21
|
config: textColorConfig,
|
|
22
22
|
api
|
|
23
23
|
}) => {
|
|
24
|
-
const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar)
|
|
25
|
-
exposure: true
|
|
26
|
-
});
|
|
24
|
+
const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
27
25
|
const primaryToolbarComponent = ({
|
|
28
26
|
editorView,
|
|
29
27
|
popupsMountPoint,
|
|
@@ -68,7 +66,7 @@ export const textColorPlugin = ({
|
|
|
68
66
|
}];
|
|
69
67
|
},
|
|
70
68
|
pmPlugins() {
|
|
71
|
-
return
|
|
69
|
+
return isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
72
70
|
name: 'textColor',
|
|
73
71
|
plugin: ({
|
|
74
72
|
dispatch
|
|
@@ -149,7 +149,7 @@ export class ToolbarTextColor extends React.Component {
|
|
|
149
149
|
const reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
|
|
150
150
|
return jsx("span", {
|
|
151
151
|
css:
|
|
152
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
152
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
153
153
|
fg('platform-visual-refresh-icons') ? [wrapperStyle, addMarginToWrapper] : wrapperStyle
|
|
154
154
|
}, jsx(Dropdown, {
|
|
155
155
|
mountTo: popupsMountPoint,
|
|
@@ -182,7 +182,7 @@ export class ToolbarTextColor extends React.Component {
|
|
|
182
182
|
ref: this.toolbarItemRef,
|
|
183
183
|
iconBefore: jsx("div", {
|
|
184
184
|
css:
|
|
185
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
185
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
186
186
|
fg('platform-visual-refresh-icons') ?
|
|
187
187
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
188
188
|
triggerWrapperStylesWithPadding :
|
|
@@ -20,9 +20,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
20
20
|
export var textColorPlugin = function textColorPlugin(_ref) {
|
|
21
21
|
var textColorConfig = _ref.config,
|
|
22
22
|
api = _ref.api;
|
|
23
|
-
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar)
|
|
24
|
-
exposure: true
|
|
25
|
-
});
|
|
23
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
|
|
26
24
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
27
25
|
var editorView = _ref2.editorView,
|
|
28
26
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
@@ -66,7 +64,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
66
64
|
}];
|
|
67
65
|
},
|
|
68
66
|
pmPlugins: function pmPlugins() {
|
|
69
|
-
return
|
|
67
|
+
return isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
70
68
|
name: 'textColor',
|
|
71
69
|
plugin: function plugin(_ref3) {
|
|
72
70
|
var dispatch = _ref3.dispatch;
|
|
@@ -165,7 +165,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
165
165
|
var reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
|
|
166
166
|
return jsx("span", {
|
|
167
167
|
css:
|
|
168
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
168
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
169
169
|
fg('platform-visual-refresh-icons') ? [wrapperStyle, addMarginToWrapper] : wrapperStyle
|
|
170
170
|
}, jsx(Dropdown, {
|
|
171
171
|
mountTo: popupsMountPoint,
|
|
@@ -198,7 +198,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
198
198
|
ref: this.toolbarItemRef,
|
|
199
199
|
iconBefore: jsx("div", {
|
|
200
200
|
css:
|
|
201
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
201
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
202
202
|
fg('platform-visual-refresh-icons') ?
|
|
203
203
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
204
204
|
triggerWrapperStylesWithPadding :
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^7.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^3.2.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^3.7.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.15.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^14.15.0",
|
|
50
50
|
"@atlaskit/theme": "^21.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
52
52
|
"@atlaskit/tokens": "^6.4.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1"
|