@atlaskit/editor-plugin-floating-toolbar 8.2.2 → 8.2.3
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 +10 -0
- package/dist/cjs/ui/CheckboxModal.js +2 -2
- package/dist/cjs/ui/SimpleModal.js +2 -2
- package/dist/cjs/ui/Toolbar.js +1 -6
- package/dist/es2019/ui/CheckboxModal.js +2 -2
- package/dist/es2019/ui/SimpleModal.js +2 -2
- package/dist/es2019/ui/Toolbar.js +1 -6
- package/dist/esm/ui/CheckboxModal.js +2 -2
- package/dist/esm/ui/SimpleModal.js +2 -2
- package/dist/esm/ui/Toolbar.js +1 -6
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 8.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ff53e1bfc6c25`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ff53e1bfc6c25) -
|
|
8
|
+
[ED-29482] clean up references to platform_editor_toolbar_rerender_optimization_exp
|
|
9
|
+
- [`663926469ec70`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/663926469ec70) -
|
|
10
|
+
Switch to use fg() to check feature gate platform_editor_update_modal_close_button
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 8.2.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -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, {
|
|
@@ -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,
|
|
@@ -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, {
|
|
@@ -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,
|
|
@@ -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, {
|
|
@@ -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.3",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,14 +38,14 @@
|
|
|
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
43
|
"@atlaskit/modal-dialog": "^14.4.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.5.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.7.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
|
}
|