@atlaskit/editor-common 93.4.4 → 93.5.0
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/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +14 -6
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +7 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/EditorContext/index.js +1 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +15 -7
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +9 -4
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/EditorContext/index.js +1 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +15 -7
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +9 -4
- package/dist/types/analytics/types/view-events.d.ts +1 -0
- package/dist/types/ui/EditorContext/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/view-events.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContext/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#151611](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151611)
|
|
8
|
+
[`ee71cb75c933c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee71cb75c933c) -
|
|
9
|
+
ED-25294 add new attribute as engagement platform message trigger
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#152399](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152399)
|
|
14
|
+
[`fbd7217f0cb51`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fbd7217f0cb51) -
|
|
15
|
+
[ux] ED-25092: Added iconFallback prop to FloatingToolbarDropdown
|
|
16
|
+
- [#151611](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151611)
|
|
17
|
+
[`c866e61e26ae2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c866e61e26ae2) -
|
|
18
|
+
[ux] [ED-25306] When opening the media picker from the editor main toolbar do not use the
|
|
19
|
+
ToolbarArrowKeyNavigationProvider
|
|
20
|
+
- [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
|
|
21
|
+
[`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
|
|
22
|
+
bump adf-schema to 42.0.1
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 93.4.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "93.
|
|
20
|
+
var packageVersion = "93.5.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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 = "93.
|
|
27
|
+
var packageVersion = "93.5.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -12,6 +12,8 @@ var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-
|
|
|
12
12
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
13
13
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
14
14
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
15
|
+
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-down"));
|
|
16
|
+
var _primitives = require("@atlaskit/primitives");
|
|
15
17
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
16
18
|
var _analytics = require("../../analytics");
|
|
17
19
|
var _uiColor = require("../../ui-color");
|
|
@@ -30,8 +32,11 @@ var _types = require("../ArrowKeyNavigationProvider/types");
|
|
|
30
32
|
var colorPickerButtonWrapper = (0, _react2.css)({
|
|
31
33
|
position: 'relative'
|
|
32
34
|
});
|
|
33
|
-
var colorPickerExpandContainer = (0,
|
|
34
|
-
|
|
35
|
+
var colorPickerExpandContainer = (0, _primitives.xcss)({
|
|
36
|
+
marginTop: 'space.0',
|
|
37
|
+
marginBottom: 'space.0',
|
|
38
|
+
marginLeft: 'space.negative.050',
|
|
39
|
+
marginRight: 'space.negative.050'
|
|
35
40
|
});
|
|
36
41
|
|
|
37
42
|
// Control the size of color picker buttons and preview
|
|
@@ -228,10 +233,13 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
228
233
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
229
234
|
,
|
|
230
235
|
css: buttonStyle,
|
|
231
|
-
iconAfter: (0, _react2.jsx)(
|
|
232
|
-
|
|
233
|
-
}, (0, _react2.jsx)(
|
|
234
|
-
|
|
236
|
+
iconAfter: (0, _react2.jsx)(_primitives.Box, {
|
|
237
|
+
xcss: colorPickerExpandContainer
|
|
238
|
+
}, (0, _react2.jsx)(_chevronDown2.default, {
|
|
239
|
+
color: "currentColor",
|
|
240
|
+
spacing: "spacious",
|
|
241
|
+
LEGACY_fallbackIcon: _chevronDown.default,
|
|
242
|
+
label: "color-picker-chevron-down"
|
|
235
243
|
})),
|
|
236
244
|
"data-selected-color": props.currentColor
|
|
237
245
|
})), renderPopup());
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _elementBrowser = require("../../element-browser");
|
|
11
11
|
var _messages = require("../../messages");
|
|
12
|
+
var _mediaInsert = require("../../messages/media-insert");
|
|
12
13
|
var _ui = require("../../ui");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -16,7 +17,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
16
17
|
* @jsxRuntime classic
|
|
17
18
|
* @jsx jsx
|
|
18
19
|
*/
|
|
19
|
-
/* eslint-disable no-console */
|
|
20
20
|
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
22
|
|
|
@@ -144,6 +144,11 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
144
144
|
if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
+
|
|
148
|
+
// If the target element is the media picker then navigation is handled by the media picker
|
|
149
|
+
if (targetElement instanceof HTMLElement && targetElement.closest("[aria-label=\"".concat(intl.formatMessage(_mediaInsert.mediaInsertMessages.mediaPickerPopupAriaLabel), "\"]"))) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
147
152
|
if (targetElement instanceof HTMLElement && !((_wrapperRef$current2 = wrapperRef.current) !== null && _wrapperRef$current2 !== void 0 && _wrapperRef$current2.contains(targetElement))) {
|
|
148
153
|
selectedItemIndex.current = -1;
|
|
149
154
|
} else {
|
|
@@ -196,7 +201,7 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
196
201
|
editorViewDom === null || editorViewDom === void 0 || editorViewDom.removeEventListener('keydown', globalKeyDownHandler);
|
|
197
202
|
}
|
|
198
203
|
};
|
|
199
|
-
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
204
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar, intl]);
|
|
200
205
|
return (0, _react2.jsx)("div", {
|
|
201
206
|
css: editorAppearance === 'comment' && centeredToolbarContainer
|
|
202
207
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -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 = "93.
|
|
4
|
+
const packageVersion = "93.5.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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 = "93.
|
|
16
|
+
const packageVersion = "93.5.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export const EditorContext = /*#__PURE__*/React.createContext({});
|
|
@@ -9,7 +9,9 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
10
10
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
11
11
|
import Button from '@atlaskit/button/standard-button';
|
|
12
|
-
import
|
|
12
|
+
import LegacyExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
13
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
14
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
15
17
|
import { ColorPalette, DEFAULT_BORDER_COLOR, getSelectedRowAndColumnFromPalette } from '../../ui-color';
|
|
@@ -22,8 +24,11 @@ import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
|
22
24
|
const colorPickerButtonWrapper = css({
|
|
23
25
|
position: 'relative'
|
|
24
26
|
});
|
|
25
|
-
const colorPickerExpandContainer =
|
|
26
|
-
|
|
27
|
+
const colorPickerExpandContainer = xcss({
|
|
28
|
+
marginTop: 'space.0',
|
|
29
|
+
marginBottom: 'space.0',
|
|
30
|
+
marginLeft: 'space.negative.050',
|
|
31
|
+
marginRight: 'space.negative.050'
|
|
27
32
|
});
|
|
28
33
|
|
|
29
34
|
// Control the size of color picker buttons and preview
|
|
@@ -208,10 +213,13 @@ const ColorPickerButton = props => {
|
|
|
208
213
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
209
214
|
,
|
|
210
215
|
css: buttonStyle,
|
|
211
|
-
iconAfter: jsx(
|
|
212
|
-
|
|
213
|
-
}, jsx(
|
|
214
|
-
|
|
216
|
+
iconAfter: jsx(Box, {
|
|
217
|
+
xcss: colorPickerExpandContainer
|
|
218
|
+
}, jsx(ChevronDownIcon, {
|
|
219
|
+
color: "currentColor",
|
|
220
|
+
spacing: "spacious",
|
|
221
|
+
LEGACY_fallbackIcon: LegacyExpandIcon,
|
|
222
|
+
label: "color-picker-chevron-down"
|
|
215
223
|
})),
|
|
216
224
|
"data-selected-color": props.currentColor
|
|
217
225
|
})), renderPopup());
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
/* eslint-disable no-console */
|
|
6
5
|
|
|
7
6
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
8
7
|
|
|
9
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
9
|
import { css, jsx } from '@emotion/react';
|
|
11
10
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
|
-
import { fullPageMessages
|
|
11
|
+
import { fullPageMessages } from '../../messages';
|
|
12
|
+
import { mediaInsertMessages } from '../../messages/media-insert';
|
|
13
13
|
import { EDIT_AREA_ID } from '../../ui';
|
|
14
14
|
/*
|
|
15
15
|
** The context is used to handle the keydown events of submenus.
|
|
@@ -137,6 +137,11 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
137
137
|
if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
// If the target element is the media picker then navigation is handled by the media picker
|
|
142
|
+
if (targetElement instanceof HTMLElement && targetElement.closest(`[aria-label="${intl.formatMessage(mediaInsertMessages.mediaPickerPopupAriaLabel)}"]`)) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
140
145
|
if (targetElement instanceof HTMLElement && !((_wrapperRef$current2 = wrapperRef.current) !== null && _wrapperRef$current2 !== void 0 && _wrapperRef$current2.contains(targetElement))) {
|
|
141
146
|
selectedItemIndex.current = -1;
|
|
142
147
|
} else {
|
|
@@ -189,7 +194,7 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
189
194
|
editorViewDom === null || editorViewDom === void 0 ? void 0 : editorViewDom.removeEventListener('keydown', globalKeyDownHandler);
|
|
190
195
|
}
|
|
191
196
|
};
|
|
192
|
-
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
197
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar, intl]);
|
|
193
198
|
return jsx("div", {
|
|
194
199
|
css: editorAppearance === 'comment' && centeredToolbarContainer
|
|
195
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -197,7 +202,7 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
197
202
|
className: "custom-key-handler-wrapper",
|
|
198
203
|
ref: wrapperRef,
|
|
199
204
|
role: "toolbar",
|
|
200
|
-
"aria-label": intl.formatMessage(
|
|
205
|
+
"aria-label": intl.formatMessage(fullPageMessages.toolbarLabel),
|
|
201
206
|
"aria-controls": EDIT_AREA_ID
|
|
202
207
|
}, jsx(KeyDownHandlerContext.Provider, {
|
|
203
208
|
value: submenuKeydownHandleContext
|
|
@@ -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 = "93.
|
|
10
|
+
var packageVersion = "93.5.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "93.
|
|
24
|
+
var packageVersion = "93.5.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export var EditorContext = /*#__PURE__*/React.createContext({});
|
|
@@ -10,7 +10,9 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
11
11
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
12
12
|
import Button from '@atlaskit/button/standard-button';
|
|
13
|
-
import
|
|
13
|
+
import LegacyExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
15
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
17
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
16
18
|
import { ColorPalette, DEFAULT_BORDER_COLOR, getSelectedRowAndColumnFromPalette } from '../../ui-color';
|
|
@@ -23,8 +25,11 @@ import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
|
23
25
|
var colorPickerButtonWrapper = css({
|
|
24
26
|
position: 'relative'
|
|
25
27
|
});
|
|
26
|
-
var colorPickerExpandContainer =
|
|
27
|
-
|
|
28
|
+
var colorPickerExpandContainer = xcss({
|
|
29
|
+
marginTop: 'space.0',
|
|
30
|
+
marginBottom: 'space.0',
|
|
31
|
+
marginLeft: 'space.negative.050',
|
|
32
|
+
marginRight: 'space.negative.050'
|
|
28
33
|
});
|
|
29
34
|
|
|
30
35
|
// Control the size of color picker buttons and preview
|
|
@@ -221,10 +226,13 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
221
226
|
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
222
227
|
,
|
|
223
228
|
css: buttonStyle,
|
|
224
|
-
iconAfter: jsx(
|
|
225
|
-
|
|
226
|
-
}, jsx(
|
|
227
|
-
|
|
229
|
+
iconAfter: jsx(Box, {
|
|
230
|
+
xcss: colorPickerExpandContainer
|
|
231
|
+
}, jsx(ChevronDownIcon, {
|
|
232
|
+
color: "currentColor",
|
|
233
|
+
spacing: "spacious",
|
|
234
|
+
LEGACY_fallbackIcon: LegacyExpandIcon,
|
|
235
|
+
label: "color-picker-chevron-down"
|
|
228
236
|
})),
|
|
229
237
|
"data-selected-color": props.currentColor
|
|
230
238
|
})), renderPopup());
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
/* eslint-disable no-console */
|
|
6
5
|
|
|
7
6
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
8
7
|
|
|
9
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
9
|
import { css, jsx } from '@emotion/react';
|
|
11
10
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
|
-
import { fullPageMessages
|
|
11
|
+
import { fullPageMessages } from '../../messages';
|
|
12
|
+
import { mediaInsertMessages } from '../../messages/media-insert';
|
|
13
13
|
import { EDIT_AREA_ID } from '../../ui';
|
|
14
14
|
/*
|
|
15
15
|
** The context is used to handle the keydown events of submenus.
|
|
@@ -135,6 +135,11 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
135
135
|
if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
// If the target element is the media picker then navigation is handled by the media picker
|
|
140
|
+
if (targetElement instanceof HTMLElement && targetElement.closest("[aria-label=\"".concat(intl.formatMessage(mediaInsertMessages.mediaPickerPopupAriaLabel), "\"]"))) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
138
143
|
if (targetElement instanceof HTMLElement && !((_wrapperRef$current2 = wrapperRef.current) !== null && _wrapperRef$current2 !== void 0 && _wrapperRef$current2.contains(targetElement))) {
|
|
139
144
|
selectedItemIndex.current = -1;
|
|
140
145
|
} else {
|
|
@@ -187,7 +192,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
187
192
|
editorViewDom === null || editorViewDom === void 0 || editorViewDom.removeEventListener('keydown', globalKeyDownHandler);
|
|
188
193
|
}
|
|
189
194
|
};
|
|
190
|
-
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar]);
|
|
195
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar, editorAppearance, useStickyToolbar, intl]);
|
|
191
196
|
return jsx("div", {
|
|
192
197
|
css: editorAppearance === 'comment' && centeredToolbarContainer
|
|
193
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -195,7 +200,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
195
200
|
className: "custom-key-handler-wrapper",
|
|
196
201
|
ref: wrapperRef,
|
|
197
202
|
role: "toolbar",
|
|
198
|
-
"aria-label": intl.formatMessage(
|
|
203
|
+
"aria-label": intl.formatMessage(fullPageMessages.toolbarLabel),
|
|
199
204
|
"aria-controls": EDIT_AREA_ID
|
|
200
205
|
}, jsx(KeyDownHandlerContext.Provider, {
|
|
201
206
|
value: submenuKeydownHandleContext
|
|
@@ -5,5 +5,6 @@ export type ViewInlineCommentsButtonEventAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJE
|
|
|
5
5
|
isDisabled: boolean;
|
|
6
6
|
mode: MODE.EDITOR;
|
|
7
7
|
inputMethod: INPUT_METHOD.FLOATING_TB;
|
|
8
|
+
isNonTextInlineNodeInludedInComment: boolean;
|
|
8
9
|
}, undefined>;
|
|
9
10
|
export type ViewEventPayload = ViewInlineCommentsButtonEventAEP;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare const EditorContext: React.Context<{}>;
|
|
@@ -5,5 +5,6 @@ export type ViewInlineCommentsButtonEventAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJE
|
|
|
5
5
|
isDisabled: boolean;
|
|
6
6
|
mode: MODE.EDITOR;
|
|
7
7
|
inputMethod: INPUT_METHOD.FLOATING_TB;
|
|
8
|
+
isNonTextInlineNodeInludedInComment: boolean;
|
|
8
9
|
}, undefined>;
|
|
9
10
|
export type ViewEventPayload = ViewInlineCommentsButtonEventAEP;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare const EditorContext: React.Context<{}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.
|
|
3
|
+
"version": "93.5.0",
|
|
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/"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
113
|
-
"@atlaskit/adf-schema": "^
|
|
113
|
+
"@atlaskit/adf-schema": "^42.0.2",
|
|
114
114
|
"@atlaskit/adf-utils": "^19.9.0",
|
|
115
115
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
116
116
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
139
139
|
"@atlaskit/media-picker": "^66.7.0",
|
|
140
140
|
"@atlaskit/media-ui": "^25.15.0",
|
|
141
|
-
"@atlaskit/media-viewer": "49.1.
|
|
141
|
+
"@atlaskit/media-viewer": "49.1.1",
|
|
142
142
|
"@atlaskit/mention": "^23.3.0",
|
|
143
143
|
"@atlaskit/menu": "^2.12.0",
|
|
144
144
|
"@atlaskit/onboarding": "^11.2.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"@atlaskit/spinner": "^16.3.0",
|
|
152
152
|
"@atlaskit/task-decision": "^17.11.0",
|
|
153
153
|
"@atlaskit/textfield": "^6.5.0",
|
|
154
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
154
|
+
"@atlaskit/tmp-editor-statsig": "^2.5.0",
|
|
155
155
|
"@atlaskit/tokens": "^2.0.0",
|
|
156
156
|
"@atlaskit/tooltip": "^18.8.0",
|
|
157
157
|
"@atlaskit/ufo": "^0.3.0",
|