@atlaskit/editor-plugin-floating-toolbar 1.16.3 → 1.18.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 +25 -0
- package/dist/cjs/ui/DropdownMenu.js +50 -0
- package/dist/cjs/ui/Toolbar.js +32 -0
- package/dist/es2019/ui/DropdownMenu.js +48 -0
- package/dist/es2019/ui/Toolbar.js +32 -0
- package/dist/esm/ui/DropdownMenu.js +50 -0
- package/dist/esm/ui/Toolbar.js +32 -0
- package/dist/types/ui/Dropdown.d.ts +2 -2
- package/dist/types/ui/DropdownMenu.d.ts +2 -2
- package/dist/types-ts4.5/ui/Dropdown.d.ts +2 -2
- package/dist/types-ts4.5/ui/DropdownMenu.d.ts +2 -2
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#113466](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113466)
|
|
8
|
+
[`756bb7e35a24d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/756bb7e35a24d) -
|
|
9
|
+
Add new FloatingToolbarOverflowDropdown item to floating toolbar config to support new editor
|
|
10
|
+
controls, add config in selection-toolbar plugin to add new button to text selection
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 1.17.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
|
|
21
|
+
[`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
|
|
22
|
+
Bumped editor-prosemirror version to 7.0.0
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 1.16.3
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
13
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
13
14
|
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
14
15
|
var _menu = require("@atlaskit/menu");
|
|
15
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -36,6 +37,10 @@ var spacerStyles = (0, _react2.css)({
|
|
|
36
37
|
flex: 1,
|
|
37
38
|
padding: "var(--ds-space-100, 8px)"
|
|
38
39
|
});
|
|
40
|
+
var separatorStyles = (0, _react2.css)({
|
|
41
|
+
background: "var(--ds-border, #091E4224)",
|
|
42
|
+
height: '1px'
|
|
43
|
+
});
|
|
39
44
|
|
|
40
45
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
41
46
|
var menuContainerStyles = (0, _react2.css)({
|
|
@@ -234,6 +239,51 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
234
239
|
editorView = props.editorView,
|
|
235
240
|
_props$showSelected = props.showSelected,
|
|
236
241
|
showSelected = _props$showSelected === void 0 ? true : _props$showSelected;
|
|
242
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
243
|
+
return (0, _react2.jsx)("div", {
|
|
244
|
+
css: menuContainerStyles,
|
|
245
|
+
role: "menu"
|
|
246
|
+
}, items.filter(function (item) {
|
|
247
|
+
return !('hidden' in item) || !item.hidden;
|
|
248
|
+
}).map(function (item, idx) {
|
|
249
|
+
if (!('type' in item)) {
|
|
250
|
+
return (0, _react2.jsx)(DropdownMenuItem
|
|
251
|
+
// Ignored via go/ees005
|
|
252
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
253
|
+
, {
|
|
254
|
+
key: idx,
|
|
255
|
+
item: item,
|
|
256
|
+
hide: hide,
|
|
257
|
+
dispatchCommand: dispatchCommand,
|
|
258
|
+
editorView: editorView,
|
|
259
|
+
showSelected: showSelected,
|
|
260
|
+
intl: intl
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
if (item.type === 'separator') {
|
|
264
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
265
|
+
return (0, _react2.jsx)("div", {
|
|
266
|
+
key: idx,
|
|
267
|
+
css: separatorStyles
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
if (item.type === 'overflow-dropdown-heading') {
|
|
271
|
+
return (
|
|
272
|
+
// eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
|
|
273
|
+
(0, _react2.jsx)("div", {
|
|
274
|
+
key: idx,
|
|
275
|
+
style: {
|
|
276
|
+
padding: '10px'
|
|
277
|
+
}
|
|
278
|
+
}, (0, _react2.jsx)(_heading.default, {
|
|
279
|
+
size: "xxsmall"
|
|
280
|
+
}, item.title))
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// here to change based on dropdown type
|
|
237
287
|
return (0, _react2.jsx)("div", {
|
|
238
288
|
css: menuContainerStyles,
|
|
239
289
|
role: "menu"
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -24,6 +24,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
24
24
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
25
25
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
26
26
|
var _commands = require("@atlaskit/editor-plugin-table/commands");
|
|
27
|
+
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
27
28
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
28
29
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
29
30
|
var _commands2 = require("../pm-plugins/toolbar-data/commands");
|
|
@@ -194,6 +195,37 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
194
195
|
{
|
|
195
196
|
return item.render(editorView, idx, dispatchAnalyticsEvent);
|
|
196
197
|
}
|
|
198
|
+
case 'overflow-dropdown':
|
|
199
|
+
return (0, _react2.jsx)(_Dropdown.default, {
|
|
200
|
+
key: idx
|
|
201
|
+
// TODO: Find more appropriate copy
|
|
202
|
+
,
|
|
203
|
+
title: 'Show more items',
|
|
204
|
+
icon: (0, _react2.jsx)(_showMoreHorizontal.default, {
|
|
205
|
+
label: 'Show more items',
|
|
206
|
+
spacing: "spacious"
|
|
207
|
+
}),
|
|
208
|
+
dispatchCommand: dispatchCommand,
|
|
209
|
+
options: item.options,
|
|
210
|
+
disabled: item.disabled,
|
|
211
|
+
tooltip: item.tooltip,
|
|
212
|
+
hideExpandIcon: true,
|
|
213
|
+
mountPoint: popupsMountPoint,
|
|
214
|
+
boundariesElement: popupsBoundariesElement,
|
|
215
|
+
scrollableElement: popupsScrollableElement,
|
|
216
|
+
dropdownWidth: item.dropdownWidth,
|
|
217
|
+
showSelected: item.showSelected,
|
|
218
|
+
buttonTestId: item.testId,
|
|
219
|
+
editorView: editorView,
|
|
220
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
221
|
+
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && "".concat(item.id, "-dropdownList"),
|
|
222
|
+
alignDropdownWithToolbar: items.length === 1,
|
|
223
|
+
onToggle: item.onToggle,
|
|
224
|
+
footer: item.footer,
|
|
225
|
+
onMount: item.onMount,
|
|
226
|
+
onClick: item.onClick,
|
|
227
|
+
pulse: item.pulse
|
|
228
|
+
});
|
|
197
229
|
case 'dropdown':
|
|
198
230
|
var DropdownIcon = item.icon;
|
|
199
231
|
var BeforeIcon = item.iconBefore;
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
|
+
import Heading from '@atlaskit/heading';
|
|
13
14
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
14
15
|
import { ButtonItem } from '@atlaskit/menu';
|
|
15
16
|
import { B400 } from '@atlaskit/theme/colors';
|
|
@@ -26,6 +27,10 @@ const spacerStyles = css({
|
|
|
26
27
|
flex: 1,
|
|
27
28
|
padding: "var(--ds-space-100, 8px)"
|
|
28
29
|
});
|
|
30
|
+
const separatorStyles = css({
|
|
31
|
+
background: "var(--ds-border, #091E4224)",
|
|
32
|
+
height: '1px'
|
|
33
|
+
});
|
|
29
34
|
|
|
30
35
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
31
36
|
const menuContainerStyles = css({
|
|
@@ -227,6 +232,49 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
227
232
|
editorView,
|
|
228
233
|
showSelected = true
|
|
229
234
|
} = props;
|
|
235
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
236
|
+
return jsx("div", {
|
|
237
|
+
css: menuContainerStyles,
|
|
238
|
+
role: "menu"
|
|
239
|
+
}, items.filter(item => !('hidden' in item) || !item.hidden).map((item, idx) => {
|
|
240
|
+
if (!('type' in item)) {
|
|
241
|
+
return jsx(DropdownMenuItem
|
|
242
|
+
// Ignored via go/ees005
|
|
243
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
244
|
+
, {
|
|
245
|
+
key: idx,
|
|
246
|
+
item: item,
|
|
247
|
+
hide: hide,
|
|
248
|
+
dispatchCommand: dispatchCommand,
|
|
249
|
+
editorView: editorView,
|
|
250
|
+
showSelected: showSelected,
|
|
251
|
+
intl: intl
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (item.type === 'separator') {
|
|
255
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
256
|
+
return jsx("div", {
|
|
257
|
+
key: idx,
|
|
258
|
+
css: separatorStyles
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
if (item.type === 'overflow-dropdown-heading') {
|
|
262
|
+
return (
|
|
263
|
+
// eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
|
|
264
|
+
jsx("div", {
|
|
265
|
+
key: idx,
|
|
266
|
+
style: {
|
|
267
|
+
padding: '10px'
|
|
268
|
+
}
|
|
269
|
+
}, jsx(Heading, {
|
|
270
|
+
size: "xxsmall"
|
|
271
|
+
}, item.title))
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// here to change based on dropdown type
|
|
230
278
|
return jsx("div", {
|
|
231
279
|
css: menuContainerStyles,
|
|
232
280
|
role: "menu"
|
|
@@ -17,6 +17,7 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
17
17
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
18
18
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
19
19
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
20
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
22
23
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -167,6 +168,37 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
167
168
|
{
|
|
168
169
|
return item.render(editorView, idx, dispatchAnalyticsEvent);
|
|
169
170
|
}
|
|
171
|
+
case 'overflow-dropdown':
|
|
172
|
+
return jsx(Dropdown, {
|
|
173
|
+
key: idx
|
|
174
|
+
// TODO: Find more appropriate copy
|
|
175
|
+
,
|
|
176
|
+
title: 'Show more items',
|
|
177
|
+
icon: jsx(ShowMoreHorizontalIcon, {
|
|
178
|
+
label: 'Show more items',
|
|
179
|
+
spacing: "spacious"
|
|
180
|
+
}),
|
|
181
|
+
dispatchCommand: dispatchCommand,
|
|
182
|
+
options: item.options,
|
|
183
|
+
disabled: item.disabled,
|
|
184
|
+
tooltip: item.tooltip,
|
|
185
|
+
hideExpandIcon: true,
|
|
186
|
+
mountPoint: popupsMountPoint,
|
|
187
|
+
boundariesElement: popupsBoundariesElement,
|
|
188
|
+
scrollableElement: popupsScrollableElement,
|
|
189
|
+
dropdownWidth: item.dropdownWidth,
|
|
190
|
+
showSelected: item.showSelected,
|
|
191
|
+
buttonTestId: item.testId,
|
|
192
|
+
editorView: editorView,
|
|
193
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
194
|
+
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && `${item.id}-dropdownList`,
|
|
195
|
+
alignDropdownWithToolbar: items.length === 1,
|
|
196
|
+
onToggle: item.onToggle,
|
|
197
|
+
footer: item.footer,
|
|
198
|
+
onMount: item.onMount,
|
|
199
|
+
onClick: item.onClick,
|
|
200
|
+
pulse: item.pulse
|
|
201
|
+
});
|
|
170
202
|
case 'dropdown':
|
|
171
203
|
const DropdownIcon = item.icon;
|
|
172
204
|
const BeforeIcon = item.iconBefore;
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
|
|
12
12
|
import { injectIntl } from 'react-intl-next';
|
|
13
13
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
14
|
+
import Heading from '@atlaskit/heading';
|
|
14
15
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
15
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
16
17
|
import { B400 } from '@atlaskit/theme/colors';
|
|
@@ -27,6 +28,10 @@ var spacerStyles = css({
|
|
|
27
28
|
flex: 1,
|
|
28
29
|
padding: "var(--ds-space-100, 8px)"
|
|
29
30
|
});
|
|
31
|
+
var separatorStyles = css({
|
|
32
|
+
background: "var(--ds-border, #091E4224)",
|
|
33
|
+
height: '1px'
|
|
34
|
+
});
|
|
30
35
|
|
|
31
36
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
32
37
|
var menuContainerStyles = css({
|
|
@@ -225,6 +230,51 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
225
230
|
editorView = props.editorView,
|
|
226
231
|
_props$showSelected = props.showSelected,
|
|
227
232
|
showSelected = _props$showSelected === void 0 ? true : _props$showSelected;
|
|
233
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
234
|
+
return jsx("div", {
|
|
235
|
+
css: menuContainerStyles,
|
|
236
|
+
role: "menu"
|
|
237
|
+
}, items.filter(function (item) {
|
|
238
|
+
return !('hidden' in item) || !item.hidden;
|
|
239
|
+
}).map(function (item, idx) {
|
|
240
|
+
if (!('type' in item)) {
|
|
241
|
+
return jsx(DropdownMenuItem
|
|
242
|
+
// Ignored via go/ees005
|
|
243
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
244
|
+
, {
|
|
245
|
+
key: idx,
|
|
246
|
+
item: item,
|
|
247
|
+
hide: hide,
|
|
248
|
+
dispatchCommand: dispatchCommand,
|
|
249
|
+
editorView: editorView,
|
|
250
|
+
showSelected: showSelected,
|
|
251
|
+
intl: intl
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (item.type === 'separator') {
|
|
255
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
256
|
+
return jsx("div", {
|
|
257
|
+
key: idx,
|
|
258
|
+
css: separatorStyles
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
if (item.type === 'overflow-dropdown-heading') {
|
|
262
|
+
return (
|
|
263
|
+
// eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop
|
|
264
|
+
jsx("div", {
|
|
265
|
+
key: idx,
|
|
266
|
+
style: {
|
|
267
|
+
padding: '10px'
|
|
268
|
+
}
|
|
269
|
+
}, jsx(Heading, {
|
|
270
|
+
size: "xxsmall"
|
|
271
|
+
}, item.title))
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// here to change based on dropdown type
|
|
228
278
|
return jsx("div", {
|
|
229
279
|
css: menuContainerStyles,
|
|
230
280
|
role: "menu"
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -24,6 +24,7 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
24
24
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
25
25
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
26
26
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
27
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
27
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
28
29
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
29
30
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -187,6 +188,37 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
187
188
|
{
|
|
188
189
|
return item.render(editorView, idx, dispatchAnalyticsEvent);
|
|
189
190
|
}
|
|
191
|
+
case 'overflow-dropdown':
|
|
192
|
+
return jsx(Dropdown, {
|
|
193
|
+
key: idx
|
|
194
|
+
// TODO: Find more appropriate copy
|
|
195
|
+
,
|
|
196
|
+
title: 'Show more items',
|
|
197
|
+
icon: jsx(ShowMoreHorizontalIcon, {
|
|
198
|
+
label: 'Show more items',
|
|
199
|
+
spacing: "spacious"
|
|
200
|
+
}),
|
|
201
|
+
dispatchCommand: dispatchCommand,
|
|
202
|
+
options: item.options,
|
|
203
|
+
disabled: item.disabled,
|
|
204
|
+
tooltip: item.tooltip,
|
|
205
|
+
hideExpandIcon: true,
|
|
206
|
+
mountPoint: popupsMountPoint,
|
|
207
|
+
boundariesElement: popupsBoundariesElement,
|
|
208
|
+
scrollableElement: popupsScrollableElement,
|
|
209
|
+
dropdownWidth: item.dropdownWidth,
|
|
210
|
+
showSelected: item.showSelected,
|
|
211
|
+
buttonTestId: item.testId,
|
|
212
|
+
editorView: editorView,
|
|
213
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
214
|
+
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && "".concat(item.id, "-dropdownList"),
|
|
215
|
+
alignDropdownWithToolbar: items.length === 1,
|
|
216
|
+
onToggle: item.onToggle,
|
|
217
|
+
footer: item.footer,
|
|
218
|
+
onMount: item.onMount,
|
|
219
|
+
onClick: item.onClick,
|
|
220
|
+
pulse: item.pulse
|
|
221
|
+
});
|
|
190
222
|
case 'dropdown':
|
|
191
223
|
var DropdownIcon = item.icon;
|
|
192
224
|
var BeforeIcon = item.iconBefore;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { ReactElement } from 'react';
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import type { CommandDispatch, DropdownOptions, FloatingToolbarButtonSpotlightConfig } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { CommandDispatch, DropdownOptions, FloatingToolbarOverflowDropdownOptions, FloatingToolbarButtonSpotlightConfig } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
export interface Props {
|
|
@@ -14,7 +14,7 @@ export interface Props {
|
|
|
14
14
|
icon?: ReactElement<any>;
|
|
15
15
|
iconBefore?: ReactElement<any>;
|
|
16
16
|
hideExpandIcon?: boolean;
|
|
17
|
-
options: DropdownOptions<Function>;
|
|
17
|
+
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
18
18
|
dispatchCommand: (command: Function) => void;
|
|
19
19
|
mountPoint?: HTMLElement;
|
|
20
20
|
boundariesElement?: HTMLElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type { DropdownOptionT } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { DropdownOptionT, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { ButtonItemProps } from '@atlaskit/menu';
|
|
6
6
|
export declare const menuItemDimensions: {
|
|
@@ -11,7 +11,7 @@ export declare const itemSpacing: number;
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
hide: Function;
|
|
13
13
|
dispatchCommand: Function;
|
|
14
|
-
items: Array<DropdownOptionT<Function
|
|
14
|
+
items: Array<DropdownOptionT<Function>> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
15
15
|
showSelected?: boolean;
|
|
16
16
|
editorView?: EditorView;
|
|
17
17
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { ReactElement } from 'react';
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import type { CommandDispatch, DropdownOptions, FloatingToolbarButtonSpotlightConfig } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { CommandDispatch, DropdownOptions, FloatingToolbarOverflowDropdownOptions, FloatingToolbarButtonSpotlightConfig } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
export interface Props {
|
|
@@ -14,7 +14,7 @@ export interface Props {
|
|
|
14
14
|
icon?: ReactElement<any>;
|
|
15
15
|
iconBefore?: ReactElement<any>;
|
|
16
16
|
hideExpandIcon?: boolean;
|
|
17
|
-
options: DropdownOptions<Function>;
|
|
17
|
+
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
18
18
|
dispatchCommand: (command: Function) => void;
|
|
19
19
|
mountPoint?: HTMLElement;
|
|
20
20
|
boundariesElement?: HTMLElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type { DropdownOptionT } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { DropdownOptionT, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { ButtonItemProps } from '@atlaskit/menu';
|
|
6
6
|
export declare const menuItemDimensions: {
|
|
@@ -11,7 +11,7 @@ export declare const itemSpacing: number;
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
hide: Function;
|
|
13
13
|
dispatchCommand: Function;
|
|
14
|
-
items: Array<DropdownOptionT<Function
|
|
14
|
+
items: Array<DropdownOptionT<Function>> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
15
15
|
showSelected?: boolean;
|
|
16
16
|
editorView?: EditorView;
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,27 +26,27 @@
|
|
|
26
26
|
"@atlaskit/adf-utils": "^19.18.0",
|
|
27
27
|
"@atlaskit/button": "^20.5.0",
|
|
28
28
|
"@atlaskit/checkbox": "^15.3.0",
|
|
29
|
-
"@atlaskit/editor-common": "^99.
|
|
29
|
+
"@atlaskit/editor-common": "^99.15.0",
|
|
30
30
|
"@atlaskit/editor-palette": "1.7.0",
|
|
31
|
-
"@atlaskit/editor-plugin-block-controls": "^2.
|
|
32
|
-
"@atlaskit/editor-plugin-context-panel": "^2.
|
|
33
|
-
"@atlaskit/editor-plugin-copy-button": "^1.
|
|
34
|
-
"@atlaskit/editor-plugin-decorations": "^1.
|
|
35
|
-
"@atlaskit/editor-plugin-editor-disabled": "^1.
|
|
36
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^2.
|
|
37
|
-
"@atlaskit/editor-plugin-emoji": "^2.
|
|
38
|
-
"@atlaskit/editor-plugin-extension": "^3.
|
|
39
|
-
"@atlaskit/editor-plugin-table": "^9.
|
|
40
|
-
"@atlaskit/editor-prosemirror": "
|
|
41
|
-
"@atlaskit/emoji": "^67.
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
31
|
+
"@atlaskit/editor-plugin-block-controls": "^2.26.0",
|
|
32
|
+
"@atlaskit/editor-plugin-context-panel": "^2.1.0",
|
|
33
|
+
"@atlaskit/editor-plugin-copy-button": "^1.5.0",
|
|
34
|
+
"@atlaskit/editor-plugin-decorations": "^1.5.0",
|
|
35
|
+
"@atlaskit/editor-plugin-editor-disabled": "^1.5.0",
|
|
36
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^2.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-emoji": "^2.9.0",
|
|
38
|
+
"@atlaskit/editor-plugin-extension": "^3.5.0",
|
|
39
|
+
"@atlaskit/editor-plugin-table": "^9.5.0",
|
|
40
|
+
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
|
+
"@atlaskit/emoji": "^67.14.0",
|
|
42
|
+
"@atlaskit/icon": "^23.9.0",
|
|
43
43
|
"@atlaskit/menu": "^2.14.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
46
|
-
"@atlaskit/primitives": "^13.
|
|
46
|
+
"@atlaskit/primitives": "^13.5.0",
|
|
47
47
|
"@atlaskit/select": "^18.10.0",
|
|
48
48
|
"@atlaskit/theme": "^15.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^2.46.0",
|
|
50
50
|
"@atlaskit/tokens": "^3.3.0",
|
|
51
51
|
"@atlaskit/tooltip": "^19.1.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|