@atlaskit/editor-plugin-floating-toolbar 1.7.4 → 1.7.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 +15 -0
- package/dist/cjs/ui/CheckboxModal.js +3 -3
- package/dist/cjs/ui/Dropdown.js +8 -0
- package/dist/cjs/ui/EmojiPickerButton.js +5 -3
- package/dist/cjs/ui/SimpleModal.js +3 -3
- package/dist/es2019/ui/CheckboxModal.js +1 -1
- package/dist/es2019/ui/Dropdown.js +8 -0
- package/dist/es2019/ui/EmojiPickerButton.js +4 -2
- package/dist/es2019/ui/SimpleModal.js +1 -1
- package/dist/esm/ui/CheckboxModal.js +1 -1
- package/dist/esm/ui/Dropdown.js +8 -0
- package/dist/esm/ui/EmojiPickerButton.js +4 -2
- package/dist/esm/ui/SimpleModal.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#116062](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116062)
|
|
8
|
+
[`1c26d1ee6fb25`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c26d1ee6fb25) -
|
|
9
|
+
Migrated to new atlaskit Buttons.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 1.7.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 1.7.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -9,7 +9,7 @@ exports.CheckboxModal = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
13
13
|
var _checkbox = require("@atlaskit/checkbox");
|
|
14
14
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
15
15
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
@@ -67,11 +67,11 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
|
67
67
|
},
|
|
68
68
|
label: checkboxlabel,
|
|
69
69
|
testId: testId ? "".concat(testId, "-checkbox") : undefined
|
|
70
|
-
}))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(
|
|
70
|
+
}))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
71
71
|
appearance: "default",
|
|
72
72
|
onClick: onClose,
|
|
73
73
|
testId: testId ? "".concat(testId, "-cancel-button") : undefined
|
|
74
|
-
}, cancelButtonLabel), /*#__PURE__*/_react.default.createElement(
|
|
74
|
+
}, cancelButtonLabel), /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
75
75
|
appearance: "warning",
|
|
76
76
|
onClick: function onClick() {
|
|
77
77
|
onConfirm(isChecked);
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -18,6 +18,7 @@ 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");
|
|
21
22
|
var _DropdownMenu = _interopRequireWildcard(require("./DropdownMenu"));
|
|
22
23
|
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); }
|
|
23
24
|
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; }
|
|
@@ -202,6 +203,13 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
202
203
|
if (this.props.setDisableParentScroll) {
|
|
203
204
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
204
205
|
}
|
|
206
|
+
|
|
207
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element, we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
208
|
+
if (this.props.mountPoint &&
|
|
209
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
210
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
205
213
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
206
214
|
var dropList = document.querySelector('[data-role="droplistContent"]');
|
|
207
215
|
if (dropList) {
|
|
@@ -8,7 +8,7 @@ exports.EmojiPickerButton = void 0;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
|
-
var
|
|
11
|
+
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
12
12
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
@@ -105,9 +105,11 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
105
105
|
}, (0, _react2.jsx)(_tooltip.default, {
|
|
106
106
|
content: title,
|
|
107
107
|
position: "top"
|
|
108
|
-
}, (0, _react2.jsx)(
|
|
108
|
+
}, (0, _react2.jsx)(_standardButton.default, {
|
|
109
109
|
appearance: 'subtle',
|
|
110
|
-
key: props.idx
|
|
110
|
+
key: props.idx
|
|
111
|
+
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
112
|
+
,
|
|
111
113
|
style: {
|
|
112
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
113
115
|
padding: 0,
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.SimpleModal = void 0;
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var
|
|
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
13
|
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); }
|
|
@@ -26,11 +26,11 @@ var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
|
26
26
|
testId: testId
|
|
27
27
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
28
28
|
appearance: "warning"
|
|
29
|
-
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement("p", null, options === null || options === void 0 ? void 0 : options.message)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(
|
|
29
|
+
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement("p", null, options === null || options === void 0 ? void 0 : options.message)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
30
30
|
appearance: "default",
|
|
31
31
|
onClick: onClose,
|
|
32
32
|
testId: testId ? "".concat(testId, "-cancel-button") : undefined
|
|
33
|
-
}, cancelButtonLabel), /*#__PURE__*/_react.default.createElement(
|
|
33
|
+
}, cancelButtonLabel), /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
34
34
|
appearance: "warning",
|
|
35
35
|
onClick: function onClick() {
|
|
36
36
|
onConfirm();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import Button from '@atlaskit/button/
|
|
3
|
+
import Button from '@atlaskit/button/new';
|
|
4
4
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
5
5
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
6
6
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
@@ -8,6 +8,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
8
8
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
10
10
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
11
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
12
13
|
|
|
13
14
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -179,6 +180,13 @@ export default class Dropdown extends Component {
|
|
|
179
180
|
if (this.props.setDisableParentScroll) {
|
|
180
181
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
181
182
|
}
|
|
183
|
+
|
|
184
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element, we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
185
|
+
if (this.props.mountPoint &&
|
|
186
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
187
|
+
getBooleanFF('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
182
190
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
183
191
|
const dropList = document.querySelector('[data-role="droplistContent"]');
|
|
184
192
|
if (dropList) {
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import Button from '@atlaskit/button';
|
|
6
|
+
import Button from '@atlaskit/button/standard-button';
|
|
7
7
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
8
8
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
@@ -94,7 +94,9 @@ export const EmojiPickerButton = props => {
|
|
|
94
94
|
position: "top"
|
|
95
95
|
}, jsx(Button, {
|
|
96
96
|
appearance: 'subtle',
|
|
97
|
-
key: props.idx
|
|
97
|
+
key: props.idx
|
|
98
|
+
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
99
|
+
,
|
|
98
100
|
style: {
|
|
99
101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
100
102
|
padding: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Button from '@atlaskit/button/
|
|
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
5
|
export const SimpleModal = props => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import Button from '@atlaskit/button/
|
|
4
|
+
import Button from '@atlaskit/button/new';
|
|
5
5
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
6
6
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
7
7
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -18,6 +18,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
18
18
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
19
19
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
20
20
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
21
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
import DropdownMenu, { itemSpacing, menuItemDimensions } from './DropdownMenu';
|
|
22
23
|
|
|
23
24
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -197,6 +198,13 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
197
198
|
if (this.props.setDisableParentScroll) {
|
|
198
199
|
this.props.setDisableParentScroll(this.state.isOpen);
|
|
199
200
|
}
|
|
201
|
+
|
|
202
|
+
// ECA11Y-235: no sense in sending keyboard event since the menu popup mounted to the custom element, we will ensure first element focused asap as 'MenuArrowKeyNavigationProvider' is mounted
|
|
203
|
+
if (this.props.mountPoint &&
|
|
204
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
205
|
+
getBooleanFF('platform.editor.a11y-main-toolbar-navigation_osrty')) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
200
208
|
if (this.state.isOpen && this.state.isOpenedByKeyboard) {
|
|
201
209
|
var dropList = document.querySelector('[data-role="droplistContent"]');
|
|
202
210
|
if (dropList) {
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import Button from '@atlaskit/button';
|
|
7
|
+
import Button from '@atlaskit/button/standard-button';
|
|
8
8
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
9
9
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
10
10
|
import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
@@ -100,7 +100,9 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
100
100
|
position: "top"
|
|
101
101
|
}, jsx(Button, {
|
|
102
102
|
appearance: 'subtle',
|
|
103
|
-
key: props.idx
|
|
103
|
+
key: props.idx
|
|
104
|
+
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
105
|
+
,
|
|
104
106
|
style: {
|
|
105
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
106
108
|
padding: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Button from '@atlaskit/button/
|
|
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
5
|
export var SimpleModal = function SimpleModal(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,25 +24,25 @@
|
|
|
24
24
|
".": "./src/index.ts"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-utils": "^19.
|
|
27
|
+
"@atlaskit/adf-utils": "^19.4.0",
|
|
28
28
|
"@atlaskit/button": "^18.0.0",
|
|
29
29
|
"@atlaskit/checkbox": "^13.5.0",
|
|
30
|
-
"@atlaskit/editor-common": "^83.
|
|
30
|
+
"@atlaskit/editor-common": "^83.5.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.6.0",
|
|
32
|
-
"@atlaskit/editor-plugin-block-controls": "^1.
|
|
32
|
+
"@atlaskit/editor-plugin-block-controls": "^1.5.0",
|
|
33
33
|
"@atlaskit/editor-plugin-context-panel": "^1.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-copy-button": "^1.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-extension": "^1.
|
|
39
|
-
"@atlaskit/editor-plugin-table": "^7.
|
|
38
|
+
"@atlaskit/editor-plugin-extension": "^1.9.0",
|
|
39
|
+
"@atlaskit/editor-plugin-table": "^7.19.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
41
|
"@atlaskit/emoji": "^67.6.0",
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
43
|
-
"@atlaskit/menu": "^2.
|
|
42
|
+
"@atlaskit/icon": "^22.5.0",
|
|
43
|
+
"@atlaskit/menu": "^2.6.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
45
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/select": "^17.11.0",
|
|
47
47
|
"@atlaskit/theme": "^12.11.0",
|
|
48
48
|
"@atlaskit/tokens": "^1.53.0",
|