@atlaskit/editor-plugin-floating-toolbar 5.1.0 → 5.1.2
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 +17 -0
- package/dist/cjs/floatingToolbarPlugin.js +2 -4
- package/dist/cjs/ui/DropdownMenu.js +3 -8
- package/dist/es2019/floatingToolbarPlugin.js +2 -4
- package/dist/es2019/ui/DropdownMenu.js +4 -9
- package/dist/esm/floatingToolbarPlugin.js +2 -4
- package/dist/esm/ui/DropdownMenu.js +4 -9
- package/package.json +5 -5
- package/dist/cjs/ui/ToolbarLoader.js +0 -23
- package/dist/es2019/ui/ToolbarLoader.js +0 -6
- package/dist/esm/ui/ToolbarLoader.js +0 -12
- package/dist/types/ui/ToolbarLoader.d.ts +0 -4
- package/dist/types-ts4.5/ui/ToolbarLoader.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#189903](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189903)
|
|
8
|
+
[`f5ccd32e607db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5ccd32e607db) -
|
|
9
|
+
[ED-28567] Add/remove missing/extra separators in media, table and panel toolbars shown in Jira
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 5.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#189045](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189045)
|
|
17
|
+
[`66b7ad7a0630e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/66b7ad7a0630e) -
|
|
18
|
+
disable dynamic import for floating toolbar
|
|
19
|
+
|
|
3
20
|
## 5.1.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -32,7 +32,7 @@ var _plugin = require("./pm-plugins/toolbar-data/plugin");
|
|
|
32
32
|
var _pluginKey = require("./pm-plugins/toolbar-data/plugin-key");
|
|
33
33
|
var _utils2 = require("./pm-plugins/utils");
|
|
34
34
|
var _ConfirmationModal = require("./ui/ConfirmationModal");
|
|
35
|
-
var
|
|
35
|
+
var _Toolbar = _interopRequireDefault(require("./ui/Toolbar"));
|
|
36
36
|
var _utils3 = require("./ui/utils");
|
|
37
37
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
38
38
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -397,7 +397,7 @@ function ContentComponent(_ref5) {
|
|
|
397
397
|
providerFactory: providerFactory,
|
|
398
398
|
providers: ['extensionProvider'],
|
|
399
399
|
renderNode: function renderNode(providers) {
|
|
400
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
400
|
+
return /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
401
401
|
target: targetRef
|
|
402
402
|
// Ignored via go/ees005
|
|
403
403
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -506,8 +506,6 @@ function floatingToolbarPluginFactory(options) {
|
|
|
506
506
|
key: pluginKey,
|
|
507
507
|
state: {
|
|
508
508
|
init: function init() {
|
|
509
|
-
// Use this point to preload the UI
|
|
510
|
-
_ToolbarLoader.ToolbarLoader.preload();
|
|
511
509
|
return {
|
|
512
510
|
getConfigWithNodeInfo: getConfigWithNodeInfo
|
|
513
511
|
};
|
|
@@ -26,10 +26,6 @@ var menuItemDimensions = exports.menuItemDimensions = {
|
|
|
26
26
|
width: 175,
|
|
27
27
|
height: 32
|
|
28
28
|
};
|
|
29
|
-
var separatorStylesThin = (0, _react2.css)({
|
|
30
|
-
background: "var(--ds-border, #091E4224)",
|
|
31
|
-
height: '1px'
|
|
32
|
-
});
|
|
33
29
|
var headingStyles = (0, _react2.css)({
|
|
34
30
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
35
31
|
});
|
|
@@ -86,10 +82,9 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
86
82
|
});
|
|
87
83
|
}
|
|
88
84
|
if (item.type === 'separator') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
key: idx
|
|
92
|
-
css: separatorStylesThin
|
|
85
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
86
|
+
return (0, _react2.jsx)(_floatingToolbar.DropdownSeparator, {
|
|
87
|
+
key: idx
|
|
93
88
|
});
|
|
94
89
|
}
|
|
95
90
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -21,7 +21,7 @@ import { createPlugin as floatingToolbarDataPluginFactory } from './pm-plugins/t
|
|
|
21
21
|
import { pluginKey as dataPluginKey } from './pm-plugins/toolbar-data/plugin-key';
|
|
22
22
|
import { findNode } from './pm-plugins/utils';
|
|
23
23
|
import { ConfirmationModal } from './ui/ConfirmationModal';
|
|
24
|
-
import
|
|
24
|
+
import Toolbar from './ui/Toolbar';
|
|
25
25
|
import { consolidateOverflowDropdownItems } from './ui/utils';
|
|
26
26
|
|
|
27
27
|
// TODO: AFP-2532 - Fix automatic suppressions below
|
|
@@ -382,7 +382,7 @@ export function ContentComponent({
|
|
|
382
382
|
providerFactory: providerFactory,
|
|
383
383
|
providers: ['extensionProvider'],
|
|
384
384
|
renderNode: providers => {
|
|
385
|
-
return /*#__PURE__*/React.createElement(
|
|
385
|
+
return /*#__PURE__*/React.createElement(Toolbar, {
|
|
386
386
|
target: targetRef
|
|
387
387
|
// Ignored via go/ees005
|
|
388
388
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -491,8 +491,6 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
491
491
|
key: pluginKey,
|
|
492
492
|
state: {
|
|
493
493
|
init: () => {
|
|
494
|
-
// Use this point to preload the UI
|
|
495
|
-
ToolbarLoader.preload();
|
|
496
494
|
return {
|
|
497
495
|
getConfigWithNodeInfo
|
|
498
496
|
};
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
10
10
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
|
-
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
12
|
+
import { DropdownMenuItem, DropdownSeparator } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
14
14
|
import { HeadingItem } from '@atlaskit/menu';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -18,10 +18,6 @@ export const menuItemDimensions = {
|
|
|
18
18
|
width: 175,
|
|
19
19
|
height: 32
|
|
20
20
|
};
|
|
21
|
-
const separatorStylesThin = css({
|
|
22
|
-
background: "var(--ds-border, #091E4224)",
|
|
23
|
-
height: '1px'
|
|
24
|
-
});
|
|
25
21
|
const headingStyles = css({
|
|
26
22
|
padding: `${"var(--ds-space-200, 16px)"} 0 ${"var(--ds-space-100, 8px)"}`
|
|
27
23
|
});
|
|
@@ -77,10 +73,9 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
77
73
|
});
|
|
78
74
|
}
|
|
79
75
|
if (item.type === 'separator') {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
key: idx
|
|
83
|
-
css: separatorStylesThin
|
|
76
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
77
|
+
return jsx(DropdownSeparator, {
|
|
78
|
+
key: idx
|
|
84
79
|
});
|
|
85
80
|
}
|
|
86
81
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -25,7 +25,7 @@ import { createPlugin as floatingToolbarDataPluginFactory } from './pm-plugins/t
|
|
|
25
25
|
import { pluginKey as dataPluginKey } from './pm-plugins/toolbar-data/plugin-key';
|
|
26
26
|
import { findNode } from './pm-plugins/utils';
|
|
27
27
|
import { ConfirmationModal } from './ui/ConfirmationModal';
|
|
28
|
-
import
|
|
28
|
+
import Toolbar from './ui/Toolbar';
|
|
29
29
|
import { consolidateOverflowDropdownItems } from './ui/utils';
|
|
30
30
|
|
|
31
31
|
// TODO: AFP-2532 - Fix automatic suppressions below
|
|
@@ -388,7 +388,7 @@ export function ContentComponent(_ref5) {
|
|
|
388
388
|
providerFactory: providerFactory,
|
|
389
389
|
providers: ['extensionProvider'],
|
|
390
390
|
renderNode: function renderNode(providers) {
|
|
391
|
-
return /*#__PURE__*/React.createElement(
|
|
391
|
+
return /*#__PURE__*/React.createElement(Toolbar, {
|
|
392
392
|
target: targetRef
|
|
393
393
|
// Ignored via go/ees005
|
|
394
394
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -497,8 +497,6 @@ export function floatingToolbarPluginFactory(options) {
|
|
|
497
497
|
key: pluginKey,
|
|
498
498
|
state: {
|
|
499
499
|
init: function init() {
|
|
500
|
-
// Use this point to preload the UI
|
|
501
|
-
ToolbarLoader.preload();
|
|
502
500
|
return {
|
|
503
501
|
getConfigWithNodeInfo: getConfigWithNodeInfo
|
|
504
502
|
};
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
10
10
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
|
-
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
12
|
+
import { DropdownMenuItem, DropdownSeparator } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
14
14
|
import { HeadingItem } from '@atlaskit/menu';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -18,10 +18,6 @@ export var menuItemDimensions = {
|
|
|
18
18
|
width: 175,
|
|
19
19
|
height: 32
|
|
20
20
|
};
|
|
21
|
-
var separatorStylesThin = css({
|
|
22
|
-
background: "var(--ds-border, #091E4224)",
|
|
23
|
-
height: '1px'
|
|
24
|
-
});
|
|
25
21
|
var headingStyles = css({
|
|
26
22
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
27
23
|
});
|
|
@@ -78,10 +74,9 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
78
74
|
});
|
|
79
75
|
}
|
|
80
76
|
if (item.type === 'separator') {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
key: idx
|
|
84
|
-
css: separatorStylesThin
|
|
77
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
78
|
+
return jsx(DropdownSeparator, {
|
|
79
|
+
key: idx
|
|
85
80
|
});
|
|
86
81
|
}
|
|
87
82
|
if (item.type === 'overflow-dropdown-heading') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"@atlaskit/editor-plugin-decorations": "^3.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-emoji": "^4.
|
|
37
|
+
"@atlaskit/editor-plugin-emoji": "^4.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-extension": "^6.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-interaction": "^4.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-table": "^12.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-user-intent": "^1.1.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/emoji": "^69.3.0",
|
|
44
|
-
"@atlaskit/icon": "^27.
|
|
44
|
+
"@atlaskit/icon": "^27.6.0",
|
|
45
45
|
"@atlaskit/menu": "^8.0.0",
|
|
46
46
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/primitives": "^14.10.0",
|
|
49
49
|
"@atlaskit/select": "^21.2.0",
|
|
50
50
|
"@atlaskit/theme": "^19.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^9.10.0",
|
|
52
52
|
"@atlaskit/tokens": "^5.6.0",
|
|
53
53
|
"@atlaskit/tooltip": "^20.3.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"react-loadable": "^5.1.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^107.
|
|
63
|
+
"@atlaskit/editor-common": "^107.12.0",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0"
|
|
66
66
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ToolbarLoader = void 0;
|
|
8
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
10
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
-
var ToolbarLoader = exports.ToolbarLoader = (0, _reactLoadable.default)({
|
|
12
|
-
loader: function loader() {
|
|
13
|
-
return Promise.resolve().then(function () {
|
|
14
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-core-floating-toolbar" */
|
|
15
|
-
'./Toolbar'));
|
|
16
|
-
}).then(function (mod) {
|
|
17
|
-
return mod.default;
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
loading: function loading() {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Loadable from 'react-loadable';
|
|
2
|
-
export var ToolbarLoader = Loadable({
|
|
3
|
-
loader: function loader() {
|
|
4
|
-
return import( /* webpackChunkName: "@atlaskit-internal_editor-core-floating-toolbar" */
|
|
5
|
-
'./Toolbar').then(function (mod) {
|
|
6
|
-
return mod.default;
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
loading: function loading() {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
});
|