@atlaskit/editor-common 94.5.0 → 94.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 +8 -0
- 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 +7 -22
- package/dist/cjs/ui-menu/ToolbarButton/index.js +2 -3
- 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 +7 -22
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -3
- 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 +7 -22
- package/dist/esm/ui-menu/ToolbarButton/index.js +2 -3
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 94.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152968](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152968)
|
|
8
|
+
[`501e975100eab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/501e975100eab) -
|
|
9
|
+
[ED-24137] feature flag clean up for the Cell Options menu a11y work
|
|
10
|
+
|
|
3
11
|
## 94.5.0
|
|
4
12
|
|
|
5
13
|
### Minor 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 = "94.5.
|
|
20
|
+
var packageVersion = "94.5.1";
|
|
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 = "94.5.
|
|
27
|
+
var packageVersion = "94.5.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -23,7 +23,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
23
23
|
var _react2 = require("@emotion/react");
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
25
|
var _menu = require("@atlaskit/menu");
|
|
26
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
26
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
28
27
|
var _styles = require("../../styles");
|
|
29
28
|
var _ToolbarArrowKeyNavigationProvider = require("../../ui-menu/ToolbarArrowKeyNavigationProvider");
|
|
@@ -113,25 +112,15 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
113
112
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCloseAndFocus", function (event) {
|
|
114
113
|
var _this$state$target;
|
|
115
114
|
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
116
|
-
|
|
117
|
-
_this.handleClose(event);
|
|
118
|
-
} else {
|
|
119
|
-
_this.handleClose();
|
|
120
|
-
}
|
|
115
|
+
_this.handleClose(event);
|
|
121
116
|
});
|
|
122
117
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClose", function (event) {
|
|
123
118
|
var onOpenChange = _this.props.onOpenChange;
|
|
124
119
|
if (onOpenChange) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
} else {
|
|
131
|
-
onOpenChange({
|
|
132
|
-
isOpen: false
|
|
133
|
-
});
|
|
134
|
-
}
|
|
120
|
+
onOpenChange({
|
|
121
|
+
isOpen: false,
|
|
122
|
+
event: event
|
|
123
|
+
});
|
|
135
124
|
}
|
|
136
125
|
});
|
|
137
126
|
return _this;
|
|
@@ -201,11 +190,7 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
201
190
|
handleClickOutside: this.handleClose,
|
|
202
191
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
203
192
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
204
|
-
if (
|
|
205
|
-
if (!allowEnterDefaultBehavior) {
|
|
206
|
-
e.preventDefault();
|
|
207
|
-
}
|
|
208
|
-
} else {
|
|
193
|
+
if (!allowEnterDefaultBehavior) {
|
|
209
194
|
e.preventDefault();
|
|
210
195
|
}
|
|
211
196
|
e.stopPropagation();
|
|
@@ -360,7 +345,7 @@ function DropdownMenuItem(_ref) {
|
|
|
360
345
|
item: item
|
|
361
346
|
});
|
|
362
347
|
},
|
|
363
|
-
"aria-expanded":
|
|
348
|
+
"aria-expanded": item['aria-expanded']
|
|
364
349
|
}, item.content));
|
|
365
350
|
if (item.tooltipDescription) {
|
|
366
351
|
var _item$key3;
|
|
@@ -10,7 +10,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
14
|
var _analytics = require("../../analytics");
|
|
16
15
|
var _keymaps = require("../../keymaps");
|
|
@@ -117,10 +116,10 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
117
116
|
if (!title) {
|
|
118
117
|
return button;
|
|
119
118
|
}
|
|
120
|
-
var tooltipContent = hideTooltip ? null : (0,
|
|
119
|
+
var tooltipContent = hideTooltip ? null : (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
121
120
|
description: title,
|
|
122
121
|
keymap: keymap
|
|
123
|
-
})
|
|
122
|
+
});
|
|
124
123
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
125
124
|
content: tooltipContent,
|
|
126
125
|
hideTooltipOnClick: true,
|
|
@@ -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 = "94.5.
|
|
4
|
+
const packageVersion = "94.5.1";
|
|
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 = "94.5.
|
|
16
|
+
const packageVersion = "94.5.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -9,7 +9,6 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
13
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
15
14
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -114,27 +113,17 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
114
113
|
_defineProperty(this, "handleCloseAndFocus", event => {
|
|
115
114
|
var _this$state$target, _this$state$target$qu;
|
|
116
115
|
(_this$state$target = this.state.target) === null || _this$state$target === void 0 ? void 0 : (_this$state$target$qu = _this$state$target.querySelector('button')) === null || _this$state$target$qu === void 0 ? void 0 : _this$state$target$qu.focus();
|
|
117
|
-
|
|
118
|
-
this.handleClose(event);
|
|
119
|
-
} else {
|
|
120
|
-
this.handleClose();
|
|
121
|
-
}
|
|
116
|
+
this.handleClose(event);
|
|
122
117
|
});
|
|
123
118
|
_defineProperty(this, "handleClose", event => {
|
|
124
119
|
const {
|
|
125
120
|
onOpenChange
|
|
126
121
|
} = this.props;
|
|
127
122
|
if (onOpenChange) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
133
|
-
} else {
|
|
134
|
-
onOpenChange({
|
|
135
|
-
isOpen: false
|
|
136
|
-
});
|
|
137
|
-
}
|
|
123
|
+
onOpenChange({
|
|
124
|
+
isOpen: false,
|
|
125
|
+
event: event
|
|
126
|
+
});
|
|
138
127
|
}
|
|
139
128
|
});
|
|
140
129
|
}
|
|
@@ -203,11 +192,7 @@ export default class DropdownMenuWrapper extends PureComponent {
|
|
|
203
192
|
handleClickOutside: this.handleClose,
|
|
204
193
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
205
194
|
handleEnterKeydown: e => {
|
|
206
|
-
if (
|
|
207
|
-
if (!allowEnterDefaultBehavior) {
|
|
208
|
-
e.preventDefault();
|
|
209
|
-
}
|
|
210
|
-
} else {
|
|
195
|
+
if (!allowEnterDefaultBehavior) {
|
|
211
196
|
e.preventDefault();
|
|
212
197
|
}
|
|
213
198
|
e.stopPropagation();
|
|
@@ -348,7 +333,7 @@ export function DropdownMenuItem({
|
|
|
348
333
|
onMouseLeave: () => onMouseLeave && onMouseLeave({
|
|
349
334
|
item
|
|
350
335
|
}),
|
|
351
|
-
"aria-expanded":
|
|
336
|
+
"aria-expanded": item['aria-expanded']
|
|
352
337
|
}, item.content));
|
|
353
338
|
if (item.tooltipDescription) {
|
|
354
339
|
var _item$key3;
|
|
@@ -9,7 +9,6 @@ import React, { useCallback } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
15
14
|
import { ToolTipContent } from '../../keymaps';
|
|
@@ -106,10 +105,10 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
106
105
|
if (!title) {
|
|
107
106
|
return button;
|
|
108
107
|
}
|
|
109
|
-
const tooltipContent = hideTooltip ? null :
|
|
108
|
+
const tooltipContent = hideTooltip ? null : jsx(ToolTipContent, {
|
|
110
109
|
description: title,
|
|
111
110
|
keymap: keymap
|
|
112
|
-
})
|
|
111
|
+
});
|
|
113
112
|
return jsx(Tooltip, {
|
|
114
113
|
content: tooltipContent,
|
|
115
114
|
hideTooltipOnClick: true,
|
|
@@ -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 = "94.5.
|
|
10
|
+
var packageVersion = "94.5.1";
|
|
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 = "94.5.
|
|
24
|
+
var packageVersion = "94.5.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -25,7 +25,6 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
25
25
|
import { css, jsx } from '@emotion/react';
|
|
26
26
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
27
27
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
28
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
28
|
import Tooltip from '@atlaskit/tooltip';
|
|
30
29
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
31
30
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -102,25 +101,15 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
102
101
|
_defineProperty(_assertThisInitialized(_this), "handleCloseAndFocus", function (event) {
|
|
103
102
|
var _this$state$target;
|
|
104
103
|
(_this$state$target = _this.state.target) === null || _this$state$target === void 0 || (_this$state$target = _this$state$target.querySelector('button')) === null || _this$state$target === void 0 || _this$state$target.focus();
|
|
105
|
-
|
|
106
|
-
_this.handleClose(event);
|
|
107
|
-
} else {
|
|
108
|
-
_this.handleClose();
|
|
109
|
-
}
|
|
104
|
+
_this.handleClose(event);
|
|
110
105
|
});
|
|
111
106
|
_defineProperty(_assertThisInitialized(_this), "handleClose", function (event) {
|
|
112
107
|
var onOpenChange = _this.props.onOpenChange;
|
|
113
108
|
if (onOpenChange) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
} else {
|
|
120
|
-
onOpenChange({
|
|
121
|
-
isOpen: false
|
|
122
|
-
});
|
|
123
|
-
}
|
|
109
|
+
onOpenChange({
|
|
110
|
+
isOpen: false,
|
|
111
|
+
event: event
|
|
112
|
+
});
|
|
124
113
|
}
|
|
125
114
|
});
|
|
126
115
|
return _this;
|
|
@@ -190,11 +179,7 @@ var DropdownMenuWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
|
190
179
|
handleClickOutside: this.handleClose,
|
|
191
180
|
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
192
181
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
193
|
-
if (
|
|
194
|
-
if (!allowEnterDefaultBehavior) {
|
|
195
|
-
e.preventDefault();
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
182
|
+
if (!allowEnterDefaultBehavior) {
|
|
198
183
|
e.preventDefault();
|
|
199
184
|
}
|
|
200
185
|
e.stopPropagation();
|
|
@@ -350,7 +335,7 @@ export function DropdownMenuItem(_ref) {
|
|
|
350
335
|
item: item
|
|
351
336
|
});
|
|
352
337
|
},
|
|
353
|
-
"aria-expanded":
|
|
338
|
+
"aria-expanded": item['aria-expanded']
|
|
354
339
|
}, item.content));
|
|
355
340
|
if (item.tooltipDescription) {
|
|
356
341
|
var _item$key3;
|
|
@@ -12,7 +12,6 @@ import React, { useCallback } from 'react';
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
18
17
|
import { ToolTipContent } from '../../keymaps';
|
|
@@ -110,10 +109,10 @@ var ToolbarButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
109
|
if (!title) {
|
|
111
110
|
return button;
|
|
112
111
|
}
|
|
113
|
-
var tooltipContent = hideTooltip ? null :
|
|
112
|
+
var tooltipContent = hideTooltip ? null : jsx(ToolTipContent, {
|
|
114
113
|
description: title,
|
|
115
114
|
keymap: keymap
|
|
116
|
-
})
|
|
115
|
+
});
|
|
117
116
|
return jsx(Tooltip, {
|
|
118
117
|
content: tooltipContent,
|
|
119
118
|
hideTooltipOnClick: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "94.5.
|
|
3
|
+
"version": "94.5.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/"
|
|
@@ -246,9 +246,6 @@
|
|
|
246
246
|
"annotations_align_editor_and_renderer_styles": {
|
|
247
247
|
"type": "boolean"
|
|
248
248
|
},
|
|
249
|
-
"platform_editor_a11y_table_context_menu": {
|
|
250
|
-
"type": "boolean"
|
|
251
|
-
},
|
|
252
249
|
"editor_inline_comments_paste_insert_nodes": {
|
|
253
250
|
"type": "boolean"
|
|
254
251
|
},
|