@atlaskit/editor-plugin-highlight 4.0.2 → 4.0.4
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 +16 -0
- package/dist/cjs/highlightPlugin.js +3 -2
- package/dist/cjs/ui/HighlightColorMenuItem.js +7 -2
- package/dist/es2019/highlightPlugin.js +3 -2
- package/dist/es2019/ui/HighlightColorMenuItem.js +7 -2
- package/dist/esm/highlightPlugin.js +3 -2
- package/dist/esm/ui/HighlightColorMenuItem.js +7 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 4.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`555ac8f256674`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/555ac8f256674) -
|
|
8
|
+
Update menu item icon size to small, tweak paddings and font styles
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
|
|
16
|
+
replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.0.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -8,7 +8,6 @@ exports.highlightPlugin = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _changeColor = require("./editor-commands/change-color");
|
|
14
13
|
var _keymap = require("./pm-plugins/keymap");
|
|
@@ -21,7 +20,9 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
21
20
|
var api = _ref.api,
|
|
22
21
|
options = _ref.config;
|
|
23
22
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
24
|
-
var isToolbarAifcEnabled = (0,
|
|
23
|
+
var isToolbarAifcEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
24
|
+
exposure: true
|
|
25
|
+
});
|
|
25
26
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
26
27
|
var popupsMountPoint = _ref2.popupsMountPoint,
|
|
27
28
|
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
@@ -20,6 +20,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
20
20
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
21
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
22
22
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
23
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
23
24
|
var _checkMarkEditorDone = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-mark--editor-done"));
|
|
24
25
|
var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
|
|
25
26
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -91,7 +92,9 @@ function HighlightColorMenuItem(_ref2) {
|
|
|
91
92
|
return /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
92
93
|
xcss: styles.container,
|
|
93
94
|
testId: "highlight-color-menu-item"
|
|
94
|
-
}, /*#__PURE__*/React.createElement(
|
|
95
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(_heading.default, {
|
|
96
|
+
size: "xxsmall"
|
|
97
|
+
}, formatMessage(_messages.highlightMessages.highlight)) : /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
95
98
|
weight: "bold"
|
|
96
99
|
}, formatMessage(_messages.highlightMessages.highlight)), /*#__PURE__*/React.createElement(_editorToolbar.ColorPalette, {
|
|
97
100
|
onClick: function onClick(color) {
|
|
@@ -110,5 +113,7 @@ function HighlightColorMenuItem(_ref2) {
|
|
|
110
113
|
onClick: function onClick() {
|
|
111
114
|
return handleHighlightColorChange(_uiColor.REMOVE_HIGHLIGHT_COLOR);
|
|
112
115
|
}
|
|
113
|
-
},
|
|
116
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
117
|
+
weight: "medium"
|
|
118
|
+
}, "Remove highlight") : 'Remove highlight')));
|
|
114
119
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { changeColor } from './editor-commands/change-color';
|
|
7
6
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -15,7 +14,9 @@ export const highlightPlugin = ({
|
|
|
15
14
|
}) => {
|
|
16
15
|
var _api$analytics;
|
|
17
16
|
const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
18
|
-
const isToolbarAifcEnabled =
|
|
17
|
+
const isToolbarAifcEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
18
|
+
exposure: true
|
|
19
|
+
});
|
|
19
20
|
const primaryToolbarComponent = ({
|
|
20
21
|
popupsMountPoint,
|
|
21
22
|
popupsBoundariesElement,
|
|
@@ -11,6 +11,7 @@ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPaletteNext } from '@atlaskit/edi
|
|
|
11
11
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
12
12
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
13
13
|
import { ColorPalette, TextColorIcon, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
14
|
+
import Heading from '@atlaskit/heading';
|
|
14
15
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
15
16
|
import Icon from '@atlaskit/icon/core/text-style';
|
|
16
17
|
import { Stack, Text, Box } from '@atlaskit/primitives/compiled';
|
|
@@ -77,7 +78,9 @@ export function HighlightColorMenuItem({
|
|
|
77
78
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
78
79
|
xcss: styles.container,
|
|
79
80
|
testId: "highlight-color-menu-item"
|
|
80
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Heading, {
|
|
82
|
+
size: "xxsmall"
|
|
83
|
+
}, formatMessage(messages.highlight)) : /*#__PURE__*/React.createElement(Text, {
|
|
81
84
|
weight: "bold"
|
|
82
85
|
}, formatMessage(messages.highlight)), /*#__PURE__*/React.createElement(ColorPalette, {
|
|
83
86
|
onClick: color => {
|
|
@@ -94,5 +97,7 @@ export function HighlightColorMenuItem({
|
|
|
94
97
|
shouldFitContainer: true,
|
|
95
98
|
appearance: "subtle",
|
|
96
99
|
onClick: () => handleHighlightColorChange(REMOVE_HIGHLIGHT_COLOR)
|
|
97
|
-
},
|
|
100
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Text, {
|
|
101
|
+
weight: "medium"
|
|
102
|
+
}, "Remove highlight") : 'Remove highlight')));
|
|
98
103
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { changeColor } from './editor-commands/change-color';
|
|
7
6
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -14,7 +13,9 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
14
13
|
var api = _ref.api,
|
|
15
14
|
options = _ref.config;
|
|
16
15
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
17
|
-
var isToolbarAifcEnabled =
|
|
16
|
+
var isToolbarAifcEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
17
|
+
exposure: true
|
|
18
|
+
});
|
|
18
19
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
19
20
|
var popupsMountPoint = _ref2.popupsMountPoint,
|
|
20
21
|
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
@@ -14,6 +14,7 @@ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPaletteNext } from '@atlaskit/edi
|
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
16
16
|
import { ColorPalette, TextColorIcon, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
17
|
+
import Heading from '@atlaskit/heading';
|
|
17
18
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
18
19
|
import Icon from '@atlaskit/icon/core/text-style';
|
|
19
20
|
import { Stack, Text, Box } from '@atlaskit/primitives/compiled';
|
|
@@ -82,7 +83,9 @@ export function HighlightColorMenuItem(_ref2) {
|
|
|
82
83
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
83
84
|
xcss: styles.container,
|
|
84
85
|
testId: "highlight-color-menu-item"
|
|
85
|
-
}, /*#__PURE__*/React.createElement(
|
|
86
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Heading, {
|
|
87
|
+
size: "xxsmall"
|
|
88
|
+
}, formatMessage(messages.highlight)) : /*#__PURE__*/React.createElement(Text, {
|
|
86
89
|
weight: "bold"
|
|
87
90
|
}, formatMessage(messages.highlight)), /*#__PURE__*/React.createElement(ColorPalette, {
|
|
88
91
|
onClick: function onClick(color) {
|
|
@@ -101,5 +104,7 @@ export function HighlightColorMenuItem(_ref2) {
|
|
|
101
104
|
onClick: function onClick() {
|
|
102
105
|
return handleHighlightColorChange(REMOVE_HIGHLIGHT_COLOR);
|
|
103
106
|
}
|
|
104
|
-
},
|
|
107
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Text, {
|
|
108
|
+
weight: "medium"
|
|
109
|
+
}, "Remove highlight") : 'Remove highlight')));
|
|
105
110
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,16 +46,17 @@
|
|
|
46
46
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
47
47
|
"@atlaskit/editor-toolbar": "^0.8.0",
|
|
48
48
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
49
|
+
"@atlaskit/heading": "^5.2.0",
|
|
49
50
|
"@atlaskit/icon": "^28.1.0",
|
|
50
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
52
|
"@atlaskit/primitives": "^14.13.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
53
54
|
"@atlaskit/tokens": "^6.2.0",
|
|
54
55
|
"@babel/runtime": "^7.0.0",
|
|
55
56
|
"@emotion/react": "^11.7.1"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^108.
|
|
59
|
+
"@atlaskit/editor-common": "^108.5.0",
|
|
59
60
|
"react": "^18.2.0",
|
|
60
61
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
61
62
|
},
|