@atlaskit/editor-common 110.3.1 → 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 +15 -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/preset/core-plugin/index.js +1 -2
- 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/cjs/utils/calculate-toolbar-position.js +2 -2
- package/dist/cjs/utils/document.js +2 -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/preset/core-plugin/index.js +1 -2
- 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/es2019/utils/calculate-toolbar-position.js +2 -2
- package/dist/es2019/utils/document.js +2 -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/preset/core-plugin/index.js +1 -2
- 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/esm/utils/calculate-toolbar-position.js +2 -2
- package/dist/esm/utils/document.js +2 -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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
11
|
+
## 110.3.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`76ffc91d514f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76ffc91d514f3) -
|
|
16
|
+
Changed packages over to using the generic AIFC FG rather then an experiment
|
|
17
|
+
|
|
3
18
|
## 110.3.1
|
|
4
19
|
|
|
5
20
|
### 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
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.corePlugin = void 0;
|
|
7
7
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
10
9
|
var _nodeAnchorProvider = require("../../node-anchor/node-anchor-provider");
|
|
11
10
|
var _processRawValue = require("../../utils/processRawValue");
|
|
12
11
|
var _editorCommands = require("../editor-commands");
|
|
@@ -110,7 +109,7 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
|
|
|
110
109
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
111
110
|
editorView.dispatch(tr.scrollIntoView());
|
|
112
111
|
} else {
|
|
113
|
-
if ((0,
|
|
112
|
+
if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
|
|
114
113
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
115
114
|
}
|
|
116
115
|
}
|
|
@@ -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;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
|
-
var
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
10
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
11
11
|
|
|
12
12
|
/*
|
|
@@ -113,7 +113,7 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
113
113
|
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
114
114
|
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
115
115
|
var range = null;
|
|
116
|
-
if ((0,
|
|
116
|
+
if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
|
|
117
117
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
118
|
var maybeRange = selection.getRangeAt(0);
|
|
119
119
|
if (maybeRange instanceof Range) {
|
|
@@ -15,7 +15,7 @@ exports.isSelectionEndOfParagraph = exports.isReplaceDocOperation = void 0;
|
|
|
15
15
|
exports.nodesBetweenChanged = nodesBetweenChanged;
|
|
16
16
|
var _clamp = _interopRequireDefault(require("lodash/clamp"));
|
|
17
17
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
18
|
-
var
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
19
|
var _editorCoreUtils = require("./editor-core-utils");
|
|
20
20
|
var getStepRange = exports.getStepRange = function getStepRange(transaction) {
|
|
21
21
|
var from = -1;
|
|
@@ -30,7 +30,7 @@ var getStepRange = exports.getStepRange = function getStepRange(transaction) {
|
|
|
30
30
|
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
31
31
|
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
32
32
|
// to see why use clamp here
|
|
33
|
-
if ((0,
|
|
33
|
+
if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
|
|
34
34
|
var docSize = transaction.doc.content.size;
|
|
35
35
|
from = (0, _clamp.default)(from, 0, docSize);
|
|
36
36
|
to = (0, _clamp.default)(to, 0, docSize);
|
|
@@ -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
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
3
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
5
4
|
import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
6
5
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
@@ -112,7 +111,7 @@ export const corePlugin = ({
|
|
|
112
111
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
113
112
|
editorView.dispatch(tr.scrollIntoView());
|
|
114
113
|
} else {
|
|
115
|
-
if (
|
|
114
|
+
if (fg('aifc_create_enabled')) {
|
|
116
115
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
117
116
|
}
|
|
118
117
|
}
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -106,7 +106,7 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
106
106
|
const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
107
107
|
const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
108
108
|
let range = null;
|
|
109
|
-
if (
|
|
109
|
+
if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
|
|
110
110
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
111
111
|
const maybeRange = selection.getRangeAt(0);
|
|
112
112
|
if (maybeRange instanceof Range) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clamp from 'lodash/clamp';
|
|
2
2
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { isEmptyParagraph } from './editor-core-utils';
|
|
5
5
|
export const getStepRange = transaction => {
|
|
6
6
|
let from = -1;
|
|
@@ -15,7 +15,7 @@ export const getStepRange = transaction => {
|
|
|
15
15
|
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
16
16
|
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
17
17
|
// to see why use clamp here
|
|
18
|
-
if (
|
|
18
|
+
if (fg('aifc_create_enabled')) {
|
|
19
19
|
const docSize = transaction.doc.content.size;
|
|
20
20
|
from = clamp(from, 0, docSize);
|
|
21
21
|
to = clamp(to, 0, docSize);
|
|
@@ -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
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
3
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
5
4
|
import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
6
5
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
@@ -105,7 +104,7 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
105
104
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
106
105
|
editorView.dispatch(tr.scrollIntoView());
|
|
107
106
|
} else {
|
|
108
|
-
if (
|
|
107
|
+
if (fg('aifc_create_enabled')) {
|
|
109
108
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
110
109
|
}
|
|
111
110
|
}
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -107,7 +107,7 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
107
107
|
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
108
108
|
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
109
109
|
var range = null;
|
|
110
|
-
if (
|
|
110
|
+
if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
|
|
111
111
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
112
112
|
var maybeRange = selection.getRangeAt(0);
|
|
113
113
|
if (maybeRange instanceof Range) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clamp from 'lodash/clamp';
|
|
2
2
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { isEmptyParagraph } from './editor-core-utils';
|
|
5
5
|
export var getStepRange = function getStepRange(transaction) {
|
|
6
6
|
var from = -1;
|
|
@@ -15,7 +15,7 @@ export var getStepRange = function getStepRange(transaction) {
|
|
|
15
15
|
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
16
16
|
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
17
17
|
// to see why use clamp here
|
|
18
|
-
if (
|
|
18
|
+
if (fg('aifc_create_enabled')) {
|
|
19
19
|
var docSize = transaction.doc.content.size;
|
|
20
20
|
from = clamp(from, 0, docSize);
|
|
21
21
|
to = clamp(to, 0, docSize);
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.
|
|
3
|
+
"version": "110.4.0",
|
|
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/"
|
|
@@ -178,6 +178,9 @@
|
|
|
178
178
|
"platform_editor_blocktaskitem_patch_3": {
|
|
179
179
|
"type": "boolean"
|
|
180
180
|
},
|
|
181
|
+
"aifc_create_enabled": {
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
},
|
|
181
184
|
"platform-visual-refresh-icons": {
|
|
182
185
|
"type": "boolean"
|
|
183
186
|
},
|
|
@@ -274,9 +277,6 @@
|
|
|
274
277
|
"platform_editor_resolve_hyperlinks_CONFLUENCE": {
|
|
275
278
|
"type": "boolean"
|
|
276
279
|
},
|
|
277
|
-
"aifc_create_enabled": {
|
|
278
|
-
"type": "boolean"
|
|
279
|
-
},
|
|
280
280
|
"platform_editor_resolve_hyperlinks_JIRA": {
|
|
281
281
|
"type": "boolean"
|
|
282
282
|
},
|