@atlaskit/editor-plugin-expand 2.7.1 → 2.7.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,15 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 2.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#141778](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141778)
8
+ [`1c6f578277694`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c6f578277694) -
9
+ ED-24870 & ED-24864 - Add the logic to gate the nested media in quotes functionality behind the
10
+ nest-media-and-codeblock-in-quote experiment. Also adjust the logic so the nested expands are now
11
+ behind the nested-expand-in-expand experiment.
12
+
3
13
  ## 2.7.1
4
14
 
5
15
  ### Patch Changes
@@ -133,8 +133,8 @@ function handleExpandDrag(view, event, slice) {
133
133
  var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
134
134
  var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
135
135
  var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
136
- if ((0, _experiments.editorExperiment)('nested-dnd', false)) {
137
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
136
+ if ((0, _experiments.editorExperiment)('nested-expand-in-expand', false)) {
137
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
138
138
  event.preventDefault();
139
139
  return true;
140
140
  }
@@ -115,8 +115,8 @@ function handleExpandDrag(view, event, slice) {
115
115
  var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
116
116
  var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
117
117
  var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
118
- if ((0, _experiments.editorExperiment)('nested-dnd', false)) {
119
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
118
+ if ((0, _experiments.editorExperiment)('nested-expand-in-expand', false)) {
119
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
120
120
  event.preventDefault();
121
121
  return true;
122
122
  }
@@ -125,8 +125,8 @@ export function handleExpandDrag(view, event, slice) {
125
125
  const dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
126
126
  const nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
127
127
  const isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
128
- if (editorExperiment('nested-dnd', false)) {
129
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
128
+ if (editorExperiment('nested-expand-in-expand', false)) {
129
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
130
130
  event.preventDefault();
131
131
  return true;
132
132
  }
@@ -104,8 +104,8 @@ export function handleExpandDrag(view, event, slice) {
104
104
  const dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
105
105
  const nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
106
106
  const isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
107
- if (editorExperiment('nested-dnd', false)) {
108
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
107
+ if (editorExperiment('nested-expand-in-expand', false)) {
108
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
109
109
  event.preventDefault();
110
110
  return true;
111
111
  }
@@ -124,8 +124,8 @@ export function handleExpandDrag(view, event, slice) {
124
124
  var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
125
125
  var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
126
126
  var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
127
- if (editorExperiment('nested-dnd', false)) {
128
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
127
+ if (editorExperiment('nested-expand-in-expand', false)) {
128
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
129
129
  event.preventDefault();
130
130
  return true;
131
131
  }
@@ -105,8 +105,8 @@ export function handleExpandDrag(view, event, slice) {
105
105
  var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
106
106
  var nodesWithNestedExpandSupport = [state.schema.nodes.expand, state.schema.nodes.tableHeader, state.schema.nodes.tableCell];
107
107
  var isNodeAtDropPosInsideNodesWithNestedExpandSupport = nodesWithNestedExpandSupport.includes(dropLocationNodeType) || nodesWithNestedExpandSupport.includes(dropLocationParentNodeType);
108
- if (editorExperiment('nested-dnd', false)) {
109
- if ((sliceContainsExpand || sliceContainsNestedExpand) && isNodeAtDropPosInsideNodesWithNestedExpandSupport) {
108
+ if (editorExperiment('nested-expand-in-expand', false)) {
109
+ if ((sliceContainsExpand || sliceContainsNestedExpand) && (dropLocationNodeType === state.schema.nodes.expand || dropLocationParentNodeType === state.schema.nodes.expand)) {
110
110
  event.preventDefault();
111
111
  return true;
112
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",