@atlaskit/editor-common 106.3.0 → 106.3.2
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 +22 -0
- package/dist/cjs/media-single/ExternalImageBadge.js +1 -1
- package/dist/cjs/messages/help-dialog.js +10 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/Dropdown/index.js +11 -0
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +11 -2
- package/dist/es2019/media-single/ExternalImageBadge.js +1 -1
- package/dist/es2019/messages/help-dialog.js +10 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/Dropdown/index.js +9 -0
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +11 -2
- package/dist/esm/media-single/ExternalImageBadge.js +1 -1
- package/dist/esm/messages/help-dialog.js +10 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/Dropdown/index.js +11 -0
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +11 -2
- package/dist/types/messages/help-dialog.d.ts +10 -0
- package/dist/types/ui-menu/Dropdown/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/help-dialog.d.ts +10 -0
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -0
- package/package.json +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 106.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#166424](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166424)
|
|
8
|
+
[`5bfa5b37065b1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5bfa5b37065b1) -
|
|
9
|
+
[ED-27807] Fix a bug where first button in the floating toolbar is shown with focus ring when
|
|
10
|
+
pressing Option+F10
|
|
11
|
+
- [#167027](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/167027)
|
|
12
|
+
[`44639aaa2f7ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44639aaa2f7ae) -
|
|
13
|
+
ED-28191 add new description text for resizing shortcut now it applies to more elements behind
|
|
14
|
+
platform_editor_breakout_resizing experiment
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 106.3.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#166430](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166430)
|
|
22
|
+
[`cbdfbbb359bd9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cbdfbbb359bd9) -
|
|
23
|
+
[ux] ED-27214 Fix flickering when dropdown menu opens in floating toolbar
|
|
24
|
+
|
|
3
25
|
## 106.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -18,7 +18,7 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
18
18
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
19
19
|
cursor: 'pointer'
|
|
20
20
|
});
|
|
21
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
21
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
22
22
|
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
23
23
|
if (!url) {
|
|
24
24
|
return false;
|
|
@@ -71,11 +71,21 @@ var helpDialogMessages = exports.helpDialogMessages = (0, _reactIntlNext.defineM
|
|
|
71
71
|
defaultMessage: 'Increase table or media size',
|
|
72
72
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
73
73
|
},
|
|
74
|
+
increaseElementSize: {
|
|
75
|
+
id: 'fabric.editor.increaseElementSize',
|
|
76
|
+
defaultMessage: 'Increase element size',
|
|
77
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
78
|
+
},
|
|
74
79
|
decreaseSize: {
|
|
75
80
|
id: 'fabric.editor.decreaseSize',
|
|
76
81
|
defaultMessage: 'Decrease table or media size',
|
|
77
82
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
78
83
|
},
|
|
84
|
+
decreaseElementSize: {
|
|
85
|
+
id: 'fabric.editor.decreaseElementSize',
|
|
86
|
+
defaultMessage: 'Decrease element size',
|
|
87
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
88
|
+
},
|
|
79
89
|
openCellOptions: {
|
|
80
90
|
id: 'fabric.editor.openCellOptions',
|
|
81
91
|
defaultMessage: 'Open cell options',
|
|
@@ -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 = "106.3.
|
|
19
|
+
var packageVersion = "106.3.2";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "106.3.
|
|
26
|
+
var packageVersion = "106.3.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -18,6 +18,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
18
18
|
var _uiReact = require("../../ui-react");
|
|
19
19
|
var _DropList = _interopRequireDefault(require("../../ui/DropList"));
|
|
20
20
|
var _Popup = _interopRequireDefault(require("../../ui/Popup"));
|
|
21
|
+
var _utils = require("../../ui/Popup/utils");
|
|
21
22
|
var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
22
23
|
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); }
|
|
23
24
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -68,6 +69,16 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
68
69
|
}
|
|
69
70
|
(0, _inherits2.default)(Dropdown, _PureComponent);
|
|
70
71
|
return (0, _createClass2.default)(Dropdown, [{
|
|
72
|
+
key: "componentDidUpdate",
|
|
73
|
+
value: function componentDidUpdate(prevProps) {
|
|
74
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && (0, _platformFeatureFlags.fg)('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
75
|
+
var initialPlacement = (0, _utils.calculatePlacement)(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
76
|
+
this.setState({
|
|
77
|
+
popupPlacement: initialPlacement
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
71
82
|
key: "renderDropdown",
|
|
72
83
|
value: function renderDropdown() {
|
|
73
84
|
var _this$state = this.state,
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _elementBrowser = require("../../element-browser");
|
|
12
13
|
var _messages = require("../../messages");
|
|
@@ -213,10 +214,18 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
213
214
|
// Ignored via go/ees005
|
|
214
215
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
215
216
|
if (isShortcutToFocusToolbar(event)) {
|
|
216
|
-
var _filteredFocusableEle7, _filteredFocusableEle8;
|
|
217
|
+
var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
|
|
217
218
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
218
219
|
(_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
|
|
219
|
-
|
|
220
|
+
|
|
221
|
+
// Button component from DS removes focus ring when :focus:not(:focus-visible) is true
|
|
222
|
+
// Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
|
|
223
|
+
// which is why the first button in the toolbar is not shown with focus ring
|
|
224
|
+
// The workaround is add a new classname so we add back focus ring when the button is focused
|
|
225
|
+
if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && (0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus')) {
|
|
226
|
+
filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
|
|
227
|
+
}
|
|
228
|
+
(_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 || _filteredFocusableEle9.scrollIntoView({
|
|
220
229
|
behavior: 'smooth',
|
|
221
230
|
block: 'center',
|
|
222
231
|
inline: 'nearest'
|
|
@@ -11,7 +11,7 @@ const baseStyles = xcss({
|
|
|
11
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
12
12
|
cursor: 'pointer'
|
|
13
13
|
});
|
|
14
|
-
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
14
|
+
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
15
15
|
export const isUnbadgedUrl = url => {
|
|
16
16
|
if (!url) {
|
|
17
17
|
return false;
|
|
@@ -65,11 +65,21 @@ export const helpDialogMessages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Increase table or media size',
|
|
66
66
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
67
67
|
},
|
|
68
|
+
increaseElementSize: {
|
|
69
|
+
id: 'fabric.editor.increaseElementSize',
|
|
70
|
+
defaultMessage: 'Increase element size',
|
|
71
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
72
|
+
},
|
|
68
73
|
decreaseSize: {
|
|
69
74
|
id: 'fabric.editor.decreaseSize',
|
|
70
75
|
defaultMessage: 'Decrease table or media size',
|
|
71
76
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
72
77
|
},
|
|
78
|
+
decreaseElementSize: {
|
|
79
|
+
id: 'fabric.editor.decreaseElementSize',
|
|
80
|
+
defaultMessage: 'Decrease element size',
|
|
81
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
82
|
+
},
|
|
73
83
|
openCellOptions: {
|
|
74
84
|
id: 'fabric.editor.openCellOptions',
|
|
75
85
|
defaultMessage: 'Open cell options',
|
|
@@ -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 = "106.3.
|
|
4
|
+
const packageVersion = "106.3.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "106.3.
|
|
16
|
+
const packageVersion = "106.3.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -5,6 +5,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
5
5
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
6
6
|
import DropdownList from '../../ui/DropList';
|
|
7
7
|
import Popup from '../../ui/Popup';
|
|
8
|
+
import { calculatePlacement } from '../../ui/Popup/utils';
|
|
8
9
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
9
10
|
/**
|
|
10
11
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -45,6 +46,14 @@ export class Dropdown extends PureComponent {
|
|
|
45
46
|
popupPlacement: ['bottom', 'left']
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
componentDidUpdate(prevProps) {
|
|
50
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && fg('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
51
|
+
const initialPlacement = calculatePlacement(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
52
|
+
this.setState({
|
|
53
|
+
popupPlacement: initialPlacement
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
renderDropdown() {
|
|
49
58
|
const {
|
|
50
59
|
target,
|
|
@@ -7,6 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
12
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
13
|
import { fullPageMessages } from '../../messages';
|
|
@@ -205,10 +206,18 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
205
206
|
// Ignored via go/ees005
|
|
206
207
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
207
208
|
if (isShortcutToFocusToolbar(event)) {
|
|
208
|
-
var _filteredFocusableEle7, _filteredFocusableEle8;
|
|
209
|
+
var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
|
|
209
210
|
const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
210
211
|
(_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 ? void 0 : _filteredFocusableEle7.focus();
|
|
211
|
-
|
|
212
|
+
|
|
213
|
+
// Button component from DS removes focus ring when :focus:not(:focus-visible) is true
|
|
214
|
+
// Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
|
|
215
|
+
// which is why the first button in the toolbar is not shown with focus ring
|
|
216
|
+
// The workaround is add a new classname so we add back focus ring when the button is focused
|
|
217
|
+
if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && fg('platform_editor_fix_floating_toolbar_focus')) {
|
|
218
|
+
filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
|
|
219
|
+
}
|
|
220
|
+
(_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 ? void 0 : _filteredFocusableEle9.scrollIntoView({
|
|
212
221
|
behavior: 'smooth',
|
|
213
222
|
block: 'center',
|
|
214
223
|
inline: 'nearest'
|
|
@@ -11,7 +11,7 @@ var baseStyles = xcss({
|
|
|
11
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
12
12
|
cursor: 'pointer'
|
|
13
13
|
});
|
|
14
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
14
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com'];
|
|
15
15
|
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
16
16
|
if (!url) {
|
|
17
17
|
return false;
|
|
@@ -65,11 +65,21 @@ export var helpDialogMessages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Increase table or media size',
|
|
66
66
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
67
67
|
},
|
|
68
|
+
increaseElementSize: {
|
|
69
|
+
id: 'fabric.editor.increaseElementSize',
|
|
70
|
+
defaultMessage: 'Increase element size',
|
|
71
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to increase the width of the selected element. Optimal characters less than 21.'
|
|
72
|
+
},
|
|
68
73
|
decreaseSize: {
|
|
69
74
|
id: 'fabric.editor.decreaseSize',
|
|
70
75
|
defaultMessage: 'Decrease table or media size',
|
|
71
76
|
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
72
77
|
},
|
|
78
|
+
decreaseElementSize: {
|
|
79
|
+
id: 'fabric.editor.decreaseElementSize',
|
|
80
|
+
defaultMessage: 'Decrease element size',
|
|
81
|
+
description: 'The text is shown as an shortcut description in help dialog modal, when the user uses the described shortcut, he is able to decrease the width of the selected element. Optimal characters less than 21.'
|
|
82
|
+
},
|
|
73
83
|
openCellOptions: {
|
|
74
84
|
id: 'fabric.editor.openCellOptions',
|
|
75
85
|
defaultMessage: 'Open cell options',
|
|
@@ -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 = "106.3.
|
|
10
|
+
var packageVersion = "106.3.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "106.3.
|
|
23
|
+
var packageVersion = "106.3.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -12,6 +12,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
12
12
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
13
13
|
import DropdownList from '../../ui/DropList';
|
|
14
14
|
import Popup from '../../ui/Popup';
|
|
15
|
+
import { calculatePlacement } from '../../ui/Popup/utils';
|
|
15
16
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
16
17
|
/**
|
|
17
18
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -59,6 +60,16 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
59
60
|
}
|
|
60
61
|
_inherits(Dropdown, _PureComponent);
|
|
61
62
|
return _createClass(Dropdown, [{
|
|
63
|
+
key: "componentDidUpdate",
|
|
64
|
+
value: function componentDidUpdate(prevProps) {
|
|
65
|
+
if (!prevProps.isOpen && this.props.isOpen && this.state.target && fg('platform_editor_floating_toolbar_dropdown_flicker')) {
|
|
66
|
+
var initialPlacement = calculatePlacement(this.state.target, this.props.boundariesElement || document.body, this.props.fitWidth, this.props.fitHeight, this.props.alignX, this.props.alignY, this.props.forcePlacement);
|
|
67
|
+
this.setState({
|
|
68
|
+
popupPlacement: initialPlacement
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
62
73
|
key: "renderDropdown",
|
|
63
74
|
value: function renderDropdown() {
|
|
64
75
|
var _this$state = this.state,
|
|
@@ -7,6 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
12
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
13
|
import { fullPageMessages } from '../../messages';
|
|
@@ -205,10 +206,18 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
205
206
|
// Ignored via go/ees005
|
|
206
207
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
207
208
|
if (isShortcutToFocusToolbar(event)) {
|
|
208
|
-
var _filteredFocusableEle7, _filteredFocusableEle8;
|
|
209
|
+
var _filteredFocusableEle7, _filteredFocusableEle8, _filteredFocusableEle9;
|
|
209
210
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
210
211
|
(_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
|
|
211
|
-
|
|
212
|
+
|
|
213
|
+
// Button component from DS removes focus ring when :focus:not(:focus-visible) is true
|
|
214
|
+
// Since here we programmatically focus the first button in the toolbar (as suppose to keyboard navigation), browser does not always force focus-visible to true
|
|
215
|
+
// which is why the first button in the toolbar is not shown with focus ring
|
|
216
|
+
// The workaround is add a new classname so we add back focus ring when the button is focused
|
|
217
|
+
if (((_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.tagName) === 'BUTTON' && fg('platform_editor_fix_floating_toolbar_focus')) {
|
|
218
|
+
filteredFocusableElements[0].classList.add('first-floating-toolbar-button');
|
|
219
|
+
}
|
|
220
|
+
(_filteredFocusableEle9 = filteredFocusableElements[0]) === null || _filteredFocusableEle9 === void 0 || _filteredFocusableEle9.scrollIntoView({
|
|
212
221
|
behavior: 'smooth',
|
|
213
222
|
block: 'center',
|
|
214
223
|
inline: 'nearest'
|
|
@@ -64,11 +64,21 @@ export declare const helpDialogMessages: {
|
|
|
64
64
|
defaultMessage: string;
|
|
65
65
|
description: string;
|
|
66
66
|
};
|
|
67
|
+
increaseElementSize: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
67
72
|
decreaseSize: {
|
|
68
73
|
id: string;
|
|
69
74
|
defaultMessage: string;
|
|
70
75
|
description: string;
|
|
71
76
|
};
|
|
77
|
+
decreaseElementSize: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
72
82
|
openCellOptions: {
|
|
73
83
|
id: string;
|
|
74
84
|
defaultMessage: string;
|
|
@@ -39,6 +39,7 @@ export declare class Dropdown extends PureComponent<Props, State> {
|
|
|
39
39
|
private updatePopupPlacement;
|
|
40
40
|
private handleCloseAndFocus;
|
|
41
41
|
private handleClose;
|
|
42
|
+
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
42
43
|
private renderDropdown;
|
|
43
44
|
render(): React.JSX.Element;
|
|
44
45
|
}
|
|
@@ -64,11 +64,21 @@ export declare const helpDialogMessages: {
|
|
|
64
64
|
defaultMessage: string;
|
|
65
65
|
description: string;
|
|
66
66
|
};
|
|
67
|
+
increaseElementSize: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
67
72
|
decreaseSize: {
|
|
68
73
|
id: string;
|
|
69
74
|
defaultMessage: string;
|
|
70
75
|
description: string;
|
|
71
76
|
};
|
|
77
|
+
decreaseElementSize: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
72
82
|
openCellOptions: {
|
|
73
83
|
id: string;
|
|
74
84
|
defaultMessage: string;
|
|
@@ -45,6 +45,7 @@ export declare class Dropdown extends PureComponent<Props, State> {
|
|
|
45
45
|
private updatePopupPlacement;
|
|
46
46
|
private handleCloseAndFocus;
|
|
47
47
|
private handleClose;
|
|
48
|
+
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
48
49
|
private renderDropdown;
|
|
49
50
|
render(): React.JSX.Element;
|
|
50
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "106.3.
|
|
3
|
+
"version": "106.3.2",
|
|
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/"
|
|
@@ -163,14 +163,14 @@
|
|
|
163
163
|
"@atlaskit/profilecard": "^23.16.0",
|
|
164
164
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
165
165
|
"@atlaskit/section-message": "^8.2.0",
|
|
166
|
-
"@atlaskit/smart-card": "^38.
|
|
166
|
+
"@atlaskit/smart-card": "^38.8.0",
|
|
167
167
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
168
168
|
"@atlaskit/spinner": "^18.0.0",
|
|
169
169
|
"@atlaskit/task-decision": "^19.2.0",
|
|
170
170
|
"@atlaskit/textfield": "^8.0.0",
|
|
171
171
|
"@atlaskit/theme": "^18.0.0",
|
|
172
172
|
"@atlaskit/tmp-editor-statsig": "^5.13.0",
|
|
173
|
-
"@atlaskit/tokens": "^5.
|
|
173
|
+
"@atlaskit/tokens": "^5.1.0",
|
|
174
174
|
"@atlaskit/tooltip": "^20.3.0",
|
|
175
175
|
"@atlaskit/width-detector": "^5.0.0",
|
|
176
176
|
"@babel/runtime": "^7.0.0",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"devDependencies": {
|
|
210
210
|
"@af/visual-regression": "workspace:^",
|
|
211
211
|
"@atlaskit/media-core": "^36.1.0",
|
|
212
|
-
"@atlaskit/media-test-helpers": "^36.
|
|
212
|
+
"@atlaskit/media-test-helpers": "^36.1.0",
|
|
213
213
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
214
214
|
"@atlaskit/visual-regression": "workspace:^",
|
|
215
215
|
"@testing-library/dom": "^10.1.0",
|
|
@@ -391,11 +391,17 @@
|
|
|
391
391
|
"dst-a11y__replace-anchor-with-link__editor": {
|
|
392
392
|
"type": "boolean"
|
|
393
393
|
},
|
|
394
|
+
"platform_editor_floating_toolbar_dropdown_flicker": {
|
|
395
|
+
"type": "boolean"
|
|
396
|
+
},
|
|
394
397
|
"confluence_preload_forge_viewport_heights_editor": {
|
|
395
398
|
"type": "boolean"
|
|
396
399
|
},
|
|
397
400
|
"interactable_in_editor_inputs": {
|
|
398
401
|
"type": "boolean"
|
|
402
|
+
},
|
|
403
|
+
"platform_editor_fix_floating_toolbar_focus": {
|
|
404
|
+
"type": "boolean"
|
|
399
405
|
}
|
|
400
406
|
}
|
|
401
407
|
}
|