@atlaskit/editor-plugin-block-controls 2.13.25 → 2.13.26
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 2.13.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168770](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168770)
|
|
8
|
+
[`0107980b9bac7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0107980b9bac7) -
|
|
9
|
+
ED-25623 Fix drag handle alignment when inline extension is nested inside table
|
|
10
|
+
|
|
3
11
|
## 2.13.25
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -277,6 +277,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
277
277
|
var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
|
|
278
278
|
var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
|
|
279
279
|
var isEmbedCard = nodeType === 'embedCard';
|
|
280
|
+
var isMacroInteractionUpdates = (0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_5') ? macroInteractionUpdates && isExtension : macroInteractionUpdates;
|
|
280
281
|
var innerContainer = null;
|
|
281
282
|
if (dom) {
|
|
282
283
|
if (isEmbedCard) {
|
|
@@ -293,12 +294,12 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
293
294
|
var isEdgeCase = (hasResizer || isExtension || isEmbedCard || isBlockCard) && innerContainer;
|
|
294
295
|
if (supportsAnchor) {
|
|
295
296
|
return {
|
|
296
|
-
left: isEdgeCase ? "calc(anchor(".concat(anchorName, " start) + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer,
|
|
297
|
+
left: isEdgeCase ? "calc(anchor(".concat(anchorName, " start) + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : (0, _advancedLayoutsFlags.isPreRelease2)() && isLayoutColumn ? "calc((anchor(".concat(anchorName, " right) + anchor(").concat(anchorName, " left))/2 - ").concat(_consts.DRAG_HANDLE_HEIGHT / 2, "px)") : "calc(anchor(".concat(anchorName, " start) - ").concat(_consts.DRAG_HANDLE_WIDTH, "px - ").concat((0, _consts.dragHandleGap)(nodeType, parentNodeType), "px)"),
|
|
297
298
|
top: (0, _advancedLayoutsFlags.isPreRelease2)() && isLayoutColumn ? "calc(anchor(".concat(anchorName, " top) - ").concat(_consts.DRAG_HANDLE_WIDTH, "px)") : (0, _platformFeatureFlags.fg)('platform_editor_elements_dnd_ed_23674') ? "calc(anchor(".concat(anchorName, " start) + ").concat((0, _consts.topPositionAdjustment)(nodeType), "px)") : anchorName.includes('table') ? "calc(anchor(".concat(anchorName, " start) + ").concat(_consts.DRAG_HANDLE_HEIGHT, "px)") : "anchor(".concat(anchorName, " start)")
|
|
298
299
|
};
|
|
299
300
|
}
|
|
300
301
|
return {
|
|
301
|
-
left: isEdgeCase ? "calc(".concat((dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0, "px + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer,
|
|
302
|
+
left: isEdgeCase ? "calc(".concat((dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0, "px + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : (0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType),
|
|
302
303
|
top: (0, _platformFeatureFlags.fg)('platform_editor_elements_dnd_ed_23674') ? (0, _dragHandlePositions.getTopPosition)(dom, nodeType) : (0, _dragHandlePositions.getTopPosition)(dom)
|
|
303
304
|
};
|
|
304
305
|
}, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates, getPos, isLayoutColumn]);
|
|
@@ -261,6 +261,7 @@ export const DragHandle = ({
|
|
|
261
261
|
const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
|
|
262
262
|
const isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
|
|
263
263
|
const isEmbedCard = nodeType === 'embedCard';
|
|
264
|
+
const isMacroInteractionUpdates = fg('platform_editor_element_dnd_nested_fix_patch_5') ? macroInteractionUpdates && isExtension : macroInteractionUpdates;
|
|
264
265
|
let innerContainer = null;
|
|
265
266
|
if (dom) {
|
|
266
267
|
if (isEmbedCard) {
|
|
@@ -277,12 +278,12 @@ export const DragHandle = ({
|
|
|
277
278
|
const isEdgeCase = (hasResizer || isExtension || isEmbedCard || isBlockCard) && innerContainer;
|
|
278
279
|
if (supportsAnchor) {
|
|
279
280
|
return {
|
|
280
|
-
left: isEdgeCase ? `calc(anchor(${anchorName} start) + ${getLeftPosition(dom, nodeType, innerContainer,
|
|
281
|
+
left: isEdgeCase ? `calc(anchor(${anchorName} start) + ${getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType)})` : isPreRelease2() && isLayoutColumn ? `calc((anchor(${anchorName} right) + anchor(${anchorName} left))/2 - ${DRAG_HANDLE_HEIGHT / 2}px)` : `calc(anchor(${anchorName} start) - ${DRAG_HANDLE_WIDTH}px - ${dragHandleGap(nodeType, parentNodeType)}px)`,
|
|
281
282
|
top: isPreRelease2() && isLayoutColumn ? `calc(anchor(${anchorName} top) - ${DRAG_HANDLE_WIDTH}px)` : fg('platform_editor_elements_dnd_ed_23674') ? `calc(anchor(${anchorName} start) + ${topPositionAdjustment(nodeType)}px)` : anchorName.includes('table') ? `calc(anchor(${anchorName} start) + ${DRAG_HANDLE_HEIGHT}px)` : `anchor(${anchorName} start)`
|
|
282
283
|
};
|
|
283
284
|
}
|
|
284
285
|
return {
|
|
285
|
-
left: isEdgeCase ? `calc(${(dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0}px + ${getLeftPosition(dom, nodeType, innerContainer,
|
|
286
|
+
left: isEdgeCase ? `calc(${(dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0}px + ${getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType)})` : getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType),
|
|
286
287
|
top: fg('platform_editor_elements_dnd_ed_23674') ? getTopPosition(dom, nodeType) : getTopPosition(dom)
|
|
287
288
|
};
|
|
288
289
|
}, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates, getPos, isLayoutColumn]);
|
|
@@ -268,6 +268,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
268
268
|
var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
|
|
269
269
|
var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
|
|
270
270
|
var isEmbedCard = nodeType === 'embedCard';
|
|
271
|
+
var isMacroInteractionUpdates = fg('platform_editor_element_dnd_nested_fix_patch_5') ? macroInteractionUpdates && isExtension : macroInteractionUpdates;
|
|
271
272
|
var innerContainer = null;
|
|
272
273
|
if (dom) {
|
|
273
274
|
if (isEmbedCard) {
|
|
@@ -284,12 +285,12 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
284
285
|
var isEdgeCase = (hasResizer || isExtension || isEmbedCard || isBlockCard) && innerContainer;
|
|
285
286
|
if (supportsAnchor) {
|
|
286
287
|
return {
|
|
287
|
-
left: isEdgeCase ? "calc(anchor(".concat(anchorName, " start) + ").concat(getLeftPosition(dom, nodeType, innerContainer,
|
|
288
|
+
left: isEdgeCase ? "calc(anchor(".concat(anchorName, " start) + ").concat(getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : isPreRelease2() && isLayoutColumn ? "calc((anchor(".concat(anchorName, " right) + anchor(").concat(anchorName, " left))/2 - ").concat(DRAG_HANDLE_HEIGHT / 2, "px)") : "calc(anchor(".concat(anchorName, " start) - ").concat(DRAG_HANDLE_WIDTH, "px - ").concat(dragHandleGap(nodeType, parentNodeType), "px)"),
|
|
288
289
|
top: isPreRelease2() && isLayoutColumn ? "calc(anchor(".concat(anchorName, " top) - ").concat(DRAG_HANDLE_WIDTH, "px)") : fg('platform_editor_elements_dnd_ed_23674') ? "calc(anchor(".concat(anchorName, " start) + ").concat(topPositionAdjustment(nodeType), "px)") : anchorName.includes('table') ? "calc(anchor(".concat(anchorName, " start) + ").concat(DRAG_HANDLE_HEIGHT, "px)") : "anchor(".concat(anchorName, " start)")
|
|
289
290
|
};
|
|
290
291
|
}
|
|
291
292
|
return {
|
|
292
|
-
left: isEdgeCase ? "calc(".concat((dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0, "px + ").concat(getLeftPosition(dom, nodeType, innerContainer,
|
|
293
|
+
left: isEdgeCase ? "calc(".concat((dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0, "px + ").concat(getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : getLeftPosition(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType),
|
|
293
294
|
top: fg('platform_editor_elements_dnd_ed_23674') ? getTopPosition(dom, nodeType) : getTopPosition(dom)
|
|
294
295
|
};
|
|
295
296
|
}, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates, getPos, isLayoutColumn]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.26",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -142,6 +142,9 @@
|
|
|
142
142
|
"platform_editor_element_dnd_nested_fix_patch_4": {
|
|
143
143
|
"type": "boolean"
|
|
144
144
|
},
|
|
145
|
+
"platform_editor_element_dnd_nested_fix_patch_5": {
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
},
|
|
145
148
|
"platform_editor_element_dnd_nested_type_error_fix": {
|
|
146
149
|
"type": "boolean"
|
|
147
150
|
},
|