@atlaskit/editor-plugin-block-controls 7.5.1 → 7.5.2
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
|
+
## 7.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`75b45f2248329`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/75b45f2248329) -
|
|
8
|
+
FG cleanup platform_editor_elements_dnd_multi_select_patch_2
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.5.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -260,13 +260,10 @@ var moveNodeViaShortcut = exports.moveNodeViaShortcut = function moveNodeViaShor
|
|
|
260
260
|
}
|
|
261
261
|
var nodeType = (_state$doc$nodeAt = state.doc.nodeAt(currentNodePos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.type.name;
|
|
262
262
|
var shouldMoveNode = false;
|
|
263
|
-
if (moveToPos > -1
|
|
263
|
+
if (moveToPos > -1) {
|
|
264
264
|
var isDestDepthSameAsSource = $currentNodePos.depth === state.doc.resolve(moveToPos).depth;
|
|
265
265
|
var isSourceLayoutColumn = nodeType === 'layoutColumn';
|
|
266
266
|
shouldMoveNode = isDestDepthSameAsSource || isSourceLayoutColumn;
|
|
267
|
-
} else {
|
|
268
|
-
// only move the node if the destination is at the same depth, not support moving a nested node to a parent node
|
|
269
|
-
shouldMoveNode = moveToPos > -1 && $currentNodePos.depth === state.doc.resolve(moveToPos).depth || nodeType === 'layoutColumn';
|
|
270
267
|
}
|
|
271
268
|
var _expandSelectionBound = (0, _selection.expandSelectionBounds)($currentNodePos, selection.$to),
|
|
272
269
|
$newAnchor = _expandSelectionBound.$anchor,
|
|
@@ -318,7 +315,7 @@ var moveNode = exports.moveNode = function moveNode(api) {
|
|
|
318
315
|
return function (_ref7) {
|
|
319
316
|
var _api$blockControls$co, _api$accessibilityUti;
|
|
320
317
|
var tr = _ref7.tr;
|
|
321
|
-
if (!api ||
|
|
318
|
+
if (!api || start < 0 || to < 0) {
|
|
322
319
|
return tr;
|
|
323
320
|
}
|
|
324
321
|
var handleNode = tr.doc.nodeAt(start);
|
|
@@ -260,13 +260,10 @@ export const moveNodeViaShortcut = (api, direction, formatMessage) => {
|
|
|
260
260
|
}
|
|
261
261
|
const nodeType = (_state$doc$nodeAt = state.doc.nodeAt(currentNodePos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.type.name;
|
|
262
262
|
let shouldMoveNode = false;
|
|
263
|
-
if (moveToPos > -1
|
|
263
|
+
if (moveToPos > -1) {
|
|
264
264
|
const isDestDepthSameAsSource = $currentNodePos.depth === state.doc.resolve(moveToPos).depth;
|
|
265
265
|
const isSourceLayoutColumn = nodeType === 'layoutColumn';
|
|
266
266
|
shouldMoveNode = isDestDepthSameAsSource || isSourceLayoutColumn;
|
|
267
|
-
} else {
|
|
268
|
-
// only move the node if the destination is at the same depth, not support moving a nested node to a parent node
|
|
269
|
-
shouldMoveNode = moveToPos > -1 && $currentNodePos.depth === state.doc.resolve(moveToPos).depth || nodeType === 'layoutColumn';
|
|
270
267
|
}
|
|
271
268
|
const {
|
|
272
269
|
$anchor: $newAnchor,
|
|
@@ -319,7 +316,7 @@ export const moveNode = api => (start, to, inputMethod = INPUT_METHOD.DRAG_AND_D
|
|
|
319
316
|
tr
|
|
320
317
|
}) => {
|
|
321
318
|
var _api$blockControls$co2, _api$accessibilityUti;
|
|
322
|
-
if (!api ||
|
|
319
|
+
if (!api || start < 0 || to < 0) {
|
|
323
320
|
return tr;
|
|
324
321
|
}
|
|
325
322
|
const handleNode = tr.doc.nodeAt(start);
|
|
@@ -254,13 +254,10 @@ export var moveNodeViaShortcut = function moveNodeViaShortcut(api, direction, fo
|
|
|
254
254
|
}
|
|
255
255
|
var nodeType = (_state$doc$nodeAt = state.doc.nodeAt(currentNodePos)) === null || _state$doc$nodeAt === void 0 ? void 0 : _state$doc$nodeAt.type.name;
|
|
256
256
|
var shouldMoveNode = false;
|
|
257
|
-
if (moveToPos > -1
|
|
257
|
+
if (moveToPos > -1) {
|
|
258
258
|
var isDestDepthSameAsSource = $currentNodePos.depth === state.doc.resolve(moveToPos).depth;
|
|
259
259
|
var isSourceLayoutColumn = nodeType === 'layoutColumn';
|
|
260
260
|
shouldMoveNode = isDestDepthSameAsSource || isSourceLayoutColumn;
|
|
261
|
-
} else {
|
|
262
|
-
// only move the node if the destination is at the same depth, not support moving a nested node to a parent node
|
|
263
|
-
shouldMoveNode = moveToPos > -1 && $currentNodePos.depth === state.doc.resolve(moveToPos).depth || nodeType === 'layoutColumn';
|
|
264
261
|
}
|
|
265
262
|
var _expandSelectionBound = expandSelectionBounds($currentNodePos, selection.$to),
|
|
266
263
|
$newAnchor = _expandSelectionBound.$anchor,
|
|
@@ -312,7 +309,7 @@ export var moveNode = function moveNode(api) {
|
|
|
312
309
|
return function (_ref7) {
|
|
313
310
|
var _api$blockControls$co, _api$accessibilityUti;
|
|
314
311
|
var tr = _ref7.tr;
|
|
315
|
-
if (!api ||
|
|
312
|
+
if (!api || start < 0 || to < 0) {
|
|
316
313
|
return tr;
|
|
317
314
|
}
|
|
318
315
|
var handleNode = tr.doc.nodeAt(start);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.2",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-feature-flags": "^5.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-interaction": "^9.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-limited-mode": "^3.
|
|
37
|
+
"@atlaskit/editor-plugin-limited-mode": "^3.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-metrics": "^7.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-quick-insert": "^6.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
54
|
-
"@atlaskit/primitives": "^16.
|
|
54
|
+
"@atlaskit/primitives": "^16.1.0",
|
|
55
55
|
"@atlaskit/theme": "^21.0.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^13.25.0",
|
|
57
57
|
"@atlaskit/tokens": "^7.0.0",
|
|
58
|
-
"@atlaskit/tooltip": "^20.
|
|
58
|
+
"@atlaskit/tooltip": "^20.7.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
60
60
|
"@emotion/react": "^11.7.1",
|
|
61
61
|
"@popperjs/core": "^2.11.8",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"uuid": "^3.1.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@atlaskit/editor-common": "^110.
|
|
68
|
+
"@atlaskit/editor-common": "^110.20.0",
|
|
69
69
|
"react": "^18.2.0",
|
|
70
70
|
"react-dom": "^18.2.0",
|
|
71
71
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -124,9 +124,6 @@
|
|
|
124
124
|
"platform_editor_ease_of_use_metrics": {
|
|
125
125
|
"type": "boolean"
|
|
126
126
|
},
|
|
127
|
-
"platform_editor_elements_dnd_multi_select_patch_2": {
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
127
|
"platform_editor_multi_body_extension_extensibility": {
|
|
131
128
|
"type": "boolean"
|
|
132
129
|
},
|