@atlaskit/editor-common 107.20.0 → 107.20.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/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +5 -2
- package/dist/es2019/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +5 -2
- package/dist/esm/floating-toolbar/DropdownMenuItem.js +2 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +5 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b13c372cb68dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b13c372cb68dd) -
|
|
8
|
+
ENGHEALTH-32424 Remove unnecessary aria-disabled and tabIndex attributes and add menuitem to
|
|
9
|
+
dropdown items"
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 107.20.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -10,6 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _checkMarkEditorDone = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-mark--editor-done"));
|
|
12
12
|
var _menu = require("@atlaskit/menu");
|
|
13
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
16
|
var _floatingToolbar = require("../floating-toolbar");
|
|
@@ -160,7 +161,7 @@ var DropdownMenuItem = exports.DropdownMenuItem = function DropdownMenuItem(prop
|
|
|
160
161
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
161
162
|
var hasRole = function hasRole(item) {
|
|
162
163
|
var _item$domItemOptions2;
|
|
163
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
164
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
164
165
|
var _item$domItemOptions;
|
|
165
166
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
166
167
|
}
|
|
@@ -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.20.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.20.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -22,6 +22,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _menu = require("@atlaskit/menu");
|
|
25
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
27
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
27
28
|
var _styles = require("../../styles");
|
|
@@ -327,14 +328,16 @@ function DropdownMenuItem(_ref) {
|
|
|
327
328
|
css: function css() {
|
|
328
329
|
return buttonStyles(item.isActive, submenuActive);
|
|
329
330
|
},
|
|
331
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
330
332
|
tabIndex: tabIndex,
|
|
331
333
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
334
|
+
"aria-expanded": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
332
335
|
onMouseDown: _handleSubmenuActive
|
|
333
336
|
}, (0, _react2.jsx)(_menu.CustomItem, {
|
|
334
337
|
item: item,
|
|
335
338
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
336
339
|
testId: testId,
|
|
337
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
340
|
+
role: shouldUseDefaultRole ? 'button' : (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
338
341
|
iconBefore: item.elemBefore,
|
|
339
342
|
iconAfter: item.elemAfter,
|
|
340
343
|
isDisabled: item.isDisabled,
|
|
@@ -360,7 +363,7 @@ function DropdownMenuItem(_ref) {
|
|
|
360
363
|
item: item
|
|
361
364
|
});
|
|
362
365
|
},
|
|
363
|
-
"aria-expanded": item['aria-expanded']
|
|
366
|
+
"aria-expanded": (0, _expValEquals.expValEquals)('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
364
367
|
}, item.content));
|
|
365
368
|
if (item.tooltipDescription) {
|
|
366
369
|
var _item$key3;
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
|
|
11
11
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
12
12
|
import { ButtonItem } from '@atlaskit/menu';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
16
|
import { messages } from '../floating-toolbar';
|
|
@@ -153,7 +154,7 @@ export const DropdownMenuItem = props => {
|
|
|
153
154
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
155
|
const hasRole = item => {
|
|
155
156
|
var _item$domItemOptions2;
|
|
156
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
157
|
+
if (editorExperiment('platform_editor_controls', 'variant1') || expValEquals('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
157
158
|
var _item$domItemOptions;
|
|
158
159
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
159
160
|
}
|
|
@@ -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.20.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.20.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -12,6 +12,7 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
17
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
18
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
@@ -352,14 +353,16 @@ export function DropdownMenuItem({
|
|
|
352
353
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
353
354
|
jsx("div", {
|
|
354
355
|
css: () => buttonStyles(item.isActive, submenuActive),
|
|
356
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
355
357
|
tabIndex: tabIndex,
|
|
356
358
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
359
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
357
360
|
onMouseDown: _handleSubmenuActive
|
|
358
361
|
}, jsx(CustomItem, {
|
|
359
362
|
item: item,
|
|
360
363
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
361
364
|
testId: testId,
|
|
362
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
365
|
+
role: shouldUseDefaultRole ? 'button' : expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
363
366
|
iconBefore: item.elemBefore,
|
|
364
367
|
iconAfter: item.elemAfter,
|
|
365
368
|
isDisabled: item.isDisabled,
|
|
@@ -379,7 +382,7 @@ export function DropdownMenuItem({
|
|
|
379
382
|
onMouseLeave: () => onMouseLeave && onMouseLeave({
|
|
380
383
|
item
|
|
381
384
|
}),
|
|
382
|
-
"aria-expanded": item['aria-expanded']
|
|
385
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
383
386
|
}, item.content));
|
|
384
387
|
if (item.tooltipDescription) {
|
|
385
388
|
var _item$key3;
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
|
|
12
12
|
import EditorDoneIcon from '@atlaskit/icon/core/migration/check-mark--editor-done';
|
|
13
13
|
import { ButtonItem } from '@atlaskit/menu';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
16
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
17
|
import { messages } from '../floating-toolbar';
|
|
@@ -152,7 +153,7 @@ export var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
152
153
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
153
154
|
var hasRole = function hasRole(item) {
|
|
154
155
|
var _item$domItemOptions2;
|
|
155
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
156
|
+
if (editorExperiment('platform_editor_controls', 'variant1') || expValEquals('platform_editor_august_a11y', 'isEnabled', true)) {
|
|
156
157
|
var _item$domItemOptions;
|
|
157
158
|
return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : 'menuitem';
|
|
158
159
|
}
|
|
@@ -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.20.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.20.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -27,6 +27,7 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
27
27
|
import { css, jsx } from '@emotion/react';
|
|
28
28
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
29
29
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
30
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
31
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
31
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
32
33
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
@@ -320,14 +321,16 @@ export function DropdownMenuItem(_ref) {
|
|
|
320
321
|
css: function css() {
|
|
321
322
|
return buttonStyles(item.isActive, submenuActive);
|
|
322
323
|
},
|
|
324
|
+
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
323
325
|
tabIndex: tabIndex,
|
|
324
326
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
327
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? item['aria-expanded'] : undefined,
|
|
325
328
|
onMouseDown: _handleSubmenuActive
|
|
326
329
|
}, jsx(CustomItem, {
|
|
327
330
|
item: item,
|
|
328
331
|
key: (_item$key2 = item.key) !== null && _item$key2 !== void 0 ? _item$key2 : String(item.content),
|
|
329
332
|
testId: testId,
|
|
330
|
-
role: shouldUseDefaultRole ? 'button' : 'menuitem',
|
|
333
|
+
role: shouldUseDefaultRole ? 'button' : expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : 'menuitem',
|
|
331
334
|
iconBefore: item.elemBefore,
|
|
332
335
|
iconAfter: item.elemAfter,
|
|
333
336
|
isDisabled: item.isDisabled,
|
|
@@ -353,7 +356,7 @@ export function DropdownMenuItem(_ref) {
|
|
|
353
356
|
item: item
|
|
354
357
|
});
|
|
355
358
|
},
|
|
356
|
-
"aria-expanded": item['aria-expanded']
|
|
359
|
+
"aria-expanded": expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? undefined : item['aria-expanded']
|
|
357
360
|
}, item.content));
|
|
358
361
|
if (item.tooltipDescription) {
|
|
359
362
|
var _item$key3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.20.
|
|
3
|
+
"version": "107.20.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/"
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
163
163
|
"@atlaskit/popper": "^7.1.0",
|
|
164
164
|
"@atlaskit/primitives": "^14.11.0",
|
|
165
|
-
"@atlaskit/profilecard": "^24.
|
|
165
|
+
"@atlaskit/profilecard": "^24.3.0",
|
|
166
166
|
"@atlaskit/react-ufo": "^4.2.0",
|
|
167
167
|
"@atlaskit/section-message": "^8.5.0",
|
|
168
168
|
"@atlaskit/smart-card": "^40.7.0",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"@af/visual-regression": "workspace:^",
|
|
214
214
|
"@atlaskit/media-core": "^37.0.0",
|
|
215
215
|
"@atlaskit/media-test-helpers": "^37.0.0",
|
|
216
|
-
"@atlaskit/util-data-test": "^18.
|
|
216
|
+
"@atlaskit/util-data-test": "^18.1.0",
|
|
217
217
|
"@atlaskit/visual-regression": "workspace:^",
|
|
218
218
|
"@testing-library/dom": "^10.1.0",
|
|
219
219
|
"@testing-library/jest-dom": "^6.4.5",
|