@atlaskit/editor-common 107.18.0 → 107.18.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 +9 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +9 -4
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +5 -2
- package/dist/cjs/element-browser/constants.js +3 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +9 -4
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +6 -3
- package/dist/es2019/element-browser/constants.js +2 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/element-browser/components/ElementList/ElementList.js +9 -4
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +6 -3
- package/dist/esm/element-browser/constants.js +2 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/element-browser/components/ElementList/ElementList.d.ts +2 -1
- package/dist/types/element-browser/constants.d.ts +1 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/ElementList.d.ts +2 -1
- package/dist/types-ts4.5/element-browser/constants.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#197573](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/197573)
|
|
8
|
+
[`066bb4840be19`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/066bb4840be19) -
|
|
9
|
+
[ENGHEALTH-32415] resolve aria issues with element browser
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 107.18.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -20,6 +20,7 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
|
20
20
|
var _menu = require("@atlaskit/menu");
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
24
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
24
25
|
var _analytics = require("../../../analytics");
|
|
25
26
|
var _quickInsert = require("../../../quick-insert");
|
|
@@ -231,7 +232,8 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
|
|
|
231
232
|
selected: selectedItemIndex === index,
|
|
232
233
|
focus: focusedItemIndex === index,
|
|
233
234
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
234
|
-
onInsertItem: onInsertItem
|
|
235
|
+
onInsertItem: onInsertItem,
|
|
236
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? 'option' : undefined
|
|
235
237
|
})));
|
|
236
238
|
};
|
|
237
239
|
},
|
|
@@ -361,7 +363,8 @@ function ElementItem(_ref6) {
|
|
|
361
363
|
index = _ref6.index,
|
|
362
364
|
onInsertItem = _ref6.onInsertItem,
|
|
363
365
|
focus = _ref6.focus,
|
|
364
|
-
setFocusedItemIndex = _ref6.setFocusedItemIndex
|
|
366
|
+
setFocusedItemIndex = _ref6.setFocusedItemIndex,
|
|
367
|
+
role = _ref6.role;
|
|
365
368
|
var ref = (0, _useFocus.default)(focus);
|
|
366
369
|
|
|
367
370
|
/**
|
|
@@ -406,11 +409,13 @@ function ElementItem(_ref6) {
|
|
|
406
409
|
title: title
|
|
407
410
|
}),
|
|
408
411
|
isSelected: selected,
|
|
409
|
-
"aria-describedby": title,
|
|
412
|
+
"aria-describedby": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : title,
|
|
413
|
+
"aria-label": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? title : undefined,
|
|
410
414
|
ref: ref,
|
|
411
415
|
testId: "element-item-".concat(index),
|
|
412
416
|
id: "searched-item-".concat(index),
|
|
413
|
-
isDisabled: isDisabled
|
|
417
|
+
isDisabled: isDisabled,
|
|
418
|
+
role: role
|
|
414
419
|
}, (0, _react2.jsx)(ItemContent
|
|
415
420
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
416
421
|
, {
|
|
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
14
14
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
15
15
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _analytics = require("../../analytics");
|
|
18
19
|
var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
|
|
19
20
|
var _ViewMore = require("../components/ViewMore");
|
|
@@ -323,7 +324,8 @@ function MobileBrowser(_ref) {
|
|
|
323
324
|
onClick: setFocusOnSearch,
|
|
324
325
|
searchTerm: searchTerm,
|
|
325
326
|
items: items,
|
|
326
|
-
selectedItemIndex: selectedItemIndex
|
|
327
|
+
selectedItemIndex: selectedItemIndex,
|
|
328
|
+
ariaControlsId: (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? _constants.ELEMENT_BROWSER_LIST_ID : undefined
|
|
327
329
|
}), showCategories && (0, _react2.jsx)("nav", {
|
|
328
330
|
css: mobileCategoryListWrapper,
|
|
329
331
|
tabIndex: -1
|
|
@@ -336,7 +338,8 @@ function MobileBrowser(_ref) {
|
|
|
336
338
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
337
339
|
setFocusOnSearch: setFocusOnSearch
|
|
338
340
|
}))), (0, _react2.jsx)("div", {
|
|
339
|
-
css: mobileMainContent
|
|
341
|
+
css: mobileMainContent,
|
|
342
|
+
id: (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? _constants.ELEMENT_BROWSER_LIST_ID : undefined
|
|
340
343
|
}, (0, _react2.jsx)(_ElementList.default, {
|
|
341
344
|
items: items,
|
|
342
345
|
mode: mode,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR_HEADING_PADDING_LEFT = exports.SEARCH_ITEM_HEIGHT_WIDTH = exports.SCROLLBAR_WIDTH = exports.INLINE_SIDEBAR_HEIGHT = exports.GRID_SIZE = exports.FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS = exports.ELEMENT_LIST_PADDING = exports.ELEMENT_ITEM_PADDING = exports.ELEMENT_ITEM_HEIGHT = exports.ELEMENT_BROWSER_ID = exports.DEVICE_BREAKPOINT_NUMBERS = void 0;
|
|
6
|
+
exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR_HEADING_PADDING_LEFT = exports.SEARCH_ITEM_HEIGHT_WIDTH = exports.SCROLLBAR_WIDTH = exports.INLINE_SIDEBAR_HEIGHT = exports.GRID_SIZE = exports.FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS = exports.ELEMENT_LIST_PADDING = exports.ELEMENT_ITEM_PADDING = exports.ELEMENT_ITEM_HEIGHT = exports.ELEMENT_BROWSER_LIST_ID = exports.ELEMENT_BROWSER_ID = exports.DEVICE_BREAKPOINT_NUMBERS = void 0;
|
|
7
7
|
var GRID_SIZE = exports.GRID_SIZE = 8;
|
|
8
8
|
var DEVICE_BREAKPOINT_NUMBERS = exports.DEVICE_BREAKPOINT_NUMBERS = {
|
|
9
9
|
small: GRID_SIZE * 40,
|
|
@@ -24,4 +24,5 @@ var SCROLLBAR_WIDTH = exports.SCROLLBAR_WIDTH = 15;
|
|
|
24
24
|
var ELEMENT_LIST_PADDING = exports.ELEMENT_LIST_PADDING = 2;
|
|
25
25
|
var ELEMENT_ITEM_HEIGHT = exports.ELEMENT_ITEM_HEIGHT = 60;
|
|
26
26
|
var ELEMENT_ITEM_PADDING = exports.ELEMENT_ITEM_PADDING = 10;
|
|
27
|
-
var ELEMENT_BROWSER_ID = exports.ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
27
|
+
var ELEMENT_BROWSER_ID = exports.ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
28
|
+
var ELEMENT_BROWSER_LIST_ID = exports.ELEMENT_BROWSER_LIST_ID = 'editor-element-browser-list';
|
|
@@ -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 = "107.
|
|
19
|
+
var packageVersion = "107.18.0";
|
|
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 = "107.
|
|
26
|
+
var packageVersion = "107.18.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -16,6 +16,7 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
|
16
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
19
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
20
|
import Tooltip from '@atlaskit/tooltip';
|
|
20
21
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
21
22
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -220,7 +221,8 @@ const ElementListSingleColumn = props => {
|
|
|
220
221
|
selected: selectedItemIndex === index,
|
|
221
222
|
focus: focusedItemIndex === index,
|
|
222
223
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
223
|
-
onInsertItem: onInsertItem
|
|
224
|
+
onInsertItem: onInsertItem,
|
|
225
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? 'option' : undefined
|
|
224
226
|
})));
|
|
225
227
|
},
|
|
226
228
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -350,7 +352,8 @@ export function ElementItem({
|
|
|
350
352
|
index,
|
|
351
353
|
onInsertItem,
|
|
352
354
|
focus,
|
|
353
|
-
setFocusedItemIndex
|
|
355
|
+
setFocusedItemIndex,
|
|
356
|
+
role
|
|
354
357
|
}) {
|
|
355
358
|
const ref = useFocus(focus);
|
|
356
359
|
|
|
@@ -398,11 +401,13 @@ export function ElementItem({
|
|
|
398
401
|
title: title
|
|
399
402
|
}),
|
|
400
403
|
isSelected: selected,
|
|
401
|
-
"aria-describedby": title,
|
|
404
|
+
"aria-describedby": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : title,
|
|
405
|
+
"aria-label": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? title : undefined,
|
|
402
406
|
ref: ref,
|
|
403
407
|
testId: `element-item-${index}`,
|
|
404
408
|
id: `searched-item-${index}`,
|
|
405
|
-
isDisabled: isDisabled
|
|
409
|
+
isDisabled: isDisabled,
|
|
410
|
+
role: role
|
|
406
411
|
}, jsx(ItemContent
|
|
407
412
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
408
413
|
, {
|
|
@@ -11,10 +11,11 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
11
11
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
12
12
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
15
16
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
16
17
|
import { ViewMore as ViewMoreNext } from '../components/ViewMore';
|
|
17
|
-
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
18
|
+
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, ELEMENT_BROWSER_LIST_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
18
19
|
import useContainerWidth from '../hooks/use-container-width';
|
|
19
20
|
import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
|
|
20
21
|
import { ViewMore } from '../ViewMore';
|
|
@@ -313,7 +314,8 @@ function MobileBrowser({
|
|
|
313
314
|
onClick: setFocusOnSearch,
|
|
314
315
|
searchTerm: searchTerm,
|
|
315
316
|
items: items,
|
|
316
|
-
selectedItemIndex: selectedItemIndex
|
|
317
|
+
selectedItemIndex: selectedItemIndex,
|
|
318
|
+
ariaControlsId: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? ELEMENT_BROWSER_LIST_ID : undefined
|
|
317
319
|
}), showCategories && jsx("nav", {
|
|
318
320
|
css: mobileCategoryListWrapper,
|
|
319
321
|
tabIndex: -1
|
|
@@ -326,7 +328,8 @@ function MobileBrowser({
|
|
|
326
328
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
327
329
|
setFocusOnSearch: setFocusOnSearch
|
|
328
330
|
}))), jsx("div", {
|
|
329
|
-
css: mobileMainContent
|
|
331
|
+
css: mobileMainContent,
|
|
332
|
+
id: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? ELEMENT_BROWSER_LIST_ID : undefined
|
|
330
333
|
}, jsx(ElementList, {
|
|
331
334
|
items: items,
|
|
332
335
|
mode: mode,
|
|
@@ -18,4 +18,5 @@ export const SCROLLBAR_WIDTH = 15;
|
|
|
18
18
|
export const ELEMENT_LIST_PADDING = 2;
|
|
19
19
|
export const ELEMENT_ITEM_HEIGHT = 60;
|
|
20
20
|
export const ELEMENT_ITEM_PADDING = 10;
|
|
21
|
-
export const ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
21
|
+
export const ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
22
|
+
export const ELEMENT_BROWSER_LIST_ID = 'editor-element-browser-list';
|
|
@@ -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 = "107.
|
|
4
|
+
const packageVersion = "107.18.0";
|
|
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 = "107.
|
|
16
|
+
const packageVersion = "107.18.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -17,6 +17,7 @@ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
|
17
17
|
import { ButtonItem } from '@atlaskit/menu';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
19
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
22
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
22
23
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -220,7 +221,8 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
|
|
|
220
221
|
selected: selectedItemIndex === index,
|
|
221
222
|
focus: focusedItemIndex === index,
|
|
222
223
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
223
|
-
onInsertItem: onInsertItem
|
|
224
|
+
onInsertItem: onInsertItem,
|
|
225
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? 'option' : undefined
|
|
224
226
|
})));
|
|
225
227
|
};
|
|
226
228
|
},
|
|
@@ -350,7 +352,8 @@ export function ElementItem(_ref6) {
|
|
|
350
352
|
index = _ref6.index,
|
|
351
353
|
onInsertItem = _ref6.onInsertItem,
|
|
352
354
|
focus = _ref6.focus,
|
|
353
|
-
setFocusedItemIndex = _ref6.setFocusedItemIndex
|
|
355
|
+
setFocusedItemIndex = _ref6.setFocusedItemIndex,
|
|
356
|
+
role = _ref6.role;
|
|
354
357
|
var ref = useFocus(focus);
|
|
355
358
|
|
|
356
359
|
/**
|
|
@@ -395,11 +398,13 @@ export function ElementItem(_ref6) {
|
|
|
395
398
|
title: title
|
|
396
399
|
}),
|
|
397
400
|
isSelected: selected,
|
|
398
|
-
"aria-describedby": title,
|
|
401
|
+
"aria-describedby": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : title,
|
|
402
|
+
"aria-label": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? title : undefined,
|
|
399
403
|
ref: ref,
|
|
400
404
|
testId: "element-item-".concat(index),
|
|
401
405
|
id: "searched-item-".concat(index),
|
|
402
|
-
isDisabled: isDisabled
|
|
406
|
+
isDisabled: isDisabled,
|
|
407
|
+
role: role
|
|
403
408
|
}, jsx(ItemContent
|
|
404
409
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
405
410
|
, {
|
|
@@ -12,10 +12,11 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
12
12
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
16
17
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
17
18
|
import { ViewMore as ViewMoreNext } from '../components/ViewMore';
|
|
18
|
-
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
19
|
+
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, ELEMENT_BROWSER_LIST_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
19
20
|
import useContainerWidth from '../hooks/use-container-width';
|
|
20
21
|
import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
|
|
21
22
|
import { ViewMore } from '../ViewMore';
|
|
@@ -313,7 +314,8 @@ function MobileBrowser(_ref) {
|
|
|
313
314
|
onClick: setFocusOnSearch,
|
|
314
315
|
searchTerm: searchTerm,
|
|
315
316
|
items: items,
|
|
316
|
-
selectedItemIndex: selectedItemIndex
|
|
317
|
+
selectedItemIndex: selectedItemIndex,
|
|
318
|
+
ariaControlsId: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? ELEMENT_BROWSER_LIST_ID : undefined
|
|
317
319
|
}), showCategories && jsx("nav", {
|
|
318
320
|
css: mobileCategoryListWrapper,
|
|
319
321
|
tabIndex: -1
|
|
@@ -326,7 +328,8 @@ function MobileBrowser(_ref) {
|
|
|
326
328
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
327
329
|
setFocusOnSearch: setFocusOnSearch
|
|
328
330
|
}))), jsx("div", {
|
|
329
|
-
css: mobileMainContent
|
|
331
|
+
css: mobileMainContent,
|
|
332
|
+
id: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? ELEMENT_BROWSER_LIST_ID : undefined
|
|
330
333
|
}, jsx(ElementList, {
|
|
331
334
|
items: items,
|
|
332
335
|
mode: mode,
|
|
@@ -18,4 +18,5 @@ export var SCROLLBAR_WIDTH = 15;
|
|
|
18
18
|
export var ELEMENT_LIST_PADDING = 2;
|
|
19
19
|
export var ELEMENT_ITEM_HEIGHT = 60;
|
|
20
20
|
export var ELEMENT_ITEM_PADDING = 10;
|
|
21
|
-
export var ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
21
|
+
export var ELEMENT_BROWSER_ID = 'editor-element-browser';
|
|
22
|
+
export var ELEMENT_BROWSER_LIST_ID = 'editor-element-browser-list';
|
|
@@ -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 = "107.
|
|
10
|
+
var packageVersion = "107.18.0";
|
|
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 = "107.
|
|
23
|
+
var packageVersion = "107.18.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -36,7 +36,8 @@ type ElementItemType = {
|
|
|
36
36
|
focus: boolean;
|
|
37
37
|
setFocusedItemIndex: (index: number) => void;
|
|
38
38
|
index: number;
|
|
39
|
+
role?: string;
|
|
39
40
|
};
|
|
40
|
-
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, }: ElementItemType): jsx.JSX.Element;
|
|
41
|
+
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, role, }: ElementItemType): jsx.JSX.Element;
|
|
41
42
|
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>>;
|
|
42
43
|
export default MemoizedElementListWithAnalytics;
|
|
@@ -19,3 +19,4 @@ export declare const ELEMENT_LIST_PADDING = 2;
|
|
|
19
19
|
export declare const ELEMENT_ITEM_HEIGHT = 60;
|
|
20
20
|
export declare const ELEMENT_ITEM_PADDING = 10;
|
|
21
21
|
export declare const ELEMENT_BROWSER_ID = "editor-element-browser";
|
|
22
|
+
export declare const ELEMENT_BROWSER_LIST_ID = "editor-element-browser-list";
|
|
@@ -36,7 +36,8 @@ type ElementItemType = {
|
|
|
36
36
|
focus: boolean;
|
|
37
37
|
setFocusedItemIndex: (index: number) => void;
|
|
38
38
|
index: number;
|
|
39
|
+
role?: string;
|
|
39
40
|
};
|
|
40
|
-
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, }: ElementItemType): jsx.JSX.Element;
|
|
41
|
+
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, role, }: ElementItemType): jsx.JSX.Element;
|
|
41
42
|
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>>;
|
|
42
43
|
export default MemoizedElementListWithAnalytics;
|
|
@@ -19,3 +19,4 @@ export declare const ELEMENT_LIST_PADDING = 2;
|
|
|
19
19
|
export declare const ELEMENT_ITEM_HEIGHT = 60;
|
|
20
20
|
export declare const ELEMENT_ITEM_PADDING = 10;
|
|
21
21
|
export declare const ELEMENT_BROWSER_ID = "editor-element-browser";
|
|
22
|
+
export declare const ELEMENT_BROWSER_LIST_ID = "editor-element-browser-list";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.18.
|
|
3
|
+
"version": "107.18.1",
|
|
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/"
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"@atlaskit/editor-shared-styles": "^3.5.0",
|
|
143
143
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
144
144
|
"@atlaskit/emoji": "^69.3.0",
|
|
145
|
-
"@atlaskit/icon": "^27.
|
|
145
|
+
"@atlaskit/icon": "^27.10.0",
|
|
146
146
|
"@atlaskit/icon-object": "^7.2.0",
|
|
147
147
|
"@atlaskit/link": "^3.2.0",
|
|
148
148
|
"@atlaskit/link-datasource": "^4.19.0",
|