@atlaskit/editor-plugin-text-color 5.4.1 → 5.5.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,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 5.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`687c1b8fa7801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687c1b8fa7801) -
|
|
8
|
+
EDITOR-1566 bump adf-schema + update validator
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 5.4.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`23b126bae703a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/23b126bae703a) -
|
|
19
|
+
ED-29354 Text/highlight color toolbar item is not full disabled when cursor is in page title
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 5.4.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -30,6 +30,9 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
30
30
|
api = _ref.api;
|
|
31
31
|
var isHighlightPluginExisted = !!(api !== null && api !== void 0 && api.highlight);
|
|
32
32
|
var isTextColorDisabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.disabled');
|
|
33
|
+
var _useToolbarUI = (0, _editorToolbar.useToolbarUI)(),
|
|
34
|
+
isToolbarDisabled = _useToolbarUI.isDisabled;
|
|
35
|
+
var isDisabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_5', 'isEnabled', true) ? Boolean(isToolbarDisabled || isTextColorDisabled) : isTextColorDisabled;
|
|
33
36
|
var highlightColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'highlight.activeColor');
|
|
34
37
|
var textColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.color');
|
|
35
38
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
@@ -47,10 +50,10 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
47
50
|
iconColor: iconColor,
|
|
48
51
|
shouldRecommendSmallIcon: true,
|
|
49
52
|
size: 'small',
|
|
50
|
-
isDisabled:
|
|
53
|
+
isDisabled: isDisabled,
|
|
51
54
|
spacing: 'compact'
|
|
52
55
|
})),
|
|
53
|
-
isDisabled:
|
|
56
|
+
isDisabled: isDisabled,
|
|
54
57
|
testId: "text-color-highlight-menu",
|
|
55
58
|
hasSectionMargin: false
|
|
56
59
|
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -63,10 +66,10 @@ var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColor
|
|
|
63
66
|
iconColor: iconColor,
|
|
64
67
|
shouldRecommendSmallIcon: true,
|
|
65
68
|
size: 'small',
|
|
66
|
-
isDisabled:
|
|
69
|
+
isDisabled: isDisabled,
|
|
67
70
|
spacing: 'compact'
|
|
68
71
|
})),
|
|
69
|
-
isDisabled:
|
|
72
|
+
isDisabled: isDisabled,
|
|
70
73
|
testId: "text-color-highlight-menu",
|
|
71
74
|
hasSectionMargin: false
|
|
72
75
|
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
8
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
9
|
-
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor } from '@atlaskit/editor-toolbar';
|
|
9
|
+
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
10
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
const styles = {
|
|
@@ -24,6 +24,10 @@ export const TextColorHighlightMenu = ({
|
|
|
24
24
|
}) => {
|
|
25
25
|
const isHighlightPluginExisted = !!(api !== null && api !== void 0 && api.highlight);
|
|
26
26
|
const isTextColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
27
|
+
const {
|
|
28
|
+
isDisabled: isToolbarDisabled
|
|
29
|
+
} = useToolbarUI();
|
|
30
|
+
const isDisabled = expValEquals('platform_editor_toolbar_aifc_patch_5', 'isEnabled', true) ? Boolean(isToolbarDisabled || isTextColorDisabled) : isTextColorDisabled;
|
|
27
31
|
const highlightColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
28
32
|
const textColor = useSharedPluginStateSelector(api, 'textColor.color');
|
|
29
33
|
const {
|
|
@@ -42,10 +46,10 @@ export const TextColorHighlightMenu = ({
|
|
|
42
46
|
iconColor: iconColor,
|
|
43
47
|
shouldRecommendSmallIcon: true,
|
|
44
48
|
size: 'small',
|
|
45
|
-
isDisabled:
|
|
49
|
+
isDisabled: isDisabled,
|
|
46
50
|
spacing: 'compact'
|
|
47
51
|
})),
|
|
48
|
-
isDisabled:
|
|
52
|
+
isDisabled: isDisabled,
|
|
49
53
|
testId: "text-color-highlight-menu",
|
|
50
54
|
hasSectionMargin: false
|
|
51
55
|
}, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/React.createElement(Box, {
|
|
@@ -58,10 +62,10 @@ export const TextColorHighlightMenu = ({
|
|
|
58
62
|
iconColor: iconColor,
|
|
59
63
|
shouldRecommendSmallIcon: true,
|
|
60
64
|
size: 'small',
|
|
61
|
-
isDisabled:
|
|
65
|
+
isDisabled: isDisabled,
|
|
62
66
|
spacing: 'compact'
|
|
63
67
|
})),
|
|
64
|
-
isDisabled:
|
|
68
|
+
isDisabled: isDisabled,
|
|
65
69
|
testId: "text-color-highlight-menu",
|
|
66
70
|
hasSectionMargin: false
|
|
67
71
|
}, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/React.createElement(Box, {
|
|
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
8
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
9
|
-
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor } from '@atlaskit/editor-toolbar';
|
|
9
|
+
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, getContrastingBackgroundColor, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
10
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
var styles = {
|
|
@@ -23,6 +23,9 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
23
23
|
api = _ref.api;
|
|
24
24
|
var isHighlightPluginExisted = !!(api !== null && api !== void 0 && api.highlight);
|
|
25
25
|
var isTextColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
26
|
+
var _useToolbarUI = useToolbarUI(),
|
|
27
|
+
isToolbarDisabled = _useToolbarUI.isDisabled;
|
|
28
|
+
var isDisabled = expValEquals('platform_editor_toolbar_aifc_patch_5', 'isEnabled', true) ? Boolean(isToolbarDisabled || isTextColorDisabled) : isTextColorDisabled;
|
|
26
29
|
var highlightColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
27
30
|
var textColor = useSharedPluginStateSelector(api, 'textColor.color');
|
|
28
31
|
var _useIntl = useIntl(),
|
|
@@ -40,10 +43,10 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
40
43
|
iconColor: iconColor,
|
|
41
44
|
shouldRecommendSmallIcon: true,
|
|
42
45
|
size: 'small',
|
|
43
|
-
isDisabled:
|
|
46
|
+
isDisabled: isDisabled,
|
|
44
47
|
spacing: 'compact'
|
|
45
48
|
})),
|
|
46
|
-
isDisabled:
|
|
49
|
+
isDisabled: isDisabled,
|
|
47
50
|
testId: "text-color-highlight-menu",
|
|
48
51
|
hasSectionMargin: false
|
|
49
52
|
}, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/React.createElement(Box, {
|
|
@@ -56,10 +59,10 @@ export var TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
|
56
59
|
iconColor: iconColor,
|
|
57
60
|
shouldRecommendSmallIcon: true,
|
|
58
61
|
size: 'small',
|
|
59
|
-
isDisabled:
|
|
62
|
+
isDisabled: isDisabled,
|
|
60
63
|
spacing: 'compact'
|
|
61
64
|
})),
|
|
62
|
-
isDisabled:
|
|
65
|
+
isDisabled: isDisabled,
|
|
63
66
|
testId: "text-color-highlight-menu",
|
|
64
67
|
hasSectionMargin: false
|
|
65
68
|
}, expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? children : /*#__PURE__*/React.createElement(Box, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^51.
|
|
32
|
+
"@atlaskit/adf-schema": "^51.2.0",
|
|
33
33
|
"@atlaskit/button": "^23.4.0",
|
|
34
34
|
"@atlaskit/css": "^0.14.0",
|
|
35
35
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^5.
|
|
37
|
-
"@atlaskit/editor-plugin-highlight": "^5.
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^5.3.0",
|
|
37
|
+
"@atlaskit/editor-plugin-highlight": "^5.4.0",
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^6.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^6.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^2.1.0",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.9.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
46
|
"@atlaskit/heading": "^5.2.0",
|
|
47
|
-
"@atlaskit/icon": "^28.
|
|
47
|
+
"@atlaskit/icon": "^28.3.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/primitives": "^14.
|
|
49
|
+
"@atlaskit/primitives": "^14.15.0",
|
|
50
50
|
"@atlaskit/theme": "^21.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^12.30.0",
|
|
52
52
|
"@atlaskit/tokens": "^6.3.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^109.
|
|
57
|
+
"@atlaskit/editor-common": "^109.16.0",
|
|
58
58
|
"react": "^18.2.0",
|
|
59
59
|
"react-dom": "^18.2.0",
|
|
60
60
|
"react-intl-next": "npm:react-intl@^5.18.1"
|