@atlaskit/editor-common 110.18.5 → 110.18.7
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 +14 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/toolbar/EditorToolbarUIProvider.js +29 -9
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/toolbar/EditorToolbarUIProvider.js +26 -8
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/toolbar/EditorToolbarUIProvider.js +29 -9
- package/dist/esm/ui/DropList/index.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.18.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 110.18.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`bbd03bed5ca41`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bbd03bed5ca41) -
|
|
14
|
+
[ux] ED-29587 Keyboard shortcuts break when navigating to and from dropdown menus
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 110.18.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
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); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "110.18.
|
|
19
|
+
var packageVersion = "110.18.6";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.EditorToolbarUIProvider = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
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); }
|
|
11
12
|
var EditorToolbarUIProvider = exports.EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
|
|
12
13
|
var children = _ref.children,
|
|
@@ -18,17 +19,36 @@ var EditorToolbarUIProvider = exports.EditorToolbarUIProvider = function EditorT
|
|
|
18
19
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
19
20
|
keyboardNavigation = _ref.keyboardNavigation;
|
|
20
21
|
var onDropdownOpenChanged = (0, _react.useCallback)(function (_ref2) {
|
|
21
|
-
var isOpen = _ref2.isOpen
|
|
22
|
+
var isOpen = _ref2.isOpen,
|
|
23
|
+
event = _ref2.event;
|
|
22
24
|
if (!isOpen) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7')) {
|
|
26
|
+
// Only refocus the editor when the dropdown closes via mouse or programmatic close.
|
|
27
|
+
// When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
|
|
28
|
+
var isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
|
|
29
|
+
var shouldFocusEditor = !isKeyboardEscape;
|
|
30
|
+
if (shouldFocusEditor) {
|
|
31
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
32
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
33
|
+
setTimeout(function () {
|
|
34
|
+
return requestAnimationFrame(function () {
|
|
35
|
+
api === null || api === void 0 || api.core.actions.focus({
|
|
36
|
+
scrollIntoView: false
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}, 1);
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
43
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
44
|
+
setTimeout(function () {
|
|
45
|
+
return requestAnimationFrame(function () {
|
|
46
|
+
api === null || api === void 0 || api.core.actions.focus({
|
|
47
|
+
scrollIntoView: false
|
|
48
|
+
});
|
|
29
49
|
});
|
|
30
|
-
});
|
|
31
|
-
}
|
|
50
|
+
}, 1);
|
|
51
|
+
}
|
|
32
52
|
}
|
|
33
53
|
}, [api]);
|
|
34
54
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarUIProvider, {
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "110.18.
|
|
27
|
+
var packageVersion = "110.18.6";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "110.18.
|
|
4
|
+
const packageVersion = "110.18.6";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
export const EditorToolbarUIProvider = ({
|
|
4
5
|
children,
|
|
5
6
|
api,
|
|
@@ -11,16 +12,33 @@ export const EditorToolbarUIProvider = ({
|
|
|
11
12
|
keyboardNavigation
|
|
12
13
|
}) => {
|
|
13
14
|
const onDropdownOpenChanged = useCallback(({
|
|
14
|
-
isOpen
|
|
15
|
+
isOpen,
|
|
16
|
+
event
|
|
15
17
|
}) => {
|
|
16
18
|
if (!isOpen) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (fg('platform_editor_toolbar_aifc_patch_7')) {
|
|
20
|
+
// Only refocus the editor when the dropdown closes via mouse or programmatic close.
|
|
21
|
+
// When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
|
|
22
|
+
const isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
|
|
23
|
+
const shouldFocusEditor = !isKeyboardEscape;
|
|
24
|
+
if (shouldFocusEditor) {
|
|
25
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
26
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
27
|
+
setTimeout(() => requestAnimationFrame(() => {
|
|
28
|
+
api === null || api === void 0 ? void 0 : api.core.actions.focus({
|
|
29
|
+
scrollIntoView: false
|
|
30
|
+
});
|
|
31
|
+
}), 1);
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
35
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
36
|
+
setTimeout(() => requestAnimationFrame(() => {
|
|
37
|
+
api === null || api === void 0 ? void 0 : api.core.actions.focus({
|
|
38
|
+
scrollIntoView: false
|
|
39
|
+
});
|
|
40
|
+
}), 1);
|
|
41
|
+
}
|
|
24
42
|
}
|
|
25
43
|
}, [api]);
|
|
26
44
|
return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "110.18.
|
|
17
|
+
const packageVersion = "110.18.6";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "110.18.
|
|
10
|
+
var packageVersion = "110.18.6";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
|
|
4
5
|
var children = _ref.children,
|
|
5
6
|
api = _ref.api,
|
|
@@ -10,17 +11,36 @@ export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
|
|
|
10
11
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
11
12
|
keyboardNavigation = _ref.keyboardNavigation;
|
|
12
13
|
var onDropdownOpenChanged = useCallback(function (_ref2) {
|
|
13
|
-
var isOpen = _ref2.isOpen
|
|
14
|
+
var isOpen = _ref2.isOpen,
|
|
15
|
+
event = _ref2.event;
|
|
14
16
|
if (!isOpen) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
if (fg('platform_editor_toolbar_aifc_patch_7')) {
|
|
18
|
+
// Only refocus the editor when the dropdown closes via mouse or programmatic close.
|
|
19
|
+
// When closed via keyboard Escape, keep focus on the trigger for better keyboard UX.
|
|
20
|
+
var isKeyboardEscape = event instanceof KeyboardEvent && event.key === 'Escape';
|
|
21
|
+
var shouldFocusEditor = !isKeyboardEscape;
|
|
22
|
+
if (shouldFocusEditor) {
|
|
23
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
24
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
25
|
+
setTimeout(function () {
|
|
26
|
+
return requestAnimationFrame(function () {
|
|
27
|
+
api === null || api === void 0 || api.core.actions.focus({
|
|
28
|
+
scrollIntoView: false
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}, 1);
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
// On Dropdown closed, focus is returned to trigger button by default in requestAnimationFrame
|
|
35
|
+
// Hence, `.focus()` should also be called in requestAnimationFrame
|
|
36
|
+
setTimeout(function () {
|
|
37
|
+
return requestAnimationFrame(function () {
|
|
38
|
+
api === null || api === void 0 || api.core.actions.focus({
|
|
39
|
+
scrollIntoView: false
|
|
40
|
+
});
|
|
21
41
|
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
42
|
+
}, 1);
|
|
43
|
+
}
|
|
24
44
|
}
|
|
25
45
|
}, [api]);
|
|
26
46
|
return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "110.18.
|
|
24
|
+
var packageVersion = "110.18.6";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.18.
|
|
3
|
+
"version": "110.18.7",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
39
39
|
"@atlaskit/atlassian-context": "^0.6.0",
|
|
40
40
|
"@atlaskit/button": "^23.5.0",
|
|
41
|
-
"@atlaskit/code": "^17.
|
|
41
|
+
"@atlaskit/code": "^17.3.0",
|
|
42
42
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
43
43
|
"@atlaskit/css": "^0.15.0",
|
|
44
44
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"@atlaskit/menu": "^8.4.0",
|
|
69
69
|
"@atlaskit/onboarding": "^14.4.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
71
|
-
"@atlaskit/platform-feature-flags-react": "^0.
|
|
71
|
+
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
72
72
|
"@atlaskit/popper": "^7.1.0",
|
|
73
73
|
"@atlaskit/primitives": "^16.0.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.20.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
76
|
"@atlaskit/react-ufo": "^4.12.0",
|
|
77
|
-
"@atlaskit/section-message": "^8.
|
|
77
|
+
"@atlaskit/section-message": "^8.8.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.4.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^8.4.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|