@atlaskit/editor-plugin-floating-toolbar 1.9.1 → 1.10.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 +26 -0
- package/dist/cjs/plugin.js +4 -2
- package/dist/cjs/ui/Dropdown.js +5 -5
- package/dist/cjs/ui/SimpleModal.js +4 -1
- package/dist/cjs/ui/Toolbar.js +4 -0
- package/dist/es2019/plugin.js +3 -2
- package/dist/es2019/ui/Dropdown.js +5 -5
- package/dist/es2019/ui/SimpleModal.js +4 -1
- package/dist/es2019/ui/Toolbar.js +4 -0
- package/dist/esm/plugin.js +4 -2
- package/dist/esm/ui/Dropdown.js +5 -5
- package/dist/esm/ui/SimpleModal.js +4 -1
- package/dist/esm/ui/Toolbar.js +4 -0
- package/dist/types/ui/Dropdown.d.ts +1 -0
- package/dist/types-ts4.5/ui/Dropdown.d.ts +1 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3ac0ae73c0d52`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3ac0ae73c0d52) -
|
|
8
|
+
[ED-24499] Add Turn into dropdown button to text selection toolbar for
|
|
9
|
+
platform_editor_basic_text_transformations experiment. This button will be used to provide options
|
|
10
|
+
to transform selected texts/inline nodes into other elements (e.g. expand) containing the content.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#126418](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126418)
|
|
15
|
+
[`dc10688cd20b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dc10688cd20b6) -
|
|
16
|
+
[ux] Migrate typography with new ADS token and primitive
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 1.9.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#125082](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/125082)
|
|
24
|
+
[`ba605ab4da0e1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba605ab4da0e1) -
|
|
25
|
+
[ED-23977] This change cleans up the use of the feature flag
|
|
26
|
+
'platform.editor.a11y-main-toolbar-navigation_osrty'.
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 1.9.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -239,7 +239,9 @@ function ContentComponent(_ref5) {
|
|
|
239
239
|
} : _config$absoluteOffse,
|
|
240
240
|
focusTrap = config.focusTrap,
|
|
241
241
|
_config$mediaAssistiv = config.mediaAssistiveMessage,
|
|
242
|
-
mediaAssistiveMessage = _config$mediaAssistiv === void 0 ? '' : _config$mediaAssistiv
|
|
242
|
+
mediaAssistiveMessage = _config$mediaAssistiv === void 0 ? '' : _config$mediaAssistiv,
|
|
243
|
+
_config$stick = config.stick,
|
|
244
|
+
stick = _config$stick === void 0 ? true : _config$stick;
|
|
243
245
|
var targetRef = getDomRef(editorView, dispatchAnalyticsEvent);
|
|
244
246
|
var isEditorDisabled = editorDisabledState && editorDisabledState.editorDisabled;
|
|
245
247
|
var isInViewMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
@@ -290,7 +292,7 @@ function ContentComponent(_ref5) {
|
|
|
290
292
|
fitWidth: width,
|
|
291
293
|
absoluteOffset: absoluteOffset,
|
|
292
294
|
alignX: align,
|
|
293
|
-
stick:
|
|
295
|
+
stick: stick,
|
|
294
296
|
zIndex: zIndex,
|
|
295
297
|
mountTo: popupsMountPoint,
|
|
296
298
|
boundariesElement: popupsBoundariesElement,
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -18,7 +18,6 @@ var _react2 = require("@emotion/react");
|
|
|
18
18
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
19
19
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
20
20
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _DropdownMenu = _interopRequireWildcard(require("./DropdownMenu"));
|
|
23
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -126,6 +125,7 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
126
125
|
var _this$props2 = this.props,
|
|
127
126
|
title = _this$props2.title,
|
|
128
127
|
icon = _this$props2.icon,
|
|
128
|
+
iconBefore = _this$props2.iconBefore,
|
|
129
129
|
options = _this$props2.options,
|
|
130
130
|
dispatchCommand = _this$props2.dispatchCommand,
|
|
131
131
|
mountPoint = _this$props2.mountPoint,
|
|
@@ -161,6 +161,7 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
161
161
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
162
162
|
label: "Expand dropdown menu"
|
|
163
163
|
})),
|
|
164
|
+
icon: iconBefore,
|
|
164
165
|
onClick: this.toggleOpen,
|
|
165
166
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
166
167
|
selected: isOpen,
|
|
@@ -207,10 +208,9 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
207
208
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
208
209
|
}
|
|
209
210
|
|
|
210
|
-
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
(0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
211
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
212
|
+
// we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
213
|
+
if (this.props.mountPoint) {
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
216
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
11
11
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
|
+
var _primitives = require("@atlaskit/primitives");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
16
|
var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
@@ -26,7 +27,9 @@ var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
|
26
27
|
testId: testId
|
|
27
28
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
28
29
|
appearance: "warning"
|
|
29
|
-
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(
|
|
30
|
+
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
31
|
+
as: "p"
|
|
32
|
+
}, options === null || options === void 0 ? void 0 : options.message)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
30
33
|
appearance: "default",
|
|
31
34
|
onClick: onClose,
|
|
32
35
|
testId: testId ? "".concat(testId, "-cancel-button") : undefined
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -157,12 +157,16 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
157
157
|
}
|
|
158
158
|
case 'dropdown':
|
|
159
159
|
var DropdownIcon = item.icon;
|
|
160
|
+
var BeforeIcon = item.iconBefore;
|
|
160
161
|
return (0, _react2.jsx)(_Dropdown.default, {
|
|
161
162
|
key: idx,
|
|
162
163
|
title: item.title,
|
|
163
164
|
icon: DropdownIcon && (0, _react2.jsx)(DropdownIcon, {
|
|
164
165
|
label: item.title
|
|
165
166
|
}),
|
|
167
|
+
iconBefore: BeforeIcon && (0, _react2.jsx)(BeforeIcon, {
|
|
168
|
+
label: ""
|
|
169
|
+
}),
|
|
166
170
|
dispatchCommand: dispatchCommand,
|
|
167
171
|
options: item.options,
|
|
168
172
|
disabled: item.disabled,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -227,7 +227,8 @@ export function ContentComponent({
|
|
|
227
227
|
bottom: 0
|
|
228
228
|
},
|
|
229
229
|
focusTrap,
|
|
230
|
-
mediaAssistiveMessage = ''
|
|
230
|
+
mediaAssistiveMessage = '',
|
|
231
|
+
stick = true
|
|
231
232
|
} = config;
|
|
232
233
|
const targetRef = getDomRef(editorView, dispatchAnalyticsEvent);
|
|
233
234
|
const isEditorDisabled = editorDisabledState && editorDisabledState.editorDisabled;
|
|
@@ -276,7 +277,7 @@ export function ContentComponent({
|
|
|
276
277
|
fitWidth: width,
|
|
277
278
|
absoluteOffset: absoluteOffset,
|
|
278
279
|
alignX: align,
|
|
279
|
-
stick:
|
|
280
|
+
stick: stick,
|
|
280
281
|
zIndex: zIndex,
|
|
281
282
|
mountTo: popupsMountPoint,
|
|
282
283
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -11,7 +11,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
16
15
|
|
|
17
16
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -104,6 +103,7 @@ export default class Dropdown extends Component {
|
|
|
104
103
|
const {
|
|
105
104
|
title,
|
|
106
105
|
icon,
|
|
106
|
+
iconBefore,
|
|
107
107
|
options,
|
|
108
108
|
dispatchCommand,
|
|
109
109
|
mountPoint,
|
|
@@ -140,6 +140,7 @@ export default class Dropdown extends Component {
|
|
|
140
140
|
}, jsx(ExpandIcon, {
|
|
141
141
|
label: "Expand dropdown menu"
|
|
142
142
|
})),
|
|
143
|
+
icon: iconBefore,
|
|
143
144
|
onClick: this.toggleOpen,
|
|
144
145
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
145
146
|
selected: isOpen,
|
|
@@ -184,10 +185,9 @@ export default class Dropdown extends Component {
|
|
|
184
185
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
185
186
|
}
|
|
186
187
|
|
|
187
|
-
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
getBooleanFF('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
188
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
189
|
+
// we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
190
|
+
if (this.props.mountPoint) {
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Button from '@atlaskit/button/new';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
4
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
5
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
6
|
export const SimpleModal = props => {
|
|
6
7
|
const {
|
|
7
8
|
onConfirm,
|
|
@@ -20,7 +21,9 @@ export const SimpleModal = props => {
|
|
|
20
21
|
testId: testId
|
|
21
22
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
22
23
|
appearance: "warning"
|
|
23
|
-
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(
|
|
24
|
+
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
|
25
|
+
as: "p"
|
|
26
|
+
}, options === null || options === void 0 ? void 0 : options.message)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
24
27
|
appearance: "default",
|
|
25
28
|
onClick: onClose,
|
|
26
29
|
testId: testId ? `${testId}-cancel-button` : undefined
|
|
@@ -133,12 +133,16 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
133
133
|
}
|
|
134
134
|
case 'dropdown':
|
|
135
135
|
const DropdownIcon = item.icon;
|
|
136
|
+
const BeforeIcon = item.iconBefore;
|
|
136
137
|
return jsx(Dropdown, {
|
|
137
138
|
key: idx,
|
|
138
139
|
title: item.title,
|
|
139
140
|
icon: DropdownIcon && jsx(DropdownIcon, {
|
|
140
141
|
label: item.title
|
|
141
142
|
}),
|
|
143
|
+
iconBefore: BeforeIcon && jsx(BeforeIcon, {
|
|
144
|
+
label: ""
|
|
145
|
+
}),
|
|
142
146
|
dispatchCommand: dispatchCommand,
|
|
143
147
|
options: item.options,
|
|
144
148
|
disabled: item.disabled,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -229,7 +229,9 @@ export function ContentComponent(_ref5) {
|
|
|
229
229
|
} : _config$absoluteOffse,
|
|
230
230
|
focusTrap = config.focusTrap,
|
|
231
231
|
_config$mediaAssistiv = config.mediaAssistiveMessage,
|
|
232
|
-
mediaAssistiveMessage = _config$mediaAssistiv === void 0 ? '' : _config$mediaAssistiv
|
|
232
|
+
mediaAssistiveMessage = _config$mediaAssistiv === void 0 ? '' : _config$mediaAssistiv,
|
|
233
|
+
_config$stick = config.stick,
|
|
234
|
+
stick = _config$stick === void 0 ? true : _config$stick;
|
|
233
235
|
var targetRef = getDomRef(editorView, dispatchAnalyticsEvent);
|
|
234
236
|
var isEditorDisabled = editorDisabledState && editorDisabledState.editorDisabled;
|
|
235
237
|
var isInViewMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
@@ -280,7 +282,7 @@ export function ContentComponent(_ref5) {
|
|
|
280
282
|
fitWidth: width,
|
|
281
283
|
absoluteOffset: absoluteOffset,
|
|
282
284
|
alignX: align,
|
|
283
|
-
stick:
|
|
285
|
+
stick: stick,
|
|
284
286
|
zIndex: zIndex,
|
|
285
287
|
mountTo: popupsMountPoint,
|
|
286
288
|
boundariesElement: popupsBoundariesElement,
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -21,7 +21,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
21
21
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
22
22
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
23
23
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
24
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
25
24
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
26
25
|
|
|
27
26
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -121,6 +120,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
121
120
|
var _this$props2 = this.props,
|
|
122
121
|
title = _this$props2.title,
|
|
123
122
|
icon = _this$props2.icon,
|
|
123
|
+
iconBefore = _this$props2.iconBefore,
|
|
124
124
|
options = _this$props2.options,
|
|
125
125
|
dispatchCommand = _this$props2.dispatchCommand,
|
|
126
126
|
mountPoint = _this$props2.mountPoint,
|
|
@@ -156,6 +156,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
156
156
|
}, jsx(ExpandIcon, {
|
|
157
157
|
label: "Expand dropdown menu"
|
|
158
158
|
})),
|
|
159
|
+
icon: iconBefore,
|
|
159
160
|
onClick: this.toggleOpen,
|
|
160
161
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
161
162
|
selected: isOpen,
|
|
@@ -202,10 +203,9 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
202
203
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
getBooleanFF('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
206
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element,
|
|
207
|
+
// we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
208
|
+
if (this.props.mountPoint) {
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Button from '@atlaskit/button/new';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
4
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
5
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
6
|
export var SimpleModal = function SimpleModal(props) {
|
|
6
7
|
var onConfirm = props.onConfirm,
|
|
7
8
|
onClose = props.onClose,
|
|
@@ -16,7 +17,9 @@ export var SimpleModal = function SimpleModal(props) {
|
|
|
16
17
|
testId: testId
|
|
17
18
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
18
19
|
appearance: "warning"
|
|
19
|
-
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(
|
|
20
|
+
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
|
21
|
+
as: "p"
|
|
22
|
+
}, options === null || options === void 0 ? void 0 : options.message)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
20
23
|
appearance: "default",
|
|
21
24
|
onClick: onClose,
|
|
22
25
|
testId: testId ? "".concat(testId, "-cancel-button") : undefined
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -150,12 +150,16 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
150
150
|
}
|
|
151
151
|
case 'dropdown':
|
|
152
152
|
var DropdownIcon = item.icon;
|
|
153
|
+
var BeforeIcon = item.iconBefore;
|
|
153
154
|
return jsx(Dropdown, {
|
|
154
155
|
key: idx,
|
|
155
156
|
title: item.title,
|
|
156
157
|
icon: DropdownIcon && jsx(DropdownIcon, {
|
|
157
158
|
label: item.title
|
|
158
159
|
}),
|
|
160
|
+
iconBefore: BeforeIcon && jsx(BeforeIcon, {
|
|
161
|
+
label: ""
|
|
162
|
+
}),
|
|
159
163
|
dispatchCommand: dispatchCommand,
|
|
160
164
|
options: item.options,
|
|
161
165
|
disabled: item.disabled,
|
|
@@ -11,6 +11,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
title: string;
|
|
13
13
|
icon?: ReactElement<any>;
|
|
14
|
+
iconBefore?: ReactElement<any>;
|
|
14
15
|
hideExpandIcon?: boolean;
|
|
15
16
|
options: DropdownOptions<Function>;
|
|
16
17
|
dispatchCommand: (command: Function) => void;
|
|
@@ -11,6 +11,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
title: string;
|
|
13
13
|
icon?: ReactElement<any>;
|
|
14
|
+
iconBefore?: ReactElement<any>;
|
|
14
15
|
hideExpandIcon?: boolean;
|
|
15
16
|
options: DropdownOptions<Function>;
|
|
16
17
|
dispatchCommand: (command: Function) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/adf-utils": "^19.6.0",
|
|
28
28
|
"@atlaskit/button": "^19.1.0",
|
|
29
|
-
"@atlaskit/checkbox": "^13.
|
|
30
|
-
"@atlaskit/editor-common": "^87.
|
|
29
|
+
"@atlaskit/checkbox": "^13.6.0",
|
|
30
|
+
"@atlaskit/editor-common": "^87.4.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.6.0",
|
|
32
|
-
"@atlaskit/editor-plugin-block-controls": "^1.
|
|
32
|
+
"@atlaskit/editor-plugin-block-controls": "^1.10.0",
|
|
33
33
|
"@atlaskit/editor-plugin-context-panel": "^1.2.0",
|
|
34
34
|
"@atlaskit/editor-plugin-copy-button": "^1.2.0",
|
|
35
35
|
"@atlaskit/editor-plugin-decorations": "^1.2.0",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-extension": "^1.12.0",
|
|
39
39
|
"@atlaskit/editor-plugin-table": "^7.24.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
41
|
-
"@atlaskit/emoji": "^67.
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
43
|
-
"@atlaskit/menu": "^2.
|
|
41
|
+
"@atlaskit/emoji": "^67.7.0",
|
|
42
|
+
"@atlaskit/icon": "^22.10.0",
|
|
43
|
+
"@atlaskit/menu": "^2.9.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
45
|
-
"@atlaskit/
|
|
45
|
+
"@atlaskit/primitives": "^11.1.0",
|
|
46
46
|
"@atlaskit/select": "^17.11.0",
|
|
47
47
|
"@atlaskit/theme": "^12.11.0",
|
|
48
|
-
"@atlaskit/tokens": "^1.
|
|
48
|
+
"@atlaskit/tokens": "^1.57.0",
|
|
49
49
|
"@atlaskit/tooltip": "^18.5.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|