@atlaskit/editor-common 110.3.2 → 110.4.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 +8 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +6 -2
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +6 -2
- package/dist/cjs/extensibility/Extension/LegacyContentHeader/index.js +6 -2
- package/dist/cjs/extensibility/Extension/Lozenge/EditToggle.js +4 -2
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +4 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +6 -2
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +10 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/HoverLinkOverlay/index.js +6 -2
- package/dist/cjs/ui/Popup/index.js +4 -2
- package/dist/es2019/extensibility/Extension/Extension/index.js +6 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +6 -2
- package/dist/es2019/extensibility/Extension/LegacyContentHeader/index.js +6 -2
- package/dist/es2019/extensibility/Extension/Lozenge/EditToggle.js +4 -2
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +4 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +6 -2
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +10 -4
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +6 -2
- package/dist/es2019/ui/Popup/index.js +7 -2
- package/dist/esm/extensibility/Extension/Extension/index.js +6 -2
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +6 -2
- package/dist/esm/extensibility/Extension/LegacyContentHeader/index.js +6 -2
- package/dist/esm/extensibility/Extension/Lozenge/EditToggle.js +4 -2
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +4 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +6 -2
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +10 -4
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +6 -2
- package/dist/esm/ui/Popup/index.js +4 -2
- package/dist/types/ui/Popup/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/Popup/index.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0778701e62192`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0778701e62192) -
|
|
8
|
+
[ux] ED-29424 Focus first menu item when block menu is opened and remove decorations when delete
|
|
9
|
+
button unmounts
|
|
10
|
+
|
|
3
11
|
## 110.3.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -170,10 +170,14 @@ function ExtensionWithPluginState(props) {
|
|
|
170
170
|
_styles2.wrapperStyleInheritedCursor
|
|
171
171
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
172
172
|
,
|
|
173
|
-
style: customContainerStyles
|
|
173
|
+
style: customContainerStyles
|
|
174
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
175
|
+
,
|
|
174
176
|
onMouseEnter: function onMouseEnter() {
|
|
175
177
|
return handleMouseEvent(true);
|
|
176
|
-
}
|
|
178
|
+
}
|
|
179
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
180
|
+
,
|
|
177
181
|
onMouseLeave: function onMouseLeave() {
|
|
178
182
|
return handleMouseEvent(false);
|
|
179
183
|
}
|
|
@@ -79,10 +79,14 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
79
79
|
css: [_styles2.wrapperStyle, _styles2.inlineWrapperStyles]
|
|
80
80
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
81
|
,
|
|
82
|
-
className: classNames
|
|
82
|
+
className: classNames
|
|
83
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
84
|
+
,
|
|
83
85
|
onMouseEnter: function onMouseEnter() {
|
|
84
86
|
return handleMouseEvent(true);
|
|
85
|
-
}
|
|
87
|
+
}
|
|
88
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
89
|
+
,
|
|
86
90
|
onMouseLeave: function onMouseLeave() {
|
|
87
91
|
return handleMouseEvent(false);
|
|
88
92
|
}
|
|
@@ -88,8 +88,12 @@ var LegacyContentHeader = exports.LegacyContentHeader = function LegacyContentHe
|
|
|
88
88
|
css: [lcmHeaderStyles]
|
|
89
89
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
90
90
|
,
|
|
91
|
-
className: classNames
|
|
92
|
-
|
|
91
|
+
className: classNames
|
|
92
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
93
|
+
,
|
|
94
|
+
onMouseEnter: onMouseEnter
|
|
95
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
96
|
+
,
|
|
93
97
|
onMouseLeave: onMouseLeave
|
|
94
98
|
}, (0, _react2.jsx)(_status.Status, {
|
|
95
99
|
text: formatMessage(i18n.legacyContentHeader),
|
|
@@ -105,11 +105,13 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
|
|
|
105
105
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
106
106
|
,
|
|
107
107
|
className: "extension-edit-toggle-container"
|
|
108
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
108
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
109
109
|
,
|
|
110
110
|
onMouseOver: function onMouseOver() {
|
|
111
111
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
114
|
+
,
|
|
113
115
|
onMouseLeave: function onMouseLeave() {
|
|
114
116
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
115
117
|
},
|
|
@@ -161,11 +161,13 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
161
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
162
162
|
,
|
|
163
163
|
style: customContainerStyles
|
|
164
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
164
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
165
165
|
,
|
|
166
166
|
onMouseOver: function onMouseOver() {
|
|
167
167
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
168
|
-
}
|
|
168
|
+
}
|
|
169
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
170
|
+
,
|
|
169
171
|
onMouseLeave: function onMouseLeave() {
|
|
170
172
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
171
173
|
},
|
|
@@ -204,10 +204,14 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
|
|
|
204
204
|
"data-layout": node.attrs.layout
|
|
205
205
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
206
206
|
,
|
|
207
|
-
style: mbeWrapperStyles
|
|
207
|
+
style: mbeWrapperStyles
|
|
208
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
209
|
+
,
|
|
208
210
|
onMouseEnter: function onMouseEnter() {
|
|
209
211
|
return handleMouseEvent(true);
|
|
210
|
-
}
|
|
212
|
+
}
|
|
213
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
214
|
+
,
|
|
211
215
|
onMouseLeave: function onMouseLeave() {
|
|
212
216
|
return handleMouseEvent(false);
|
|
213
217
|
}
|
|
@@ -135,7 +135,9 @@ var LinkSearchListItemNext = function LinkSearchListItemNext(props, ref) {
|
|
|
135
135
|
onFocus: onFocus,
|
|
136
136
|
onKeyDown: handleKeyDown,
|
|
137
137
|
onMouseMove: handleMouseMove,
|
|
138
|
-
onMouseEnter: handleMouseEnter
|
|
138
|
+
onMouseEnter: handleMouseEnter
|
|
139
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
140
|
+
,
|
|
139
141
|
onMouseLeave: handleMouseLeave,
|
|
140
142
|
onClick: handleSelect
|
|
141
143
|
}, renderIcon(), (0, _react2.jsx)("span", {
|
|
@@ -239,15 +241,19 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
239
241
|
id = _this$props7.id,
|
|
240
242
|
role = _this$props7.role;
|
|
241
243
|
return (
|
|
242
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
244
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
243
245
|
(0, _react2.jsx)("li", {
|
|
244
246
|
css: [container, selected && containerSelected],
|
|
245
247
|
role: role,
|
|
246
248
|
id: id,
|
|
247
249
|
"aria-selected": selected,
|
|
248
250
|
"data-testid": "link-search-list-item",
|
|
249
|
-
onMouseMove: this.handleMouseMove
|
|
250
|
-
|
|
251
|
+
onMouseMove: this.handleMouseMove
|
|
252
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
253
|
+
,
|
|
254
|
+
onMouseEnter: this.handleMouseEnter
|
|
255
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
256
|
+
,
|
|
251
257
|
onMouseLeave: this.handleMouseLeave,
|
|
252
258
|
onClick: this.handleSelect
|
|
253
259
|
}, this.renderIcon(), (0, _react2.jsx)("span", {
|
|
@@ -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 = "110.3.
|
|
19
|
+
var packageVersion = "110.3.2";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -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 = "110.3.
|
|
27
|
+
var packageVersion = "110.3.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -192,10 +192,14 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
192
192
|
(0, _react2.jsx)("span", {
|
|
193
193
|
ref: containerRef,
|
|
194
194
|
css: containerStyles,
|
|
195
|
-
onDoubleClick: handleDoubleClick
|
|
195
|
+
onDoubleClick: handleDoubleClick
|
|
196
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
197
|
+
,
|
|
196
198
|
onMouseEnter: function onMouseEnter() {
|
|
197
199
|
return handleOverlayChange(true);
|
|
198
|
-
}
|
|
200
|
+
}
|
|
201
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
202
|
+
,
|
|
199
203
|
onMouseLeave: function onMouseLeave() {
|
|
200
204
|
return handleOverlayChange(false);
|
|
201
205
|
}
|
|
@@ -17,6 +17,7 @@ var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
|
17
17
|
var _reactDom = require("react-dom");
|
|
18
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
20
21
|
var _utils = require("./utils");
|
|
21
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
23
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -62,14 +63,15 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
62
63
|
if (!popup) {
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
|
-
var
|
|
66
|
+
var defaultTrapConfig = {
|
|
66
67
|
clickOutsideDeactivates: true,
|
|
67
68
|
escapeDeactivates: true,
|
|
68
69
|
initialFocus: popup,
|
|
69
70
|
fallbackFocus: popup,
|
|
70
71
|
returnFocusOnDeactivate: false
|
|
71
72
|
};
|
|
72
|
-
_this.focusTrap
|
|
73
|
+
var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
|
|
74
|
+
_this.focusTrap = (0, _focusTrap.default)(popup, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
|
|
73
75
|
_this.focusTrap.activate();
|
|
74
76
|
}));
|
|
75
77
|
return _this;
|
|
@@ -166,8 +166,12 @@ function ExtensionWithPluginState(props) {
|
|
|
166
166
|
wrapperStyleInheritedCursor
|
|
167
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
168
168
|
,
|
|
169
|
-
style: customContainerStyles
|
|
170
|
-
|
|
169
|
+
style: customContainerStyles
|
|
170
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
171
|
+
,
|
|
172
|
+
onMouseEnter: () => handleMouseEvent(true)
|
|
173
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
174
|
+
,
|
|
171
175
|
onMouseLeave: () => handleMouseEvent(false)
|
|
172
176
|
}, jsx("div", {
|
|
173
177
|
"data-testid": "extension-overflow-wrapper"
|
|
@@ -73,8 +73,12 @@ const InlineExtension = props => {
|
|
|
73
73
|
css: [wrapperStyle, inlineWrapperStyles]
|
|
74
74
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
75
75
|
,
|
|
76
|
-
className: classNames
|
|
77
|
-
|
|
76
|
+
className: classNames
|
|
77
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
78
|
+
,
|
|
79
|
+
onMouseEnter: () => handleMouseEvent(true)
|
|
80
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
81
|
+
,
|
|
78
82
|
onMouseLeave: () => handleMouseEvent(false)
|
|
79
83
|
}, jsx("div", {
|
|
80
84
|
css: overlay,
|
|
@@ -83,8 +83,12 @@ export const LegacyContentHeader = ({
|
|
|
83
83
|
css: [lcmHeaderStyles]
|
|
84
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
85
85
|
,
|
|
86
|
-
className: classNames
|
|
87
|
-
|
|
86
|
+
className: classNames
|
|
87
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
88
|
+
,
|
|
89
|
+
onMouseEnter: onMouseEnter
|
|
90
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
91
|
+
,
|
|
88
92
|
onMouseLeave: onMouseLeave
|
|
89
93
|
}, jsx(Status, {
|
|
90
94
|
text: formatMessage(i18n.legacyContentHeader),
|
|
@@ -98,9 +98,11 @@ export const EditToggle = ({
|
|
|
98
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
99
99
|
,
|
|
100
100
|
className: "extension-edit-toggle-container"
|
|
101
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
101
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
102
|
+
,
|
|
103
|
+
onMouseOver: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true)
|
|
104
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
102
105
|
,
|
|
103
|
-
onMouseOver: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true),
|
|
104
106
|
onMouseLeave: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false),
|
|
105
107
|
tabIndex: -1
|
|
106
108
|
}, jsx("button", {
|
|
@@ -153,11 +153,13 @@ export const ExtensionLabel = ({
|
|
|
153
153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
154
154
|
,
|
|
155
155
|
style: customContainerStyles
|
|
156
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
156
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
157
157
|
,
|
|
158
158
|
onMouseOver: () => {
|
|
159
159
|
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
160
|
-
}
|
|
160
|
+
}
|
|
161
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
162
|
+
,
|
|
161
163
|
onMouseLeave: () => {
|
|
162
164
|
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
163
165
|
},
|
|
@@ -195,8 +195,12 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
195
195
|
"data-layout": node.attrs.layout
|
|
196
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
197
197
|
,
|
|
198
|
-
style: mbeWrapperStyles
|
|
199
|
-
|
|
198
|
+
style: mbeWrapperStyles
|
|
199
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
200
|
+
,
|
|
201
|
+
onMouseEnter: () => handleMouseEvent(true)
|
|
202
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
203
|
+
,
|
|
200
204
|
onMouseLeave: () => handleMouseEvent(false)
|
|
201
205
|
}, jsx("div", {
|
|
202
206
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -125,7 +125,9 @@ const LinkSearchListItemNext = (props, ref) => {
|
|
|
125
125
|
onFocus: onFocus,
|
|
126
126
|
onKeyDown: handleKeyDown,
|
|
127
127
|
onMouseMove: handleMouseMove,
|
|
128
|
-
onMouseEnter: handleMouseEnter
|
|
128
|
+
onMouseEnter: handleMouseEnter
|
|
129
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
130
|
+
,
|
|
129
131
|
onMouseLeave: handleMouseLeave,
|
|
130
132
|
onClick: handleSelect
|
|
131
133
|
}, renderIcon(), jsx("span", {
|
|
@@ -224,15 +226,19 @@ class LinkSearchListItem extends React.PureComponent {
|
|
|
224
226
|
role
|
|
225
227
|
} = this.props;
|
|
226
228
|
return (
|
|
227
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
229
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
228
230
|
jsx("li", {
|
|
229
231
|
css: [container, selected && containerSelected],
|
|
230
232
|
role: role,
|
|
231
233
|
id: id,
|
|
232
234
|
"aria-selected": selected,
|
|
233
235
|
"data-testid": "link-search-list-item",
|
|
234
|
-
onMouseMove: this.handleMouseMove
|
|
235
|
-
|
|
236
|
+
onMouseMove: this.handleMouseMove
|
|
237
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
238
|
+
,
|
|
239
|
+
onMouseEnter: this.handleMouseEnter
|
|
240
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
241
|
+
,
|
|
236
242
|
onMouseLeave: this.handleMouseLeave,
|
|
237
243
|
onClick: this.handleSelect
|
|
238
244
|
}, this.renderIcon(), jsx("span", {
|
|
@@ -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 = "110.3.
|
|
4
|
+
const packageVersion = "110.3.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "110.3.
|
|
17
|
+
const packageVersion = "110.3.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -172,8 +172,12 @@ const HoverLinkOverlay = ({
|
|
|
172
172
|
jsx("span", {
|
|
173
173
|
ref: containerRef,
|
|
174
174
|
css: containerStyles,
|
|
175
|
-
onDoubleClick: handleDoubleClick
|
|
176
|
-
|
|
175
|
+
onDoubleClick: handleDoubleClick
|
|
176
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
177
|
+
,
|
|
178
|
+
onMouseEnter: () => handleOverlayChange(true)
|
|
179
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
180
|
+
,
|
|
177
181
|
onMouseLeave: () => handleOverlayChange(false)
|
|
178
182
|
}, children, jsx("span", {
|
|
179
183
|
css: hiddenTextStyle,
|
|
@@ -5,6 +5,7 @@ import rafSchedule from 'raf-schd';
|
|
|
5
5
|
import { createPortal, flushSync } from 'react-dom';
|
|
6
6
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
9
|
import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
|
|
9
10
|
// Ignored via go/ees005
|
|
10
11
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -39,14 +40,18 @@ export default class Popup extends React.Component {
|
|
|
39
40
|
if (!popup) {
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
const
|
|
43
|
+
const defaultTrapConfig = {
|
|
43
44
|
clickOutsideDeactivates: true,
|
|
44
45
|
escapeDeactivates: true,
|
|
45
46
|
initialFocus: popup,
|
|
46
47
|
fallbackFocus: popup,
|
|
47
48
|
returnFocusOnDeactivate: false
|
|
48
49
|
};
|
|
49
|
-
this.focusTrap
|
|
50
|
+
const trapConfig = typeof this.props.focusTrap === 'boolean' ? defaultTrapConfig : {
|
|
51
|
+
...defaultTrapConfig,
|
|
52
|
+
...this.props.focusTrap
|
|
53
|
+
};
|
|
54
|
+
this.focusTrap = createFocusTrap(popup, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
|
|
50
55
|
this.focusTrap.activate();
|
|
51
56
|
}));
|
|
52
57
|
}
|
|
@@ -163,10 +163,14 @@ function ExtensionWithPluginState(props) {
|
|
|
163
163
|
wrapperStyleInheritedCursor
|
|
164
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
165
165
|
,
|
|
166
|
-
style: customContainerStyles
|
|
166
|
+
style: customContainerStyles
|
|
167
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
168
|
+
,
|
|
167
169
|
onMouseEnter: function onMouseEnter() {
|
|
168
170
|
return handleMouseEvent(true);
|
|
169
|
-
}
|
|
171
|
+
}
|
|
172
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
173
|
+
,
|
|
170
174
|
onMouseLeave: function onMouseLeave() {
|
|
171
175
|
return handleMouseEvent(false);
|
|
172
176
|
}
|
|
@@ -69,10 +69,14 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
69
69
|
css: [wrapperStyle, inlineWrapperStyles]
|
|
70
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
71
71
|
,
|
|
72
|
-
className: classNames
|
|
72
|
+
className: classNames
|
|
73
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
74
|
+
,
|
|
73
75
|
onMouseEnter: function onMouseEnter() {
|
|
74
76
|
return handleMouseEvent(true);
|
|
75
|
-
}
|
|
77
|
+
}
|
|
78
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
79
|
+
,
|
|
76
80
|
onMouseLeave: function onMouseLeave() {
|
|
77
81
|
return handleMouseEvent(false);
|
|
78
82
|
}
|
|
@@ -81,8 +81,12 @@ export var LegacyContentHeader = function LegacyContentHeader(_ref) {
|
|
|
81
81
|
css: [lcmHeaderStyles]
|
|
82
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
83
83
|
,
|
|
84
|
-
className: classNames
|
|
85
|
-
|
|
84
|
+
className: classNames
|
|
85
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
86
|
+
,
|
|
87
|
+
onMouseEnter: onMouseEnter
|
|
88
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
89
|
+
,
|
|
86
90
|
onMouseLeave: onMouseLeave
|
|
87
91
|
}, jsx(Status, {
|
|
88
92
|
text: formatMessage(i18n.legacyContentHeader),
|
|
@@ -97,11 +97,13 @@ export var EditToggle = function EditToggle(_ref) {
|
|
|
97
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
98
98
|
,
|
|
99
99
|
className: "extension-edit-toggle-container"
|
|
100
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
100
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
101
101
|
,
|
|
102
102
|
onMouseOver: function onMouseOver() {
|
|
103
103
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
106
|
+
,
|
|
105
107
|
onMouseLeave: function onMouseLeave() {
|
|
106
108
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
107
109
|
},
|
|
@@ -152,11 +152,13 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
152
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
153
153
|
,
|
|
154
154
|
style: customContainerStyles
|
|
155
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
155
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, @atlassian/a11y/mouse-events-have-key-events
|
|
156
156
|
,
|
|
157
157
|
onMouseOver: function onMouseOver() {
|
|
158
158
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
159
|
-
}
|
|
159
|
+
}
|
|
160
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
161
|
+
,
|
|
160
162
|
onMouseLeave: function onMouseLeave() {
|
|
161
163
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
162
164
|
},
|
|
@@ -197,10 +197,14 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
|
|
|
197
197
|
"data-layout": node.attrs.layout
|
|
198
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
199
199
|
,
|
|
200
|
-
style: mbeWrapperStyles
|
|
200
|
+
style: mbeWrapperStyles
|
|
201
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
202
|
+
,
|
|
201
203
|
onMouseEnter: function onMouseEnter() {
|
|
202
204
|
return handleMouseEvent(true);
|
|
203
|
-
}
|
|
205
|
+
}
|
|
206
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
207
|
+
,
|
|
204
208
|
onMouseLeave: function onMouseLeave() {
|
|
205
209
|
return handleMouseEvent(false);
|
|
206
210
|
}
|
|
@@ -130,7 +130,9 @@ var LinkSearchListItemNext = function LinkSearchListItemNext(props, ref) {
|
|
|
130
130
|
onFocus: onFocus,
|
|
131
131
|
onKeyDown: handleKeyDown,
|
|
132
132
|
onMouseMove: handleMouseMove,
|
|
133
|
-
onMouseEnter: handleMouseEnter
|
|
133
|
+
onMouseEnter: handleMouseEnter
|
|
134
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
135
|
+
,
|
|
134
136
|
onMouseLeave: handleMouseLeave,
|
|
135
137
|
onClick: handleSelect
|
|
136
138
|
}, renderIcon(), jsx("span", {
|
|
@@ -234,15 +236,19 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
234
236
|
id = _this$props7.id,
|
|
235
237
|
role = _this$props7.role;
|
|
236
238
|
return (
|
|
237
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
239
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
238
240
|
jsx("li", {
|
|
239
241
|
css: [container, selected && containerSelected],
|
|
240
242
|
role: role,
|
|
241
243
|
id: id,
|
|
242
244
|
"aria-selected": selected,
|
|
243
245
|
"data-testid": "link-search-list-item",
|
|
244
|
-
onMouseMove: this.handleMouseMove
|
|
245
|
-
|
|
246
|
+
onMouseMove: this.handleMouseMove
|
|
247
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
248
|
+
,
|
|
249
|
+
onMouseEnter: this.handleMouseEnter
|
|
250
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
251
|
+
,
|
|
246
252
|
onMouseLeave: this.handleMouseLeave,
|
|
247
253
|
onClick: this.handleSelect
|
|
248
254
|
}, this.renderIcon(), jsx("span", {
|
|
@@ -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 = "110.3.
|
|
10
|
+
var packageVersion = "110.3.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "110.3.
|
|
24
|
+
var packageVersion = "110.3.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -178,10 +178,14 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
178
178
|
jsx("span", {
|
|
179
179
|
ref: containerRef,
|
|
180
180
|
css: containerStyles,
|
|
181
|
-
onDoubleClick: handleDoubleClick
|
|
181
|
+
onDoubleClick: handleDoubleClick
|
|
182
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
183
|
+
,
|
|
182
184
|
onMouseEnter: function onMouseEnter() {
|
|
183
185
|
return handleOverlayChange(true);
|
|
184
|
-
}
|
|
186
|
+
}
|
|
187
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
188
|
+
,
|
|
185
189
|
onMouseLeave: function onMouseLeave() {
|
|
186
190
|
return handleOverlayChange(false);
|
|
187
191
|
}
|
|
@@ -14,6 +14,7 @@ import rafSchedule from 'raf-schd';
|
|
|
14
14
|
import { createPortal, flushSync } from 'react-dom';
|
|
15
15
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
17
18
|
import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
|
|
18
19
|
// Ignored via go/ees005
|
|
19
20
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -55,14 +56,15 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
55
56
|
if (!popup) {
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
var
|
|
59
|
+
var defaultTrapConfig = {
|
|
59
60
|
clickOutsideDeactivates: true,
|
|
60
61
|
escapeDeactivates: true,
|
|
61
62
|
initialFocus: popup,
|
|
62
63
|
fallbackFocus: popup,
|
|
63
64
|
returnFocusOnDeactivate: false
|
|
64
65
|
};
|
|
65
|
-
_this.focusTrap
|
|
66
|
+
var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
|
|
67
|
+
_this.focusTrap = createFocusTrap(popup, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
|
|
66
68
|
_this.focusTrap.activate();
|
|
67
69
|
}));
|
|
68
70
|
return _this;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Options as FocusTrapOptions } from 'focus-trap';
|
|
2
3
|
import type { Position } from './utils';
|
|
3
4
|
export interface Props {
|
|
4
5
|
absoluteOffset?: Position;
|
|
@@ -12,7 +13,7 @@ export interface Props {
|
|
|
12
13
|
fitHeight?: number;
|
|
13
14
|
fitWidth?: number;
|
|
14
15
|
/** Enable focus trap to contain the user's focus within the popup */
|
|
15
|
-
focusTrap?: boolean;
|
|
16
|
+
focusTrap?: boolean | FocusTrapOptions;
|
|
16
17
|
forcePlacement?: boolean;
|
|
17
18
|
mountTo?: HTMLElement;
|
|
18
19
|
offset?: number[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Options as FocusTrapOptions } from 'focus-trap';
|
|
2
3
|
import type { Position } from './utils';
|
|
3
4
|
export interface Props {
|
|
4
5
|
absoluteOffset?: Position;
|
|
@@ -12,7 +13,7 @@ export interface Props {
|
|
|
12
13
|
fitHeight?: number;
|
|
13
14
|
fitWidth?: number;
|
|
14
15
|
/** Enable focus trap to contain the user's focus within the popup */
|
|
15
|
-
focusTrap?: boolean;
|
|
16
|
+
focusTrap?: boolean | FocusTrapOptions;
|
|
16
17
|
forcePlacement?: boolean;
|
|
17
18
|
mountTo?: HTMLElement;
|
|
18
19
|
offset?: number[];
|
package/package.json
CHANGED