@atlaskit/editor-core 214.2.0 → 214.2.1
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 +8 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -15
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -14
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -15
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -15
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -14
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 214.2.1
|
|
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
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 214.2.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -99,13 +99,11 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
var
|
|
102
|
+
var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
|
|
103
103
|
//Alt + F9 to reach first element in this main toolbar
|
|
104
104
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
105
|
-
};
|
|
106
|
-
var
|
|
107
|
-
var isShortcutToFocusToolbar = (0, _experiments.editorExperiment)('platform_editor_toolbar_rerender_optimization_exp', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
108
|
-
var handleEscapeRaw = function handleEscapeRaw(event) {
|
|
105
|
+
}, []);
|
|
106
|
+
var handleEscape = (0, _react.useCallback)(function (event) {
|
|
109
107
|
var _props$editorView;
|
|
110
108
|
if (!((_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.hasFocus())) {
|
|
111
109
|
var _props$editorView2;
|
|
@@ -113,17 +111,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
113
111
|
}
|
|
114
112
|
event.preventDefault();
|
|
115
113
|
event.stopPropagation();
|
|
116
|
-
};
|
|
117
|
-
var handleEscapeMemoized = (0, _react.useCallback)(function (event) {
|
|
118
|
-
var _props$editorView3;
|
|
119
|
-
if (!((_props$editorView3 = props.editorView) !== null && _props$editorView3 !== void 0 && _props$editorView3.hasFocus())) {
|
|
120
|
-
var _props$editorView4;
|
|
121
|
-
(_props$editorView4 = props.editorView) === null || _props$editorView4 === void 0 || _props$editorView4.focus();
|
|
122
|
-
}
|
|
123
|
-
event.preventDefault();
|
|
124
|
-
event.stopPropagation();
|
|
125
114
|
}, [props.editorView]);
|
|
126
|
-
var handleEscape = (0, _experiments.editorExperiment)('platform_editor_toolbar_rerender_optimization_exp', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
127
115
|
return (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
|
|
128
116
|
var contextPanelWidth = _ref2.width;
|
|
129
117
|
return (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
@@ -14,7 +14,6 @@ var _contextPanel = require("@atlaskit/editor-common/context-panel");
|
|
|
14
14
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
15
15
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
16
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
18
17
|
var _toolbar2 = require("../../../utils/toolbar");
|
|
19
18
|
var _Toolbar = require("../../Toolbar/Toolbar");
|
|
20
19
|
var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
|
|
@@ -78,27 +77,17 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
78
77
|
ToolbarPortal = _ref5.Portal;
|
|
79
78
|
var hasToolbarPortal = ToolbarPortal !== _react.default.Fragment;
|
|
80
79
|
var mountPoint = hasToolbarPortal ? undefined : popupsMountPoint;
|
|
81
|
-
var
|
|
80
|
+
var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
|
|
82
81
|
//Alt + F9 to reach first element in this main toolbar
|
|
83
82
|
return event.altKey && event.key === 'F9';
|
|
84
|
-
};
|
|
85
|
-
var
|
|
86
|
-
var isShortcutToFocusToolbar = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
87
|
-
var handleEscapeRaw = function handleEscapeRaw(event) {
|
|
88
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
89
|
-
editorView === null || editorView === void 0 || editorView.focus();
|
|
90
|
-
}
|
|
91
|
-
event.preventDefault();
|
|
92
|
-
event.stopPropagation();
|
|
93
|
-
};
|
|
94
|
-
var handleEscapeMemoized = (0, _react.useCallback)(function (event) {
|
|
83
|
+
}, []);
|
|
84
|
+
var handleEscape = (0, _react.useCallback)(function (event) {
|
|
95
85
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
96
86
|
editorView === null || editorView === void 0 || editorView.focus();
|
|
97
87
|
}
|
|
98
88
|
event.preventDefault();
|
|
99
89
|
event.stopPropagation();
|
|
100
90
|
}, [editorView]);
|
|
101
|
-
var handleEscape = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
102
91
|
return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref6) {
|
|
103
92
|
var ContextPanelWidth = _ref6.width;
|
|
104
93
|
return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
@@ -87,13 +87,11 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
87
87
|
return () => window.removeEventListener('resize', updateOnResize);
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
const
|
|
90
|
+
const isShortcutToFocusToolbar = useCallback(event => {
|
|
91
91
|
//Alt + F9 to reach first element in this main toolbar
|
|
92
92
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
93
|
-
};
|
|
94
|
-
const
|
|
95
|
-
const isShortcutToFocusToolbar = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
96
|
-
const handleEscapeRaw = event => {
|
|
93
|
+
}, []);
|
|
94
|
+
const handleEscape = useCallback(event => {
|
|
97
95
|
var _props$editorView;
|
|
98
96
|
if (!((_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.hasFocus())) {
|
|
99
97
|
var _props$editorView2;
|
|
@@ -101,17 +99,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
101
99
|
}
|
|
102
100
|
event.preventDefault();
|
|
103
101
|
event.stopPropagation();
|
|
104
|
-
};
|
|
105
|
-
const handleEscapeMemoized = useCallback(event => {
|
|
106
|
-
var _props$editorView3;
|
|
107
|
-
if (!((_props$editorView3 = props.editorView) !== null && _props$editorView3 !== void 0 && _props$editorView3.hasFocus())) {
|
|
108
|
-
var _props$editorView4;
|
|
109
|
-
(_props$editorView4 = props.editorView) === null || _props$editorView4 === void 0 ? void 0 : _props$editorView4.focus();
|
|
110
|
-
}
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
event.stopPropagation();
|
|
113
102
|
}, [props.editorView]);
|
|
114
|
-
const handleEscape = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
115
103
|
return jsx(ContextPanelConsumer, null, ({
|
|
116
104
|
width: contextPanelWidth
|
|
117
105
|
}) => jsx(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -7,7 +7,6 @@ import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
|
7
7
|
import { TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
8
8
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { isToolbar } from '../../../utils/toolbar';
|
|
12
11
|
import { ToolbarNext } from '../../Toolbar/Toolbar';
|
|
13
12
|
import { useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
@@ -73,27 +72,17 @@ export const FullPageToolbarNext = ({
|
|
|
73
72
|
};
|
|
74
73
|
const hasToolbarPortal = ToolbarPortal !== React.Fragment;
|
|
75
74
|
const mountPoint = hasToolbarPortal ? undefined : popupsMountPoint;
|
|
76
|
-
const
|
|
75
|
+
const isShortcutToFocusToolbar = useCallback(event => {
|
|
77
76
|
//Alt + F9 to reach first element in this main toolbar
|
|
78
77
|
return event.altKey && event.key === 'F9';
|
|
79
|
-
};
|
|
80
|
-
const
|
|
81
|
-
const isShortcutToFocusToolbar = expValEqualsNoExposure('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
82
|
-
const handleEscapeRaw = event => {
|
|
83
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
84
|
-
editorView === null || editorView === void 0 ? void 0 : editorView.focus();
|
|
85
|
-
}
|
|
86
|
-
event.preventDefault();
|
|
87
|
-
event.stopPropagation();
|
|
88
|
-
};
|
|
89
|
-
const handleEscapeMemoized = useCallback(event => {
|
|
78
|
+
}, []);
|
|
79
|
+
const handleEscape = useCallback(event => {
|
|
90
80
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
91
81
|
editorView === null || editorView === void 0 ? void 0 : editorView.focus();
|
|
92
82
|
}
|
|
93
83
|
event.preventDefault();
|
|
94
84
|
event.stopPropagation();
|
|
95
85
|
}, [editorView]);
|
|
96
|
-
const handleEscape = expValEqualsNoExposure('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
97
86
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
98
87
|
width: ContextPanelWidth
|
|
99
88
|
}) => /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "214.
|
|
2
|
+
export const version = "214.2.0";
|
|
@@ -90,13 +90,11 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
var
|
|
93
|
+
var isShortcutToFocusToolbar = useCallback(function (event) {
|
|
94
94
|
//Alt + F9 to reach first element in this main toolbar
|
|
95
95
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
96
|
-
};
|
|
97
|
-
var
|
|
98
|
-
var isShortcutToFocusToolbar = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
99
|
-
var handleEscapeRaw = function handleEscapeRaw(event) {
|
|
96
|
+
}, []);
|
|
97
|
+
var handleEscape = useCallback(function (event) {
|
|
100
98
|
var _props$editorView;
|
|
101
99
|
if (!((_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.hasFocus())) {
|
|
102
100
|
var _props$editorView2;
|
|
@@ -104,17 +102,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
104
102
|
}
|
|
105
103
|
event.preventDefault();
|
|
106
104
|
event.stopPropagation();
|
|
107
|
-
};
|
|
108
|
-
var handleEscapeMemoized = useCallback(function (event) {
|
|
109
|
-
var _props$editorView3;
|
|
110
|
-
if (!((_props$editorView3 = props.editorView) !== null && _props$editorView3 !== void 0 && _props$editorView3.hasFocus())) {
|
|
111
|
-
var _props$editorView4;
|
|
112
|
-
(_props$editorView4 = props.editorView) === null || _props$editorView4 === void 0 || _props$editorView4.focus();
|
|
113
|
-
}
|
|
114
|
-
event.preventDefault();
|
|
115
|
-
event.stopPropagation();
|
|
116
105
|
}, [props.editorView]);
|
|
117
|
-
var handleEscape = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
118
106
|
return jsx(ContextPanelConsumer, null, function (_ref2) {
|
|
119
107
|
var contextPanelWidth = _ref2.width;
|
|
120
108
|
return jsx(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -7,7 +7,6 @@ import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
|
7
7
|
import { TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
8
8
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { isToolbar } from '../../../utils/toolbar';
|
|
12
11
|
import { ToolbarNext } from '../../Toolbar/Toolbar';
|
|
13
12
|
import { useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
@@ -70,27 +69,17 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
70
69
|
ToolbarPortal = _ref5.Portal;
|
|
71
70
|
var hasToolbarPortal = ToolbarPortal !== React.Fragment;
|
|
72
71
|
var mountPoint = hasToolbarPortal ? undefined : popupsMountPoint;
|
|
73
|
-
var
|
|
72
|
+
var isShortcutToFocusToolbar = useCallback(function (event) {
|
|
74
73
|
//Alt + F9 to reach first element in this main toolbar
|
|
75
74
|
return event.altKey && event.key === 'F9';
|
|
76
|
-
};
|
|
77
|
-
var
|
|
78
|
-
var isShortcutToFocusToolbar = expValEqualsNoExposure('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
|
|
79
|
-
var handleEscapeRaw = function handleEscapeRaw(event) {
|
|
80
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
81
|
-
editorView === null || editorView === void 0 || editorView.focus();
|
|
82
|
-
}
|
|
83
|
-
event.preventDefault();
|
|
84
|
-
event.stopPropagation();
|
|
85
|
-
};
|
|
86
|
-
var handleEscapeMemoized = useCallback(function (event) {
|
|
75
|
+
}, []);
|
|
76
|
+
var handleEscape = useCallback(function (event) {
|
|
87
77
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
88
78
|
editorView === null || editorView === void 0 || editorView.focus();
|
|
89
79
|
}
|
|
90
80
|
event.preventDefault();
|
|
91
81
|
event.stopPropagation();
|
|
92
82
|
}, [editorView]);
|
|
93
|
-
var handleEscape = expValEqualsNoExposure('platform_editor_toolbar_rerender_optimization_exp', 'isEnabled', true) ? handleEscapeMemoized : handleEscapeRaw;
|
|
94
83
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref6) {
|
|
95
84
|
var ContextPanelWidth = _ref6.width;
|
|
96
85
|
return /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "214.
|
|
2
|
+
export var version = "214.2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "214.2.
|
|
3
|
+
"version": "214.2.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/editor-toolbar": "^0.14.0",
|
|
57
57
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
58
58
|
"@atlaskit/emoji": "^69.5.0",
|
|
59
|
-
"@atlaskit/icon": "^28.
|
|
59
|
+
"@atlaskit/icon": "^28.5.0",
|
|
60
60
|
"@atlaskit/link": "^3.2.0",
|
|
61
61
|
"@atlaskit/media-card": "^79.5.0",
|
|
62
62
|
"@atlaskit/mention": "^24.2.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
65
65
|
"@atlaskit/react-ufo": "^4.11.0",
|
|
66
66
|
"@atlaskit/task-decision": "^19.2.0",
|
|
67
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
67
|
+
"@atlaskit/tmp-editor-statsig": "^13.5.0",
|
|
68
68
|
"@atlaskit/tokens": "^6.4.0",
|
|
69
69
|
"@atlaskit/tooltip": "^20.5.0",
|
|
70
70
|
"@atlaskit/width-detector": "^5.0.0",
|