@atlaskit/editor-common 110.9.1 → 110.9.3
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/element-browser/components/StatelessElementBrowser.js +1 -1
- package/dist/cjs/extensibility/Extension/Lozenge/EditToggle.js +2 -2
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/cjs/messages/block-menu.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/toolbar/rank.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/HoverLinkOverlay/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +17 -3
- package/dist/cjs/ui/Popup/utils.js +12 -7
- package/dist/cjs/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +1 -1
- package/dist/es2019/extensibility/Extension/Lozenge/EditToggle.js +2 -2
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/es2019/messages/block-menu.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/toolbar/rank.js +2 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +17 -3
- package/dist/es2019/ui/Popup/utils.js +12 -7
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +1 -1
- package/dist/esm/extensibility/Extension/Lozenge/EditToggle.js +2 -2
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +2 -2
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/esm/messages/block-menu.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/toolbar/rank.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +17 -3
- package/dist/esm/ui/Popup/utils.js +12 -7
- package/dist/esm/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/types/messages/block-menu.d.ts +5 -0
- package/dist/types/toolbar/rank.d.ts +0 -2
- package/dist/types/ui/Popup/utils.d.ts +2 -1
- package/dist/types-ts4.5/messages/block-menu.d.ts +5 -0
- package/dist/types-ts4.5/toolbar/rank.d.ts +0 -2
- package/dist/types-ts4.5/ui/Popup/utils.d.ts +2 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.9.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2d1801fdf502c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d1801fdf502c) -
|
|
8
|
+
[ux] AIFC-896 fix linker picker position
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 110.9.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`e053b5e610ac2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e053b5e610ac2) -
|
|
16
|
+
[ux] EDITOR-1652 add convert to sync block to block menu
|
|
17
|
+
|
|
3
18
|
## 110.9.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -254,7 +254,7 @@ function StatelessElementBrowser(props) {
|
|
|
254
254
|
var handleClick = function handleClick() {
|
|
255
255
|
setCanFocusSearch(true);
|
|
256
256
|
};
|
|
257
|
-
return /* eslint-disable-next-line
|
|
257
|
+
return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
|
|
258
258
|
(0, _react2.jsx)("div", {
|
|
259
259
|
css: wrapper,
|
|
260
260
|
"data-testid": "element-browser",
|
|
@@ -94,7 +94,7 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
|
|
|
94
94
|
}
|
|
95
95
|
}, [handleClick]);
|
|
96
96
|
return (
|
|
97
|
-
// eslint-disable-next-line
|
|
97
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
98
98
|
(0, _react2.jsx)("div", {
|
|
99
99
|
"data-testid": "extension-edit-toggle-container"
|
|
100
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -106,7 +106,7 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
|
|
|
106
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
107
107
|
,
|
|
108
108
|
className: "extension-edit-toggle-container"
|
|
109
|
-
// eslint-disable-next-line
|
|
109
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
110
110
|
,
|
|
111
111
|
onMouseOver: function onMouseOver() {
|
|
112
112
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
@@ -163,7 +163,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
163
163
|
'extension-icon': (0, _expValEquals.expValEquals)('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
|
|
164
164
|
});
|
|
165
165
|
return (
|
|
166
|
-
// eslint-disable-next-line
|
|
166
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
167
167
|
(0, _react.jsx)("div", {
|
|
168
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
169
169
|
css: containerStyles
|
|
@@ -173,7 +173,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
173
173
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
174
174
|
,
|
|
175
175
|
style: customContainerStyles
|
|
176
|
-
// eslint-disable-next-line
|
|
176
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
177
177
|
,
|
|
178
178
|
onMouseOver: function onMouseOver() {
|
|
179
179
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
@@ -241,7 +241,7 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
241
241
|
id = _this$props7.id,
|
|
242
242
|
role = _this$props7.role;
|
|
243
243
|
return (
|
|
244
|
-
// eslint-disable-next-line
|
|
244
|
+
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
245
245
|
(0, _react2.jsx)("li", {
|
|
246
246
|
css: [container, selected && containerSelected],
|
|
247
247
|
role: role,
|
|
@@ -65,5 +65,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
65
65
|
id: 'fabric.editor.block.menu.create.synced.block',
|
|
66
66
|
defaultMessage: 'Create synced block',
|
|
67
67
|
description: 'Create a synced block at this empty line'
|
|
68
|
+
},
|
|
69
|
+
convertToSyncedBlock: {
|
|
70
|
+
id: 'fabric.editor.block.menu.convert.to.synced.block',
|
|
71
|
+
defaultMessage: 'Convert to synced block',
|
|
72
|
+
description: 'Convert the selection to a synced block by putting all of the content inside a new synced block'
|
|
68
73
|
}
|
|
69
74
|
});
|
|
@@ -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.9.
|
|
19
|
+
var packageVersion = "110.9.2";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
package/dist/cjs/toolbar/rank.js
CHANGED
|
@@ -43,7 +43,7 @@ var TEXT_STYLES_MENU_SECTION_RANK = exports.TEXT_STYLES_MENU_SECTION_RANK = (0,
|
|
|
43
43
|
/**
|
|
44
44
|
* Text formatting group
|
|
45
45
|
*/
|
|
46
|
-
var TEXT_FORMAT_GROUP_RANK = exports.TEXT_FORMAT_GROUP_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
46
|
+
var TEXT_FORMAT_GROUP_RANK = exports.TEXT_FORMAT_GROUP_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_HERO_BUTTON.key, 100), _keys.TEXT_FORMATTING_MENU.key, 200);
|
|
47
47
|
var TEXT_FORMAT_GROUP_COLLAPSED_RANK = exports.TEXT_FORMAT_GROUP_COLLAPSED_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key, 100), _keys.TEXT_FORMATTING_MENU.key, 200);
|
|
48
48
|
var TEXT_FORMAT_MENU_RANK = exports.TEXT_FORMAT_MENU_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.TEXT_FORMATTING_MENU_SECTION.key, 100), _keys.CLEAR_FORMARTTING_MENU_SECTION.key, 200);
|
|
49
49
|
var TEXT_FORMATTING_MENU_SECTION_RANK = exports.TEXT_FORMATTING_MENU_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BOLD_MENU_ITEM.key, 100), _keys.ITALIC_MENU_ITEM.key, 200), _keys.UNDERLINE_MENU_ITEM.key, 300), _keys.STRIKE_MENU_ITEM.key, 400), _keys.CODE_MENU_ITEM.key, 500), _keys.SUBSCRIPT_MENU_ITEM.key, 600), _keys.SUPERSCRIPT_MENU_ITEM.key, 700);
|
|
@@ -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.9.
|
|
27
|
+
var packageVersion = "110.9.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -188,7 +188,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
return (
|
|
191
|
-
// eslint-disable-next-line
|
|
191
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
192
192
|
(0, _react2.jsx)("span", {
|
|
193
193
|
ref: containerRef,
|
|
194
194
|
css: containerStyles,
|
|
@@ -116,7 +116,8 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
116
116
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
117
117
|
offset: offset,
|
|
118
118
|
allowOutOfBounds: allowOutOfBounds,
|
|
119
|
-
rect: rect
|
|
119
|
+
rect: rect,
|
|
120
|
+
boundariesElement: (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
|
|
120
121
|
});
|
|
121
122
|
position = onPositionCalculated ? onPositionCalculated(position) : position;
|
|
122
123
|
if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
|
|
@@ -179,6 +180,10 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
179
180
|
}, {
|
|
180
181
|
key: "initPopup",
|
|
181
182
|
value: function initPopup(popup) {
|
|
183
|
+
if (this.popupRef.current && (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
|
|
184
|
+
var _this$resizeObserver;
|
|
185
|
+
(_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.popupRef.current);
|
|
186
|
+
}
|
|
182
187
|
this.popupRef.current = popup;
|
|
183
188
|
var target = this.props.target;
|
|
184
189
|
var overflowScrollParent = (0, _utils.findOverflowScrollParent)(popup);
|
|
@@ -203,6 +208,10 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
203
208
|
if (this.props.focusTrap) {
|
|
204
209
|
this.initFocusTrap();
|
|
205
210
|
}
|
|
211
|
+
if (this.popupRef.current && (0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
|
|
212
|
+
var _this$resizeObserver2;
|
|
213
|
+
(_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 || _this$resizeObserver2.observe(this.popupRef.current);
|
|
214
|
+
}
|
|
206
215
|
}
|
|
207
216
|
}, {
|
|
208
217
|
key: "destroyFocusTrap",
|
|
@@ -283,8 +292,13 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
283
292
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
284
293
|
this.scrollElement.removeEventListener('scroll', this.onResize);
|
|
285
294
|
}
|
|
286
|
-
if (
|
|
287
|
-
|
|
295
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_link_popup_position_fix_aifc')) {
|
|
296
|
+
var _this$resizeObserver3;
|
|
297
|
+
(_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 || _this$resizeObserver3.disconnect();
|
|
298
|
+
} else {
|
|
299
|
+
if (this.scrollParentElement && this.resizeObserver) {
|
|
300
|
+
this.resizeObserver.unobserve(this.scrollParentElement);
|
|
301
|
+
}
|
|
288
302
|
}
|
|
289
303
|
this.scheduledUpdatePosition.cancel();
|
|
290
304
|
this.destroyFocusTrap();
|
|
@@ -144,8 +144,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
|
|
|
144
144
|
targetHeight = _ref2.targetHeight,
|
|
145
145
|
popup = _ref2.popup,
|
|
146
146
|
offset = _ref2.offset,
|
|
147
|
-
position = _ref2.position
|
|
148
|
-
|
|
147
|
+
position = _ref2.position,
|
|
148
|
+
boundariesElement = _ref2.boundariesElement;
|
|
149
|
+
var scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
149
150
|
var newPos = _objectSpread({}, position);
|
|
150
151
|
if (scrollParent) {
|
|
151
152
|
var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
|
|
@@ -167,8 +168,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
|
|
|
167
168
|
popupOffsetParent = _ref3.popupOffsetParent,
|
|
168
169
|
offset = _ref3.offset,
|
|
169
170
|
position = _ref3.position,
|
|
170
|
-
placement = _ref3.placement
|
|
171
|
-
|
|
171
|
+
placement = _ref3.placement,
|
|
172
|
+
boundariesElement = _ref3.boundariesElement;
|
|
173
|
+
var scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
172
174
|
var newPos = _objectSpread({}, position);
|
|
173
175
|
if (scrollParent) {
|
|
174
176
|
var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
|
|
@@ -229,7 +231,8 @@ function calculatePosition(_ref5) {
|
|
|
229
231
|
stick = _ref5.stick,
|
|
230
232
|
_ref5$allowOutOfBound = _ref5.allowOutOfBounds,
|
|
231
233
|
allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
|
|
232
|
-
rect = _ref5.rect
|
|
234
|
+
rect = _ref5.rect,
|
|
235
|
+
boundariesElement = _ref5.boundariesElement;
|
|
233
236
|
var position = {};
|
|
234
237
|
if (!target || !popup || !popup.offsetParent) {
|
|
235
238
|
return position;
|
|
@@ -285,7 +288,8 @@ function calculatePosition(_ref5) {
|
|
|
285
288
|
popup: popup,
|
|
286
289
|
offset: offset,
|
|
287
290
|
position: position,
|
|
288
|
-
placement: verticalPlacement
|
|
291
|
+
placement: verticalPlacement,
|
|
292
|
+
boundariesElement: boundariesElement
|
|
289
293
|
});
|
|
290
294
|
}
|
|
291
295
|
if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
|
|
@@ -295,7 +299,8 @@ function calculatePosition(_ref5) {
|
|
|
295
299
|
targetHeight: targetHeight,
|
|
296
300
|
popup: popup,
|
|
297
301
|
offset: offset,
|
|
298
|
-
position: position
|
|
302
|
+
position: position,
|
|
303
|
+
boundariesElement: boundariesElement
|
|
299
304
|
});
|
|
300
305
|
}
|
|
301
306
|
var horizontalPosition = calculateHorizontalPlacement({
|
|
@@ -323,7 +323,7 @@ function DropdownMenuItem(_ref) {
|
|
|
323
323
|
// especially when we pass any interactive element as a item.content
|
|
324
324
|
var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
325
325
|
var dropListItem =
|
|
326
|
-
// eslint-disable-next-line
|
|
326
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
327
327
|
(0, _react2.jsx)("div", {
|
|
328
328
|
css: function css() {
|
|
329
329
|
return buttonStyles(item.isActive, submenuActive);
|
|
@@ -240,7 +240,7 @@ function StatelessElementBrowser(props) {
|
|
|
240
240
|
const handleClick = () => {
|
|
241
241
|
setCanFocusSearch(true);
|
|
242
242
|
};
|
|
243
|
-
return /* eslint-disable-next-line
|
|
243
|
+
return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
|
|
244
244
|
jsx("div", {
|
|
245
245
|
css: wrapper,
|
|
246
246
|
"data-testid": "element-browser",
|
|
@@ -87,7 +87,7 @@ export const EditToggle = ({
|
|
|
87
87
|
}
|
|
88
88
|
}, [handleClick]);
|
|
89
89
|
return (
|
|
90
|
-
// eslint-disable-next-line
|
|
90
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
91
91
|
jsx("div", {
|
|
92
92
|
"data-testid": "extension-edit-toggle-container"
|
|
93
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -99,7 +99,7 @@ export const EditToggle = ({
|
|
|
99
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
100
100
|
,
|
|
101
101
|
className: "extension-edit-toggle-container"
|
|
102
|
-
// eslint-disable-next-line
|
|
102
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
103
103
|
,
|
|
104
104
|
onMouseOver: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true)
|
|
105
105
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
@@ -154,7 +154,7 @@ export const ExtensionLabel = ({
|
|
|
154
154
|
'extension-icon': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
|
|
155
155
|
});
|
|
156
156
|
return (
|
|
157
|
-
// eslint-disable-next-line
|
|
157
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
158
158
|
jsx("div", {
|
|
159
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
160
160
|
css: containerStyles
|
|
@@ -164,7 +164,7 @@ export const ExtensionLabel = ({
|
|
|
164
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
165
165
|
,
|
|
166
166
|
style: customContainerStyles
|
|
167
|
-
// eslint-disable-next-line
|
|
167
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
168
168
|
,
|
|
169
169
|
onMouseOver: () => {
|
|
170
170
|
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
@@ -226,7 +226,7 @@ class LinkSearchListItem extends React.PureComponent {
|
|
|
226
226
|
role
|
|
227
227
|
} = this.props;
|
|
228
228
|
return (
|
|
229
|
-
// eslint-disable-next-line
|
|
229
|
+
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
230
230
|
jsx("li", {
|
|
231
231
|
css: [container, selected && containerSelected],
|
|
232
232
|
role: role,
|
|
@@ -59,5 +59,10 @@ export const messages = defineMessages({
|
|
|
59
59
|
id: 'fabric.editor.block.menu.create.synced.block',
|
|
60
60
|
defaultMessage: 'Create synced block',
|
|
61
61
|
description: 'Create a synced block at this empty line'
|
|
62
|
+
},
|
|
63
|
+
convertToSyncedBlock: {
|
|
64
|
+
id: 'fabric.editor.block.menu.convert.to.synced.block',
|
|
65
|
+
defaultMessage: 'Convert to synced block',
|
|
66
|
+
description: 'Convert the selection to a synced block by putting all of the content inside a new synced block'
|
|
62
67
|
}
|
|
63
68
|
});
|
|
@@ -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.9.
|
|
4
|
+
const packageVersion = "110.9.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -122,10 +122,8 @@ export const TEXT_STYLES_MENU_SECTION_RANK = {
|
|
|
122
122
|
* Text formatting group
|
|
123
123
|
*/
|
|
124
124
|
export const TEXT_FORMAT_GROUP_RANK = {
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[TEXT_FORMATTING_HERO_BUTTON.key]: 300,
|
|
128
|
-
[TEXT_FORMATTING_MENU.key]: 400
|
|
125
|
+
[TEXT_FORMATTING_HERO_BUTTON.key]: 100,
|
|
126
|
+
[TEXT_FORMATTING_MENU.key]: 200
|
|
129
127
|
};
|
|
130
128
|
export const TEXT_FORMAT_GROUP_COLLAPSED_RANK = {
|
|
131
129
|
[TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key]: 100,
|
|
@@ -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.9.
|
|
17
|
+
const packageVersion = "110.9.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -168,7 +168,7 @@ const HoverLinkOverlay = ({
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
return (
|
|
171
|
-
// eslint-disable-next-line
|
|
171
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
172
172
|
jsx("span", {
|
|
173
173
|
ref: containerRef,
|
|
174
174
|
css: containerStyles,
|
|
@@ -93,7 +93,8 @@ export default class Popup extends React.Component {
|
|
|
93
93
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
94
94
|
offset: offset,
|
|
95
95
|
allowOutOfBounds,
|
|
96
|
-
rect
|
|
96
|
+
rect,
|
|
97
|
+
boundariesElement: fg('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
|
|
97
98
|
});
|
|
98
99
|
position = onPositionCalculated ? onPositionCalculated(position) : position;
|
|
99
100
|
if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
|
|
@@ -150,6 +151,10 @@ export default class Popup extends React.Component {
|
|
|
150
151
|
* Checks whether it's possible to position popup along given target, and if it's not throws an error.
|
|
151
152
|
*/
|
|
152
153
|
initPopup(popup) {
|
|
154
|
+
if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
155
|
+
var _this$resizeObserver;
|
|
156
|
+
(_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 ? void 0 : _this$resizeObserver.unobserve(this.popupRef.current);
|
|
157
|
+
}
|
|
153
158
|
this.popupRef.current = popup;
|
|
154
159
|
const {
|
|
155
160
|
target
|
|
@@ -176,6 +181,10 @@ export default class Popup extends React.Component {
|
|
|
176
181
|
if (this.props.focusTrap) {
|
|
177
182
|
this.initFocusTrap();
|
|
178
183
|
}
|
|
184
|
+
if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
185
|
+
var _this$resizeObserver2;
|
|
186
|
+
(_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 ? void 0 : _this$resizeObserver2.observe(this.popupRef.current);
|
|
187
|
+
}
|
|
179
188
|
}
|
|
180
189
|
/**
|
|
181
190
|
* Cancels the initialisation of the focus trap if it has not yet occured
|
|
@@ -247,8 +256,13 @@ export default class Popup extends React.Component {
|
|
|
247
256
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
248
257
|
this.scrollElement.removeEventListener('scroll', this.onResize);
|
|
249
258
|
}
|
|
250
|
-
if (
|
|
251
|
-
|
|
259
|
+
if (fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
260
|
+
var _this$resizeObserver3;
|
|
261
|
+
(_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 ? void 0 : _this$resizeObserver3.disconnect();
|
|
262
|
+
} else {
|
|
263
|
+
if (this.scrollParentElement && this.resizeObserver) {
|
|
264
|
+
this.resizeObserver.unobserve(this.scrollParentElement);
|
|
265
|
+
}
|
|
252
266
|
}
|
|
253
267
|
this.scheduledUpdatePosition.cancel();
|
|
254
268
|
this.destroyFocusTrap();
|
|
@@ -131,9 +131,10 @@ const calculateVerticalStickBottom = ({
|
|
|
131
131
|
targetHeight,
|
|
132
132
|
popup,
|
|
133
133
|
offset,
|
|
134
|
-
position
|
|
134
|
+
position,
|
|
135
|
+
boundariesElement
|
|
135
136
|
}) => {
|
|
136
|
-
const scrollParent = findOverflowScrollParent(target);
|
|
137
|
+
const scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
137
138
|
const newPos = {
|
|
138
139
|
...position
|
|
139
140
|
};
|
|
@@ -157,9 +158,10 @@ const calculateVerticalStickTop = ({
|
|
|
157
158
|
popupOffsetParent,
|
|
158
159
|
offset,
|
|
159
160
|
position,
|
|
160
|
-
placement
|
|
161
|
+
placement,
|
|
162
|
+
boundariesElement
|
|
161
163
|
}) => {
|
|
162
|
-
const scrollParent = findOverflowScrollParent(target);
|
|
164
|
+
const scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
163
165
|
const newPos = {
|
|
164
166
|
...position
|
|
165
167
|
};
|
|
@@ -223,7 +225,8 @@ export function calculatePosition({
|
|
|
223
225
|
offset,
|
|
224
226
|
stick,
|
|
225
227
|
allowOutOfBounds = false,
|
|
226
|
-
rect
|
|
228
|
+
rect,
|
|
229
|
+
boundariesElement
|
|
227
230
|
}) {
|
|
228
231
|
let position = {};
|
|
229
232
|
if (!target || !popup || !popup.offsetParent) {
|
|
@@ -283,7 +286,8 @@ export function calculatePosition({
|
|
|
283
286
|
popup,
|
|
284
287
|
offset,
|
|
285
288
|
position,
|
|
286
|
-
placement: verticalPlacement
|
|
289
|
+
placement: verticalPlacement,
|
|
290
|
+
boundariesElement
|
|
287
291
|
});
|
|
288
292
|
}
|
|
289
293
|
if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
|
|
@@ -293,7 +297,8 @@ export function calculatePosition({
|
|
|
293
297
|
targetHeight,
|
|
294
298
|
popup,
|
|
295
299
|
offset,
|
|
296
|
-
position
|
|
300
|
+
position,
|
|
301
|
+
boundariesElement
|
|
297
302
|
});
|
|
298
303
|
}
|
|
299
304
|
const horizontalPosition = calculateHorizontalPlacement({
|
|
@@ -350,7 +350,7 @@ export function DropdownMenuItem({
|
|
|
350
350
|
// especially when we pass any interactive element as a item.content
|
|
351
351
|
const tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
352
352
|
const dropListItem =
|
|
353
|
-
// eslint-disable-next-line
|
|
353
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
354
354
|
jsx("div", {
|
|
355
355
|
css: () => buttonStyles(item.isActive, submenuActive),
|
|
356
356
|
role: expValEquals('platform_editor_august_a11y', 'isEnabled', true) ? shouldUseDefaultRole ? undefined : 'menuitem' : undefined,
|
|
@@ -244,7 +244,7 @@ function StatelessElementBrowser(props) {
|
|
|
244
244
|
var handleClick = function handleClick() {
|
|
245
245
|
setCanFocusSearch(true);
|
|
246
246
|
};
|
|
247
|
-
return /* eslint-disable-next-line
|
|
247
|
+
return /* eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable*/(
|
|
248
248
|
jsx("div", {
|
|
249
249
|
css: wrapper,
|
|
250
250
|
"data-testid": "element-browser",
|
|
@@ -86,7 +86,7 @@ export var EditToggle = function EditToggle(_ref) {
|
|
|
86
86
|
}
|
|
87
87
|
}, [handleClick]);
|
|
88
88
|
return (
|
|
89
|
-
// eslint-disable-next-line
|
|
89
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
90
90
|
jsx("div", {
|
|
91
91
|
"data-testid": "extension-edit-toggle-container"
|
|
92
92
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -98,7 +98,7 @@ export var EditToggle = function EditToggle(_ref) {
|
|
|
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
|
|
101
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
102
102
|
,
|
|
103
103
|
onMouseOver: function onMouseOver() {
|
|
104
104
|
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
@@ -154,7 +154,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
154
154
|
'extension-icon': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
|
|
155
155
|
});
|
|
156
156
|
return (
|
|
157
|
-
// eslint-disable-next-line
|
|
157
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
158
158
|
jsx("div", {
|
|
159
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
160
160
|
css: containerStyles
|
|
@@ -164,7 +164,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
164
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
165
165
|
,
|
|
166
166
|
style: customContainerStyles
|
|
167
|
-
// eslint-disable-next-line
|
|
167
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
168
168
|
,
|
|
169
169
|
onMouseOver: function onMouseOver() {
|
|
170
170
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
@@ -236,7 +236,7 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
236
236
|
id = _this$props7.id,
|
|
237
237
|
role = _this$props7.role;
|
|
238
238
|
return (
|
|
239
|
-
// eslint-disable-next-line
|
|
239
|
+
// eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
|
|
240
240
|
jsx("li", {
|
|
241
241
|
css: [container, selected && containerSelected],
|
|
242
242
|
role: role,
|
|
@@ -59,5 +59,10 @@ export var messages = defineMessages({
|
|
|
59
59
|
id: 'fabric.editor.block.menu.create.synced.block',
|
|
60
60
|
defaultMessage: 'Create synced block',
|
|
61
61
|
description: 'Create a synced block at this empty line'
|
|
62
|
+
},
|
|
63
|
+
convertToSyncedBlock: {
|
|
64
|
+
id: 'fabric.editor.block.menu.convert.to.synced.block',
|
|
65
|
+
defaultMessage: 'Convert to synced block',
|
|
66
|
+
description: 'Convert the selection to a synced block by putting all of the content inside a new synced block'
|
|
62
67
|
}
|
|
63
68
|
});
|
|
@@ -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.9.
|
|
10
|
+
var packageVersion = "110.9.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
package/dist/esm/toolbar/rank.js
CHANGED
|
@@ -36,7 +36,7 @@ export var TEXT_STYLES_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defi
|
|
|
36
36
|
/**
|
|
37
37
|
* Text formatting group
|
|
38
38
|
*/
|
|
39
|
-
export var TEXT_FORMAT_GROUP_RANK = _defineProperty(_defineProperty(
|
|
39
|
+
export var TEXT_FORMAT_GROUP_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_HERO_BUTTON.key, 100), TEXT_FORMATTING_MENU.key, 200);
|
|
40
40
|
export var TEXT_FORMAT_GROUP_COLLAPSED_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_HERO_BUTTON_COLLAPSED.key, 100), TEXT_FORMATTING_MENU.key, 200);
|
|
41
41
|
export var TEXT_FORMAT_MENU_RANK = _defineProperty(_defineProperty({}, TEXT_FORMATTING_MENU_SECTION.key, 100), CLEAR_FORMARTTING_MENU_SECTION.key, 200);
|
|
42
42
|
export var TEXT_FORMATTING_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BOLD_MENU_ITEM.key, 100), ITALIC_MENU_ITEM.key, 200), UNDERLINE_MENU_ITEM.key, 300), STRIKE_MENU_ITEM.key, 400), CODE_MENU_ITEM.key, 500), SUBSCRIPT_MENU_ITEM.key, 600), SUPERSCRIPT_MENU_ITEM.key, 700);
|
|
@@ -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.9.
|
|
24
|
+
var packageVersion = "110.9.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -174,7 +174,7 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
|
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
return (
|
|
177
|
-
// eslint-disable-next-line
|
|
177
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
178
178
|
jsx("span", {
|
|
179
179
|
ref: containerRef,
|
|
180
180
|
css: containerStyles,
|
|
@@ -109,7 +109,8 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
110
110
|
offset: offset,
|
|
111
111
|
allowOutOfBounds: allowOutOfBounds,
|
|
112
|
-
rect: rect
|
|
112
|
+
rect: rect,
|
|
113
|
+
boundariesElement: fg('platform_editor_link_popup_position_fix_aifc') ? boundariesElement || document.body : undefined
|
|
113
114
|
});
|
|
114
115
|
position = onPositionCalculated ? onPositionCalculated(position) : position;
|
|
115
116
|
if (typeof position.top !== 'undefined' && absoluteOffset !== null && absoluteOffset !== void 0 && absoluteOffset.top) {
|
|
@@ -172,6 +173,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
172
173
|
}, {
|
|
173
174
|
key: "initPopup",
|
|
174
175
|
value: function initPopup(popup) {
|
|
176
|
+
if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
177
|
+
var _this$resizeObserver;
|
|
178
|
+
(_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.popupRef.current);
|
|
179
|
+
}
|
|
175
180
|
this.popupRef.current = popup;
|
|
176
181
|
var target = this.props.target;
|
|
177
182
|
var overflowScrollParent = findOverflowScrollParent(popup);
|
|
@@ -196,6 +201,10 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
196
201
|
if (this.props.focusTrap) {
|
|
197
202
|
this.initFocusTrap();
|
|
198
203
|
}
|
|
204
|
+
if (this.popupRef.current && fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
205
|
+
var _this$resizeObserver2;
|
|
206
|
+
(_this$resizeObserver2 = this.resizeObserver) === null || _this$resizeObserver2 === void 0 || _this$resizeObserver2.observe(this.popupRef.current);
|
|
207
|
+
}
|
|
199
208
|
}
|
|
200
209
|
}, {
|
|
201
210
|
key: "destroyFocusTrap",
|
|
@@ -276,8 +285,13 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
276
285
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
277
286
|
this.scrollElement.removeEventListener('scroll', this.onResize);
|
|
278
287
|
}
|
|
279
|
-
if (
|
|
280
|
-
|
|
288
|
+
if (fg('platform_editor_link_popup_position_fix_aifc')) {
|
|
289
|
+
var _this$resizeObserver3;
|
|
290
|
+
(_this$resizeObserver3 = this.resizeObserver) === null || _this$resizeObserver3 === void 0 || _this$resizeObserver3.disconnect();
|
|
291
|
+
} else {
|
|
292
|
+
if (this.scrollParentElement && this.resizeObserver) {
|
|
293
|
+
this.resizeObserver.unobserve(this.scrollParentElement);
|
|
294
|
+
}
|
|
281
295
|
}
|
|
282
296
|
this.scheduledUpdatePosition.cancel();
|
|
283
297
|
this.destroyFocusTrap();
|
|
@@ -130,8 +130,9 @@ var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2)
|
|
|
130
130
|
targetHeight = _ref2.targetHeight,
|
|
131
131
|
popup = _ref2.popup,
|
|
132
132
|
offset = _ref2.offset,
|
|
133
|
-
position = _ref2.position
|
|
134
|
-
|
|
133
|
+
position = _ref2.position,
|
|
134
|
+
boundariesElement = _ref2.boundariesElement;
|
|
135
|
+
var scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
135
136
|
var newPos = _objectSpread({}, position);
|
|
136
137
|
if (scrollParent) {
|
|
137
138
|
var topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
|
|
@@ -153,8 +154,9 @@ var calculateVerticalStickTop = function calculateVerticalStickTop(_ref3) {
|
|
|
153
154
|
popupOffsetParent = _ref3.popupOffsetParent,
|
|
154
155
|
offset = _ref3.offset,
|
|
155
156
|
position = _ref3.position,
|
|
156
|
-
placement = _ref3.placement
|
|
157
|
-
|
|
157
|
+
placement = _ref3.placement,
|
|
158
|
+
boundariesElement = _ref3.boundariesElement;
|
|
159
|
+
var scrollParent = findOverflowScrollParent(target) || boundariesElement;
|
|
158
160
|
var newPos = _objectSpread({}, position);
|
|
159
161
|
if (scrollParent) {
|
|
160
162
|
var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
|
|
@@ -215,7 +217,8 @@ export function calculatePosition(_ref5) {
|
|
|
215
217
|
stick = _ref5.stick,
|
|
216
218
|
_ref5$allowOutOfBound = _ref5.allowOutOfBounds,
|
|
217
219
|
allowOutOfBounds = _ref5$allowOutOfBound === void 0 ? false : _ref5$allowOutOfBound,
|
|
218
|
-
rect = _ref5.rect
|
|
220
|
+
rect = _ref5.rect,
|
|
221
|
+
boundariesElement = _ref5.boundariesElement;
|
|
219
222
|
var position = {};
|
|
220
223
|
if (!target || !popup || !popup.offsetParent) {
|
|
221
224
|
return position;
|
|
@@ -271,7 +274,8 @@ export function calculatePosition(_ref5) {
|
|
|
271
274
|
popup: popup,
|
|
272
275
|
offset: offset,
|
|
273
276
|
position: position,
|
|
274
|
-
placement: verticalPlacement
|
|
277
|
+
placement: verticalPlacement,
|
|
278
|
+
boundariesElement: boundariesElement
|
|
275
279
|
});
|
|
276
280
|
}
|
|
277
281
|
if (verticalPlacement !== 'top' && verticalPlacement !== 'start' && stick) {
|
|
@@ -281,7 +285,8 @@ export function calculatePosition(_ref5) {
|
|
|
281
285
|
targetHeight: targetHeight,
|
|
282
286
|
popup: popup,
|
|
283
287
|
offset: offset,
|
|
284
|
-
position: position
|
|
288
|
+
position: position,
|
|
289
|
+
boundariesElement: boundariesElement
|
|
285
290
|
});
|
|
286
291
|
}
|
|
287
292
|
var horizontalPosition = calculateHorizontalPlacement({
|
|
@@ -316,7 +316,7 @@ export function DropdownMenuItem(_ref) {
|
|
|
316
316
|
// especially when we pass any interactive element as a item.content
|
|
317
317
|
var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
318
318
|
var dropListItem =
|
|
319
|
-
// eslint-disable-next-line
|
|
319
|
+
// eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
|
|
320
320
|
jsx("div", {
|
|
321
321
|
css: function css() {
|
|
322
322
|
return buttonStyles(item.isActive, submenuActive);
|
|
@@ -116,8 +116,6 @@ export declare const TEXT_STYLES_MENU_SECTION_RANK: {
|
|
|
116
116
|
* Text formatting group
|
|
117
117
|
*/
|
|
118
118
|
export declare const TEXT_FORMAT_GROUP_RANK: {
|
|
119
|
-
"bold-button-group": number;
|
|
120
|
-
"underline-button-group": number;
|
|
121
119
|
"text-formatting-hero-button": number;
|
|
122
120
|
"text-formatting-menu": number;
|
|
123
121
|
};
|
|
@@ -6,6 +6,7 @@ export interface Position {
|
|
|
6
6
|
}
|
|
7
7
|
export interface CalculatePositionParams {
|
|
8
8
|
allowOutOfBounds?: boolean;
|
|
9
|
+
boundariesElement?: HTMLElement;
|
|
9
10
|
offset: number[];
|
|
10
11
|
placement: [string, string];
|
|
11
12
|
popup?: HTMLElement;
|
|
@@ -28,7 +29,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
|
|
|
28
29
|
* Calculates relative coordinates for placing popup along with the target.
|
|
29
30
|
* Uses placement from calculatePlacement.
|
|
30
31
|
*/
|
|
31
|
-
export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, }: CalculatePositionParams): Position;
|
|
32
|
+
export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, }: CalculatePositionParams): Position;
|
|
32
33
|
export declare function validatePosition(popup: HTMLElement): boolean;
|
|
33
34
|
/**
|
|
34
35
|
* Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
|
|
@@ -116,8 +116,6 @@ export declare const TEXT_STYLES_MENU_SECTION_RANK: {
|
|
|
116
116
|
* Text formatting group
|
|
117
117
|
*/
|
|
118
118
|
export declare const TEXT_FORMAT_GROUP_RANK: {
|
|
119
|
-
"bold-button-group": number;
|
|
120
|
-
"underline-button-group": number;
|
|
121
119
|
"text-formatting-hero-button": number;
|
|
122
120
|
"text-formatting-menu": number;
|
|
123
121
|
};
|
|
@@ -6,6 +6,7 @@ export interface Position {
|
|
|
6
6
|
}
|
|
7
7
|
export interface CalculatePositionParams {
|
|
8
8
|
allowOutOfBounds?: boolean;
|
|
9
|
+
boundariesElement?: HTMLElement;
|
|
9
10
|
offset: number[];
|
|
10
11
|
placement: [
|
|
11
12
|
string,
|
|
@@ -34,7 +35,7 @@ export declare function calculatePlacement(target: HTMLElement, boundariesElemen
|
|
|
34
35
|
* Calculates relative coordinates for placing popup along with the target.
|
|
35
36
|
* Uses placement from calculatePlacement.
|
|
36
37
|
*/
|
|
37
|
-
export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, }: CalculatePositionParams): Position;
|
|
38
|
+
export declare function calculatePosition({ placement, target, popup, offset, stick, allowOutOfBounds, rect, boundariesElement, }: CalculatePositionParams): Position;
|
|
38
39
|
export declare function validatePosition(popup: HTMLElement): boolean;
|
|
39
40
|
/**
|
|
40
41
|
* Traverse DOM Tree upwards looking for popup parents with "overflow: scroll".
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.9.
|
|
3
|
+
"version": "110.9.3",
|
|
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/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/icon-object": "^7.2.0",
|
|
56
56
|
"@atlaskit/link": "^3.2.0",
|
|
57
57
|
"@atlaskit/link-datasource": "^4.25.0",
|
|
58
|
-
"@atlaskit/link-picker": "^3.
|
|
58
|
+
"@atlaskit/link-picker": "^3.15.0",
|
|
59
59
|
"@atlaskit/media-card": "^79.5.0",
|
|
60
60
|
"@atlaskit/media-client": "^35.5.0",
|
|
61
61
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/media-picker": "^70.0.0",
|
|
65
65
|
"@atlaskit/media-ui": "^28.7.0",
|
|
66
66
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
67
|
-
"@atlaskit/mention": "^24.
|
|
67
|
+
"@atlaskit/mention": "^24.3.0",
|
|
68
68
|
"@atlaskit/menu": "^8.4.0",
|
|
69
69
|
"@atlaskit/onboarding": "^14.4.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/profilecard": "^24.18.0",
|
|
75
75
|
"@atlaskit/react-ufo": "^4.11.0",
|
|
76
76
|
"@atlaskit/section-message": "^8.7.0",
|
|
77
|
-
"@atlaskit/smart-card": "^43.
|
|
77
|
+
"@atlaskit/smart-card": "^43.1.0",
|
|
78
78
|
"@atlaskit/smart-user-picker": "^8.3.0",
|
|
79
79
|
"@atlaskit/spinner": "^19.0.0",
|
|
80
80
|
"@atlaskit/status": "^3.0.0",
|
|
@@ -196,6 +196,9 @@
|
|
|
196
196
|
"platform_editor_renderer_table_header_styles": {
|
|
197
197
|
"type": "boolean"
|
|
198
198
|
},
|
|
199
|
+
"platform_editor_link_popup_position_fix_aifc": {
|
|
200
|
+
"type": "boolean"
|
|
201
|
+
},
|
|
199
202
|
"platform_editor_elements_dnd_multi_select_patch_1": {
|
|
200
203
|
"type": "boolean"
|
|
201
204
|
},
|