@atlaskit/editor-plugin-block-controls 2.25.0 → 2.26.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 2.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#111831](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111831)
8
+ [`66895944dfac9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66895944dfac9) -
9
+ [ED-26430] Block drag-and-drop of legacy content macro extension
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 2.25.0
4
16
 
5
17
  ### Minor Changes
@@ -28,12 +28,17 @@ var shouldDescendIntoNode = exports.shouldDescendIntoNode = function shouldDesce
28
28
  return !IGNORE_NODE_DESCENDANTS.includes(node.type.name);
29
29
  };
30
30
  var shouldIgnoreNode = function shouldIgnoreNode(node, ignore_nodes, depth, parent) {
31
+ var _node$attrs, _node$attrs2;
31
32
  var isEmbedCard = node.type.name === 'embedCard';
32
33
  var isMediaSingle = node.type.name === 'mediaSingle';
33
34
  var isFirstTableRow = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'table' && depth === 1 && node === parent.firstChild && 'tableRow' === node.type.name && (0, _experiments.editorExperiment)('advanced_layouts', true);
34
35
  if (isFirstTableRow) {
35
36
  return false;
36
37
  }
38
+ var isLegacyContentMacroExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionKey) === 'legacy-content';
39
+ if (isLegacyContentMacroExtension) {
40
+ return true;
41
+ }
37
42
  return (isEmbedCard || isMediaSingle) && ['wrap-right', 'wrap-left'].includes(node.attrs.layout) ? true : ignore_nodes.includes(node.type.name);
38
43
  };
39
44
 
@@ -20,12 +20,17 @@ export const shouldDescendIntoNode = node => {
20
20
  return !IGNORE_NODE_DESCENDANTS.includes(node.type.name);
21
21
  };
22
22
  const shouldIgnoreNode = (node, ignore_nodes, depth, parent) => {
23
+ var _node$attrs, _node$attrs2;
23
24
  const isEmbedCard = node.type.name === 'embedCard';
24
25
  const isMediaSingle = node.type.name === 'mediaSingle';
25
26
  const isFirstTableRow = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'table' && depth === 1 && node === parent.firstChild && 'tableRow' === node.type.name && editorExperiment('advanced_layouts', true);
26
27
  if (isFirstTableRow) {
27
28
  return false;
28
29
  }
30
+ const isLegacyContentMacroExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionKey) === 'legacy-content';
31
+ if (isLegacyContentMacroExtension) {
32
+ return true;
33
+ }
29
34
  return (isEmbedCard || isMediaSingle) && ['wrap-right', 'wrap-left'].includes(node.attrs.layout) ? true : ignore_nodes.includes(node.type.name);
30
35
  };
31
36
 
@@ -21,12 +21,17 @@ export var shouldDescendIntoNode = function shouldDescendIntoNode(node) {
21
21
  return !IGNORE_NODE_DESCENDANTS.includes(node.type.name);
22
22
  };
23
23
  var shouldIgnoreNode = function shouldIgnoreNode(node, ignore_nodes, depth, parent) {
24
+ var _node$attrs, _node$attrs2;
24
25
  var isEmbedCard = node.type.name === 'embedCard';
25
26
  var isMediaSingle = node.type.name === 'mediaSingle';
26
27
  var isFirstTableRow = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'table' && depth === 1 && node === parent.firstChild && 'tableRow' === node.type.name && editorExperiment('advanced_layouts', true);
27
28
  if (isFirstTableRow) {
28
29
  return false;
29
30
  }
31
+ var isLegacyContentMacroExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionKey) === 'legacy-content';
32
+ if (isLegacyContentMacroExtension) {
33
+ return true;
34
+ }
30
35
  return (isEmbedCard || isMediaSingle) && ['wrap-right', 'wrap-left'].includes(node.attrs.layout) ? true : ignore_nodes.includes(node.type.name);
31
36
  };
32
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "2.25.0",
3
+ "version": "2.26.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/adf-schema": "^46.1.0",
34
- "@atlaskit/editor-common": "^99.11.0",
34
+ "@atlaskit/editor-common": "^99.12.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.4.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.12.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.5.0",
@@ -42,14 +42,14 @@
42
42
  "@atlaskit/editor-prosemirror": "7.0.0",
43
43
  "@atlaskit/editor-shared-styles": "^3.2.0",
44
44
  "@atlaskit/editor-tables": "^2.9.0",
45
- "@atlaskit/icon": "^23.7.0",
45
+ "@atlaskit/icon": "^23.8.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.0.0",
47
47
  "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
48
48
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
49
49
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.2.0",
50
50
  "@atlaskit/primitives": "^13.5.0",
51
51
  "@atlaskit/theme": "^15.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^2.44.0",
52
+ "@atlaskit/tmp-editor-statsig": "^2.45.0",
53
53
  "@atlaskit/tokens": "^3.3.0",
54
54
  "@atlaskit/tooltip": "^19.1.0",
55
55
  "@babel/runtime": "^7.0.0",