@atlaskit/editor-common 75.5.0 → 75.5.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 +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +5 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +5 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +5 -1
- package/dist/types/ui/Popup/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/Popup/index.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 75.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`966f90e1edf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/966f90e1edf) - [ux] [ECA11Y-44] Adjust 'Popup' component so that it doesn't always have to have 'aria-label' attribute displayed
|
|
8
|
+
|
|
3
9
|
## 75.5.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
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 = "75.5.
|
|
19
|
+
var packageVersion = "75.5.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "75.5.
|
|
27
|
+
var packageVersion = "75.5.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -272,13 +272,17 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
272
272
|
if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
|
|
273
273
|
return null;
|
|
274
274
|
}
|
|
275
|
+
|
|
276
|
+
//In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
|
|
277
|
+
var ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
|
|
275
278
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
276
279
|
ref: this.handleRef,
|
|
277
280
|
style: _objectSpread(_objectSpread({
|
|
278
281
|
position: 'absolute',
|
|
279
282
|
zIndex: this.props.zIndex || _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
280
283
|
}, position), this.props.style),
|
|
281
|
-
"aria-label":
|
|
284
|
+
"aria-label": ariaLabel,
|
|
285
|
+
"data-testid": "popup-wrapper"
|
|
282
286
|
// Indicates component is an editor pop. Required for focus handling in Message.tsx
|
|
283
287
|
,
|
|
284
288
|
"data-editor-popup": true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "75.5.
|
|
3
|
+
const packageVersion = "75.5.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -9,7 +9,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
9
9
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
10
|
import Layer from '../Layer';
|
|
11
11
|
const packageName = "@atlaskit/editor-common";
|
|
12
|
-
const packageVersion = "75.5.
|
|
12
|
+
const packageVersion = "75.5.1";
|
|
13
13
|
const halfFocusRing = 1;
|
|
14
14
|
const dropOffset = '0, 8';
|
|
15
15
|
class DropList extends Component {
|
|
@@ -226,6 +226,9 @@ export default class Popup extends React.Component {
|
|
|
226
226
|
if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
|
|
227
227
|
return null;
|
|
228
228
|
}
|
|
229
|
+
|
|
230
|
+
//In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
|
|
231
|
+
const ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
|
|
229
232
|
return /*#__PURE__*/React.createElement("div", {
|
|
230
233
|
ref: this.handleRef,
|
|
231
234
|
style: {
|
|
@@ -234,7 +237,8 @@ export default class Popup extends React.Component {
|
|
|
234
237
|
...position,
|
|
235
238
|
...this.props.style
|
|
236
239
|
},
|
|
237
|
-
"aria-label":
|
|
240
|
+
"aria-label": ariaLabel,
|
|
241
|
+
"data-testid": "popup-wrapper"
|
|
238
242
|
// Indicates component is an editor pop. Required for focus handling in Message.tsx
|
|
239
243
|
,
|
|
240
244
|
"data-editor-popup": true
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "75.5.
|
|
9
|
+
var packageVersion = "75.5.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -19,7 +19,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
19
19
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
20
20
|
import Layer from '../Layer';
|
|
21
21
|
var packageName = "@atlaskit/editor-common";
|
|
22
|
-
var packageVersion = "75.5.
|
|
22
|
+
var packageVersion = "75.5.1";
|
|
23
23
|
var halfFocusRing = 1;
|
|
24
24
|
var dropOffset = '0, 8';
|
|
25
25
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -259,13 +259,17 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
259
259
|
if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
|
|
260
260
|
return null;
|
|
261
261
|
}
|
|
262
|
+
|
|
263
|
+
//In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
|
|
264
|
+
var ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
|
|
262
265
|
return /*#__PURE__*/React.createElement("div", {
|
|
263
266
|
ref: this.handleRef,
|
|
264
267
|
style: _objectSpread(_objectSpread({
|
|
265
268
|
position: 'absolute',
|
|
266
269
|
zIndex: this.props.zIndex || akEditorFloatingPanelZIndex
|
|
267
270
|
}, position), this.props.style),
|
|
268
|
-
"aria-label":
|
|
271
|
+
"aria-label": ariaLabel,
|
|
272
|
+
"data-testid": "popup-wrapper"
|
|
269
273
|
// Indicates component is an editor pop. Required for focus handling in Message.tsx
|
|
270
274
|
,
|
|
271
275
|
"data-editor-popup": true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Position } from './utils';
|
|
2
|
+
import type { Position } from './utils';
|
|
3
3
|
export interface Props {
|
|
4
4
|
zIndex?: number;
|
|
5
5
|
alignX?: 'left' | 'right' | 'center' | 'end';
|
|
@@ -15,7 +15,8 @@ export interface Props {
|
|
|
15
15
|
shouldRenderPopup?: (position: Position) => boolean;
|
|
16
16
|
scrollableElement?: HTMLElement;
|
|
17
17
|
stick?: boolean;
|
|
18
|
-
|
|
18
|
+
/** `null` should only be used if we provide enough context to screen readers to exclude aria-label attribute */
|
|
19
|
+
ariaLabel?: string | null;
|
|
19
20
|
forcePlacement?: boolean;
|
|
20
21
|
allowOutOfBounds?: boolean;
|
|
21
22
|
rect?: DOMRect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Position } from './utils';
|
|
2
|
+
import type { Position } from './utils';
|
|
3
3
|
export interface Props {
|
|
4
4
|
zIndex?: number;
|
|
5
5
|
alignX?: 'left' | 'right' | 'center' | 'end';
|
|
@@ -18,7 +18,8 @@ export interface Props {
|
|
|
18
18
|
shouldRenderPopup?: (position: Position) => boolean;
|
|
19
19
|
scrollableElement?: HTMLElement;
|
|
20
20
|
stick?: boolean;
|
|
21
|
-
|
|
21
|
+
/** `null` should only be used if we provide enough context to screen readers to exclude aria-label attribute */
|
|
22
|
+
ariaLabel?: string | null;
|
|
22
23
|
forcePlacement?: boolean;
|
|
23
24
|
allowOutOfBounds?: boolean;
|
|
24
25
|
rect?: DOMRect;
|
package/package.json
CHANGED