@atlaskit/editor-plugin-floating-toolbar 3.3.5 → 3.3.6
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 +9 -0
- package/dist/cjs/ui/Toolbar.js +11 -9
- package/dist/es2019/ui/Toolbar.js +11 -9
- package/dist/esm/ui/Toolbar.js +11 -9
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#135586](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135586)
|
|
8
|
+
[`3aeba66081612`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3aeba66081612) -
|
|
9
|
+
ED-26593 Add missing i18n for editor control
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.3.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -19,6 +19,7 @@ var _react2 = require("@emotion/react");
|
|
|
19
19
|
var _reactIntlNext = require("react-intl-next");
|
|
20
20
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
21
21
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
22
|
+
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
22
23
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
23
24
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
24
25
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
@@ -87,7 +88,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
87
88
|
node = _ref.node,
|
|
88
89
|
setDisableScroll = _ref.setDisableScroll,
|
|
89
90
|
mountRef = _ref.mountRef,
|
|
90
|
-
api = _ref.api
|
|
91
|
+
api = _ref.api,
|
|
92
|
+
intl = _ref.intl;
|
|
91
93
|
var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
|
|
92
94
|
var renderItem = function renderItem(item, idx) {
|
|
93
95
|
var _api$contextPanel, _api$extension;
|
|
@@ -125,13 +127,15 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
125
127
|
icon: item.icon ? item.iconFallback ? (0, _react2.jsx)(ButtonIcon, {
|
|
126
128
|
color: getIconColor(item.disabled, item.selected),
|
|
127
129
|
spacing: "spacious",
|
|
128
|
-
label: item.title,
|
|
130
|
+
label: (0, _platformFeatureFlags.fg)('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
129
131
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
130
132
|
LEGACY_primaryColor: "currentColor",
|
|
131
|
-
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)"
|
|
133
|
+
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)",
|
|
134
|
+
"aria-hidden": (0, _platformFeatureFlags.fg)('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
132
135
|
}) : (0, _react2.jsx)(ButtonIcon, {
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
spacing: "spacious",
|
|
137
|
+
label: (0, _platformFeatureFlags.fg)('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
138
|
+
"aria-hidden": (0, _platformFeatureFlags.fg)('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
135
139
|
}) : undefined,
|
|
136
140
|
iconAfter: item.iconAfter ? (0, _react2.jsx)(item.iconAfter, {
|
|
137
141
|
label: ""
|
|
@@ -184,10 +188,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
184
188
|
}
|
|
185
189
|
case 'overflow-dropdown':
|
|
186
190
|
return (0, _react2.jsx)(_Dropdown.default, {
|
|
187
|
-
key: idx
|
|
188
|
-
|
|
189
|
-
,
|
|
190
|
-
title: 'Show more items',
|
|
191
|
+
key: idx,
|
|
192
|
+
title: intl.formatMessage(_messages.default.viewMore),
|
|
191
193
|
icon: (0, _react2.jsx)(_showMoreHorizontal.default, {
|
|
192
194
|
label: "",
|
|
193
195
|
spacing: "spacious"
|
|
@@ -12,6 +12,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
12
12
|
import { injectIntl } from 'react-intl-next';
|
|
13
13
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
14
14
|
import { areSameItems, messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
15
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
15
16
|
import { Announcer, FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
16
17
|
import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
17
18
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -75,7 +76,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
75
76
|
node,
|
|
76
77
|
setDisableScroll,
|
|
77
78
|
mountRef,
|
|
78
|
-
api
|
|
79
|
+
api,
|
|
80
|
+
intl
|
|
79
81
|
}) => {
|
|
80
82
|
const emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
|
|
81
83
|
const renderItem = (item, idx) => {
|
|
@@ -114,13 +116,15 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
114
116
|
icon: item.icon ? item.iconFallback ? jsx(ButtonIcon, {
|
|
115
117
|
color: getIconColor(item.disabled, item.selected),
|
|
116
118
|
spacing: "spacious",
|
|
117
|
-
label: item.title,
|
|
119
|
+
label: fg('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
118
120
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
119
121
|
LEGACY_primaryColor: "currentColor",
|
|
120
|
-
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)"
|
|
122
|
+
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)",
|
|
123
|
+
"aria-hidden": fg('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
121
124
|
}) : jsx(ButtonIcon, {
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
spacing: "spacious",
|
|
126
|
+
label: fg('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
127
|
+
"aria-hidden": fg('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
124
128
|
}) : undefined,
|
|
125
129
|
iconAfter: item.iconAfter ? jsx(item.iconAfter, {
|
|
126
130
|
label: ""
|
|
@@ -161,10 +165,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
161
165
|
}
|
|
162
166
|
case 'overflow-dropdown':
|
|
163
167
|
return jsx(Dropdown, {
|
|
164
|
-
key: idx
|
|
165
|
-
|
|
166
|
-
,
|
|
167
|
-
title: 'Show more items',
|
|
168
|
+
key: idx,
|
|
169
|
+
title: intl.formatMessage(commonMessages.viewMore),
|
|
168
170
|
icon: jsx(ShowMoreHorizontalIcon, {
|
|
169
171
|
label: "",
|
|
170
172
|
spacing: "spacious"
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -19,6 +19,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
19
19
|
import { injectIntl } from 'react-intl-next';
|
|
20
20
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
21
21
|
import { areSameItems, messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
22
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
22
23
|
import { Announcer, FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
23
24
|
import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
24
25
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -80,7 +81,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
80
81
|
node = _ref.node,
|
|
81
82
|
setDisableScroll = _ref.setDisableScroll,
|
|
82
83
|
mountRef = _ref.mountRef,
|
|
83
|
-
api = _ref.api
|
|
84
|
+
api = _ref.api,
|
|
85
|
+
intl = _ref.intl;
|
|
84
86
|
var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
|
|
85
87
|
var renderItem = function renderItem(item, idx) {
|
|
86
88
|
var _api$contextPanel, _api$extension;
|
|
@@ -118,13 +120,15 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
118
120
|
icon: item.icon ? item.iconFallback ? jsx(ButtonIcon, {
|
|
119
121
|
color: getIconColor(item.disabled, item.selected),
|
|
120
122
|
spacing: "spacious",
|
|
121
|
-
label: item.title,
|
|
123
|
+
label: fg('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
122
124
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
123
125
|
LEGACY_primaryColor: "currentColor",
|
|
124
|
-
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)"
|
|
126
|
+
Legacy_secondaryColor: "var(--ds-surface, #FFFFFF)",
|
|
127
|
+
"aria-hidden": fg('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
125
128
|
}) : jsx(ButtonIcon, {
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
spacing: "spacious",
|
|
130
|
+
label: fg('editor_a11y_remove_redundant_wrap_icon_label') ? undefined : item.title,
|
|
131
|
+
"aria-hidden": fg('editor_a11y_remove_redundant_wrap_icon_label') ? true : false // Icon is described by the button for screen readers
|
|
128
132
|
}) : undefined,
|
|
129
133
|
iconAfter: item.iconAfter ? jsx(item.iconAfter, {
|
|
130
134
|
label: ""
|
|
@@ -177,10 +181,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
177
181
|
}
|
|
178
182
|
case 'overflow-dropdown':
|
|
179
183
|
return jsx(Dropdown, {
|
|
180
|
-
key: idx
|
|
181
|
-
|
|
182
|
-
,
|
|
183
|
-
title: 'Show more items',
|
|
184
|
+
key: idx,
|
|
185
|
+
title: intl.formatMessage(commonMessages.viewMore),
|
|
184
186
|
icon: jsx(ShowMoreHorizontalIcon, {
|
|
185
187
|
label: "",
|
|
186
188
|
spacing: "spacious"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.19.0",
|
|
29
29
|
"@atlaskit/button": "^23.0.0",
|
|
30
30
|
"@atlaskit/checkbox": "^17.0.0",
|
|
31
|
-
"@atlaskit/editor-common": "^102.
|
|
31
|
+
"@atlaskit/editor-common": "^102.18.0",
|
|
32
32
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-block-controls": "^3.8.0",
|
|
34
34
|
"@atlaskit/editor-plugin-context-panel": "^4.0.0",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-emoji": "^3.
|
|
39
|
+
"@atlaskit/editor-plugin-emoji": "^3.4.0",
|
|
40
40
|
"@atlaskit/editor-plugin-extension": "^5.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-table": "^10.5.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/emoji": "^69.0.0",
|
|
44
|
-
"@atlaskit/icon": "^25.
|
|
44
|
+
"@atlaskit/icon": "^25.5.0",
|
|
45
45
|
"@atlaskit/menu": "^3.2.0",
|
|
46
46
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/primitives": "^14.
|
|
48
|
+
"@atlaskit/primitives": "^14.3.0",
|
|
49
49
|
"@atlaskit/select": "^20.0.0",
|
|
50
50
|
"@atlaskit/theme": "^18.0.0",
|
|
51
51
|
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
52
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tokens": "^4.6.0",
|
|
53
53
|
"@atlaskit/tooltip": "^20.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
@@ -126,6 +126,9 @@
|
|
|
126
126
|
"forge-ui-macro-autoconvert": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
|
+
"editor_a11y_remove_redundant_wrap_icon_label": {
|
|
130
|
+
"type": "boolean"
|
|
131
|
+
},
|
|
129
132
|
"platform_editor_fix_floating_toolbar_scrollbar": {
|
|
130
133
|
"type": "boolean"
|
|
131
134
|
},
|