@atlaskit/editor-plugin-floating-toolbar 8.2.2 → 8.2.4
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 +20 -0
- package/dist/cjs/floatingToolbarPlugin.js +1 -1
- package/dist/cjs/ui/CheckboxModal.js +2 -2
- package/dist/cjs/ui/DropdownMenu.js +3 -1
- package/dist/cjs/ui/EmojiPickerButton.js +1 -3
- package/dist/cjs/ui/SimpleModal.js +2 -2
- package/dist/cjs/ui/Toolbar.js +1 -6
- package/dist/es2019/floatingToolbarPlugin.js +1 -1
- package/dist/es2019/ui/CheckboxModal.js +2 -2
- package/dist/es2019/ui/DropdownMenu.js +3 -1
- package/dist/es2019/ui/EmojiPickerButton.js +1 -3
- package/dist/es2019/ui/SimpleModal.js +2 -2
- package/dist/es2019/ui/Toolbar.js +1 -6
- package/dist/esm/floatingToolbarPlugin.js +1 -1
- package/dist/esm/ui/CheckboxModal.js +2 -2
- package/dist/esm/ui/DropdownMenu.js +3 -1
- package/dist/esm/ui/EmojiPickerButton.js +1 -3
- package/dist/esm/ui/SimpleModal.js +2 -2
- package/dist/esm/ui/Toolbar.js +1 -6
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 8.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef001bf65d48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef001bf65d48f) -
|
|
8
|
+
Remove usage of `platform_editor_toolbar_aifc` inside editor packages - instead rely on checking
|
|
9
|
+
for new toolbar plugin option, make `enableNewToolbarExperience` mandatory for consumers to opt in
|
|
10
|
+
to new toolbar experience
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 8.2.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`ff53e1bfc6c25`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ff53e1bfc6c25) -
|
|
18
|
+
[ED-29482] clean up references to platform_editor_toolbar_rerender_optimization_exp
|
|
19
|
+
- [`663926469ec70`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/663926469ec70) -
|
|
20
|
+
Switch to use fg() to check feature gate platform_editor_update_modal_close_button
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 8.2.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -266,7 +266,7 @@ function ContentComponent(_ref5) {
|
|
|
266
266
|
node = configWithNodeInfo.node;
|
|
267
267
|
|
|
268
268
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
269
|
-
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)
|
|
269
|
+
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)) {
|
|
270
270
|
var selection = editorView.state.selection;
|
|
271
271
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
272
272
|
var isTextSelected = selection instanceof _state.TextSelection && !selection.empty;
|
|
@@ -13,8 +13,8 @@ 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"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
18
|
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); }
|
|
19
19
|
var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
20
20
|
var _options$getChildrenI;
|
|
@@ -63,7 +63,7 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
|
63
63
|
onClose: onClose,
|
|
64
64
|
testId: testId
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
|
|
66
|
-
hasCloseButton: (0,
|
|
66
|
+
hasCloseButton: (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button')
|
|
67
67
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
68
68
|
appearance: "warning"
|
|
69
69
|
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
@@ -60,7 +60,9 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
60
60
|
return (0, _react2.jsx)("div", {
|
|
61
61
|
css: menuContainerStyles,
|
|
62
62
|
role: "menu"
|
|
63
|
-
}, items
|
|
63
|
+
}, items
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
.filter(function (item) {
|
|
64
66
|
return item && (!('hidden' in item) || !item.hidden);
|
|
65
67
|
}).map(function (item, idx) {
|
|
66
68
|
if (!('type' in item)) {
|
|
@@ -156,9 +156,7 @@ var EmojiPickerButton = exports.EmojiPickerButton = function EmojiPickerButton(p
|
|
|
156
156
|
};
|
|
157
157
|
var title = props.title || '';
|
|
158
158
|
return (0, _react2.jsx)("div", {
|
|
159
|
-
css:
|
|
160
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
161
|
-
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
159
|
+
css: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
162
160
|
}, (0, _react2.jsx)(_tooltip.default, {
|
|
163
161
|
content: title,
|
|
164
162
|
position: "top"
|
|
@@ -10,8 +10,8 @@ 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 _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
15
|
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); }
|
|
16
16
|
var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
17
17
|
var onConfirm = props.onConfirm,
|
|
@@ -26,7 +26,7 @@ var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
|
26
26
|
onClose: onClose,
|
|
27
27
|
testId: testId
|
|
28
28
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
|
|
29
|
-
hasCloseButton: (0,
|
|
29
|
+
hasCloseButton: (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button')
|
|
30
30
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
31
31
|
appearance: "warning"
|
|
32
32
|
}, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -28,7 +28,6 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
|
28
28
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
29
29
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
30
30
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
31
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
32
31
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
33
32
|
var _commands = require("../pm-plugins/toolbar-data/commands");
|
|
34
33
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
@@ -699,16 +698,12 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
699
698
|
var hasSelect = items.find(function (item) {
|
|
700
699
|
return item.type === 'select' && item.selectType === 'list';
|
|
701
700
|
});
|
|
702
|
-
var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
|
|
703
|
-
//Alt + F10 to reach first element in this floating toolbar
|
|
704
|
-
return event.altKey && (event.key === 'F10' || event.keyCode === 121);
|
|
705
|
-
};
|
|
706
701
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
707
702
|
editorView: this.props.editorView,
|
|
708
703
|
handleEscape: this.handleEscape,
|
|
709
704
|
disableArrowKeyNavigation: !this.shouldHandleArrowKeys(),
|
|
710
705
|
childComponentSelector: "[data-testid='editor-floating-toolbar']",
|
|
711
|
-
isShortcutToFocusToolbar:
|
|
706
|
+
isShortcutToFocusToolbar: this.isShortcutToFocusToolbar,
|
|
712
707
|
intl: intl
|
|
713
708
|
}, (0, _react2.jsx)("div", {
|
|
714
709
|
ref: this.toolbarContainerRef,
|
|
@@ -258,7 +258,7 @@ export function ContentComponent({
|
|
|
258
258
|
} = configWithNodeInfo;
|
|
259
259
|
|
|
260
260
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
261
|
-
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)
|
|
261
|
+
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)) {
|
|
262
262
|
const selection = editorView.state.selection;
|
|
263
263
|
const isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
264
264
|
const isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
@@ -4,8 +4,8 @@ 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';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
export const CheckboxModal = props => {
|
|
10
10
|
var _options$getChildrenI;
|
|
11
11
|
const [isChecked, setCheckbox] = useState(false);
|
|
@@ -54,7 +54,7 @@ export const CheckboxModal = props => {
|
|
|
54
54
|
onClose: onClose,
|
|
55
55
|
testId: testId
|
|
56
56
|
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
57
|
-
hasCloseButton:
|
|
57
|
+
hasCloseButton: fg('platform_editor_update_modal_close_button')
|
|
58
58
|
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
59
59
|
appearance: "warning"
|
|
60
60
|
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -54,7 +54,9 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
54
54
|
return jsx("div", {
|
|
55
55
|
css: menuContainerStyles,
|
|
56
56
|
role: "menu"
|
|
57
|
-
}, items
|
|
57
|
+
}, items
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
.filter(item => item && (!('hidden' in item) || !item.hidden)).map((item, idx) => {
|
|
58
60
|
if (!('type' in item)) {
|
|
59
61
|
return jsx(DropdownMenuItem
|
|
60
62
|
// Ignored via go/ees005
|
|
@@ -141,9 +141,7 @@ export const EmojiPickerButton = props => {
|
|
|
141
141
|
};
|
|
142
142
|
const title = props.title || '';
|
|
143
143
|
return jsx("div", {
|
|
144
|
-
css:
|
|
145
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
146
|
-
fg('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
144
|
+
css: fg('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
147
145
|
}, jsx(Tooltip, {
|
|
148
146
|
content: title,
|
|
149
147
|
position: "top"
|
|
@@ -2,8 +2,8 @@ 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 { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
export const SimpleModal = props => {
|
|
8
8
|
const {
|
|
9
9
|
onConfirm,
|
|
@@ -21,7 +21,7 @@ export const SimpleModal = props => {
|
|
|
21
21
|
onClose: onClose,
|
|
22
22
|
testId: testId
|
|
23
23
|
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
24
|
-
hasCloseButton:
|
|
24
|
+
hasCloseButton: fg('platform_editor_update_modal_close_button')
|
|
25
25
|
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
26
26
|
appearance: "warning"
|
|
27
27
|
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -21,7 +21,6 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
21
21
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
22
22
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
24
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
26
25
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
27
26
|
import Dropdown from './Dropdown';
|
|
@@ -650,16 +649,12 @@ class Toolbar extends Component {
|
|
|
650
649
|
// Select has left padding of 4px to the border, everything else 8px
|
|
651
650
|
const firstElementIsSelect = items[0].type === 'select';
|
|
652
651
|
const hasSelect = items.find(item => item.type === 'select' && item.selectType === 'list');
|
|
653
|
-
const isShortcutToFocusToolbar = event => {
|
|
654
|
-
//Alt + F10 to reach first element in this floating toolbar
|
|
655
|
-
return event.altKey && (event.key === 'F10' || event.keyCode === 121);
|
|
656
|
-
};
|
|
657
652
|
return jsx(React.Fragment, null, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
658
653
|
editorView: this.props.editorView,
|
|
659
654
|
handleEscape: this.handleEscape,
|
|
660
655
|
disableArrowKeyNavigation: !this.shouldHandleArrowKeys(),
|
|
661
656
|
childComponentSelector: "[data-testid='editor-floating-toolbar']",
|
|
662
|
-
isShortcutToFocusToolbar:
|
|
657
|
+
isShortcutToFocusToolbar: this.isShortcutToFocusToolbar,
|
|
663
658
|
intl: intl
|
|
664
659
|
}, jsx("div", {
|
|
665
660
|
ref: this.toolbarContainerRef,
|
|
@@ -257,7 +257,7 @@ export function ContentComponent(_ref5) {
|
|
|
257
257
|
node = configWithNodeInfo.node;
|
|
258
258
|
|
|
259
259
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
260
|
-
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)
|
|
260
|
+
if (Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar)) {
|
|
261
261
|
var selection = editorView.state.selection;
|
|
262
262
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
263
263
|
var isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
@@ -5,8 +5,8 @@ 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';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
9
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
export var CheckboxModal = function CheckboxModal(props) {
|
|
11
11
|
var _options$getChildrenI;
|
|
12
12
|
var _useState = useState(false),
|
|
@@ -54,7 +54,7 @@ export var CheckboxModal = function CheckboxModal(props) {
|
|
|
54
54
|
onClose: onClose,
|
|
55
55
|
testId: testId
|
|
56
56
|
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
57
|
-
hasCloseButton:
|
|
57
|
+
hasCloseButton: fg('platform_editor_update_modal_close_button')
|
|
58
58
|
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
59
59
|
appearance: "warning"
|
|
60
60
|
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -53,7 +53,9 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
53
53
|
return jsx("div", {
|
|
54
54
|
css: menuContainerStyles,
|
|
55
55
|
role: "menu"
|
|
56
|
-
}, items
|
|
56
|
+
}, items
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
.filter(function (item) {
|
|
57
59
|
return item && (!('hidden' in item) || !item.hidden);
|
|
58
60
|
}).map(function (item, idx) {
|
|
59
61
|
if (!('type' in item)) {
|
|
@@ -147,9 +147,7 @@ export var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
147
147
|
};
|
|
148
148
|
var title = props.title || '';
|
|
149
149
|
return jsx("div", {
|
|
150
|
-
css:
|
|
151
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
152
|
-
fg('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
150
|
+
css: fg('platform-visual-refresh-icons') ? emojiPickerButtonWrapperVisualRefresh : emojiPickerButtonWrapper
|
|
153
151
|
}, jsx(Tooltip, {
|
|
154
152
|
content: title,
|
|
155
153
|
position: "top"
|
|
@@ -2,8 +2,8 @@ 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 { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
export var SimpleModal = function SimpleModal(props) {
|
|
8
8
|
var onConfirm = props.onConfirm,
|
|
9
9
|
onClose = props.onClose,
|
|
@@ -17,7 +17,7 @@ export var SimpleModal = function SimpleModal(props) {
|
|
|
17
17
|
onClose: onClose,
|
|
18
18
|
testId: testId
|
|
19
19
|
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
20
|
-
hasCloseButton:
|
|
20
|
+
hasCloseButton: fg('platform_editor_update_modal_close_button')
|
|
21
21
|
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
22
22
|
appearance: "warning"
|
|
23
23
|
}, heading)), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Text, {
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -30,7 +30,6 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
30
30
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
31
31
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
32
32
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
33
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
34
33
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
35
34
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
36
35
|
import Dropdown from './Dropdown';
|
|
@@ -693,16 +692,12 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
693
692
|
var hasSelect = items.find(function (item) {
|
|
694
693
|
return item.type === 'select' && item.selectType === 'list';
|
|
695
694
|
});
|
|
696
|
-
var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
|
|
697
|
-
//Alt + F10 to reach first element in this floating toolbar
|
|
698
|
-
return event.altKey && (event.key === 'F10' || event.keyCode === 121);
|
|
699
|
-
};
|
|
700
695
|
return jsx(React.Fragment, null, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
701
696
|
editorView: this.props.editorView,
|
|
702
697
|
handleEscape: this.handleEscape,
|
|
703
698
|
disableArrowKeyNavigation: !this.shouldHandleArrowKeys(),
|
|
704
699
|
childComponentSelector: "[data-testid='editor-floating-toolbar']",
|
|
705
|
-
isShortcutToFocusToolbar:
|
|
700
|
+
isShortcutToFocusToolbar: this.isShortcutToFocusToolbar,
|
|
706
701
|
intl: intl
|
|
707
702
|
}, jsx("div", {
|
|
708
703
|
ref: this.toolbarContainerRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-context-panel": "^8.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-copy-button": "^6.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
32
|
-
"@atlaskit/editor-plugin-editor-disabled": "^6.
|
|
32
|
+
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-emoji": "^7.
|
|
34
|
+
"@atlaskit/editor-plugin-emoji": "^7.2.0",
|
|
35
35
|
"@atlaskit/editor-plugin-extension": "^9.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-interaction": "^8.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-table": "^15.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-user-intent": "^4.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
40
|
"@atlaskit/emoji": "^69.5.0",
|
|
41
|
-
"@atlaskit/icon": "^28.
|
|
41
|
+
"@atlaskit/icon": "^28.5.0",
|
|
42
42
|
"@atlaskit/menu": "^8.4.0",
|
|
43
|
-
"@atlaskit/modal-dialog": "^14.
|
|
43
|
+
"@atlaskit/modal-dialog": "^14.5.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/primitives": "^14.15.0",
|
|
46
46
|
"@atlaskit/select": "^21.3.0",
|
|
47
47
|
"@atlaskit/theme": "^21.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
49
49
|
"@atlaskit/tokens": "^6.4.0",
|
|
50
50
|
"@atlaskit/tooltip": "^20.5.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-loadable": "^5.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^110.
|
|
60
|
+
"@atlaskit/editor-common": "^110.10.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0"
|
|
63
63
|
},
|
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
},
|
|
125
125
|
"platform_editor_fix_confirm_table_removal": {
|
|
126
126
|
"type": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"platform_editor_update_modal_close_button": {
|
|
129
|
+
"type": "boolean"
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
}
|